@shival99/z-ui 2.6.5 → 2.6.7
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/.npmignore +5 -5
- package/assets/css/base.css +16 -16
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +10 -13
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button.mjs +7 -7
- package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-chat.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-command.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +9 -7
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +5 -4
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +106 -29
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +3 -2
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-utils.mjs +27 -1
- package/fesm2022/shival99-z-ui-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +3 -1
- package/types/shival99-z-ui-components-z-menu.d.ts +2 -0
- package/types/shival99-z-ui-components-z-select.d.ts +1 -0
- package/types/shival99-z-ui-components-z-table.d.ts +2 -1
- package/types/shival99-z-ui-components-z-upload.d.ts +1 -0
- package/types/shival99-z-ui-utils.d.ts +8 -2
|
@@ -21,7 +21,7 @@ import { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';
|
|
|
21
21
|
import { ZSafeHtmlPipe, ZFormatNumPipe } from '@shival99/z-ui/pipes';
|
|
22
22
|
import { ZTranslateService, ZCacheService } from '@shival99/z-ui/services';
|
|
23
23
|
import { ZExcelService } from '@shival99/z-ui/services/excel';
|
|
24
|
-
import { zMergeClasses } from '@shival99/z-ui/utils';
|
|
24
|
+
import { zMergeClasses, zCreateDestroySafeTimeout } from '@shival99/z-ui/utils';
|
|
25
25
|
import { tableFeatures, createSortedRowModel, createPaginatedRowModel, createFilteredRowModel, createFacetedUniqueValues, createFacetedRowModel, createFacetedMinMaxValues, createExpandedRowModel, stockFeatures, injectTable, FlexRenderDirective } from '@tanstack/angular-table';
|
|
26
26
|
import { injectVirtualizer, defaultRangeExtractor, elementScroll } from '@tanstack/angular-virtual';
|
|
27
27
|
import { NgScrollbar } from 'ngx-scrollbar';
|
|
@@ -1790,6 +1790,7 @@ class ZTableEditCellComponent {
|
|
|
1790
1790
|
[zDisabled]="cfg().disabled"
|
|
1791
1791
|
[zReadonly]="cfg().readonly"
|
|
1792
1792
|
[ngModel]="numericValue()"
|
|
1793
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1793
1794
|
(ngModelChange)="onValueChange($event)"
|
|
1794
1795
|
(zOnBlur)="onInputBlur()"
|
|
1795
1796
|
class="w-full"
|
|
@@ -1809,6 +1810,7 @@ class ZTableEditCellComponent {
|
|
|
1809
1810
|
[zDisabled]="cfg().disabled"
|
|
1810
1811
|
[zReadonly]="cfg().readonly"
|
|
1811
1812
|
[ngModel]="value()"
|
|
1813
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1812
1814
|
[zPlaceholder]="cfg().placeholder"
|
|
1813
1815
|
(ngModelChange)="onSelectChange($event)"
|
|
1814
1816
|
class="w-full min-w-0"
|
|
@@ -1830,6 +1832,7 @@ class ZTableEditCellComponent {
|
|
|
1830
1832
|
[zReadonly]="cfg().readonly"
|
|
1831
1833
|
[zPlaceholder]="cfg().placeholder"
|
|
1832
1834
|
[ngModel]="stringValue()"
|
|
1835
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1833
1836
|
(zOnCommit)="onAutocompleteCommit($event)"
|
|
1834
1837
|
(zOnSelect)="onAutocompleteSelect($event)"
|
|
1835
1838
|
(zOnBlur)="onInputBlur()"
|
|
@@ -1851,6 +1854,7 @@ class ZTableEditCellComponent {
|
|
|
1851
1854
|
[zLoadingOutline]="true"
|
|
1852
1855
|
[zPlaceholder]="cfg().placeholder"
|
|
1853
1856
|
[ngModel]="dateValue()"
|
|
1857
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1854
1858
|
(ngModelChange)="onImmediateChange($event)"
|
|
1855
1859
|
class="w-full"
|
|
1856
1860
|
/>
|
|
@@ -1868,6 +1872,7 @@ class ZTableEditCellComponent {
|
|
|
1868
1872
|
[zDisabled]="cfg().disabled"
|
|
1869
1873
|
[zReadonly]="cfg().readonly"
|
|
1870
1874
|
[ngModel]="stringValue()"
|
|
1875
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1871
1876
|
(ngModelChange)="onValueChange($event)"
|
|
1872
1877
|
(zOnBlur)="onInputBlur()"
|
|
1873
1878
|
class="w-full"
|
|
@@ -1885,6 +1890,7 @@ class ZTableEditCellComponent {
|
|
|
1885
1890
|
[zDisabled]="cfg().disabled"
|
|
1886
1891
|
[zReadonly]="cfg().readonly"
|
|
1887
1892
|
[ngModel]="stringValue()"
|
|
1893
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1888
1894
|
(ngModelChange)="onValueChange($event)"
|
|
1889
1895
|
(zOnBlur)="onInputBlur()"
|
|
1890
1896
|
class="w-full"
|
|
@@ -1951,6 +1957,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
1951
1957
|
[zDisabled]="cfg().disabled"
|
|
1952
1958
|
[zReadonly]="cfg().readonly"
|
|
1953
1959
|
[ngModel]="numericValue()"
|
|
1960
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1954
1961
|
(ngModelChange)="onValueChange($event)"
|
|
1955
1962
|
(zOnBlur)="onInputBlur()"
|
|
1956
1963
|
class="w-full"
|
|
@@ -1970,6 +1977,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
1970
1977
|
[zDisabled]="cfg().disabled"
|
|
1971
1978
|
[zReadonly]="cfg().readonly"
|
|
1972
1979
|
[ngModel]="value()"
|
|
1980
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1973
1981
|
[zPlaceholder]="cfg().placeholder"
|
|
1974
1982
|
(ngModelChange)="onSelectChange($event)"
|
|
1975
1983
|
class="w-full min-w-0"
|
|
@@ -1991,6 +1999,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
1991
1999
|
[zReadonly]="cfg().readonly"
|
|
1992
2000
|
[zPlaceholder]="cfg().placeholder"
|
|
1993
2001
|
[ngModel]="stringValue()"
|
|
2002
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1994
2003
|
(zOnCommit)="onAutocompleteCommit($event)"
|
|
1995
2004
|
(zOnSelect)="onAutocompleteSelect($event)"
|
|
1996
2005
|
(zOnBlur)="onInputBlur()"
|
|
@@ -2012,6 +2021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
2012
2021
|
[zLoadingOutline]="true"
|
|
2013
2022
|
[zPlaceholder]="cfg().placeholder"
|
|
2014
2023
|
[ngModel]="dateValue()"
|
|
2024
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2015
2025
|
(ngModelChange)="onImmediateChange($event)"
|
|
2016
2026
|
class="w-full"
|
|
2017
2027
|
/>
|
|
@@ -2029,6 +2039,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
2029
2039
|
[zDisabled]="cfg().disabled"
|
|
2030
2040
|
[zReadonly]="cfg().readonly"
|
|
2031
2041
|
[ngModel]="stringValue()"
|
|
2042
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2032
2043
|
(ngModelChange)="onValueChange($event)"
|
|
2033
2044
|
(zOnBlur)="onInputBlur()"
|
|
2034
2045
|
class="w-full"
|
|
@@ -2046,6 +2057,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
2046
2057
|
[zDisabled]="cfg().disabled"
|
|
2047
2058
|
[zReadonly]="cfg().readonly"
|
|
2048
2059
|
[ngModel]="stringValue()"
|
|
2060
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2049
2061
|
(ngModelChange)="onValueChange($event)"
|
|
2050
2062
|
(zOnBlur)="onInputBlur()"
|
|
2051
2063
|
class="w-full"
|
|
@@ -2629,7 +2641,13 @@ class ZTableFilterComponent {
|
|
|
2629
2641
|
@if (canSort()) {
|
|
2630
2642
|
<div class="p-1">
|
|
2631
2643
|
<div class="grid min-w-0 grid-cols-[1fr_1fr_2rem] items-center gap-2">
|
|
2632
|
-
<z-input
|
|
2644
|
+
<z-input
|
|
2645
|
+
class="min-w-0"
|
|
2646
|
+
zSize="sm"
|
|
2647
|
+
zReadonly
|
|
2648
|
+
[ngModel]="sortLabelKey() | translate"
|
|
2649
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2650
|
+
/>
|
|
2633
2651
|
<z-select
|
|
2634
2652
|
class="col-span-2 min-w-0"
|
|
2635
2653
|
zSize="sm"
|
|
@@ -2637,6 +2655,7 @@ class ZTableFilterComponent {
|
|
|
2637
2655
|
[zWrap]="false"
|
|
2638
2656
|
[zScrollClose]="true"
|
|
2639
2657
|
[ngModel]="draftSortValue()"
|
|
2658
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2640
2659
|
[zPlaceholder]="'i18n_z_ui_table_sort' | translate"
|
|
2641
2660
|
(ngModelChange)="updateDraftSort($event)"
|
|
2642
2661
|
/>
|
|
@@ -2677,6 +2696,7 @@ class ZTableFilterComponent {
|
|
|
2677
2696
|
[zMaxVisible]="30"
|
|
2678
2697
|
[zPlaceholder]="'i18n_z_ui_table_filter_select_condition' | translate"
|
|
2679
2698
|
[ngModel]="condition.operator"
|
|
2699
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2680
2700
|
(ngModelChange)="updateFilterOperator(condition.id, $event)"
|
|
2681
2701
|
/>
|
|
2682
2702
|
@if (condition.isValueLess) {
|
|
@@ -2691,6 +2711,7 @@ class ZTableFilterComponent {
|
|
|
2691
2711
|
zAllowClear
|
|
2692
2712
|
[zPlaceholder]="'i18n_z_ui_table_filter_value' | translate"
|
|
2693
2713
|
[ngModel]="condition.value ?? ''"
|
|
2714
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2694
2715
|
(ngModelChange)="updateFilterValue(condition.id, $event)"
|
|
2695
2716
|
/>
|
|
2696
2717
|
}
|
|
@@ -2721,7 +2742,13 @@ class ZTableFilterComponent {
|
|
|
2721
2742
|
} @else {
|
|
2722
2743
|
<div class="p-1">
|
|
2723
2744
|
<div class="grid min-w-0 grid-cols-[1fr_1fr_2rem] items-center gap-2">
|
|
2724
|
-
<z-input
|
|
2745
|
+
<z-input
|
|
2746
|
+
class="min-w-0"
|
|
2747
|
+
zSize="sm"
|
|
2748
|
+
zReadonly
|
|
2749
|
+
[ngModel]="legacyFilterLabelKey() | translate"
|
|
2750
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2751
|
+
/>
|
|
2725
2752
|
@switch (legacyAdvancedType()) {
|
|
2726
2753
|
@case ('range') {
|
|
2727
2754
|
<div class="col-span-2 flex min-w-0 gap-1">
|
|
@@ -2730,6 +2757,7 @@ class ZTableFilterComponent {
|
|
|
2730
2757
|
zSize="sm"
|
|
2731
2758
|
[zPlaceholder]="'i18n_z_ui_table_filter_min' | translate"
|
|
2732
2759
|
[ngModel]="rangeMinValue()"
|
|
2760
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2733
2761
|
(ngModelChange)="onMinChangeDebounced($event)"
|
|
2734
2762
|
class="min-w-0 flex-1"
|
|
2735
2763
|
/>
|
|
@@ -2738,6 +2766,7 @@ class ZTableFilterComponent {
|
|
|
2738
2766
|
zSize="sm"
|
|
2739
2767
|
[zPlaceholder]="'i18n_z_ui_table_filter_max' | translate"
|
|
2740
2768
|
[ngModel]="rangeMaxValue()"
|
|
2769
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2741
2770
|
(ngModelChange)="onMaxChangeDebounced($event)"
|
|
2742
2771
|
class="min-w-0 flex-1"
|
|
2743
2772
|
/>
|
|
@@ -2753,6 +2782,7 @@ class ZTableFilterComponent {
|
|
|
2753
2782
|
[zScrollClose]="true"
|
|
2754
2783
|
[zPlaceholder]="'i18n_z_ui_table_filter_date' | translate"
|
|
2755
2784
|
[ngModel]="dateValue()"
|
|
2785
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2756
2786
|
(ngModelChange)="onDateChange($event)"
|
|
2757
2787
|
class="col-span-2 min-w-0"
|
|
2758
2788
|
/>
|
|
@@ -2769,6 +2799,7 @@ class ZTableFilterComponent {
|
|
|
2769
2799
|
[zScrollClose]="true"
|
|
2770
2800
|
[zPlaceholder]="'i18n_z_ui_table_filter_date_range' | translate"
|
|
2771
2801
|
[ngModel]="dateRangeValue()"
|
|
2802
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2772
2803
|
(ngModelChange)="onDateRangeChange($event)"
|
|
2773
2804
|
class="col-span-2 min-w-0"
|
|
2774
2805
|
/>
|
|
@@ -2784,6 +2815,7 @@ class ZTableFilterComponent {
|
|
|
2784
2815
|
[zScrollClose]="true"
|
|
2785
2816
|
[zPlaceholder]="'i18n_z_ui_table_filter_time' | translate"
|
|
2786
2817
|
[ngModel]="timeValue()"
|
|
2818
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2787
2819
|
(ngModelChange)="onTimeChange($event)"
|
|
2788
2820
|
class="col-span-2 min-w-0"
|
|
2789
2821
|
/>
|
|
@@ -2797,6 +2829,7 @@ class ZTableFilterComponent {
|
|
|
2797
2829
|
[zOptions]="selectOptions()"
|
|
2798
2830
|
[zConfig]="selectConfig()"
|
|
2799
2831
|
[ngModel]="selectValue()"
|
|
2832
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2800
2833
|
[zMaxVisible]="30"
|
|
2801
2834
|
[zPlaceholder]="'i18n_z_ui_common_select' | translate"
|
|
2802
2835
|
(ngModelChange)="onSelectChange($event)"
|
|
@@ -2815,6 +2848,7 @@ class ZTableFilterComponent {
|
|
|
2815
2848
|
[zMaxTagCount]="1"
|
|
2816
2849
|
[zMaxVisible]="30"
|
|
2817
2850
|
[ngModel]="multiSelectValue()"
|
|
2851
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2818
2852
|
[zPlaceholder]="'i18n_z_ui_common_select' | translate"
|
|
2819
2853
|
(ngModelChange)="onMultiSelectChange($event)"
|
|
2820
2854
|
class="col-span-2 min-w-0"
|
|
@@ -2834,6 +2868,7 @@ class ZTableFilterComponent {
|
|
|
2834
2868
|
class="col-span-2 min-w-0"
|
|
2835
2869
|
[zAllowClear]="true"
|
|
2836
2870
|
[ngModel]="multiSelectValue()"
|
|
2871
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2837
2872
|
(ngModelChange)="onMultiSelectChange($event)"
|
|
2838
2873
|
/>
|
|
2839
2874
|
}
|
|
@@ -2948,7 +2983,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
2948
2983
|
@if (canSort()) {
|
|
2949
2984
|
<div class="p-1">
|
|
2950
2985
|
<div class="grid min-w-0 grid-cols-[1fr_1fr_2rem] items-center gap-2">
|
|
2951
|
-
<z-input
|
|
2986
|
+
<z-input
|
|
2987
|
+
class="min-w-0"
|
|
2988
|
+
zSize="sm"
|
|
2989
|
+
zReadonly
|
|
2990
|
+
[ngModel]="sortLabelKey() | translate"
|
|
2991
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2992
|
+
/>
|
|
2952
2993
|
<z-select
|
|
2953
2994
|
class="col-span-2 min-w-0"
|
|
2954
2995
|
zSize="sm"
|
|
@@ -2956,6 +2997,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
2956
2997
|
[zWrap]="false"
|
|
2957
2998
|
[zScrollClose]="true"
|
|
2958
2999
|
[ngModel]="draftSortValue()"
|
|
3000
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2959
3001
|
[zPlaceholder]="'i18n_z_ui_table_sort' | translate"
|
|
2960
3002
|
(ngModelChange)="updateDraftSort($event)"
|
|
2961
3003
|
/>
|
|
@@ -2996,6 +3038,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
2996
3038
|
[zMaxVisible]="30"
|
|
2997
3039
|
[zPlaceholder]="'i18n_z_ui_table_filter_select_condition' | translate"
|
|
2998
3040
|
[ngModel]="condition.operator"
|
|
3041
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2999
3042
|
(ngModelChange)="updateFilterOperator(condition.id, $event)"
|
|
3000
3043
|
/>
|
|
3001
3044
|
@if (condition.isValueLess) {
|
|
@@ -3010,6 +3053,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3010
3053
|
zAllowClear
|
|
3011
3054
|
[zPlaceholder]="'i18n_z_ui_table_filter_value' | translate"
|
|
3012
3055
|
[ngModel]="condition.value ?? ''"
|
|
3056
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3013
3057
|
(ngModelChange)="updateFilterValue(condition.id, $event)"
|
|
3014
3058
|
/>
|
|
3015
3059
|
}
|
|
@@ -3040,7 +3084,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3040
3084
|
} @else {
|
|
3041
3085
|
<div class="p-1">
|
|
3042
3086
|
<div class="grid min-w-0 grid-cols-[1fr_1fr_2rem] items-center gap-2">
|
|
3043
|
-
<z-input
|
|
3087
|
+
<z-input
|
|
3088
|
+
class="min-w-0"
|
|
3089
|
+
zSize="sm"
|
|
3090
|
+
zReadonly
|
|
3091
|
+
[ngModel]="legacyFilterLabelKey() | translate"
|
|
3092
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3093
|
+
/>
|
|
3044
3094
|
@switch (legacyAdvancedType()) {
|
|
3045
3095
|
@case ('range') {
|
|
3046
3096
|
<div class="col-span-2 flex min-w-0 gap-1">
|
|
@@ -3049,6 +3099,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3049
3099
|
zSize="sm"
|
|
3050
3100
|
[zPlaceholder]="'i18n_z_ui_table_filter_min' | translate"
|
|
3051
3101
|
[ngModel]="rangeMinValue()"
|
|
3102
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3052
3103
|
(ngModelChange)="onMinChangeDebounced($event)"
|
|
3053
3104
|
class="min-w-0 flex-1"
|
|
3054
3105
|
/>
|
|
@@ -3057,6 +3108,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3057
3108
|
zSize="sm"
|
|
3058
3109
|
[zPlaceholder]="'i18n_z_ui_table_filter_max' | translate"
|
|
3059
3110
|
[ngModel]="rangeMaxValue()"
|
|
3111
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3060
3112
|
(ngModelChange)="onMaxChangeDebounced($event)"
|
|
3061
3113
|
class="min-w-0 flex-1"
|
|
3062
3114
|
/>
|
|
@@ -3072,6 +3124,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3072
3124
|
[zScrollClose]="true"
|
|
3073
3125
|
[zPlaceholder]="'i18n_z_ui_table_filter_date' | translate"
|
|
3074
3126
|
[ngModel]="dateValue()"
|
|
3127
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3075
3128
|
(ngModelChange)="onDateChange($event)"
|
|
3076
3129
|
class="col-span-2 min-w-0"
|
|
3077
3130
|
/>
|
|
@@ -3088,6 +3141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3088
3141
|
[zScrollClose]="true"
|
|
3089
3142
|
[zPlaceholder]="'i18n_z_ui_table_filter_date_range' | translate"
|
|
3090
3143
|
[ngModel]="dateRangeValue()"
|
|
3144
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3091
3145
|
(ngModelChange)="onDateRangeChange($event)"
|
|
3092
3146
|
class="col-span-2 min-w-0"
|
|
3093
3147
|
/>
|
|
@@ -3103,6 +3157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3103
3157
|
[zScrollClose]="true"
|
|
3104
3158
|
[zPlaceholder]="'i18n_z_ui_table_filter_time' | translate"
|
|
3105
3159
|
[ngModel]="timeValue()"
|
|
3160
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3106
3161
|
(ngModelChange)="onTimeChange($event)"
|
|
3107
3162
|
class="col-span-2 min-w-0"
|
|
3108
3163
|
/>
|
|
@@ -3116,6 +3171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3116
3171
|
[zOptions]="selectOptions()"
|
|
3117
3172
|
[zConfig]="selectConfig()"
|
|
3118
3173
|
[ngModel]="selectValue()"
|
|
3174
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3119
3175
|
[zMaxVisible]="30"
|
|
3120
3176
|
[zPlaceholder]="'i18n_z_ui_common_select' | translate"
|
|
3121
3177
|
(ngModelChange)="onSelectChange($event)"
|
|
@@ -3134,6 +3190,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3134
3190
|
[zMaxTagCount]="1"
|
|
3135
3191
|
[zMaxVisible]="30"
|
|
3136
3192
|
[ngModel]="multiSelectValue()"
|
|
3193
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3137
3194
|
[zPlaceholder]="'i18n_z_ui_common_select' | translate"
|
|
3138
3195
|
(ngModelChange)="onMultiSelectChange($event)"
|
|
3139
3196
|
class="col-span-2 min-w-0"
|
|
@@ -3153,6 +3210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3153
3210
|
class="col-span-2 min-w-0"
|
|
3154
3211
|
[zAllowClear]="true"
|
|
3155
3212
|
[ngModel]="multiSelectValue()"
|
|
3213
|
+
[ngModelOptions]="{ standalone: true }"
|
|
3156
3214
|
(ngModelChange)="onMultiSelectChange($event)"
|
|
3157
3215
|
/>
|
|
3158
3216
|
}
|
|
@@ -5566,6 +5624,7 @@ class ZTableComponent {
|
|
|
5566
5624
|
_zTranslate = inject(ZTranslateService);
|
|
5567
5625
|
_overlayService = inject(ZOverlayService);
|
|
5568
5626
|
_viewContainerRef = inject(ViewContainerRef);
|
|
5627
|
+
_destroyRef = inject(DestroyRef);
|
|
5569
5628
|
/** Prevents recursive scroll sync between thead/tbody/tfoot */
|
|
5570
5629
|
_isSyncingScroll = signal(false, /* @ts-ignore */
|
|
5571
5630
|
...(ngDevMode ? [{ debugName: "_isSyncingScroll" }] : /* istanbul ignore next */ []));
|
|
@@ -5579,7 +5638,7 @@ class ZTableComponent {
|
|
|
5579
5638
|
_settingsDebounceTimeout = null;
|
|
5580
5639
|
_visibilityDebounceTimeout = null;
|
|
5581
5640
|
/** Debounces filter change emissions to server */
|
|
5582
|
-
|
|
5641
|
+
_filterEmitDebounceTimer = zCreateDestroySafeTimeout(this._destroyRef);
|
|
5583
5642
|
/** Keeps the bulk bar mounted long enough for its exit animation */
|
|
5584
5643
|
_bulkBarTimer = null;
|
|
5585
5644
|
_bulkBarOverlayRef = null;
|
|
@@ -6373,7 +6432,10 @@ class ZTableComponent {
|
|
|
6373
6432
|
if (this.isServerGrouping()) {
|
|
6374
6433
|
const selectedColumnId = this.groupingColumnIds()[0];
|
|
6375
6434
|
const fallbackColumnId = this.serverGroupColumnId();
|
|
6376
|
-
|
|
6435
|
+
if (selectedColumnId) {
|
|
6436
|
+
return [selectedColumnId];
|
|
6437
|
+
}
|
|
6438
|
+
return fallbackColumnId ? [fallbackColumnId] : [];
|
|
6377
6439
|
}
|
|
6378
6440
|
return this.groupingColumnIds();
|
|
6379
6441
|
}, /* @ts-ignore */
|
|
@@ -7874,7 +7936,13 @@ class ZTableComponent {
|
|
|
7874
7936
|
const stickyGroupMeta = this._stickyGroupHeaderMeta();
|
|
7875
7937
|
// Estimate for not-yet-measured rows: learned height if available, else virtual.size.
|
|
7876
7938
|
const dynamicRowEstimate = isDynamic && this._dynamicEstimateHeight !== null ? this._dynamicEstimateHeight : rowHeight;
|
|
7877
|
-
|
|
7939
|
+
let itemCount = this._virtualGroupCount();
|
|
7940
|
+
if (isGrouping) {
|
|
7941
|
+
itemCount = flatItems.length;
|
|
7942
|
+
}
|
|
7943
|
+
if (!isGrouping && groups.length > 0) {
|
|
7944
|
+
itemCount = groups.length;
|
|
7945
|
+
}
|
|
7878
7946
|
return {
|
|
7879
7947
|
scrollElement,
|
|
7880
7948
|
count: itemCount,
|
|
@@ -8248,11 +8316,13 @@ class ZTableComponent {
|
|
|
8248
8316
|
// Virtual scroll windows the rows itself, so it needs the full row model — otherwise the
|
|
8249
8317
|
// default pageSize of 10 leaves the paginated row model truncating the data it ever sees.
|
|
8250
8318
|
const isVirtualConfig = !!cfg.virtual && (typeof cfg.virtual === 'boolean' ? cfg.virtual : cfg.virtual.enabled);
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8319
|
+
let configuredPageSize;
|
|
8320
|
+
if (cfg.pagination?.enabled) {
|
|
8321
|
+
configuredPageSize = cfg.pagination.pageSize;
|
|
8322
|
+
}
|
|
8323
|
+
if (!cfg.pagination?.enabled && isVirtualConfig) {
|
|
8324
|
+
configuredPageSize = Number.MAX_SAFE_INTEGER;
|
|
8325
|
+
}
|
|
8256
8326
|
const initialPageSize = cfg.initialState?.pagination?.pageSize;
|
|
8257
8327
|
const paginationSchemaKey = `${this._getConfigCacheKey(key || 'initial-pagination')}:${configuredPageSize ?? ''}:${initialPageSize ?? ''}`;
|
|
8258
8328
|
if (!cfg.initialState?.pagination &&
|
|
@@ -8509,11 +8579,13 @@ class ZTableComponent {
|
|
|
8509
8579
|
updateItem: (id, updates, fieldKey) => {
|
|
8510
8580
|
const current = this.zConfig();
|
|
8511
8581
|
current.data = current.data.map((row, index) => {
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8582
|
+
let rowId = row['id'];
|
|
8583
|
+
if (fieldKey) {
|
|
8584
|
+
rowId = row[fieldKey];
|
|
8585
|
+
}
|
|
8586
|
+
if (!fieldKey && current.getRowId) {
|
|
8587
|
+
rowId = current.getRowId(row, index, undefined, current.data);
|
|
8588
|
+
}
|
|
8517
8589
|
return rowId === id ? { ...row, ...updates } : row;
|
|
8518
8590
|
});
|
|
8519
8591
|
this._dataForceUpdate.update(v => v + 1);
|
|
@@ -8522,11 +8594,13 @@ class ZTableComponent {
|
|
|
8522
8594
|
deleteItem: (id, fieldKey) => {
|
|
8523
8595
|
const current = this.zConfig();
|
|
8524
8596
|
current.data = current.data.filter((row, index) => {
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8597
|
+
let rowId = row['id'];
|
|
8598
|
+
if (fieldKey) {
|
|
8599
|
+
rowId = row[fieldKey];
|
|
8600
|
+
}
|
|
8601
|
+
if (!fieldKey && current.getRowId) {
|
|
8602
|
+
rowId = current.getRowId(row, index, undefined, current.data);
|
|
8603
|
+
}
|
|
8530
8604
|
return rowId !== id;
|
|
8531
8605
|
});
|
|
8532
8606
|
this._dataForceUpdate.update(v => v + 1);
|
|
@@ -8768,10 +8842,7 @@ class ZTableComponent {
|
|
|
8768
8842
|
}, this.zConfig().debounceTime ?? Z_DEFAULT_DEBOUNCE_TIME);
|
|
8769
8843
|
}
|
|
8770
8844
|
_emitFilterChangeDebounced(filters, search) {
|
|
8771
|
-
|
|
8772
|
-
clearTimeout(this._filterEmitDebounceTimeout);
|
|
8773
|
-
}
|
|
8774
|
-
this._filterEmitDebounceTimeout = setTimeout(() => {
|
|
8845
|
+
this._filterEmitDebounceTimer.schedule(() => {
|
|
8775
8846
|
this.zChange.emit({
|
|
8776
8847
|
type: 'filter',
|
|
8777
8848
|
data: { filters, search },
|
|
@@ -10018,7 +10089,7 @@ class ZTableComponent {
|
|
|
10018
10089
|
if (!(target instanceof HTMLElement)) {
|
|
10019
10090
|
return false;
|
|
10020
10091
|
}
|
|
10021
|
-
return !!target.closest('button, input, textarea, select, [contenteditable="true"], z-input, z-select, z-calendar, z-checkbox, z-switch');
|
|
10092
|
+
return !!target.closest('button, input, textarea, select, [contenteditable="true"], z-input, z-select, z-calendar, z-checkbox, z-switch, scrollbar-thumb-x, scrollbar-thumb-y, scrollbar-track-x, scrollbar-track-y, scrollbarbutton');
|
|
10022
10093
|
}
|
|
10023
10094
|
_isCellSelectionDragTarget(target) {
|
|
10024
10095
|
if (this._document.body.classList.contains('z-table-pointer-dragging')) {
|
|
@@ -10542,7 +10613,13 @@ class ZTableComponent {
|
|
|
10542
10613
|
if (position && !this.pinAvailabilityMap()[columnId]?.[position]) {
|
|
10543
10614
|
return;
|
|
10544
10615
|
}
|
|
10545
|
-
|
|
10616
|
+
let tanStackPosition = false;
|
|
10617
|
+
if (position === 'left') {
|
|
10618
|
+
tanStackPosition = 'start';
|
|
10619
|
+
}
|
|
10620
|
+
if (position === 'right') {
|
|
10621
|
+
tanStackPosition = 'end';
|
|
10622
|
+
}
|
|
10546
10623
|
column.pin(tanStackPosition);
|
|
10547
10624
|
// A configured header colSpan renders as one solid block, so pinning (or unpinning) the
|
|
10548
10625
|
// leading column must carry its covered columns along — otherwise unpinning only the
|