@gravionlabs/helix-ui 22.2.6 → 22.2.8
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/README.md +18 -1
- package/chart/package.json +4 -0
- package/core.css +4082 -0
- package/fesm2022/gravionlabs-helix-ui-chart.mjs +446 -0
- package/fesm2022/gravionlabs-helix-ui-chart.mjs.map +1 -0
- package/fesm2022/gravionlabs-helix-ui.mjs +464 -466
- package/fesm2022/gravionlabs-helix-ui.mjs.map +1 -1
- package/package.json +6 -1
- package/styles.css +91 -0
- package/types/gravionlabs-helix-ui-chart.d.ts +134 -0
- package/types/gravionlabs-helix-ui.d.ts +252 -237
|
@@ -2,7 +2,7 @@ import * as i1 from "@angular/cdk/accordion";
|
|
|
2
2
|
import { CdkAccordion, CdkAccordionItem } from "@angular/cdk/accordion";
|
|
3
3
|
import { DOCUMENT, NgComponentOutlet, NgStyle, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector,
|
|
5
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, PLATFORM_ID, TemplateRef, afterEveryRender, afterNextRender, booleanAttribute, computed, contentChild, contentChildren, effect, forwardRef, inject, input, isDevMode, makeEnvironmentProviders, model, numberAttribute, output, provideEnvironmentInitializer, signal, untracked, viewChild } from "@angular/core";
|
|
6
6
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
7
7
|
import { CdkConnectedOverlay, CdkOverlayOrigin, Overlay } from "@angular/cdk/overlay";
|
|
8
8
|
import { NG_VALUE_ACCESSOR, NgControl } from "@angular/forms";
|
|
@@ -2614,446 +2614,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2614
2614
|
}]
|
|
2615
2615
|
}
|
|
2616
2616
|
});
|
|
2617
|
-
const HX_CHART_LOADER = new InjectionToken("HX_CHART_LOADER", {
|
|
2618
|
-
providedIn: "root",
|
|
2619
|
-
factory: () => () => import("chart.js/auto")
|
|
2620
|
-
});
|
|
2621
|
-
const PALETTE = [
|
|
2622
|
-
"--h-primary-color",
|
|
2623
|
-
"--h-orange-500",
|
|
2624
|
-
"--h-green-500",
|
|
2625
|
-
"--h-purple-500",
|
|
2626
|
-
"--h-sky-500",
|
|
2627
|
-
"--h-red-500",
|
|
2628
|
-
"--h-yellow-500",
|
|
2629
|
-
"--h-teal-500"
|
|
2630
|
-
];
|
|
2631
|
-
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2632
|
-
function merge(defaults, overrides) {
|
|
2633
|
-
const out = { ...defaults };
|
|
2634
|
-
for (const [key, value] of Object.entries(overrides)) {
|
|
2635
|
-
const base = out[key];
|
|
2636
|
-
out[key] = isObject(base) && isObject(value) ? merge(base, value) : value;
|
|
2637
|
-
}
|
|
2638
|
-
return out;
|
|
2639
|
-
}
|
|
2640
|
-
var HxChart = class HxChart {
|
|
2641
|
-
#host = inject(ElementRef).nativeElement;
|
|
2642
|
-
#zone = inject(NgZone);
|
|
2643
|
-
#loader = inject(HX_CHART_LOADER);
|
|
2644
|
-
#platform = inject(PLATFORM_ID);
|
|
2645
|
-
canvas = viewChild.required("canvas", ...ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []);
|
|
2646
|
-
type = input("bar", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
|
|
2647
|
-
data = input({}, ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
2648
|
-
options = input({}, ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
2649
|
-
plugins = input([], ...ngDevMode ? [{ debugName: "plugins" }] : /* istanbul ignore next */ []);
|
|
2650
|
-
width = input(...ngDevMode ? [void 0, { debugName: "width" }] : /* istanbul ignore next */ []);
|
|
2651
|
-
height = input(...ngDevMode ? [void 0, { debugName: "height" }] : /* istanbul ignore next */ []);
|
|
2652
|
-
responsive = input(true, {
|
|
2653
|
-
...ngDevMode ? { debugName: "responsive" } : /* istanbul ignore next */ {},
|
|
2654
|
-
transform: (v) => v !== false && v !== "false"
|
|
2655
|
-
});
|
|
2656
|
-
ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
2657
|
-
ariaLabelledBy = input(...ngDevMode ? [void 0, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
2658
|
-
themeDelay = input(50, {
|
|
2659
|
-
...ngDevMode ? { debugName: "themeDelay" } : /* istanbul ignore next */ {},
|
|
2660
|
-
transform: numberAttribute
|
|
2661
|
-
});
|
|
2662
|
-
dataSelect = output();
|
|
2663
|
-
#chart;
|
|
2664
|
-
#chartType;
|
|
2665
|
-
#ready = false;
|
|
2666
|
-
#loading = false;
|
|
2667
|
-
#observer;
|
|
2668
|
-
#timer;
|
|
2669
|
-
constructor() {
|
|
2670
|
-
afterNextRender(() => {
|
|
2671
|
-
this.#ready = true;
|
|
2672
|
-
this.#render();
|
|
2673
|
-
this.#watchTheme();
|
|
2674
|
-
});
|
|
2675
|
-
effect(() => {
|
|
2676
|
-
this.type();
|
|
2677
|
-
this.data();
|
|
2678
|
-
this.options();
|
|
2679
|
-
this.plugins();
|
|
2680
|
-
this.responsive();
|
|
2681
|
-
this.width();
|
|
2682
|
-
this.height();
|
|
2683
|
-
untracked(() => {
|
|
2684
|
-
if (this.#ready) this.#render();
|
|
2685
|
-
});
|
|
2686
|
-
});
|
|
2687
|
-
inject(DestroyRef).onDestroy(() => {
|
|
2688
|
-
clearTimeout(this.#timer);
|
|
2689
|
-
this.#observer?.disconnect();
|
|
2690
|
-
this.#chart?.destroy();
|
|
2691
|
-
this.#chart = void 0;
|
|
2692
|
-
this.#ready = false;
|
|
2693
|
-
});
|
|
2694
|
-
}
|
|
2695
|
-
get chart() {
|
|
2696
|
-
return this.#chart;
|
|
2697
|
-
}
|
|
2698
|
-
refresh() {
|
|
2699
|
-
if (this.#chart) {
|
|
2700
|
-
this.#apply(this.#chart);
|
|
2701
|
-
this.#chart.update();
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
onClick(event) {
|
|
2705
|
-
const chart = this.#chart;
|
|
2706
|
-
if (!chart) return;
|
|
2707
|
-
const element = chart.getElementsAtEventForMode(event, "nearest", { intersect: true }, false);
|
|
2708
|
-
const dataset = chart.getElementsAtEventForMode(event, "dataset", { intersect: true }, false);
|
|
2709
|
-
if (element?.[0] && dataset) this.dataSelect.emit({
|
|
2710
|
-
originalEvent: event,
|
|
2711
|
-
element: element[0],
|
|
2712
|
-
dataset
|
|
2713
|
-
});
|
|
2714
|
-
}
|
|
2715
|
-
async #render() {
|
|
2716
|
-
if (!isPlatformBrowser(this.#platform)) return;
|
|
2717
|
-
const type = this.type();
|
|
2718
|
-
if (this.#chart && this.#chartType === type) {
|
|
2719
|
-
this.#apply(this.#chart);
|
|
2720
|
-
this.#chart.update();
|
|
2721
|
-
return;
|
|
2722
|
-
}
|
|
2723
|
-
if (this.#loading) return;
|
|
2724
|
-
this.#loading = true;
|
|
2725
|
-
try {
|
|
2726
|
-
const module = await this.#loader();
|
|
2727
|
-
if (!this.#ready) return;
|
|
2728
|
-
this.#chart?.destroy();
|
|
2729
|
-
const Chart = module.default;
|
|
2730
|
-
this.#zone.runOutsideAngular(() => {
|
|
2731
|
-
this.#chart = new Chart(this.canvas().nativeElement, {
|
|
2732
|
-
type: this.type(),
|
|
2733
|
-
data: this.#themedData(),
|
|
2734
|
-
options: this.#themedOptions(),
|
|
2735
|
-
plugins: [...this.plugins()]
|
|
2736
|
-
});
|
|
2737
|
-
});
|
|
2738
|
-
this.#chartType = this.type();
|
|
2739
|
-
} catch (error) {
|
|
2740
|
-
console.error("hx-chart: chart.js could not be loaded. Is the peer dependency \"chart.js\" installed?", error);
|
|
2741
|
-
return;
|
|
2742
|
-
} finally {
|
|
2743
|
-
this.#loading = false;
|
|
2744
|
-
}
|
|
2745
|
-
if (this.#chart && this.#chartType !== this.type()) await this.#render();
|
|
2746
|
-
}
|
|
2747
|
-
#apply(chart) {
|
|
2748
|
-
chart.data = this.#themedData();
|
|
2749
|
-
chart.options = this.#themedOptions();
|
|
2750
|
-
}
|
|
2751
|
-
#token(name) {
|
|
2752
|
-
return getComputedStyle(this.#host).getPropertyValue(name).trim();
|
|
2753
|
-
}
|
|
2754
|
-
#themedData() {
|
|
2755
|
-
const data = this.data();
|
|
2756
|
-
const datasets = data.datasets;
|
|
2757
|
-
if (!Array.isArray(datasets)) return data;
|
|
2758
|
-
const palette = PALETTE.map((name) => this.#token(name)).filter(Boolean);
|
|
2759
|
-
if (palette.length === 0) return data;
|
|
2760
|
-
const perPoint = [
|
|
2761
|
-
"pie",
|
|
2762
|
-
"doughnut",
|
|
2763
|
-
"polarArea"
|
|
2764
|
-
].includes(this.type());
|
|
2765
|
-
return {
|
|
2766
|
-
...data,
|
|
2767
|
-
datasets: datasets.map((dataset, i) => {
|
|
2768
|
-
if (!isObject(dataset)) return dataset;
|
|
2769
|
-
const color = palette[i % palette.length];
|
|
2770
|
-
const count = Array.isArray(dataset.data) ? dataset.data.length : 0;
|
|
2771
|
-
const points = Array.from({ length: count }, (_, n) => palette[n % palette.length]);
|
|
2772
|
-
const filled = this.type() === "line" || this.type() === "radar";
|
|
2773
|
-
return {
|
|
2774
|
-
...dataset,
|
|
2775
|
-
backgroundColor: dataset.backgroundColor ?? (perPoint ? points : filled ? `color-mix(in srgb, ${color}, transparent 80%)` : color),
|
|
2776
|
-
borderColor: dataset.borderColor ?? (perPoint ? this.#token("--h-content-background") : color)
|
|
2777
|
-
};
|
|
2778
|
-
})
|
|
2779
|
-
};
|
|
2780
|
-
}
|
|
2781
|
-
#themedOptions() {
|
|
2782
|
-
const text = this.#token("--h-text-color");
|
|
2783
|
-
const muted = this.#token("--h-text-muted-color");
|
|
2784
|
-
const grid = this.#token("--h-content-border-color");
|
|
2785
|
-
const axis = {
|
|
2786
|
-
ticks: { color: muted },
|
|
2787
|
-
grid: { color: grid },
|
|
2788
|
-
border: { color: grid }
|
|
2789
|
-
};
|
|
2790
|
-
const radial = {
|
|
2791
|
-
ticks: {
|
|
2792
|
-
color: muted,
|
|
2793
|
-
backdropColor: "transparent"
|
|
2794
|
-
},
|
|
2795
|
-
grid: { color: grid },
|
|
2796
|
-
angleLines: { color: grid },
|
|
2797
|
-
pointLabels: { color: text }
|
|
2798
|
-
};
|
|
2799
|
-
const type = this.type();
|
|
2800
|
-
const scales = type === "radar" || type === "polarArea" ? { r: radial } : type === "pie" || type === "doughnut" ? {} : {
|
|
2801
|
-
x: axis,
|
|
2802
|
-
y: axis
|
|
2803
|
-
};
|
|
2804
|
-
return merge({
|
|
2805
|
-
responsive: this.responsive(),
|
|
2806
|
-
maintainAspectRatio: !(this.height() || this.width()),
|
|
2807
|
-
color: muted,
|
|
2808
|
-
borderColor: grid,
|
|
2809
|
-
plugins: { legend: { labels: { color: text } } },
|
|
2810
|
-
scales
|
|
2811
|
-
}, this.options());
|
|
2812
|
-
}
|
|
2813
|
-
#watchTheme() {
|
|
2814
|
-
if (typeof MutationObserver === "undefined") return;
|
|
2815
|
-
this.#observer = new MutationObserver(() => {
|
|
2816
|
-
clearTimeout(this.#timer);
|
|
2817
|
-
this.#timer = setTimeout(() => this.refresh(), this.themeDelay());
|
|
2818
|
-
});
|
|
2819
|
-
this.#observer.observe(document.documentElement, {
|
|
2820
|
-
attributes: true,
|
|
2821
|
-
attributeFilter: [
|
|
2822
|
-
"class",
|
|
2823
|
-
"style",
|
|
2824
|
-
"data-theme"
|
|
2825
|
-
]
|
|
2826
|
-
});
|
|
2827
|
-
}
|
|
2828
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2829
|
-
minVersion: "12.0.0",
|
|
2830
|
-
version: "22.2.1",
|
|
2831
|
-
ngImport: i0,
|
|
2832
|
-
type: HxChart,
|
|
2833
|
-
deps: [],
|
|
2834
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
2835
|
-
});
|
|
2836
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2837
|
-
minVersion: "17.2.0",
|
|
2838
|
-
version: "22.2.1",
|
|
2839
|
-
type: HxChart,
|
|
2840
|
-
isStandalone: true,
|
|
2841
|
-
selector: "hx-chart",
|
|
2842
|
-
inputs: {
|
|
2843
|
-
type: {
|
|
2844
|
-
classPropertyName: "type",
|
|
2845
|
-
publicName: "type",
|
|
2846
|
-
isSignal: true,
|
|
2847
|
-
isRequired: false,
|
|
2848
|
-
transformFunction: null
|
|
2849
|
-
},
|
|
2850
|
-
data: {
|
|
2851
|
-
classPropertyName: "data",
|
|
2852
|
-
publicName: "data",
|
|
2853
|
-
isSignal: true,
|
|
2854
|
-
isRequired: false,
|
|
2855
|
-
transformFunction: null
|
|
2856
|
-
},
|
|
2857
|
-
options: {
|
|
2858
|
-
classPropertyName: "options",
|
|
2859
|
-
publicName: "options",
|
|
2860
|
-
isSignal: true,
|
|
2861
|
-
isRequired: false,
|
|
2862
|
-
transformFunction: null
|
|
2863
|
-
},
|
|
2864
|
-
plugins: {
|
|
2865
|
-
classPropertyName: "plugins",
|
|
2866
|
-
publicName: "plugins",
|
|
2867
|
-
isSignal: true,
|
|
2868
|
-
isRequired: false,
|
|
2869
|
-
transformFunction: null
|
|
2870
|
-
},
|
|
2871
|
-
width: {
|
|
2872
|
-
classPropertyName: "width",
|
|
2873
|
-
publicName: "width",
|
|
2874
|
-
isSignal: true,
|
|
2875
|
-
isRequired: false,
|
|
2876
|
-
transformFunction: null
|
|
2877
|
-
},
|
|
2878
|
-
height: {
|
|
2879
|
-
classPropertyName: "height",
|
|
2880
|
-
publicName: "height",
|
|
2881
|
-
isSignal: true,
|
|
2882
|
-
isRequired: false,
|
|
2883
|
-
transformFunction: null
|
|
2884
|
-
},
|
|
2885
|
-
responsive: {
|
|
2886
|
-
classPropertyName: "responsive",
|
|
2887
|
-
publicName: "responsive",
|
|
2888
|
-
isSignal: true,
|
|
2889
|
-
isRequired: false,
|
|
2890
|
-
transformFunction: null
|
|
2891
|
-
},
|
|
2892
|
-
ariaLabel: {
|
|
2893
|
-
classPropertyName: "ariaLabel",
|
|
2894
|
-
publicName: "ariaLabel",
|
|
2895
|
-
isSignal: true,
|
|
2896
|
-
isRequired: false,
|
|
2897
|
-
transformFunction: null
|
|
2898
|
-
},
|
|
2899
|
-
ariaLabelledBy: {
|
|
2900
|
-
classPropertyName: "ariaLabelledBy",
|
|
2901
|
-
publicName: "ariaLabelledBy",
|
|
2902
|
-
isSignal: true,
|
|
2903
|
-
isRequired: false,
|
|
2904
|
-
transformFunction: null
|
|
2905
|
-
},
|
|
2906
|
-
themeDelay: {
|
|
2907
|
-
classPropertyName: "themeDelay",
|
|
2908
|
-
publicName: "themeDelay",
|
|
2909
|
-
isSignal: true,
|
|
2910
|
-
isRequired: false,
|
|
2911
|
-
transformFunction: null
|
|
2912
|
-
}
|
|
2913
|
-
},
|
|
2914
|
-
outputs: { dataSelect: "dataSelect" },
|
|
2915
|
-
host: { classAttribute: "hx-chart" },
|
|
2916
|
-
viewQueries: [{
|
|
2917
|
-
propertyName: "canvas",
|
|
2918
|
-
first: true,
|
|
2919
|
-
predicate: ["canvas"],
|
|
2920
|
-
descendants: true,
|
|
2921
|
-
isSignal: true
|
|
2922
|
-
}],
|
|
2923
|
-
ngImport: i0,
|
|
2924
|
-
template: `
|
|
2925
|
-
<div class="hx-chart-frame" [style.width]="width() ?? null" [style.height]="height() ?? null">
|
|
2926
|
-
<canvas
|
|
2927
|
-
#canvas
|
|
2928
|
-
class="hx-chart-canvas"
|
|
2929
|
-
role="img"
|
|
2930
|
-
[attr.aria-label]="ariaLabel() || null"
|
|
2931
|
-
[attr.aria-labelledby]="ariaLabelledBy() || null"
|
|
2932
|
-
(click)="onClick($event)"
|
|
2933
|
-
><ng-content select="[hxChartFallback]" /></canvas>
|
|
2934
|
-
</div>
|
|
2935
|
-
`,
|
|
2936
|
-
isInline: true,
|
|
2937
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2938
|
-
});
|
|
2939
|
-
};
|
|
2940
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
2941
|
-
minVersion: "12.0.0",
|
|
2942
|
-
version: "22.2.1",
|
|
2943
|
-
ngImport: i0,
|
|
2944
|
-
type: HxChart,
|
|
2945
|
-
decorators: [{
|
|
2946
|
-
type: Component,
|
|
2947
|
-
args: [{
|
|
2948
|
-
selector: "hx-chart",
|
|
2949
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2950
|
-
host: { class: "hx-chart" },
|
|
2951
|
-
template: `
|
|
2952
|
-
<div class="hx-chart-frame" [style.width]="width() ?? null" [style.height]="height() ?? null">
|
|
2953
|
-
<canvas
|
|
2954
|
-
#canvas
|
|
2955
|
-
class="hx-chart-canvas"
|
|
2956
|
-
role="img"
|
|
2957
|
-
[attr.aria-label]="ariaLabel() || null"
|
|
2958
|
-
[attr.aria-labelledby]="ariaLabelledBy() || null"
|
|
2959
|
-
(click)="onClick($event)"
|
|
2960
|
-
><ng-content select="[hxChartFallback]" /></canvas>
|
|
2961
|
-
</div>
|
|
2962
|
-
`
|
|
2963
|
-
}]
|
|
2964
|
-
}],
|
|
2965
|
-
ctorParameters: () => [],
|
|
2966
|
-
propDecorators: {
|
|
2967
|
-
canvas: [{
|
|
2968
|
-
type: i0.ViewChild,
|
|
2969
|
-
args: ["canvas", { isSignal: true }]
|
|
2970
|
-
}],
|
|
2971
|
-
type: [{
|
|
2972
|
-
type: i0.Input,
|
|
2973
|
-
args: [{
|
|
2974
|
-
isSignal: true,
|
|
2975
|
-
alias: "type",
|
|
2976
|
-
required: false
|
|
2977
|
-
}]
|
|
2978
|
-
}],
|
|
2979
|
-
data: [{
|
|
2980
|
-
type: i0.Input,
|
|
2981
|
-
args: [{
|
|
2982
|
-
isSignal: true,
|
|
2983
|
-
alias: "data",
|
|
2984
|
-
required: false
|
|
2985
|
-
}]
|
|
2986
|
-
}],
|
|
2987
|
-
options: [{
|
|
2988
|
-
type: i0.Input,
|
|
2989
|
-
args: [{
|
|
2990
|
-
isSignal: true,
|
|
2991
|
-
alias: "options",
|
|
2992
|
-
required: false
|
|
2993
|
-
}]
|
|
2994
|
-
}],
|
|
2995
|
-
plugins: [{
|
|
2996
|
-
type: i0.Input,
|
|
2997
|
-
args: [{
|
|
2998
|
-
isSignal: true,
|
|
2999
|
-
alias: "plugins",
|
|
3000
|
-
required: false
|
|
3001
|
-
}]
|
|
3002
|
-
}],
|
|
3003
|
-
width: [{
|
|
3004
|
-
type: i0.Input,
|
|
3005
|
-
args: [{
|
|
3006
|
-
isSignal: true,
|
|
3007
|
-
alias: "width",
|
|
3008
|
-
required: false
|
|
3009
|
-
}]
|
|
3010
|
-
}],
|
|
3011
|
-
height: [{
|
|
3012
|
-
type: i0.Input,
|
|
3013
|
-
args: [{
|
|
3014
|
-
isSignal: true,
|
|
3015
|
-
alias: "height",
|
|
3016
|
-
required: false
|
|
3017
|
-
}]
|
|
3018
|
-
}],
|
|
3019
|
-
responsive: [{
|
|
3020
|
-
type: i0.Input,
|
|
3021
|
-
args: [{
|
|
3022
|
-
isSignal: true,
|
|
3023
|
-
alias: "responsive",
|
|
3024
|
-
required: false
|
|
3025
|
-
}]
|
|
3026
|
-
}],
|
|
3027
|
-
ariaLabel: [{
|
|
3028
|
-
type: i0.Input,
|
|
3029
|
-
args: [{
|
|
3030
|
-
isSignal: true,
|
|
3031
|
-
alias: "ariaLabel",
|
|
3032
|
-
required: false
|
|
3033
|
-
}]
|
|
3034
|
-
}],
|
|
3035
|
-
ariaLabelledBy: [{
|
|
3036
|
-
type: i0.Input,
|
|
3037
|
-
args: [{
|
|
3038
|
-
isSignal: true,
|
|
3039
|
-
alias: "ariaLabelledBy",
|
|
3040
|
-
required: false
|
|
3041
|
-
}]
|
|
3042
|
-
}],
|
|
3043
|
-
themeDelay: [{
|
|
3044
|
-
type: i0.Input,
|
|
3045
|
-
args: [{
|
|
3046
|
-
isSignal: true,
|
|
3047
|
-
alias: "themeDelay",
|
|
3048
|
-
required: false
|
|
3049
|
-
}]
|
|
3050
|
-
}],
|
|
3051
|
-
dataSelect: [{
|
|
3052
|
-
type: i0.Output,
|
|
3053
|
-
args: ["dataSelect"]
|
|
3054
|
-
}]
|
|
3055
|
-
}
|
|
3056
|
-
});
|
|
3057
2617
|
var HxCheckbox = class HxCheckbox {
|
|
3058
2618
|
size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
3059
2619
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -5607,9 +5167,14 @@ var HxPaginator = class HxPaginator {
|
|
|
5607
5167
|
lastPageLabel = input("Last page", ...ngDevMode ? [{ debugName: "lastPageLabel" }] : /* istanbul ignore next */ []);
|
|
5608
5168
|
pageLabelTemplate = input("Page {page}", ...ngDevMode ? [{ debugName: "pageLabelTemplate" }] : /* istanbul ignore next */ []);
|
|
5609
5169
|
rowsPerPageLabel = input("Rows per page", ...ngDevMode ? [{ debugName: "rowsPerPageLabel" }] : /* istanbul ignore next */ []);
|
|
5170
|
+
allLabel = input("All", ...ngDevMode ? [{ debugName: "allLabel" }] : /* istanbul ignore next */ []);
|
|
5171
|
+
showAll = model(false, ...ngDevMode ? [{ debugName: "showAll" }] : /* istanbul ignore next */ []);
|
|
5172
|
+
allSelected = computed(() => this.showAll() && !!this.rowsPerPageOptions()?.includes("all"), ...ngDevMode ? [{ debugName: "allSelected" }] : /* istanbul ignore next */ []);
|
|
5173
|
+
perPage = computed(() => this.allSelected() ? Math.max(1, this.totalRecords()) : this.rows(), ...ngDevMode ? [{ debugName: "perPage" }] : /* istanbul ignore next */ []);
|
|
5174
|
+
rowsValue = computed(() => this.allSelected() ? "all" : this.rows(), ...ngDevMode ? [{ debugName: "rowsValue" }] : /* istanbul ignore next */ []);
|
|
5610
5175
|
pageChange = output();
|
|
5611
|
-
pageCount = computed(() => Math.max(1, Math.ceil(this.totalRecords() / Math.max(1, this.
|
|
5612
|
-
page = computed(() => Math.min(this.pageCount() - 1, Math.floor(this.first() / Math.max(1, this.
|
|
5176
|
+
pageCount = computed(() => Math.max(1, Math.ceil(this.totalRecords() / Math.max(1, this.perPage()))), ...ngDevMode ? [{ debugName: "pageCount" }] : /* istanbul ignore next */ []);
|
|
5177
|
+
page = computed(() => Math.min(this.pageCount() - 1, Math.floor(this.first() / Math.max(1, this.perPage()))), ...ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []);
|
|
5613
5178
|
isFirst = computed(() => this.page() === 0, ...ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []);
|
|
5614
5179
|
isLast = computed(() => this.page() >= this.pageCount() - 1, ...ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []);
|
|
5615
5180
|
links = computed(() => {
|
|
@@ -5620,13 +5185,13 @@ var HxPaginator = class HxPaginator {
|
|
|
5620
5185
|
return Array.from({ length: size }, (_, i) => start + i);
|
|
5621
5186
|
}, ...ngDevMode ? [{ debugName: "links" }] : /* istanbul ignore next */ []);
|
|
5622
5187
|
rowsOptions = computed(() => (this.rowsPerPageOptions() ?? []).map((n) => ({
|
|
5623
|
-
label: String(n),
|
|
5188
|
+
label: n === "all" ? this.allLabel() : String(n),
|
|
5624
5189
|
value: n
|
|
5625
5190
|
})), ...ngDevMode ? [{ debugName: "rowsOptions" }] : /* istanbul ignore next */ []);
|
|
5626
5191
|
report = computed(() => {
|
|
5627
5192
|
const total = this.totalRecords();
|
|
5628
|
-
const first = total === 0 ? 0 : this.page() * this.
|
|
5629
|
-
const last = Math.min(total, (this.page() + 1) * this.
|
|
5193
|
+
const first = total === 0 ? 0 : this.page() * this.perPage() + 1;
|
|
5194
|
+
const last = Math.min(total, (this.page() + 1) * this.perPage());
|
|
5630
5195
|
return this.currentPageReportTemplate().replace("{first}", String(first)).replace("{last}", String(last)).replace("{totalRecords}", String(total)).replace("{page}", String(this.page() + 1)).replace("{pageCount}", String(this.pageCount()));
|
|
5631
5196
|
}, ...ngDevMode ? [{ debugName: "report" }] : /* istanbul ignore next */ []);
|
|
5632
5197
|
pageLabel(page) {
|
|
@@ -5634,13 +5199,21 @@ var HxPaginator = class HxPaginator {
|
|
|
5634
5199
|
}
|
|
5635
5200
|
goTo(page) {
|
|
5636
5201
|
const target = Math.min(this.pageCount() - 1, Math.max(0, page));
|
|
5637
|
-
if (target === this.page() && this.first() === target * this.
|
|
5638
|
-
this.first.set(target * this.
|
|
5202
|
+
if (target === this.page() && this.first() === target * this.perPage()) return;
|
|
5203
|
+
this.first.set(target * this.perPage());
|
|
5639
5204
|
this.emit();
|
|
5640
5205
|
}
|
|
5641
5206
|
setRows(value) {
|
|
5207
|
+
if (value === "all") {
|
|
5208
|
+
if (this.allSelected()) return;
|
|
5209
|
+
this.showAll.set(true);
|
|
5210
|
+
this.first.set(0);
|
|
5211
|
+
this.emit();
|
|
5212
|
+
return;
|
|
5213
|
+
}
|
|
5642
5214
|
const rows = Number(value);
|
|
5643
|
-
if (!rows || rows === this.rows()) return;
|
|
5215
|
+
if (!rows || rows === this.rows() && !this.allSelected()) return;
|
|
5216
|
+
this.showAll.set(false);
|
|
5644
5217
|
this.rows.set(rows);
|
|
5645
5218
|
this.first.set(Math.floor(this.first() / rows) * rows);
|
|
5646
5219
|
this.emit();
|
|
@@ -5648,9 +5221,10 @@ var HxPaginator = class HxPaginator {
|
|
|
5648
5221
|
emit() {
|
|
5649
5222
|
this.pageChange.emit({
|
|
5650
5223
|
first: this.first(),
|
|
5651
|
-
rows: this.
|
|
5224
|
+
rows: this.perPage(),
|
|
5652
5225
|
page: this.page(),
|
|
5653
|
-
pageCount: this.pageCount()
|
|
5226
|
+
pageCount: this.pageCount(),
|
|
5227
|
+
...this.allSelected() ? { all: true } : {}
|
|
5654
5228
|
});
|
|
5655
5229
|
}
|
|
5656
5230
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -5772,16 +5346,31 @@ var HxPaginator = class HxPaginator {
|
|
|
5772
5346
|
isSignal: true,
|
|
5773
5347
|
isRequired: false,
|
|
5774
5348
|
transformFunction: null
|
|
5349
|
+
},
|
|
5350
|
+
allLabel: {
|
|
5351
|
+
classPropertyName: "allLabel",
|
|
5352
|
+
publicName: "allLabel",
|
|
5353
|
+
isSignal: true,
|
|
5354
|
+
isRequired: false,
|
|
5355
|
+
transformFunction: null
|
|
5356
|
+
},
|
|
5357
|
+
showAll: {
|
|
5358
|
+
classPropertyName: "showAll",
|
|
5359
|
+
publicName: "showAll",
|
|
5360
|
+
isSignal: true,
|
|
5361
|
+
isRequired: false,
|
|
5362
|
+
transformFunction: null
|
|
5775
5363
|
}
|
|
5776
5364
|
},
|
|
5777
5365
|
outputs: {
|
|
5778
5366
|
rows: "rowsChange",
|
|
5779
5367
|
first: "firstChange",
|
|
5368
|
+
showAll: "showAllChange",
|
|
5780
5369
|
pageChange: "pageChange"
|
|
5781
5370
|
},
|
|
5782
5371
|
host: { classAttribute: "hx-paginator" },
|
|
5783
5372
|
ngImport: i0,
|
|
5784
|
-
template: "<nav class=\"hx-paginator-nav\" [attr.aria-label]=\"ariaLabel()\">\n @if (showCurrentPageReport()) {\n <span class=\"hx-paginator-report\" aria-live=\"polite\">{{ report() }}</span>\n }\n <div class=\"hx-paginator-pages\">\n @if (showFirstLastButtons()) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-first\" [disabled]=\"isFirst()\" [attr.aria-label]=\"firstPageLabel()\" [title]=\"firstPageLabel()\" (click)=\"goTo(0)\"></button>\n }\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-prev\" [disabled]=\"isFirst()\" [attr.aria-label]=\"previousPageLabel()\" [title]=\"previousPageLabel()\" (click)=\"goTo(page() - 1)\"></button>\n @for (p of links(); track p) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-page\" [class.hx-paginator-page-current]=\"p === page()\" [attr.aria-label]=\"pageLabel(p)\" [attr.aria-current]=\"p === page() ? 'page' : null\" (click)=\"goTo(p)\">{{ p + 1 }}</button>\n }\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-next\" [disabled]=\"isLast()\" [attr.aria-label]=\"nextPageLabel()\" [title]=\"nextPageLabel()\" (click)=\"goTo(page() + 1)\"></button>\n @if (showFirstLastButtons()) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-last\" [disabled]=\"isLast()\" [attr.aria-label]=\"lastPageLabel()\" [title]=\"lastPageLabel()\" (click)=\"goTo(pageCount() - 1)\"></button>\n }\n </div>\n @if (rowsOptions().length) {\n <hx-select class=\"hx-paginator-rows\" [options]=\"rowsOptions()\" [value]=\"
|
|
5373
|
+
template: "<nav class=\"hx-paginator-nav\" [attr.aria-label]=\"ariaLabel()\">\n @if (showCurrentPageReport()) {\n <span class=\"hx-paginator-report\" aria-live=\"polite\">{{ report() }}</span>\n }\n <div class=\"hx-paginator-pages\">\n @if (showFirstLastButtons()) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-first\" [disabled]=\"isFirst()\" [attr.aria-label]=\"firstPageLabel()\" [title]=\"firstPageLabel()\" (click)=\"goTo(0)\"></button>\n }\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-prev\" [disabled]=\"isFirst()\" [attr.aria-label]=\"previousPageLabel()\" [title]=\"previousPageLabel()\" (click)=\"goTo(page() - 1)\"></button>\n @for (p of links(); track p) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-page\" [class.hx-paginator-page-current]=\"p === page()\" [attr.aria-label]=\"pageLabel(p)\" [attr.aria-current]=\"p === page() ? 'page' : null\" (click)=\"goTo(p)\">{{ p + 1 }}</button>\n }\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-next\" [disabled]=\"isLast()\" [attr.aria-label]=\"nextPageLabel()\" [title]=\"nextPageLabel()\" (click)=\"goTo(page() + 1)\"></button>\n @if (showFirstLastButtons()) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-last\" [disabled]=\"isLast()\" [attr.aria-label]=\"lastPageLabel()\" [title]=\"lastPageLabel()\" (click)=\"goTo(pageCount() - 1)\"></button>\n }\n </div>\n @if (rowsOptions().length) {\n <hx-select class=\"hx-paginator-rows\" [options]=\"rowsOptions()\" [value]=\"rowsValue()\" (valueChange)=\"setRows($event)\" [ariaLabel]=\"rowsPerPageLabel()\" />\n }\n</nav>\n",
|
|
5785
5374
|
dependencies: [{
|
|
5786
5375
|
kind: "component",
|
|
5787
5376
|
type: HxSelect,
|
|
@@ -5826,7 +5415,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5826
5415
|
imports: [HxSelect],
|
|
5827
5416
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5828
5417
|
host: { class: "hx-paginator" },
|
|
5829
|
-
template: "<nav class=\"hx-paginator-nav\" [attr.aria-label]=\"ariaLabel()\">\n @if (showCurrentPageReport()) {\n <span class=\"hx-paginator-report\" aria-live=\"polite\">{{ report() }}</span>\n }\n <div class=\"hx-paginator-pages\">\n @if (showFirstLastButtons()) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-first\" [disabled]=\"isFirst()\" [attr.aria-label]=\"firstPageLabel()\" [title]=\"firstPageLabel()\" (click)=\"goTo(0)\"></button>\n }\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-prev\" [disabled]=\"isFirst()\" [attr.aria-label]=\"previousPageLabel()\" [title]=\"previousPageLabel()\" (click)=\"goTo(page() - 1)\"></button>\n @for (p of links(); track p) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-page\" [class.hx-paginator-page-current]=\"p === page()\" [attr.aria-label]=\"pageLabel(p)\" [attr.aria-current]=\"p === page() ? 'page' : null\" (click)=\"goTo(p)\">{{ p + 1 }}</button>\n }\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-next\" [disabled]=\"isLast()\" [attr.aria-label]=\"nextPageLabel()\" [title]=\"nextPageLabel()\" (click)=\"goTo(page() + 1)\"></button>\n @if (showFirstLastButtons()) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-last\" [disabled]=\"isLast()\" [attr.aria-label]=\"lastPageLabel()\" [title]=\"lastPageLabel()\" (click)=\"goTo(pageCount() - 1)\"></button>\n }\n </div>\n @if (rowsOptions().length) {\n <hx-select class=\"hx-paginator-rows\" [options]=\"rowsOptions()\" [value]=\"
|
|
5418
|
+
template: "<nav class=\"hx-paginator-nav\" [attr.aria-label]=\"ariaLabel()\">\n @if (showCurrentPageReport()) {\n <span class=\"hx-paginator-report\" aria-live=\"polite\">{{ report() }}</span>\n }\n <div class=\"hx-paginator-pages\">\n @if (showFirstLastButtons()) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-first\" [disabled]=\"isFirst()\" [attr.aria-label]=\"firstPageLabel()\" [title]=\"firstPageLabel()\" (click)=\"goTo(0)\"></button>\n }\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-prev\" [disabled]=\"isFirst()\" [attr.aria-label]=\"previousPageLabel()\" [title]=\"previousPageLabel()\" (click)=\"goTo(page() - 1)\"></button>\n @for (p of links(); track p) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-page\" [class.hx-paginator-page-current]=\"p === page()\" [attr.aria-label]=\"pageLabel(p)\" [attr.aria-current]=\"p === page() ? 'page' : null\" (click)=\"goTo(p)\">{{ p + 1 }}</button>\n }\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-next\" [disabled]=\"isLast()\" [attr.aria-label]=\"nextPageLabel()\" [title]=\"nextPageLabel()\" (click)=\"goTo(page() + 1)\"></button>\n @if (showFirstLastButtons()) {\n <button type=\"button\" class=\"hx-paginator-button hx-paginator-last\" [disabled]=\"isLast()\" [attr.aria-label]=\"lastPageLabel()\" [title]=\"lastPageLabel()\" (click)=\"goTo(pageCount() - 1)\"></button>\n }\n </div>\n @if (rowsOptions().length) {\n <hx-select class=\"hx-paginator-rows\" [options]=\"rowsOptions()\" [value]=\"rowsValue()\" (valueChange)=\"setRows($event)\" [ariaLabel]=\"rowsPerPageLabel()\" />\n }\n</nav>\n"
|
|
5830
5419
|
}]
|
|
5831
5420
|
}],
|
|
5832
5421
|
propDecorators: {
|
|
@@ -5956,6 +5545,25 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5956
5545
|
required: false
|
|
5957
5546
|
}]
|
|
5958
5547
|
}],
|
|
5548
|
+
allLabel: [{
|
|
5549
|
+
type: i0.Input,
|
|
5550
|
+
args: [{
|
|
5551
|
+
isSignal: true,
|
|
5552
|
+
alias: "allLabel",
|
|
5553
|
+
required: false
|
|
5554
|
+
}]
|
|
5555
|
+
}],
|
|
5556
|
+
showAll: [{
|
|
5557
|
+
type: i0.Input,
|
|
5558
|
+
args: [{
|
|
5559
|
+
isSignal: true,
|
|
5560
|
+
alias: "showAll",
|
|
5561
|
+
required: false
|
|
5562
|
+
}]
|
|
5563
|
+
}, {
|
|
5564
|
+
type: i0.Output,
|
|
5565
|
+
args: ["showAllChange"]
|
|
5566
|
+
}],
|
|
5959
5567
|
pageChange: [{
|
|
5960
5568
|
type: i0.Output,
|
|
5961
5569
|
args: ["pageChange"]
|
|
@@ -6298,6 +5906,54 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6298
5906
|
}]
|
|
6299
5907
|
}] }
|
|
6300
5908
|
});
|
|
5909
|
+
var HxColumnHeader = class HxColumnHeader {
|
|
5910
|
+
field = input.required({
|
|
5911
|
+
...ngDevMode ? { debugName: "field" } : /* istanbul ignore next */ {},
|
|
5912
|
+
alias: "hxColumnHeader"
|
|
5913
|
+
});
|
|
5914
|
+
template = inject(TemplateRef);
|
|
5915
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5916
|
+
minVersion: "12.0.0",
|
|
5917
|
+
version: "22.2.1",
|
|
5918
|
+
ngImport: i0,
|
|
5919
|
+
type: HxColumnHeader,
|
|
5920
|
+
deps: [],
|
|
5921
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
5922
|
+
});
|
|
5923
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
5924
|
+
minVersion: "17.1.0",
|
|
5925
|
+
version: "22.2.1",
|
|
5926
|
+
type: HxColumnHeader,
|
|
5927
|
+
isStandalone: true,
|
|
5928
|
+
selector: "ng-template[hxColumnHeader]",
|
|
5929
|
+
inputs: { field: {
|
|
5930
|
+
classPropertyName: "field",
|
|
5931
|
+
publicName: "hxColumnHeader",
|
|
5932
|
+
isSignal: true,
|
|
5933
|
+
isRequired: true,
|
|
5934
|
+
transformFunction: null
|
|
5935
|
+
} },
|
|
5936
|
+
ngImport: i0
|
|
5937
|
+
});
|
|
5938
|
+
};
|
|
5939
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
5940
|
+
minVersion: "12.0.0",
|
|
5941
|
+
version: "22.2.1",
|
|
5942
|
+
ngImport: i0,
|
|
5943
|
+
type: HxColumnHeader,
|
|
5944
|
+
decorators: [{
|
|
5945
|
+
type: Directive,
|
|
5946
|
+
args: [{ selector: "ng-template[hxColumnHeader]" }]
|
|
5947
|
+
}],
|
|
5948
|
+
propDecorators: { field: [{
|
|
5949
|
+
type: i0.Input,
|
|
5950
|
+
args: [{
|
|
5951
|
+
isSignal: true,
|
|
5952
|
+
alias: "hxColumnHeader",
|
|
5953
|
+
required: true
|
|
5954
|
+
}]
|
|
5955
|
+
}] }
|
|
5956
|
+
});
|
|
6301
5957
|
var HxTableHeader = class HxTableHeader {
|
|
6302
5958
|
template = inject(TemplateRef);
|
|
6303
5959
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -6490,6 +6146,9 @@ var HxDataTable = class HxDataTable {
|
|
|
6490
6146
|
transform: booleanAttribute
|
|
6491
6147
|
});
|
|
6492
6148
|
emptyMessage = input("No records found", ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
|
|
6149
|
+
rowClass = input(...ngDevMode ? [void 0, { debugName: "rowClass" }] : /* istanbul ignore next */ []);
|
|
6150
|
+
emptyValue = input("", ...ngDevMode ? [{ debugName: "emptyValue" }] : /* istanbul ignore next */ []);
|
|
6151
|
+
allLabel = input("All", ...ngDevMode ? [{ debugName: "allLabel" }] : /* istanbul ignore next */ []);
|
|
6493
6152
|
loading = input(false, {
|
|
6494
6153
|
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
6495
6154
|
transform: booleanAttribute
|
|
@@ -6506,6 +6165,7 @@ var HxDataTable = class HxDataTable {
|
|
|
6506
6165
|
sortOrder = model(1, ...ngDevMode ? [{ debugName: "sortOrder" }] : /* istanbul ignore next */ []);
|
|
6507
6166
|
multiSortMeta = model([], ...ngDevMode ? [{ debugName: "multiSortMeta" }] : /* istanbul ignore next */ []);
|
|
6508
6167
|
sortFunction = input(...ngDevMode ? [void 0, { debugName: "sortFunction" }] : /* istanbul ignore next */ []);
|
|
6168
|
+
sortFirstOrder = input("asc", ...ngDevMode ? [{ debugName: "sortFirstOrder" }] : /* istanbul ignore next */ []);
|
|
6509
6169
|
paginator = input(false, {
|
|
6510
6170
|
...ngDevMode ? { debugName: "paginator" } : /* istanbul ignore next */ {},
|
|
6511
6171
|
transform: booleanAttribute
|
|
@@ -6539,12 +6199,24 @@ var HxDataTable = class HxDataTable {
|
|
|
6539
6199
|
filterDisplay = input(...ngDevMode ? [void 0, { debugName: "filterDisplay" }] : /* istanbul ignore next */ []);
|
|
6540
6200
|
filters = model({}, ...ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []);
|
|
6541
6201
|
filterLabel = input("Filter {header}", ...ngDevMode ? [{ debugName: "filterLabel" }] : /* istanbul ignore next */ []);
|
|
6202
|
+
clearLabel = input("Clear", ...ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []);
|
|
6203
|
+
filterPopover = viewChild(HxPopover, ...ngDevMode ? [{ debugName: "filterPopover" }] : /* istanbul ignore next */ []);
|
|
6204
|
+
filterInput = viewChild("filterInput", ...ngDevMode ? [{ debugName: "filterInput" }] : /* istanbul ignore next */ []);
|
|
6205
|
+
activeFilterColumn = signal(null, ...ngDevMode ? [{ debugName: "activeFilterColumn" }] : /* istanbul ignore next */ []);
|
|
6206
|
+
injector = inject(Injector);
|
|
6542
6207
|
expandedRowKeys = model({}, ...ngDevMode ? [{ debugName: "expandedRowKeys" }] : /* istanbul ignore next */ []);
|
|
6543
6208
|
expandLabel = input("Expand row", ...ngDevMode ? [{ debugName: "expandLabel" }] : /* istanbul ignore next */ []);
|
|
6544
6209
|
collapseLabel = input("Collapse row", ...ngDevMode ? [{ debugName: "collapseLabel" }] : /* istanbul ignore next */ []);
|
|
6545
6210
|
announcement = signal("", ...ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []);
|
|
6546
6211
|
globalText = signal("", ...ngDevMode ? [{ debugName: "globalText" }] : /* istanbul ignore next */ []);
|
|
6212
|
+
showAll = signal(false, ...ngDevMode ? [{ debugName: "showAll" }] : /* istanbul ignore next */ []);
|
|
6213
|
+
resetAll = effect(() => {
|
|
6214
|
+
this.rows();
|
|
6215
|
+
untracked(() => this.showAll.set(false));
|
|
6216
|
+
}, ...ngDevMode ? [{ debugName: "resetAll" }] : /* istanbul ignore next */ []);
|
|
6217
|
+
allActive = computed(() => this.showAll() && !!this.rowsPerPageOptions()?.includes("all"), ...ngDevMode ? [{ debugName: "allActive" }] : /* istanbul ignore next */ []);
|
|
6547
6218
|
cellTemplates = contentChildren(HxCell, ...ngDevMode ? [{ debugName: "cellTemplates" }] : /* istanbul ignore next */ []);
|
|
6219
|
+
columnHeaderTemplates = contentChildren(HxColumnHeader, ...ngDevMode ? [{ debugName: "columnHeaderTemplates" }] : /* istanbul ignore next */ []);
|
|
6548
6220
|
headerTemplate = contentChild(HxTableHeader, ...ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []);
|
|
6549
6221
|
bodyTemplate = contentChild(HxTableBody, ...ngDevMode ? [{ debugName: "bodyTemplate" }] : /* istanbul ignore next */ []);
|
|
6550
6222
|
footerTemplate = contentChild(HxTableFooter, ...ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []);
|
|
@@ -6582,10 +6254,23 @@ var HxDataTable = class HxDataTable {
|
|
|
6582
6254
|
total = computed(() => this.lazy() ? this.totalRecords() ?? this.value().length : this.sorted().length, ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
|
|
6583
6255
|
visibleRows = computed(() => {
|
|
6584
6256
|
const rows = this.sorted();
|
|
6585
|
-
if (!this.paginator() || this.lazy()) return rows;
|
|
6257
|
+
if (!this.paginator() || this.lazy() || this.allActive()) return rows;
|
|
6586
6258
|
return rows.slice(this.first(), this.first() + this.rows());
|
|
6587
6259
|
}, ...ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []);
|
|
6588
6260
|
cells = computed(() => new Map(this.cellTemplates().map((cell) => [cell.field(), cell.template])), ...ngDevMode ? [{ debugName: "cells" }] : /* istanbul ignore next */ []);
|
|
6261
|
+
warnedFields = /* @__PURE__ */ new Set();
|
|
6262
|
+
columnHeaders = computed(() => {
|
|
6263
|
+
const map = /* @__PURE__ */ new Map();
|
|
6264
|
+
for (const header of this.columnHeaderTemplates()) {
|
|
6265
|
+
const field = header.field();
|
|
6266
|
+
if (map.has(field) && isDevMode() && !this.warnedFields.has(field)) {
|
|
6267
|
+
this.warnedFields.add(field);
|
|
6268
|
+
console.warn(`hx-data-table: more than one hxColumnHeader template for "${field}"; the last one wins.`);
|
|
6269
|
+
}
|
|
6270
|
+
map.set(field, header.template);
|
|
6271
|
+
}
|
|
6272
|
+
return map;
|
|
6273
|
+
}, ...ngDevMode ? [{ debugName: "columnHeaders" }] : /* istanbul ignore next */ []);
|
|
6589
6274
|
scrolls = computed(() => this.scrollable() || !!this.scrollHeight(), ...ngDevMode ? [{ debugName: "scrolls" }] : /* istanbul ignore next */ []);
|
|
6590
6275
|
hasCaption = computed(() => !!this.caption() || !!this.captionTemplate() || !!this.ariaLabel(), ...ngDevMode ? [{ debugName: "hasCaption" }] : /* istanbul ignore next */ []);
|
|
6591
6276
|
captionHidden = computed(() => !this.caption() && !this.captionTemplate(), ...ngDevMode ? [{ debugName: "captionHidden" }] : /* istanbul ignore next */ []);
|
|
@@ -6642,6 +6327,26 @@ var HxDataTable = class HxDataTable {
|
|
|
6642
6327
|
this.first.set(0);
|
|
6643
6328
|
if (this.lazy()) this.emitLazy();
|
|
6644
6329
|
}
|
|
6330
|
+
openFilter(event, column) {
|
|
6331
|
+
const popover = this.filterPopover();
|
|
6332
|
+
if (!popover) return;
|
|
6333
|
+
if (popover.open() && this.activeFilterColumn()?.field === column.field) {
|
|
6334
|
+
popover.hide();
|
|
6335
|
+
return;
|
|
6336
|
+
}
|
|
6337
|
+
const switching = popover.open();
|
|
6338
|
+
popover.hide(false);
|
|
6339
|
+
this.activeFilterColumn.set(column);
|
|
6340
|
+
popover.show(event, event.currentTarget);
|
|
6341
|
+
if (switching) afterNextRender(() => this.filterInput()?.nativeElement.focus(), { injector: this.injector });
|
|
6342
|
+
}
|
|
6343
|
+
filterLabelFor(column) {
|
|
6344
|
+
return this.filterLabel().replace("{header}", column.header);
|
|
6345
|
+
}
|
|
6346
|
+
clearFilter(column) {
|
|
6347
|
+
this.setFilter(column, "");
|
|
6348
|
+
this.filterPopover()?.hide();
|
|
6349
|
+
}
|
|
6645
6350
|
setFilter(column, text) {
|
|
6646
6351
|
const next = { ...this.filters() };
|
|
6647
6352
|
if (text) next[column.field] = text;
|
|
@@ -6682,7 +6387,8 @@ var HxDataTable = class HxDataTable {
|
|
|
6682
6387
|
}
|
|
6683
6388
|
sort(column) {
|
|
6684
6389
|
const order = this.orderOf(column);
|
|
6685
|
-
const
|
|
6390
|
+
const firstOrder = (column.sortFirstOrder ?? this.sortFirstOrder()) === "desc" ? -1 : 1;
|
|
6391
|
+
const next = order === 0 ? firstOrder : order === firstOrder ? -firstOrder : 0;
|
|
6686
6392
|
if (this.sortMode() === "multiple") {
|
|
6687
6393
|
const rest = this.multiSortMeta().filter((m) => m.field !== column.field);
|
|
6688
6394
|
this.multiSortMeta.set(next === 0 ? rest : order === 0 ? [...rest, {
|
|
@@ -6702,13 +6408,13 @@ var HxDataTable = class HxDataTable {
|
|
|
6702
6408
|
}
|
|
6703
6409
|
onPage(event) {
|
|
6704
6410
|
this.first.set(event.first);
|
|
6705
|
-
this.rows.set(event.rows);
|
|
6411
|
+
if (!event.all) this.rows.set(event.rows);
|
|
6706
6412
|
if (this.lazy()) this.emitLazy();
|
|
6707
6413
|
}
|
|
6708
6414
|
emitLazy() {
|
|
6709
6415
|
this.lazyLoad.emit({
|
|
6710
6416
|
first: this.first(),
|
|
6711
|
-
rows: this.rows(),
|
|
6417
|
+
rows: this.allActive() && this.total() > 0 ? this.total() : this.rows(),
|
|
6712
6418
|
sortField: this.sortMode() === "multiple" ? this.multiSortMeta()[0]?.field ?? null : this.sortField(),
|
|
6713
6419
|
sortOrder: this.sortMode() === "multiple" ? this.multiSortMeta()[0]?.order ?? 1 : this.sortOrder(),
|
|
6714
6420
|
multiSortMeta: this.sortMode() === "multiple" ? this.multiSortMeta() : this.sortMeta(),
|
|
@@ -6720,6 +6426,9 @@ var HxDataTable = class HxDataTable {
|
|
|
6720
6426
|
const key = this.dataKey();
|
|
6721
6427
|
return key ? resolveField(row, key) ?? index : index;
|
|
6722
6428
|
}
|
|
6429
|
+
rowClassOf(row) {
|
|
6430
|
+
return this.rowClass()?.(row);
|
|
6431
|
+
}
|
|
6723
6432
|
valueOf(row, column) {
|
|
6724
6433
|
return resolveField(row, column.field);
|
|
6725
6434
|
}
|
|
@@ -6794,6 +6503,27 @@ var HxDataTable = class HxDataTable {
|
|
|
6794
6503
|
isRequired: false,
|
|
6795
6504
|
transformFunction: null
|
|
6796
6505
|
},
|
|
6506
|
+
rowClass: {
|
|
6507
|
+
classPropertyName: "rowClass",
|
|
6508
|
+
publicName: "rowClass",
|
|
6509
|
+
isSignal: true,
|
|
6510
|
+
isRequired: false,
|
|
6511
|
+
transformFunction: null
|
|
6512
|
+
},
|
|
6513
|
+
emptyValue: {
|
|
6514
|
+
classPropertyName: "emptyValue",
|
|
6515
|
+
publicName: "emptyValue",
|
|
6516
|
+
isSignal: true,
|
|
6517
|
+
isRequired: false,
|
|
6518
|
+
transformFunction: null
|
|
6519
|
+
},
|
|
6520
|
+
allLabel: {
|
|
6521
|
+
classPropertyName: "allLabel",
|
|
6522
|
+
publicName: "allLabel",
|
|
6523
|
+
isSignal: true,
|
|
6524
|
+
isRequired: false,
|
|
6525
|
+
transformFunction: null
|
|
6526
|
+
},
|
|
6797
6527
|
loading: {
|
|
6798
6528
|
classPropertyName: "loading",
|
|
6799
6529
|
publicName: "loading",
|
|
@@ -6864,6 +6594,13 @@ var HxDataTable = class HxDataTable {
|
|
|
6864
6594
|
isRequired: false,
|
|
6865
6595
|
transformFunction: null
|
|
6866
6596
|
},
|
|
6597
|
+
sortFirstOrder: {
|
|
6598
|
+
classPropertyName: "sortFirstOrder",
|
|
6599
|
+
publicName: "sortFirstOrder",
|
|
6600
|
+
isSignal: true,
|
|
6601
|
+
isRequired: false,
|
|
6602
|
+
transformFunction: null
|
|
6603
|
+
},
|
|
6867
6604
|
paginator: {
|
|
6868
6605
|
classPropertyName: "paginator",
|
|
6869
6606
|
publicName: "paginator",
|
|
@@ -6983,6 +6720,13 @@ var HxDataTable = class HxDataTable {
|
|
|
6983
6720
|
isRequired: false,
|
|
6984
6721
|
transformFunction: null
|
|
6985
6722
|
},
|
|
6723
|
+
clearLabel: {
|
|
6724
|
+
classPropertyName: "clearLabel",
|
|
6725
|
+
publicName: "clearLabel",
|
|
6726
|
+
isSignal: true,
|
|
6727
|
+
isRequired: false,
|
|
6728
|
+
transformFunction: null
|
|
6729
|
+
},
|
|
6986
6730
|
expandedRowKeys: {
|
|
6987
6731
|
classPropertyName: "expandedRowKeys",
|
|
6988
6732
|
publicName: "expandedRowKeys",
|
|
@@ -7023,6 +6767,11 @@ var HxDataTable = class HxDataTable {
|
|
|
7023
6767
|
predicate: HxCell,
|
|
7024
6768
|
isSignal: true
|
|
7025
6769
|
},
|
|
6770
|
+
{
|
|
6771
|
+
propertyName: "columnHeaderTemplates",
|
|
6772
|
+
predicate: HxColumnHeader,
|
|
6773
|
+
isSignal: true
|
|
6774
|
+
},
|
|
7026
6775
|
{
|
|
7027
6776
|
propertyName: "headerTemplate",
|
|
7028
6777
|
first: true,
|
|
@@ -7066,8 +6815,21 @@ var HxDataTable = class HxDataTable {
|
|
|
7066
6815
|
isSignal: true
|
|
7067
6816
|
}
|
|
7068
6817
|
],
|
|
6818
|
+
viewQueries: [{
|
|
6819
|
+
propertyName: "filterPopover",
|
|
6820
|
+
first: true,
|
|
6821
|
+
predicate: HxPopover,
|
|
6822
|
+
descendants: true,
|
|
6823
|
+
isSignal: true
|
|
6824
|
+
}, {
|
|
6825
|
+
propertyName: "filterInput",
|
|
6826
|
+
first: true,
|
|
6827
|
+
predicate: ["filterInput"],
|
|
6828
|
+
descendants: true,
|
|
6829
|
+
isSignal: true
|
|
6830
|
+
}],
|
|
7069
6831
|
ngImport: i0,
|
|
7070
|
-
template: "<div class=\"hx-data-table-frame\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <div\n class=\"hx-table-scroll hx-data-table-scroll\"\n [class.hx-data-table-scrolls]=\"scrolls()\"\n [style.max-height]=\"scrollHeight() ?? null\"\n [attr.role]=\"scrolls() ? 'region' : null\"\n [attr.aria-label]=\"scrolls() ? (ariaLabel() ?? caption() ?? null) : null\"\n [attr.tabindex]=\"scrolls() ? 0 : null\"\n >\n <table\n class=\"hx-table\"\n [class.hx-table-sm]=\"size() === 'small'\"\n [class.hx-table-lg]=\"size() === 'large'\"\n [class.hx-table-striped]=\"stripedRows()\"\n [class.hx-table-gridlines]=\"showGridlines()\"\n [class.hx-table-hoverable]=\"hoverRows()\"\n [class.hx-table-sticky]=\"!!scrollHeight()\"\n >\n @if (hasCaption()) {\n <caption [class.hx-data-table-caption-hidden]=\"captionHidden()\">\n @if (captionTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" />\n } @else {\n {{ caption() ?? ariaLabel() }}\n }\n </caption>\n }\n <thead>\n <tr>\n @if (expanderColumn()) {\n <th scope=\"col\" class=\"hx-data-table-expander-cell\"><span class=\"hx-data-table-caption-hidden\">Row details</span></th>\n }\n @if (checkboxColumn()) {\n <th scope=\"col\" class=\"hx-data-table-select-cell\">\n <input type=\"checkbox\" hx-checkbox [attr.aria-label]=\"selectAllLabel()\" [checked]=\"allSelected()\" [indeterminate]=\"someSelected()\" (change)=\"toggleSelectAll($any($event.target).checked)\" />\n </th>\n }\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: columns() }\" />\n } @else {\n @for (column of columns(); track column.field) {\n <th\n scope=\"col\"\n [class]=\"'hx-data-table-align-' + (column.align ?? 'left')\"\n [class.hx-data-table-sorted]=\"orderOf(column) !== 0\"\n [style.width]=\"column.width ?? null\"\n [attr.aria-sort]=\"ariaSort(column)\"\n >\n @
|
|
6832
|
+
template: "<div class=\"hx-data-table-frame\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <div\n class=\"hx-table-scroll hx-data-table-scroll\"\n [class.hx-data-table-scrolls]=\"scrolls()\"\n [style.max-height]=\"scrollHeight() ?? null\"\n [attr.role]=\"scrolls() ? 'region' : null\"\n [attr.aria-label]=\"scrolls() ? (ariaLabel() ?? caption() ?? null) : null\"\n [attr.tabindex]=\"scrolls() ? 0 : null\"\n >\n <table\n class=\"hx-table\"\n [class.hx-table-sm]=\"size() === 'small'\"\n [class.hx-table-lg]=\"size() === 'large'\"\n [class.hx-table-striped]=\"stripedRows()\"\n [class.hx-table-gridlines]=\"showGridlines()\"\n [class.hx-table-hoverable]=\"hoverRows()\"\n [class.hx-table-sticky]=\"!!scrollHeight()\"\n >\n @if (hasCaption()) {\n <caption [class.hx-data-table-caption-hidden]=\"captionHidden()\">\n @if (captionTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" />\n } @else {\n {{ caption() ?? ariaLabel() }}\n }\n </caption>\n }\n <thead>\n <tr>\n @if (expanderColumn()) {\n <th scope=\"col\" class=\"hx-data-table-expander-cell\"><span class=\"hx-data-table-caption-hidden\">Row details</span></th>\n }\n @if (checkboxColumn()) {\n <th scope=\"col\" class=\"hx-data-table-select-cell\">\n <input type=\"checkbox\" hx-checkbox [attr.aria-label]=\"selectAllLabel()\" [checked]=\"allSelected()\" [indeterminate]=\"someSelected()\" (change)=\"toggleSelectAll($any($event.target).checked)\" />\n </th>\n }\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: columns() }\" />\n } @else {\n @for (column of columns(); track column.field) {\n <th\n scope=\"col\"\n [class]=\"'hx-data-table-align-' + (column.align ?? 'left')\"\n [class.hx-data-table-sorted]=\"orderOf(column) !== 0\"\n [style.width]=\"column.width ?? null\"\n [attr.aria-sort]=\"ariaSort(column)\"\n [attr.title]=\"column.title ?? null\"\n >\n @let extra = columnHeaders().get(column.field);\n @let menu = filterDisplay() === 'menu' && column.filter;\n @if (extra || menu) {\n <div class=\"hx-data-table-header-content\">\n <ng-container [ngTemplateOutlet]=\"label\" [ngTemplateOutletContext]=\"{ $implicit: column }\" />\n @if (extra) {\n <ng-container [ngTemplateOutlet]=\"extra\" [ngTemplateOutletContext]=\"{ $implicit: column }\" />\n }\n @if (menu) {\n <button\n type=\"button\"\n class=\"hx-data-table-filter-button\"\n [class.hx-data-table-filter-active]=\"!!filters()[column.field]\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"activeFilterColumn()?.field === column.field\"\n [attr.aria-label]=\"filterLabelFor(column)\"\n (click)=\"openFilter($event, column)\"\n >\n <span class=\"hx-data-table-filter-icon\" aria-hidden=\"true\"></span>\n </button>\n }\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"label\" [ngTemplateOutletContext]=\"{ $implicit: column }\" />\n }\n </th>\n }\n }\n </tr>\n @if (filterRow()) {\n <tr class=\"hx-data-table-filter-row\">\n @if (expanderColumn()) { <th></th> }\n @if (checkboxColumn()) { <th></th> }\n @for (column of columns(); track column.field) {\n <th>\n @if (column.filter) {\n <input type=\"text\" hx-input size=\"small\" fluid [attr.aria-label]=\"filterLabelFor(column)\" [value]=\"filters()[column.field] ?? ''\" (input)=\"setFilter(column, $any($event.target).value)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n <tbody>\n @for (row of visibleRows(); track trackRow(row, $index); let i = $index) {\n <tr\n [class]=\"rowClassOf(row)\"\n [class.hx-data-table-selectable]=\"selectable()\"\n [attr.aria-selected]=\"selectionMode() ? (isSelected(row) ? 'true' : 'false') : null\"\n [attr.tabindex]=\"selectable() ? 0 : null\"\n (click)=\"selectRow(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\"\n >\n @if (expanderColumn()) {\n <td class=\"hx-data-table-expander-cell\">\n <button type=\"button\" class=\"hx-data-table-expander\" [class.hx-data-table-expander-open]=\"isExpanded(row, i)\" [attr.aria-expanded]=\"isExpanded(row, i)\" [attr.aria-label]=\"isExpanded(row, i) ? collapseLabel() : expandLabel()\" (click)=\"toggleExpansion(row, i)\"></button>\n </td>\n }\n @if (checkboxColumn()) {\n <td class=\"hx-data-table-select-cell\">\n <input type=\"checkbox\" hx-checkbox [attr.aria-label]=\"selectRowLabel().replace('{row}', '' + (first() + i + 1))\" [checked]=\"isSelected(row)\" (change)=\"toggleRowCheckbox(row, $any($event.target).checked)\" />\n </td>\n }\n @if (bodyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: row, index: i, columns: columns() }\" />\n } @else {\n @for (column of columns(); track column.field) {\n <td [class]=\"'hx-data-table-align-' + (column.align ?? 'left')\">\n @if (cells().get(column.field); as cell) {\n <ng-container [ngTemplateOutlet]=\"cell\" [ngTemplateOutletContext]=\"{ $implicit: row, value: valueOf(row, column), index: i }\" />\n } @else {\n {{ valueOf(row, column) ?? emptyValue() }}\n }\n </td>\n }\n }\n </tr>\n @if (expansionTemplate(); as tpl) {\n @if (isExpanded(row, i)) {\n <tr class=\"hx-data-table-expansion\">\n <td [attr.colspan]=\"colspan()\">\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: row, index: i, columns: columns() }\" />\n </td>\n </tr>\n }\n }\n } @empty {\n <tr class=\"hx-data-table-empty\">\n <td [attr.colspan]=\"colspan()\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" />\n } @else {\n {{ emptyMessage() }}\n }\n </td>\n </tr>\n }\n </tbody>\n @if (footerTemplate(); as tpl) {\n <tfoot>\n <tr>\n @if (expanderColumn()) { <td></td> }\n @if (checkboxColumn()) { <td></td> }\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: columns() }\" />\n </tr>\n </tfoot>\n }\n </table>\n </div>\n <span class=\"hx-data-table-caption-hidden\" aria-live=\"polite\">{{ announcement() }}</span>\n @if (loading()) {\n <div class=\"hx-data-table-loading\" role=\"status\">\n <hx-progress-spinner ariaLabel=\"Loading\" />\n </div>\n }\n @if (paginator()) {\n <hx-paginator\n class=\"hx-data-table-paginator\"\n [rows]=\"rows()\"\n [first]=\"first()\"\n [totalRecords]=\"total()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showAll]=\"showAll()\"\n (showAllChange)=\"showAll.set($event)\"\n [allLabel]=\"allLabel()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n (pageChange)=\"onPage($event)\"\n />\n }\n</div>\n\n@if (filterDisplay() === 'menu') {\n @let active = activeFilterColumn();\n <hx-popover panelClass=\"hx-data-table-filter-popover\" [ariaLabel]=\"active ? filterLabelFor(active) : undefined\" (hidden)=\"activeFilterColumn.set(null)\">\n @if (active) {\n <div class=\"hx-data-table-filter-menu\">\n <input #filterInput type=\"text\" hx-input size=\"small\" fluid [attr.aria-label]=\"filterLabelFor(active)\" [value]=\"filters()[active.field] ?? ''\" (input)=\"setFilter(active, $any($event.target).value)\" (keydown.enter)=\"filterPopover()?.hide()\" />\n <button hx-button type=\"button\" size=\"small\" variant=\"text\" class=\"hx-data-table-filter-clear\" (click)=\"clearFilter(active)\">{{ clearLabel() }}</button>\n </div>\n }\n </hx-popover>\n}\n\n<ng-template #label let-column>\n @if (column.sortable) {\n <button type=\"button\" class=\"hx-data-table-sort\" (click)=\"sort(column)\">\n <span>{{ column.header }}</span>\n <span class=\"hx-data-table-sort-icon\" [class.hx-data-table-sort-asc]=\"orderOf(column) === 1\" [class.hx-data-table-sort-desc]=\"orderOf(column) === -1\" aria-hidden=\"true\"></span>\n @if (sortRank(column); as rank) {\n <span class=\"hx-data-table-sort-rank\" aria-hidden=\"true\">{{ rank }}</span>\n }\n </button>\n } @else {\n {{ column.header }}\n }\n</ng-template>\n",
|
|
7071
6833
|
dependencies: [
|
|
7072
6834
|
{
|
|
7073
6835
|
kind: "directive",
|
|
@@ -7108,11 +6870,14 @@ var HxDataTable = class HxDataTable {
|
|
|
7108
6870
|
"nextPageLabel",
|
|
7109
6871
|
"lastPageLabel",
|
|
7110
6872
|
"pageLabelTemplate",
|
|
7111
|
-
"rowsPerPageLabel"
|
|
6873
|
+
"rowsPerPageLabel",
|
|
6874
|
+
"allLabel",
|
|
6875
|
+
"showAll"
|
|
7112
6876
|
],
|
|
7113
6877
|
outputs: [
|
|
7114
6878
|
"rowsChange",
|
|
7115
6879
|
"firstChange",
|
|
6880
|
+
"showAllChange",
|
|
7116
6881
|
"pageChange"
|
|
7117
6882
|
]
|
|
7118
6883
|
},
|
|
@@ -7134,6 +6899,37 @@ var HxDataTable = class HxDataTable {
|
|
|
7134
6899
|
"autoResize"
|
|
7135
6900
|
],
|
|
7136
6901
|
exportAs: ["hx-input"]
|
|
6902
|
+
},
|
|
6903
|
+
{
|
|
6904
|
+
kind: "directive",
|
|
6905
|
+
type: HxButton,
|
|
6906
|
+
selector: "button[hx-button], a[hx-button]",
|
|
6907
|
+
inputs: [
|
|
6908
|
+
"variant",
|
|
6909
|
+
"severity",
|
|
6910
|
+
"size",
|
|
6911
|
+
"rounded",
|
|
6912
|
+
"raised",
|
|
6913
|
+
"fluid",
|
|
6914
|
+
"iconOnly",
|
|
6915
|
+
"loading"
|
|
6916
|
+
],
|
|
6917
|
+
exportAs: ["hx-button"]
|
|
6918
|
+
},
|
|
6919
|
+
{
|
|
6920
|
+
kind: "component",
|
|
6921
|
+
type: HxPopover,
|
|
6922
|
+
selector: "hx-popover",
|
|
6923
|
+
inputs: [
|
|
6924
|
+
"ariaLabel",
|
|
6925
|
+
"ariaLabelledBy",
|
|
6926
|
+
"ariaDescribedBy",
|
|
6927
|
+
"role",
|
|
6928
|
+
"panelClass",
|
|
6929
|
+
"dismissable",
|
|
6930
|
+
"closeOnEscape"
|
|
6931
|
+
],
|
|
6932
|
+
outputs: ["shown", "hidden"]
|
|
7137
6933
|
}
|
|
7138
6934
|
],
|
|
7139
6935
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
@@ -7153,11 +6949,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7153
6949
|
HxProgressSpinner,
|
|
7154
6950
|
HxPaginator,
|
|
7155
6951
|
HxCheckbox,
|
|
7156
|
-
HxInput
|
|
6952
|
+
HxInput,
|
|
6953
|
+
HxButton,
|
|
6954
|
+
HxPopover
|
|
7157
6955
|
],
|
|
7158
6956
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7159
6957
|
host: { class: "hx-data-table" },
|
|
7160
|
-
template: "<div class=\"hx-data-table-frame\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <div\n class=\"hx-table-scroll hx-data-table-scroll\"\n [class.hx-data-table-scrolls]=\"scrolls()\"\n [style.max-height]=\"scrollHeight() ?? null\"\n [attr.role]=\"scrolls() ? 'region' : null\"\n [attr.aria-label]=\"scrolls() ? (ariaLabel() ?? caption() ?? null) : null\"\n [attr.tabindex]=\"scrolls() ? 0 : null\"\n >\n <table\n class=\"hx-table\"\n [class.hx-table-sm]=\"size() === 'small'\"\n [class.hx-table-lg]=\"size() === 'large'\"\n [class.hx-table-striped]=\"stripedRows()\"\n [class.hx-table-gridlines]=\"showGridlines()\"\n [class.hx-table-hoverable]=\"hoverRows()\"\n [class.hx-table-sticky]=\"!!scrollHeight()\"\n >\n @if (hasCaption()) {\n <caption [class.hx-data-table-caption-hidden]=\"captionHidden()\">\n @if (captionTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" />\n } @else {\n {{ caption() ?? ariaLabel() }}\n }\n </caption>\n }\n <thead>\n <tr>\n @if (expanderColumn()) {\n <th scope=\"col\" class=\"hx-data-table-expander-cell\"><span class=\"hx-data-table-caption-hidden\">Row details</span></th>\n }\n @if (checkboxColumn()) {\n <th scope=\"col\" class=\"hx-data-table-select-cell\">\n <input type=\"checkbox\" hx-checkbox [attr.aria-label]=\"selectAllLabel()\" [checked]=\"allSelected()\" [indeterminate]=\"someSelected()\" (change)=\"toggleSelectAll($any($event.target).checked)\" />\n </th>\n }\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: columns() }\" />\n } @else {\n @for (column of columns(); track column.field) {\n <th\n scope=\"col\"\n [class]=\"'hx-data-table-align-' + (column.align ?? 'left')\"\n [class.hx-data-table-sorted]=\"orderOf(column) !== 0\"\n [style.width]=\"column.width ?? null\"\n [attr.aria-sort]=\"ariaSort(column)\"\n >\n @
|
|
6958
|
+
template: "<div class=\"hx-data-table-frame\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <div\n class=\"hx-table-scroll hx-data-table-scroll\"\n [class.hx-data-table-scrolls]=\"scrolls()\"\n [style.max-height]=\"scrollHeight() ?? null\"\n [attr.role]=\"scrolls() ? 'region' : null\"\n [attr.aria-label]=\"scrolls() ? (ariaLabel() ?? caption() ?? null) : null\"\n [attr.tabindex]=\"scrolls() ? 0 : null\"\n >\n <table\n class=\"hx-table\"\n [class.hx-table-sm]=\"size() === 'small'\"\n [class.hx-table-lg]=\"size() === 'large'\"\n [class.hx-table-striped]=\"stripedRows()\"\n [class.hx-table-gridlines]=\"showGridlines()\"\n [class.hx-table-hoverable]=\"hoverRows()\"\n [class.hx-table-sticky]=\"!!scrollHeight()\"\n >\n @if (hasCaption()) {\n <caption [class.hx-data-table-caption-hidden]=\"captionHidden()\">\n @if (captionTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" />\n } @else {\n {{ caption() ?? ariaLabel() }}\n }\n </caption>\n }\n <thead>\n <tr>\n @if (expanderColumn()) {\n <th scope=\"col\" class=\"hx-data-table-expander-cell\"><span class=\"hx-data-table-caption-hidden\">Row details</span></th>\n }\n @if (checkboxColumn()) {\n <th scope=\"col\" class=\"hx-data-table-select-cell\">\n <input type=\"checkbox\" hx-checkbox [attr.aria-label]=\"selectAllLabel()\" [checked]=\"allSelected()\" [indeterminate]=\"someSelected()\" (change)=\"toggleSelectAll($any($event.target).checked)\" />\n </th>\n }\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: columns() }\" />\n } @else {\n @for (column of columns(); track column.field) {\n <th\n scope=\"col\"\n [class]=\"'hx-data-table-align-' + (column.align ?? 'left')\"\n [class.hx-data-table-sorted]=\"orderOf(column) !== 0\"\n [style.width]=\"column.width ?? null\"\n [attr.aria-sort]=\"ariaSort(column)\"\n [attr.title]=\"column.title ?? null\"\n >\n @let extra = columnHeaders().get(column.field);\n @let menu = filterDisplay() === 'menu' && column.filter;\n @if (extra || menu) {\n <div class=\"hx-data-table-header-content\">\n <ng-container [ngTemplateOutlet]=\"label\" [ngTemplateOutletContext]=\"{ $implicit: column }\" />\n @if (extra) {\n <ng-container [ngTemplateOutlet]=\"extra\" [ngTemplateOutletContext]=\"{ $implicit: column }\" />\n }\n @if (menu) {\n <button\n type=\"button\"\n class=\"hx-data-table-filter-button\"\n [class.hx-data-table-filter-active]=\"!!filters()[column.field]\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"activeFilterColumn()?.field === column.field\"\n [attr.aria-label]=\"filterLabelFor(column)\"\n (click)=\"openFilter($event, column)\"\n >\n <span class=\"hx-data-table-filter-icon\" aria-hidden=\"true\"></span>\n </button>\n }\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"label\" [ngTemplateOutletContext]=\"{ $implicit: column }\" />\n }\n </th>\n }\n }\n </tr>\n @if (filterRow()) {\n <tr class=\"hx-data-table-filter-row\">\n @if (expanderColumn()) { <th></th> }\n @if (checkboxColumn()) { <th></th> }\n @for (column of columns(); track column.field) {\n <th>\n @if (column.filter) {\n <input type=\"text\" hx-input size=\"small\" fluid [attr.aria-label]=\"filterLabelFor(column)\" [value]=\"filters()[column.field] ?? ''\" (input)=\"setFilter(column, $any($event.target).value)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n <tbody>\n @for (row of visibleRows(); track trackRow(row, $index); let i = $index) {\n <tr\n [class]=\"rowClassOf(row)\"\n [class.hx-data-table-selectable]=\"selectable()\"\n [attr.aria-selected]=\"selectionMode() ? (isSelected(row) ? 'true' : 'false') : null\"\n [attr.tabindex]=\"selectable() ? 0 : null\"\n (click)=\"selectRow(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\"\n >\n @if (expanderColumn()) {\n <td class=\"hx-data-table-expander-cell\">\n <button type=\"button\" class=\"hx-data-table-expander\" [class.hx-data-table-expander-open]=\"isExpanded(row, i)\" [attr.aria-expanded]=\"isExpanded(row, i)\" [attr.aria-label]=\"isExpanded(row, i) ? collapseLabel() : expandLabel()\" (click)=\"toggleExpansion(row, i)\"></button>\n </td>\n }\n @if (checkboxColumn()) {\n <td class=\"hx-data-table-select-cell\">\n <input type=\"checkbox\" hx-checkbox [attr.aria-label]=\"selectRowLabel().replace('{row}', '' + (first() + i + 1))\" [checked]=\"isSelected(row)\" (change)=\"toggleRowCheckbox(row, $any($event.target).checked)\" />\n </td>\n }\n @if (bodyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: row, index: i, columns: columns() }\" />\n } @else {\n @for (column of columns(); track column.field) {\n <td [class]=\"'hx-data-table-align-' + (column.align ?? 'left')\">\n @if (cells().get(column.field); as cell) {\n <ng-container [ngTemplateOutlet]=\"cell\" [ngTemplateOutletContext]=\"{ $implicit: row, value: valueOf(row, column), index: i }\" />\n } @else {\n {{ valueOf(row, column) ?? emptyValue() }}\n }\n </td>\n }\n }\n </tr>\n @if (expansionTemplate(); as tpl) {\n @if (isExpanded(row, i)) {\n <tr class=\"hx-data-table-expansion\">\n <td [attr.colspan]=\"colspan()\">\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: row, index: i, columns: columns() }\" />\n </td>\n </tr>\n }\n }\n } @empty {\n <tr class=\"hx-data-table-empty\">\n <td [attr.colspan]=\"colspan()\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.template\" />\n } @else {\n {{ emptyMessage() }}\n }\n </td>\n </tr>\n }\n </tbody>\n @if (footerTemplate(); as tpl) {\n <tfoot>\n <tr>\n @if (expanderColumn()) { <td></td> }\n @if (checkboxColumn()) { <td></td> }\n <ng-container [ngTemplateOutlet]=\"tpl.template\" [ngTemplateOutletContext]=\"{ $implicit: columns() }\" />\n </tr>\n </tfoot>\n }\n </table>\n </div>\n <span class=\"hx-data-table-caption-hidden\" aria-live=\"polite\">{{ announcement() }}</span>\n @if (loading()) {\n <div class=\"hx-data-table-loading\" role=\"status\">\n <hx-progress-spinner ariaLabel=\"Loading\" />\n </div>\n }\n @if (paginator()) {\n <hx-paginator\n class=\"hx-data-table-paginator\"\n [rows]=\"rows()\"\n [first]=\"first()\"\n [totalRecords]=\"total()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showAll]=\"showAll()\"\n (showAllChange)=\"showAll.set($event)\"\n [allLabel]=\"allLabel()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n (pageChange)=\"onPage($event)\"\n />\n }\n</div>\n\n@if (filterDisplay() === 'menu') {\n @let active = activeFilterColumn();\n <hx-popover panelClass=\"hx-data-table-filter-popover\" [ariaLabel]=\"active ? filterLabelFor(active) : undefined\" (hidden)=\"activeFilterColumn.set(null)\">\n @if (active) {\n <div class=\"hx-data-table-filter-menu\">\n <input #filterInput type=\"text\" hx-input size=\"small\" fluid [attr.aria-label]=\"filterLabelFor(active)\" [value]=\"filters()[active.field] ?? ''\" (input)=\"setFilter(active, $any($event.target).value)\" (keydown.enter)=\"filterPopover()?.hide()\" />\n <button hx-button type=\"button\" size=\"small\" variant=\"text\" class=\"hx-data-table-filter-clear\" (click)=\"clearFilter(active)\">{{ clearLabel() }}</button>\n </div>\n }\n </hx-popover>\n}\n\n<ng-template #label let-column>\n @if (column.sortable) {\n <button type=\"button\" class=\"hx-data-table-sort\" (click)=\"sort(column)\">\n <span>{{ column.header }}</span>\n <span class=\"hx-data-table-sort-icon\" [class.hx-data-table-sort-asc]=\"orderOf(column) === 1\" [class.hx-data-table-sort-desc]=\"orderOf(column) === -1\" aria-hidden=\"true\"></span>\n @if (sortRank(column); as rank) {\n <span class=\"hx-data-table-sort-rank\" aria-hidden=\"true\">{{ rank }}</span>\n }\n </button>\n } @else {\n {{ column.header }}\n }\n</ng-template>\n"
|
|
7161
6959
|
}]
|
|
7162
6960
|
}],
|
|
7163
6961
|
propDecorators: {
|
|
@@ -7225,6 +7023,30 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7225
7023
|
required: false
|
|
7226
7024
|
}]
|
|
7227
7025
|
}],
|
|
7026
|
+
rowClass: [{
|
|
7027
|
+
type: i0.Input,
|
|
7028
|
+
args: [{
|
|
7029
|
+
isSignal: true,
|
|
7030
|
+
alias: "rowClass",
|
|
7031
|
+
required: false
|
|
7032
|
+
}]
|
|
7033
|
+
}],
|
|
7034
|
+
emptyValue: [{
|
|
7035
|
+
type: i0.Input,
|
|
7036
|
+
args: [{
|
|
7037
|
+
isSignal: true,
|
|
7038
|
+
alias: "emptyValue",
|
|
7039
|
+
required: false
|
|
7040
|
+
}]
|
|
7041
|
+
}],
|
|
7042
|
+
allLabel: [{
|
|
7043
|
+
type: i0.Input,
|
|
7044
|
+
args: [{
|
|
7045
|
+
isSignal: true,
|
|
7046
|
+
alias: "allLabel",
|
|
7047
|
+
required: false
|
|
7048
|
+
}]
|
|
7049
|
+
}],
|
|
7228
7050
|
loading: [{
|
|
7229
7051
|
type: i0.Input,
|
|
7230
7052
|
args: [{
|
|
@@ -7314,6 +7136,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7314
7136
|
required: false
|
|
7315
7137
|
}]
|
|
7316
7138
|
}],
|
|
7139
|
+
sortFirstOrder: [{
|
|
7140
|
+
type: i0.Input,
|
|
7141
|
+
args: [{
|
|
7142
|
+
isSignal: true,
|
|
7143
|
+
alias: "sortFirstOrder",
|
|
7144
|
+
required: false
|
|
7145
|
+
}]
|
|
7146
|
+
}],
|
|
7317
7147
|
paginator: [{
|
|
7318
7148
|
type: i0.Input,
|
|
7319
7149
|
args: [{
|
|
@@ -7466,6 +7296,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7466
7296
|
required: false
|
|
7467
7297
|
}]
|
|
7468
7298
|
}],
|
|
7299
|
+
clearLabel: [{
|
|
7300
|
+
type: i0.Input,
|
|
7301
|
+
args: [{
|
|
7302
|
+
isSignal: true,
|
|
7303
|
+
alias: "clearLabel",
|
|
7304
|
+
required: false
|
|
7305
|
+
}]
|
|
7306
|
+
}],
|
|
7307
|
+
filterPopover: [{
|
|
7308
|
+
type: i0.ViewChild,
|
|
7309
|
+
args: [i0.forwardRef(() => HxPopover), { isSignal: true }]
|
|
7310
|
+
}],
|
|
7311
|
+
filterInput: [{
|
|
7312
|
+
type: i0.ViewChild,
|
|
7313
|
+
args: ["filterInput", { isSignal: true }]
|
|
7314
|
+
}],
|
|
7469
7315
|
expandedRowKeys: [{
|
|
7470
7316
|
type: i0.Input,
|
|
7471
7317
|
args: [{
|
|
@@ -7497,6 +7343,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7497
7343
|
type: i0.ContentChildren,
|
|
7498
7344
|
args: [i0.forwardRef(() => HxCell), { isSignal: true }]
|
|
7499
7345
|
}],
|
|
7346
|
+
columnHeaderTemplates: [{
|
|
7347
|
+
type: i0.ContentChildren,
|
|
7348
|
+
args: [i0.forwardRef(() => HxColumnHeader), { isSignal: true }]
|
|
7349
|
+
}],
|
|
7500
7350
|
headerTemplate: [{
|
|
7501
7351
|
type: i0.ContentChild,
|
|
7502
7352
|
args: [i0.forwardRef(() => HxTableHeader), { isSignal: true }]
|
|
@@ -10906,17 +10756,25 @@ const EMPTY = {
|
|
|
10906
10756
|
to: null
|
|
10907
10757
|
};
|
|
10908
10758
|
const earlier = (a, b) => a && b ? a <= b ? a : b : a ?? b;
|
|
10759
|
+
const sameTime = (a, b) => a?.getTime() === b?.getTime();
|
|
10760
|
+
const sameRange = (a, b) => sameTime(a.from, b.from) && sameTime(a.to, b.to);
|
|
10909
10761
|
const later = (a, b) => a && b ? a >= b ? a : b : a ?? b;
|
|
10910
10762
|
var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
10911
10763
|
fromLabel = input("From", ...ngDevMode ? [{ debugName: "fromLabel" }] : /* istanbul ignore next */ []);
|
|
10912
10764
|
toLabel = input("To", ...ngDevMode ? [{ debugName: "toLabel" }] : /* istanbul ignore next */ []);
|
|
10913
10765
|
separator = input("-", ...ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []);
|
|
10914
10766
|
placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
10767
|
+
presetsLabel = input("Presets", ...ngDevMode ? [{ debugName: "presetsLabel" }] : /* istanbul ignore next */ []);
|
|
10768
|
+
presets = input([], ...ngDevMode ? [{ debugName: "presets" }] : /* istanbul ignore next */ []);
|
|
10915
10769
|
clearLabel = input("Clear", ...ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []);
|
|
10916
10770
|
cancelLabel = input("Cancel", ...ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []);
|
|
10917
10771
|
submitLabel = input("Submit", ...ngDevMode ? [{ debugName: "submitLabel" }] : /* istanbul ignore next */ []);
|
|
10918
10772
|
chooseLabel = input("Choose date range", ...ngDevMode ? [{ debugName: "chooseLabel" }] : /* istanbul ignore next */ []);
|
|
10919
10773
|
inputId = input(...ngDevMode ? [void 0, { debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
10774
|
+
typeable = input(false, {
|
|
10775
|
+
...ngDevMode ? { debugName: "typeable" } : /* istanbul ignore next */ {},
|
|
10776
|
+
transform: booleanAttribute
|
|
10777
|
+
});
|
|
10920
10778
|
showTime = input(true, {
|
|
10921
10779
|
...ngDevMode ? { debugName: "showTime" } : /* istanbul ignore next */ {},
|
|
10922
10780
|
transform: booleanAttribute
|
|
@@ -10995,6 +10853,7 @@ var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
|
10995
10853
|
#lastFrom = null;
|
|
10996
10854
|
#lastTo = null;
|
|
10997
10855
|
#cvaDisabled = signal(false, ...ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []);
|
|
10856
|
+
#typed = signal(null, ...ngDevMode ? [{ debugName: "#typed" }] : /* istanbul ignore next */ []);
|
|
10998
10857
|
#format = computed(() => {
|
|
10999
10858
|
const custom = this.dateFormat();
|
|
11000
10859
|
if (custom) return new Intl.DateTimeFormat(this.locale(), custom);
|
|
@@ -11012,6 +10871,8 @@ var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
|
11012
10871
|
return new Intl.DateTimeFormat(this.locale(), options);
|
|
11013
10872
|
}, ...ngDevMode ? [{ debugName: "#format" }] : /* istanbul ignore next */ []);
|
|
11014
10873
|
text = computed(() => {
|
|
10874
|
+
const typed = this.#typed();
|
|
10875
|
+
if (typed !== null) return typed;
|
|
11015
10876
|
const { from, to } = this.value();
|
|
11016
10877
|
if (!from && !to) return "";
|
|
11017
10878
|
const fmt = this.#format();
|
|
@@ -11026,6 +10887,12 @@ var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
|
11026
10887
|
toValue = computed(() => this.#pickerValue(this.draft().to), ...ngDevMode ? [{ debugName: "toValue" }] : /* istanbul ignore next */ []);
|
|
11027
10888
|
#onChange = () => {};
|
|
11028
10889
|
#onTouched = () => {};
|
|
10890
|
+
constructor() {
|
|
10891
|
+
effect(() => {
|
|
10892
|
+
this.value();
|
|
10893
|
+
untracked(() => this.#typed.set(null));
|
|
10894
|
+
});
|
|
10895
|
+
}
|
|
11029
10896
|
writeValue(value) {
|
|
11030
10897
|
this.value.set({
|
|
11031
10898
|
from: value?.from ?? null,
|
|
@@ -11061,12 +10928,76 @@ var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
|
11061
10928
|
onAttach() {
|
|
11062
10929
|
afterNextRender(() => (this.daysPicker() ?? this.timePicker())?.focus(), { injector: this.#injector });
|
|
11063
10930
|
}
|
|
10931
|
+
onFieldClick() {
|
|
10932
|
+
if (!this.typeable()) this.show();
|
|
10933
|
+
}
|
|
11064
10934
|
onFieldKeydown(event) {
|
|
11065
|
-
if (
|
|
10935
|
+
if (this.typeable() && event.key === "Enter") {
|
|
10936
|
+
event.preventDefault();
|
|
10937
|
+
this.commitTyping();
|
|
10938
|
+
} else if (this.typeable() && event.key === "Escape" && this.#typed() !== null) {
|
|
10939
|
+
event.preventDefault();
|
|
10940
|
+
this.#revertTyping();
|
|
10941
|
+
} else if (event.key === "ArrowDown" || event.altKey && event.key === "ArrowUp" || !this.typeable() && (event.key === "Enter" || event.key === " ")) {
|
|
11066
10942
|
event.preventDefault();
|
|
11067
10943
|
this.show();
|
|
11068
10944
|
}
|
|
11069
10945
|
}
|
|
10946
|
+
onTyping(event) {
|
|
10947
|
+
if (!this.typeable() || this.isDisabled()) return;
|
|
10948
|
+
this.#typed.set(event.target.value);
|
|
10949
|
+
}
|
|
10950
|
+
commitTyping() {
|
|
10951
|
+
const typed = this.#typed();
|
|
10952
|
+
if (typed === null || this.isDisabled()) return;
|
|
10953
|
+
this.#typed.set(null);
|
|
10954
|
+
const next = this.#parseRange(typed);
|
|
10955
|
+
if (next && !sameRange(next, this.value())) {
|
|
10956
|
+
this.#commit(next);
|
|
10957
|
+
if (this.open()) this.#stage(next);
|
|
10958
|
+
}
|
|
10959
|
+
this.#showValue();
|
|
10960
|
+
}
|
|
10961
|
+
#revertTyping() {
|
|
10962
|
+
this.#typed.set(null);
|
|
10963
|
+
this.#showValue();
|
|
10964
|
+
}
|
|
10965
|
+
#showValue() {
|
|
10966
|
+
const field = this.field();
|
|
10967
|
+
if (field) field.nativeElement.value = this.text();
|
|
10968
|
+
}
|
|
10969
|
+
#parseRange(typed) {
|
|
10970
|
+
const text = typed.trim();
|
|
10971
|
+
if (text === "") return EMPTY;
|
|
10972
|
+
const separator = this.separator().trim().replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
10973
|
+
const parts = separator ? text.split(new RegExp(`(?:^|\\s+)${separator}(?:\\s+|$)`)) : [text];
|
|
10974
|
+
if (parts.length > 2) return null;
|
|
10975
|
+
const { from: oldFrom, to: oldTo } = this.value();
|
|
10976
|
+
const from = this.#parseSide(parts[0], oldFrom);
|
|
10977
|
+
const to = this.#parseSide(parts[1] ?? "", oldTo ?? oldFrom);
|
|
10978
|
+
if (from === void 0 || to === void 0) return null;
|
|
10979
|
+
return from && to && to < from ? {
|
|
10980
|
+
from: to,
|
|
10981
|
+
to: from
|
|
10982
|
+
} : {
|
|
10983
|
+
from,
|
|
10984
|
+
to
|
|
10985
|
+
};
|
|
10986
|
+
}
|
|
10987
|
+
#parseSide(part, old) {
|
|
10988
|
+
const text = part.trim();
|
|
10989
|
+
if (text === "") return null;
|
|
10990
|
+
const date = this.#timed() ? parseDateTimeText(text, {
|
|
10991
|
+
locale: this.locale(),
|
|
10992
|
+
showMinutes: this.showMinutes(),
|
|
10993
|
+
timeOnly: this.timeOnly(),
|
|
10994
|
+
fallbackDay: old ?? /* @__PURE__ */ new Date()
|
|
10995
|
+
}) : parseDateText(text, this.locale());
|
|
10996
|
+
if (!date || this.#isBlocked(date)) return void 0;
|
|
10997
|
+
const [min, max] = [this.minDate(), this.maxDate()];
|
|
10998
|
+
if (min && date < min || max && date > max) return void 0;
|
|
10999
|
+
return date;
|
|
11000
|
+
}
|
|
11070
11001
|
onOverlayKeydown(event) {
|
|
11071
11002
|
if (event.key === "Escape") {
|
|
11072
11003
|
event.preventDefault();
|
|
@@ -11079,6 +11010,27 @@ var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
|
11079
11010
|
clear() {
|
|
11080
11011
|
this.#stage(EMPTY);
|
|
11081
11012
|
}
|
|
11013
|
+
applyPreset(preset) {
|
|
11014
|
+
const { from: oldFrom, to: oldTo } = this.draft();
|
|
11015
|
+
const from = this.#fitPreset(preset.from(), oldFrom);
|
|
11016
|
+
const to = this.#fitPreset(preset.to(), oldTo ?? oldFrom);
|
|
11017
|
+
if (from === void 0 || to === void 0) return;
|
|
11018
|
+
this.#stage(from && to && to < from ? {
|
|
11019
|
+
from: to,
|
|
11020
|
+
to: from
|
|
11021
|
+
} : {
|
|
11022
|
+
from,
|
|
11023
|
+
to
|
|
11024
|
+
});
|
|
11025
|
+
}
|
|
11026
|
+
#fitPreset(date, old) {
|
|
11027
|
+
if (!isValidDate(date)) return null;
|
|
11028
|
+
const fitted = this.timeOnly() ? this.#atTime(old ?? /* @__PURE__ */ new Date(), date) : this.#timed() ? date : startOfDay(date);
|
|
11029
|
+
return this.#isBlocked(fitted) ? void 0 : fitted;
|
|
11030
|
+
}
|
|
11031
|
+
#timed() {
|
|
11032
|
+
return this.showTime() || this.timeOnly();
|
|
11033
|
+
}
|
|
11082
11034
|
submit() {
|
|
11083
11035
|
this.#commit(this.draft());
|
|
11084
11036
|
this.close(true);
|
|
@@ -11220,6 +11172,20 @@ var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
|
11220
11172
|
isRequired: false,
|
|
11221
11173
|
transformFunction: null
|
|
11222
11174
|
},
|
|
11175
|
+
presetsLabel: {
|
|
11176
|
+
classPropertyName: "presetsLabel",
|
|
11177
|
+
publicName: "presetsLabel",
|
|
11178
|
+
isSignal: true,
|
|
11179
|
+
isRequired: false,
|
|
11180
|
+
transformFunction: null
|
|
11181
|
+
},
|
|
11182
|
+
presets: {
|
|
11183
|
+
classPropertyName: "presets",
|
|
11184
|
+
publicName: "presets",
|
|
11185
|
+
isSignal: true,
|
|
11186
|
+
isRequired: false,
|
|
11187
|
+
transformFunction: null
|
|
11188
|
+
},
|
|
11223
11189
|
clearLabel: {
|
|
11224
11190
|
classPropertyName: "clearLabel",
|
|
11225
11191
|
publicName: "clearLabel",
|
|
@@ -11255,6 +11221,13 @@ var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
|
11255
11221
|
isRequired: false,
|
|
11256
11222
|
transformFunction: null
|
|
11257
11223
|
},
|
|
11224
|
+
typeable: {
|
|
11225
|
+
classPropertyName: "typeable",
|
|
11226
|
+
publicName: "typeable",
|
|
11227
|
+
isSignal: true,
|
|
11228
|
+
isRequired: false,
|
|
11229
|
+
transformFunction: null
|
|
11230
|
+
},
|
|
11258
11231
|
showTime: {
|
|
11259
11232
|
classPropertyName: "showTime",
|
|
11260
11233
|
publicName: "showTime",
|
|
@@ -11433,7 +11406,7 @@ var HxDateTimeRangePicker = class HxDateTimeRangePicker {
|
|
|
11433
11406
|
}
|
|
11434
11407
|
],
|
|
11435
11408
|
ngImport: i0,
|
|
11436
|
-
template: "<div\n class=\"hx-date-picker hx-date-picker-has-icon hx-date-time-range-picker-control\"\n [class.hx-date-picker-open]=\"open()\"\n [class.hx-date-picker-disabled]=\"isDisabled()\"\n [class.hx-date-picker-invalid]=\"invalid()\"\n>\n <div class=\"hx-date-picker-field\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <input\n #field\n type=\"text\"\n
|
|
11409
|
+
template: "<div\n class=\"hx-date-picker hx-date-picker-has-icon hx-date-time-range-picker-control\"\n [class.hx-date-picker-open]=\"open()\"\n [class.hx-date-picker-disabled]=\"isDisabled()\"\n [class.hx-date-picker-invalid]=\"invalid()\"\n>\n <div class=\"hx-date-picker-field\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <input\n #field\n type=\"text\"\n [readOnly]=\"!typeable()\"\n class=\"hx-date-picker-input\"\n autocomplete=\"off\"\n aria-haspopup=\"dialog\"\n [attr.id]=\"inputId() ?? null\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [value]=\"text()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? popupId : null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n (input)=\"onTyping($event)\"\n (change)=\"commitTyping()\"\n (click)=\"onFieldClick()\"\n (keydown)=\"onFieldKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"hx-date-picker-trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"chooseLabel()\"\n [attr.aria-expanded]=\"open()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n >\n <span class=\"hx-date-picker-trigger-icon\" aria-hidden=\"true\"></span>\n </button>\n </div>\n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayPanelClass=\"hx-date-picker-overlay\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayPush]=\"true\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (overlayKeydown)=\"onOverlayKeydown($event)\"\n (attach)=\"onAttach()\"\n (detach)=\"open.set(false)\"\n >\n <div\n class=\"hx-date-picker-popup hx-date-time-range-picker-popup\"\n role=\"dialog\"\n aria-modal=\"false\"\n [id]=\"popupId\"\n [attr.aria-label]=\"ariaLabel() ?? chooseLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n (focusout)=\"onPopupFocusOut($event)\"\n >\n @if (presets().length > 0) {\n <div class=\"hx-date-time-range-picker-presets\" role=\"group\" [attr.aria-label]=\"presetsLabel()\">\n @for (preset of presets(); track $index) {\n <button type=\"button\" class=\"hx-date-picker-button hx-date-time-range-picker-preset\" (click)=\"applyPreset(preset)\">{{ preset.label }}</button>\n }\n </div>\n }\n <div class=\"hx-date-time-range-picker-body\">\n @if (!timeOnly()) {\n <hx-date-picker\n class=\"hx-date-time-range-picker-days\"\n inline\n selectionMode=\"range\"\n [ariaLabel]=\"chooseLabel()\"\n [value]=\"days()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [locale]=\"locale()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [disabledDates]=\"disabledDates()\"\n (valueChange)=\"setDays($event)\"\n />\n }\n @if (showTime() || timeOnly()) {\n <div class=\"hx-date-time-range-picker-times\">\n <div class=\"hx-date-time-range-picker-time\">\n <span class=\"hx-date-time-range-picker-caption\" aria-hidden=\"true\">{{ fromLabel() }}</span>\n <hx-time-picker\n inline\n class=\"hx-date-time-range-picker-from\"\n [ariaLabel]=\"fromLabel()\"\n [value]=\"fromValue()\"\n [hourFormat]=\"hourFormat()\"\n [showMinutes]=\"showMinutes()\"\n [showSeconds]=\"showSeconds()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [locale]=\"locale()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"setFromTime($event)\"\n />\n </div>\n <div class=\"hx-date-time-range-picker-time\">\n <span class=\"hx-date-time-range-picker-caption\" aria-hidden=\"true\">{{ toLabel() }}</span>\n <hx-time-picker\n inline\n class=\"hx-date-time-range-picker-to\"\n [ariaLabel]=\"toLabel()\"\n [value]=\"toValue()\"\n [hourFormat]=\"hourFormat()\"\n [showMinutes]=\"showMinutes()\"\n [showSeconds]=\"showSeconds()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [locale]=\"locale()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"setToTime($event)\"\n />\n </div>\n </div>\n }\n </div>\n <div class=\"hx-date-picker-buttonbar hx-date-time-range-picker-footer\">\n @if (showButtonBar()) {\n <button type=\"button\" class=\"hx-date-picker-button\" (click)=\"clear()\">{{ clearLabel() }}</button>\n }\n <span class=\"hx-date-time-range-picker-spacer\"></span>\n <button type=\"button\" class=\"hx-date-picker-button hx-date-time-range-picker-cancel\" (click)=\"close(true)\">{{ cancelLabel() }}</button>\n <button type=\"button\" class=\"hx-date-picker-button hx-date-time-range-picker-submit\" (click)=\"submit()\">{{ submitLabel() }}</button>\n </div>\n </div>\n </ng-template>\n</div>\n",
|
|
11437
11410
|
dependencies: [
|
|
11438
11411
|
{
|
|
11439
11412
|
kind: "directive",
|
|
@@ -11575,9 +11548,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11575
11548
|
class: "hx-date-time-range-picker",
|
|
11576
11549
|
"(focusout)": "onHostFocusOut($event)"
|
|
11577
11550
|
},
|
|
11578
|
-
template: "<div\n class=\"hx-date-picker hx-date-picker-has-icon hx-date-time-range-picker-control\"\n [class.hx-date-picker-open]=\"open()\"\n [class.hx-date-picker-disabled]=\"isDisabled()\"\n [class.hx-date-picker-invalid]=\"invalid()\"\n>\n <div class=\"hx-date-picker-field\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <input\n #field\n type=\"text\"\n
|
|
11551
|
+
template: "<div\n class=\"hx-date-picker hx-date-picker-has-icon hx-date-time-range-picker-control\"\n [class.hx-date-picker-open]=\"open()\"\n [class.hx-date-picker-disabled]=\"isDisabled()\"\n [class.hx-date-picker-invalid]=\"invalid()\"\n>\n <div class=\"hx-date-picker-field\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <input\n #field\n type=\"text\"\n [readOnly]=\"!typeable()\"\n class=\"hx-date-picker-input\"\n autocomplete=\"off\"\n aria-haspopup=\"dialog\"\n [attr.id]=\"inputId() ?? null\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [value]=\"text()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? popupId : null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n (input)=\"onTyping($event)\"\n (change)=\"commitTyping()\"\n (click)=\"onFieldClick()\"\n (keydown)=\"onFieldKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"hx-date-picker-trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"chooseLabel()\"\n [attr.aria-expanded]=\"open()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n >\n <span class=\"hx-date-picker-trigger-icon\" aria-hidden=\"true\"></span>\n </button>\n </div>\n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayPanelClass=\"hx-date-picker-overlay\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayPush]=\"true\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (overlayKeydown)=\"onOverlayKeydown($event)\"\n (attach)=\"onAttach()\"\n (detach)=\"open.set(false)\"\n >\n <div\n class=\"hx-date-picker-popup hx-date-time-range-picker-popup\"\n role=\"dialog\"\n aria-modal=\"false\"\n [id]=\"popupId\"\n [attr.aria-label]=\"ariaLabel() ?? chooseLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n (focusout)=\"onPopupFocusOut($event)\"\n >\n @if (presets().length > 0) {\n <div class=\"hx-date-time-range-picker-presets\" role=\"group\" [attr.aria-label]=\"presetsLabel()\">\n @for (preset of presets(); track $index) {\n <button type=\"button\" class=\"hx-date-picker-button hx-date-time-range-picker-preset\" (click)=\"applyPreset(preset)\">{{ preset.label }}</button>\n }\n </div>\n }\n <div class=\"hx-date-time-range-picker-body\">\n @if (!timeOnly()) {\n <hx-date-picker\n class=\"hx-date-time-range-picker-days\"\n inline\n selectionMode=\"range\"\n [ariaLabel]=\"chooseLabel()\"\n [value]=\"days()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [locale]=\"locale()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [disabledDates]=\"disabledDates()\"\n (valueChange)=\"setDays($event)\"\n />\n }\n @if (showTime() || timeOnly()) {\n <div class=\"hx-date-time-range-picker-times\">\n <div class=\"hx-date-time-range-picker-time\">\n <span class=\"hx-date-time-range-picker-caption\" aria-hidden=\"true\">{{ fromLabel() }}</span>\n <hx-time-picker\n inline\n class=\"hx-date-time-range-picker-from\"\n [ariaLabel]=\"fromLabel()\"\n [value]=\"fromValue()\"\n [hourFormat]=\"hourFormat()\"\n [showMinutes]=\"showMinutes()\"\n [showSeconds]=\"showSeconds()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [locale]=\"locale()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"setFromTime($event)\"\n />\n </div>\n <div class=\"hx-date-time-range-picker-time\">\n <span class=\"hx-date-time-range-picker-caption\" aria-hidden=\"true\">{{ toLabel() }}</span>\n <hx-time-picker\n inline\n class=\"hx-date-time-range-picker-to\"\n [ariaLabel]=\"toLabel()\"\n [value]=\"toValue()\"\n [hourFormat]=\"hourFormat()\"\n [showMinutes]=\"showMinutes()\"\n [showSeconds]=\"showSeconds()\"\n [stepHour]=\"stepHour()\"\n [stepMinute]=\"stepMinute()\"\n [stepSecond]=\"stepSecond()\"\n [locale]=\"locale()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"setToTime($event)\"\n />\n </div>\n </div>\n }\n </div>\n <div class=\"hx-date-picker-buttonbar hx-date-time-range-picker-footer\">\n @if (showButtonBar()) {\n <button type=\"button\" class=\"hx-date-picker-button\" (click)=\"clear()\">{{ clearLabel() }}</button>\n }\n <span class=\"hx-date-time-range-picker-spacer\"></span>\n <button type=\"button\" class=\"hx-date-picker-button hx-date-time-range-picker-cancel\" (click)=\"close(true)\">{{ cancelLabel() }}</button>\n <button type=\"button\" class=\"hx-date-picker-button hx-date-time-range-picker-submit\" (click)=\"submit()\">{{ submitLabel() }}</button>\n </div>\n </div>\n </ng-template>\n</div>\n"
|
|
11579
11552
|
}]
|
|
11580
11553
|
}],
|
|
11554
|
+
ctorParameters: () => [],
|
|
11581
11555
|
propDecorators: {
|
|
11582
11556
|
fromLabel: [{
|
|
11583
11557
|
type: i0.Input,
|
|
@@ -11611,6 +11585,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11611
11585
|
required: false
|
|
11612
11586
|
}]
|
|
11613
11587
|
}],
|
|
11588
|
+
presetsLabel: [{
|
|
11589
|
+
type: i0.Input,
|
|
11590
|
+
args: [{
|
|
11591
|
+
isSignal: true,
|
|
11592
|
+
alias: "presetsLabel",
|
|
11593
|
+
required: false
|
|
11594
|
+
}]
|
|
11595
|
+
}],
|
|
11596
|
+
presets: [{
|
|
11597
|
+
type: i0.Input,
|
|
11598
|
+
args: [{
|
|
11599
|
+
isSignal: true,
|
|
11600
|
+
alias: "presets",
|
|
11601
|
+
required: false
|
|
11602
|
+
}]
|
|
11603
|
+
}],
|
|
11614
11604
|
clearLabel: [{
|
|
11615
11605
|
type: i0.Input,
|
|
11616
11606
|
args: [{
|
|
@@ -11651,6 +11641,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11651
11641
|
required: false
|
|
11652
11642
|
}]
|
|
11653
11643
|
}],
|
|
11644
|
+
typeable: [{
|
|
11645
|
+
type: i0.Input,
|
|
11646
|
+
args: [{
|
|
11647
|
+
isSignal: true,
|
|
11648
|
+
alias: "typeable",
|
|
11649
|
+
required: false
|
|
11650
|
+
}]
|
|
11651
|
+
}],
|
|
11654
11652
|
showTime: [{
|
|
11655
11653
|
type: i0.Input,
|
|
11656
11654
|
args: [{
|
|
@@ -21743,7 +21741,7 @@ var HxTheme = class HxTheme {
|
|
|
21743
21741
|
constructor() {
|
|
21744
21742
|
effect(() => {
|
|
21745
21743
|
const dark = this.#dark();
|
|
21746
|
-
if (!this.#browser) return;
|
|
21744
|
+
if (!this.#browser || this.#options.manageDark === false) return;
|
|
21747
21745
|
const root = this.#doc.documentElement;
|
|
21748
21746
|
const doc = this.#doc;
|
|
21749
21747
|
const apply = () => this.#darkSelector.apply(root, dark);
|
|
@@ -23848,6 +23846,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
23848
23846
|
}]
|
|
23849
23847
|
}
|
|
23850
23848
|
});
|
|
23851
|
-
export {
|
|
23849
|
+
export { HX_DIALOG_DATA, HX_PRIMARY_COLORS, HX_SURFACES, HX_SURFACE_NAMES, HX_THEME_OPTIONS, HxAccordion, HxAccordionContent, HxAccordionHeader, HxAccordionPanel, HxAutoComplete, HxAvatar, HxAvatarGroup, HxBadge, HxBreadcrumb, HxButton, HxButtonGroup, HxCard, HxCarousel, HxCarouselItem, HxCell, HxCheckbox, HxChip, HxColumnHeader, HxConfirmDialog, HxConfirmPopup, HxConfirmationService, HxDataTable, HxDatePicker, HxDateTimePicker, HxDateTimeRangePicker, HxDialog, HxDialogRef, HxDialogService, HxDivider, HxDrawer, HxFieldset, HxFileUpload, HxFloatLabel, HxGalleria, HxGalleriaCaption, HxGalleriaItemTemplate, HxGalleriaThumbnail, HxIconField, HxImage, HxImageIndicator, HxInput, HxInputGroup, HxInputGroupAddon, HxInputIcon, HxInputNumber, HxListbox, HxMenu, HxMenubar, HxMessage, HxMessageService, HxMultiSelect, HxOverlayBadge, HxPaginator, HxPanel, HxPassword, HxPopover, HxProgressBar, HxProgressSpinner, HxRadio, HxRating, HxRowExpansion, HxSelect, HxSelectButton, HxSkeleton, HxSlider, HxSplitButton, HxStep, HxStepContent, HxStepList, HxStepPanel, HxStepPanels, HxStepper, HxSwitch, HxTab, HxTabContent, HxTabList, HxTabPanel, HxTabPanels, HxTable, HxTableBody, HxTableCaption, HxTableEmpty, HxTableFooter, HxTableHeader, HxTabs, HxTag, HxTheme, HxTimePicker, HxTimeline, HxTimelineContent, HxTimelineMarker, HxTimelineOpposite, HxToast, HxToastItem, HxToggleButton, HxToolbar, HxTooltip, HxTree, HxTreeNodeTemplate, compareValues, formatFileSize, matchesAccept, provideHxTheme, resolveField };
|
|
23852
23850
|
|
|
23853
23851
|
//# sourceMappingURL=gravionlabs-helix-ui.mjs.map
|