@paperless/angular 2.18.6 → 2.19.1
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/esm2020/lib/modules/table/components/table/table.component.mjs +90 -90
- package/esm2020/lib/modules/table/components/table-cell/table-cell.component.mjs +28 -13
- package/esm2020/lib/modules/table/components/table-column/table-column.component.mjs +4 -2
- package/fesm2015/paperless-angular.mjs +105 -87
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +105 -88
- package/fesm2020/paperless-angular.mjs.map +1 -1
- package/lib/modules/table/components/table/table.component.d.ts +12 -12
- package/lib/modules/table/components/table-cell/table-cell.component.d.ts +4 -3
- package/lib/modules/table/components/table-column/table-column.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3023,7 +3023,7 @@ class TableCell {
|
|
|
3023
3023
|
/**
|
|
3024
3024
|
* The variant of the column
|
|
3025
3025
|
*/
|
|
3026
|
-
this.variant =
|
|
3026
|
+
this.variant = 'default';
|
|
3027
3027
|
/**
|
|
3028
3028
|
* The index of the column
|
|
3029
3029
|
*/
|
|
@@ -3044,21 +3044,21 @@ class TableCell {
|
|
|
3044
3044
|
}
|
|
3045
3045
|
get class() {
|
|
3046
3046
|
return cn(getTableCellColumnClasses(this.definition, this.variant, this.checkboxOffset), {
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3047
|
+
'sticky left-4 z-[2]': !!this.definition?.sticky,
|
|
3048
|
+
'bg-gradient-to-r from-white to-transparent dark:from-hurricane-700 from-80%': this.definition?.sticky && this.definition?.sticky !== 'secondary',
|
|
3049
|
+
'bg-gradient-to-r from-off-white-300 to-transparent dark:from-hurricane-400 from-80%': this.definition?.sticky && this.definition?.sticky === 'secondary',
|
|
3050
|
+
'flex-shrink': !this.scrollable,
|
|
3051
|
+
'flex-shrink-0': this.scrollable,
|
|
3052
3052
|
});
|
|
3053
3053
|
}
|
|
3054
3054
|
get data() {
|
|
3055
|
-
if (this.variant ===
|
|
3055
|
+
if (this.variant === 'header' || this.variant === 'header-secondary') {
|
|
3056
3056
|
return {
|
|
3057
3057
|
value: this.value,
|
|
3058
3058
|
};
|
|
3059
3059
|
}
|
|
3060
3060
|
return {
|
|
3061
|
-
value:
|
|
3061
|
+
value: this.value ?? this.definition?.path
|
|
3062
3062
|
? objectGetByPath(this.item, this.definition.path)
|
|
3063
3063
|
: null,
|
|
3064
3064
|
item: this.item,
|
|
@@ -3066,12 +3066,27 @@ class TableCell {
|
|
|
3066
3066
|
rowIndex: this.rowIndex,
|
|
3067
3067
|
};
|
|
3068
3068
|
}
|
|
3069
|
+
get contentClass() {
|
|
3070
|
+
const align = this.variant === 'header'
|
|
3071
|
+
? this.definition?.headerAlign ?? this.definition?.align
|
|
3072
|
+
: this.definition?.align;
|
|
3073
|
+
return cn('overflow-hidden text-ellipsis', {
|
|
3074
|
+
flex: this.definition?.flex,
|
|
3075
|
+
'flex-1': this.definition?.flex,
|
|
3076
|
+
'justify-start': this.definition?.flex && (align === undefined || align === 'start'),
|
|
3077
|
+
'justify-end': this.definition?.flex && align === 'end',
|
|
3078
|
+
'justify-center': this.definition?.flex && align === 'end',
|
|
3079
|
+
'text-start': !this.definition?.flex && (align === undefined || align === 'start'),
|
|
3080
|
+
'text-center': !this.definition?.flex && align === 'center',
|
|
3081
|
+
'text-end': !this.definition?.flex && align === 'end',
|
|
3082
|
+
});
|
|
3083
|
+
}
|
|
3069
3084
|
}
|
|
3070
3085
|
TableCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3071
3086
|
TableCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TableCell, selector: "p-table-cell-ngx", inputs: { variant: "variant", index: "index", rowIndex: "rowIndex", definition: "definition", item: "item", value: "value", checkbox: "checkbox", checkboxOffset: "checkboxOffset", template: "template", scrollable: "scrollable" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<ng-container *ngIf=\"checkbox\">\n\t<ng-container *ngTemplateOutlet=\"checkbox\"></ng-container>\n</ng-container>\n\n<ng-container [ngSwitch]=\"variant\">\n\t<p-loader\n\t\t*ngSwitchCase=\"'loading'\"\n\t\tvariant=\"ghost\"\n\t\tclass=\"h-6 w-full flex-1 rounded\"\n\t></p-loader>\n\n\t<ng-container *ngSwitchCase=\"'actions'\">\n\t\t<ng-container *ngIf=\"template\">\n\t\t\t<ng-container *ngTemplateOutlet=\"template; context: data\"></ng-container>\n\t\t</ng-container>\n\t</ng-container>\n\n\t<div\n\t\t*ngIf=\"variant === 'header' || variant === 'header-secondary'\"\n\t\t[class]=\"\n\t\t\tcn('overflow-hidden text-ellipsis', {\n\t\t\t\t'text-start':\n\t\t\t\t\tdefinition?.align === undefined || definition.align === 'start',\n\t\t\t\t'text-center': definition.align === 'center',\n\t\t\t\t'text-end': definition.align === 'end'\n\t\t\t})\n\t\t\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"valueTemplate\"></ng-container>\n\t</div>\n\n\t<div\n\t\t*ngSwitchCase=\"'default'\"\n\t\t[class]=\"\n\t\t\tcn('overflow-hidden text-ellipsis', {\n\t\t\t\tflex: definition?.flex,\n\t\t\t\t'flex-1': definition?.flex,\n\t\t\t\t'justify-start':\n\t\t\t\t\tdefinition?.flex &&\n\t\t\t\t\t(definition?.align === undefined || definition.align === 'start'),\n\t\t\t\t'justify-end': definition?.flex && definition.align === 'end',\n\t\t\t\t'justify-center': definition?.flex && definition.align === 'end',\n\t\t\t\t'text-start':\n\t\t\t\t\t!definition?.flex &&\n\t\t\t\t\t(definition?.align === undefined || definition.align === 'start'),\n\t\t\t\t'text-center': !definition?.flex && definition.align === 'center',\n\t\t\t\t'text-end': !definition?.flex && definition.align === 'end'\n\t\t\t})\n\t\t\"\n\t>\n\t\t<ng-container *ngIf=\"template; else valueTemplate\">\n\t\t\t<ng-container *ngTemplateOutlet=\"template; context: data\"></ng-container>\n\t\t</ng-container>\n\t</div>\n</ng-container>\n\n<ng-template #valueTemplate>\n\t<ng-container *ngIf=\"data.value\">\n\t\t{{ data.value }}\n\t</ng-container>\n\n\t<ng-content *ngIf=\"!data.value\"></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: PLoader, selector: "p-loader", inputs: ["color", "modalDescription", "modalTitle", "show", "variant"] }] });
|
|
3072
3087
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableCell, decorators: [{
|
|
3073
3088
|
type: Component,
|
|
3074
|
-
args: [{ selector:
|
|
3089
|
+
args: [{ selector: 'p-table-cell-ngx', template: "<ng-container *ngIf=\"checkbox\">\n\t<ng-container *ngTemplateOutlet=\"checkbox\"></ng-container>\n</ng-container>\n\n<ng-container [ngSwitch]=\"variant\">\n\t<p-loader\n\t\t*ngSwitchCase=\"'loading'\"\n\t\tvariant=\"ghost\"\n\t\tclass=\"h-6 w-full flex-1 rounded\"\n\t></p-loader>\n\n\t<ng-container *ngSwitchCase=\"'actions'\">\n\t\t<ng-container *ngIf=\"template\">\n\t\t\t<ng-container *ngTemplateOutlet=\"template; context: data\"></ng-container>\n\t\t</ng-container>\n\t</ng-container>\n\n\t<div\n\t\t*ngIf=\"variant === 'header' || variant === 'header-secondary'\"\n\t\t[class]=\"\n\t\t\tcn('overflow-hidden text-ellipsis', {\n\t\t\t\t'text-start':\n\t\t\t\t\tdefinition?.align === undefined || definition.align === 'start',\n\t\t\t\t'text-center': definition.align === 'center',\n\t\t\t\t'text-end': definition.align === 'end'\n\t\t\t})\n\t\t\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"valueTemplate\"></ng-container>\n\t</div>\n\n\t<div\n\t\t*ngSwitchCase=\"'default'\"\n\t\t[class]=\"\n\t\t\tcn('overflow-hidden text-ellipsis', {\n\t\t\t\tflex: definition?.flex,\n\t\t\t\t'flex-1': definition?.flex,\n\t\t\t\t'justify-start':\n\t\t\t\t\tdefinition?.flex &&\n\t\t\t\t\t(definition?.align === undefined || definition.align === 'start'),\n\t\t\t\t'justify-end': definition?.flex && definition.align === 'end',\n\t\t\t\t'justify-center': definition?.flex && definition.align === 'end',\n\t\t\t\t'text-start':\n\t\t\t\t\t!definition?.flex &&\n\t\t\t\t\t(definition?.align === undefined || definition.align === 'start'),\n\t\t\t\t'text-center': !definition?.flex && definition.align === 'center',\n\t\t\t\t'text-end': !definition?.flex && definition.align === 'end'\n\t\t\t})\n\t\t\"\n\t>\n\t\t<ng-container *ngIf=\"template; else valueTemplate\">\n\t\t\t<ng-container *ngTemplateOutlet=\"template; context: data\"></ng-container>\n\t\t</ng-container>\n\t</div>\n</ng-container>\n\n<ng-template #valueTemplate>\n\t<ng-container *ngIf=\"data.value\">\n\t\t{{ data.value }}\n\t</ng-container>\n\n\t<ng-content *ngIf=\"!data.value\"></ng-content>\n</ng-template>\n" }]
|
|
3075
3090
|
}], propDecorators: { variant: [{
|
|
3076
3091
|
type: Input
|
|
3077
3092
|
}], index: [{
|
|
@@ -3094,7 +3109,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3094
3109
|
type: Input
|
|
3095
3110
|
}], class: [{
|
|
3096
3111
|
type: HostBinding,
|
|
3097
|
-
args: [
|
|
3112
|
+
args: ['class']
|
|
3098
3113
|
}] } });
|
|
3099
3114
|
|
|
3100
3115
|
let TableColumn = class TableColumn {
|
|
@@ -3106,12 +3121,13 @@ let TableColumn = class TableColumn {
|
|
|
3106
3121
|
}
|
|
3107
3122
|
};
|
|
3108
3123
|
TableColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableColumn, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3109
|
-
TableColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TableColumn, selector: "p-table-column", inputs: { align: "align", flex: "flex", name: "name", path: "path", sizes: "sizes", variant: "variant", useSlot: "useSlot", hasCheckbox: "hasCheckbox", sticky: "sticky" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3124
|
+
TableColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TableColumn, selector: "p-table-column", inputs: { align: "align", headerAlign: "headerAlign", flex: "flex", name: "name", path: "path", sizes: "sizes", variant: "variant", useSlot: "useSlot", hasCheckbox: "hasCheckbox", sticky: "sticky" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3110
3125
|
TableColumn = __decorate([
|
|
3111
3126
|
ProxyCmp({
|
|
3112
3127
|
defineCustomElementFn: undefined,
|
|
3113
3128
|
inputs: [
|
|
3114
3129
|
'align',
|
|
3130
|
+
'headerAlign',
|
|
3115
3131
|
'flex',
|
|
3116
3132
|
'name',
|
|
3117
3133
|
'path',
|
|
@@ -3131,6 +3147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3131
3147
|
template: '<ng-content></ng-content>',
|
|
3132
3148
|
inputs: [
|
|
3133
3149
|
'align',
|
|
3150
|
+
'headerAlign',
|
|
3134
3151
|
'flex',
|
|
3135
3152
|
'name',
|
|
3136
3153
|
'path',
|
|
@@ -3615,7 +3632,7 @@ const defaultSizeOptions = [12, 24, 68, 136];
|
|
|
3615
3632
|
let Table = class Table {
|
|
3616
3633
|
constructor(_cd) {
|
|
3617
3634
|
this._cd = _cd;
|
|
3618
|
-
this.className =
|
|
3635
|
+
this.className = 'flex flex-col z-0';
|
|
3619
3636
|
this.theme = state.theme;
|
|
3620
3637
|
/**
|
|
3621
3638
|
* Wether data is loading
|
|
@@ -3660,7 +3677,7 @@ let Table = class Table {
|
|
|
3660
3677
|
/**
|
|
3661
3678
|
* The floating menu amount item text
|
|
3662
3679
|
*/
|
|
3663
|
-
this.floatingMenuAmountSelectedText =
|
|
3680
|
+
this.floatingMenuAmountSelectedText = '0 items selected';
|
|
3664
3681
|
/**
|
|
3665
3682
|
* Wether the floating menu has been shown atleast once
|
|
3666
3683
|
*/
|
|
@@ -3709,7 +3726,7 @@ let Table = class Table {
|
|
|
3709
3726
|
/**
|
|
3710
3727
|
* The action button icon
|
|
3711
3728
|
*/
|
|
3712
|
-
this.actionButtonIcon =
|
|
3729
|
+
this.actionButtonIcon = 'pencil';
|
|
3713
3730
|
/**
|
|
3714
3731
|
* Wether the action button is enabled
|
|
3715
3732
|
*/
|
|
@@ -3776,11 +3793,11 @@ let Table = class Table {
|
|
|
3776
3793
|
*/
|
|
3777
3794
|
this.hideOnSinglePage = true;
|
|
3778
3795
|
/* Empty state start */
|
|
3779
|
-
this.emptyStateType =
|
|
3780
|
-
this.emptyStateIllustration =
|
|
3781
|
-
this.emptyStateActionIcon =
|
|
3796
|
+
this.emptyStateType = 'no_filter';
|
|
3797
|
+
this.emptyStateIllustration = 'table';
|
|
3798
|
+
this.emptyStateActionIcon = 'plus';
|
|
3782
3799
|
this.enableEmptyStateAction = true;
|
|
3783
|
-
this.emptyStateFilteredIllustration =
|
|
3800
|
+
this.emptyStateFilteredIllustration = 'search';
|
|
3784
3801
|
/**
|
|
3785
3802
|
* Wether to enable scrolling
|
|
3786
3803
|
*/
|
|
@@ -3806,10 +3823,10 @@ let Table = class Table {
|
|
|
3806
3823
|
this._ctrlDown = false;
|
|
3807
3824
|
this.filterModalShow$ = new BehaviorSubject(false);
|
|
3808
3825
|
this._rowActionsSubscriptions = [];
|
|
3809
|
-
this.filterModalHeaderText =
|
|
3810
|
-
this.filterModalSaveText =
|
|
3811
|
-
this.filterModalCancelText =
|
|
3812
|
-
this.filterModalResetText =
|
|
3826
|
+
this.filterModalHeaderText = 'Filters';
|
|
3827
|
+
this.filterModalSaveText = 'Save';
|
|
3828
|
+
this.filterModalCancelText = 'Cancel';
|
|
3829
|
+
this.filterModalResetText = 'Reset filters';
|
|
3813
3830
|
this.filterModalShowReset = false;
|
|
3814
3831
|
this.filterModalShowResetMobile = false;
|
|
3815
3832
|
this.filterModalShow = new EventEmitter();
|
|
@@ -3841,37 +3858,37 @@ let Table = class Table {
|
|
|
3841
3858
|
}
|
|
3842
3859
|
ngOnInit() {
|
|
3843
3860
|
this._parseItems(this.items);
|
|
3844
|
-
onStateChange(
|
|
3861
|
+
onStateChange('theme', value => this._checkTheme(value));
|
|
3845
3862
|
this.loadingRows = Array.from({
|
|
3846
3863
|
length: this.amountOfLoadingRows,
|
|
3847
3864
|
});
|
|
3848
3865
|
this.filterModalShow$
|
|
3849
3866
|
.pipe(untilDestroyed(this), distinctUntilChanged())
|
|
3850
|
-
.subscribe(
|
|
3867
|
+
.subscribe(value => this.filterModalShow.next(value));
|
|
3851
3868
|
}
|
|
3852
3869
|
ngOnChanges(changes) {
|
|
3853
|
-
if (changes[
|
|
3854
|
-
this._parseItems(changes[
|
|
3870
|
+
if (changes['items']) {
|
|
3871
|
+
this._parseItems(changes['items'].currentValue);
|
|
3855
3872
|
}
|
|
3856
|
-
if (changes[
|
|
3873
|
+
if (changes['amountOfLoadingRows']) {
|
|
3857
3874
|
this.loadingRows = Array.from({
|
|
3858
|
-
length: changes[
|
|
3875
|
+
length: changes['amountOfLoadingRows'].currentValue,
|
|
3859
3876
|
});
|
|
3860
3877
|
}
|
|
3861
3878
|
let calculateRowSelectionData = false;
|
|
3862
|
-
if (changes[
|
|
3879
|
+
if (changes['enableRowSelection']) {
|
|
3863
3880
|
this._inputEnableRowSelection =
|
|
3864
|
-
changes[
|
|
3881
|
+
changes['enableRowSelection'].currentValue;
|
|
3865
3882
|
calculateRowSelectionData = true;
|
|
3866
3883
|
}
|
|
3867
|
-
if (changes[
|
|
3868
|
-
this._inputRowSelectionLimit = changes[
|
|
3884
|
+
if (changes['rowSelectionLimit']) {
|
|
3885
|
+
this._inputRowSelectionLimit = changes['rowSelectionLimit'].currentValue;
|
|
3869
3886
|
calculateRowSelectionData = true;
|
|
3870
3887
|
}
|
|
3871
|
-
if (calculateRowSelectionData || changes[
|
|
3888
|
+
if (calculateRowSelectionData || changes['selectedRows']) {
|
|
3872
3889
|
this._setRowSelectionData();
|
|
3873
3890
|
}
|
|
3874
|
-
if (changes[
|
|
3891
|
+
if (changes['enableScroll']?.currentValue) {
|
|
3875
3892
|
this._checkChangesSubscriptions();
|
|
3876
3893
|
}
|
|
3877
3894
|
}
|
|
@@ -3897,19 +3914,19 @@ let Table = class Table {
|
|
|
3897
3914
|
this._calculateColumnWidths();
|
|
3898
3915
|
}
|
|
3899
3916
|
keyDown({ key }) {
|
|
3900
|
-
if (key !==
|
|
3917
|
+
if (key !== 'Control' || this._ctrlDown === true) {
|
|
3901
3918
|
return;
|
|
3902
3919
|
}
|
|
3903
3920
|
this._ctrlDown = true;
|
|
3904
3921
|
}
|
|
3905
3922
|
keyUp({ key }) {
|
|
3906
|
-
if (key !==
|
|
3923
|
+
if (key !== 'Control' || this._ctrlDown === false) {
|
|
3907
3924
|
return;
|
|
3908
3925
|
}
|
|
3909
3926
|
this._ctrlDown = false;
|
|
3910
3927
|
}
|
|
3911
3928
|
visibilityChange() {
|
|
3912
|
-
if (document.visibilityState !==
|
|
3929
|
+
if (document.visibilityState !== 'hidden' || this._ctrlDown === false) {
|
|
3913
3930
|
return;
|
|
3914
3931
|
}
|
|
3915
3932
|
this._ctrlDown = false;
|
|
@@ -3950,7 +3967,7 @@ let Table = class Table {
|
|
|
3950
3967
|
if (!actions?.length) {
|
|
3951
3968
|
return [];
|
|
3952
3969
|
}
|
|
3953
|
-
return actions.filter(
|
|
3970
|
+
return actions.filter(a => !a.showFunction || a.showFunction(this.parsedItems[rowIndex]));
|
|
3954
3971
|
}
|
|
3955
3972
|
onContainerXScroll(ev) {
|
|
3956
3973
|
if (!this.enableScroll) {
|
|
@@ -3978,7 +3995,7 @@ let Table = class Table {
|
|
|
3978
3995
|
let definitionsArray = Array.from(this.extraHeaderDefinitions);
|
|
3979
3996
|
definitionsArray = this._parseDefinitions(definitionsArray);
|
|
3980
3997
|
for (const col of definitionsArray) {
|
|
3981
|
-
col.sticky = col.sticky === true ?
|
|
3998
|
+
col.sticky = col.sticky === true ? 'secondary' : false;
|
|
3982
3999
|
}
|
|
3983
4000
|
this.extraHeaders$.next(definitionsArray);
|
|
3984
4001
|
}
|
|
@@ -4020,7 +4037,7 @@ let Table = class Table {
|
|
|
4020
4037
|
}
|
|
4021
4038
|
for (let i = 0; i < this.selectedRows.length; i++) {
|
|
4022
4039
|
const value = this.selectedRows[i];
|
|
4023
|
-
const row = this.parsedItems.find(
|
|
4040
|
+
const row = this.parsedItems.find(d => this._getSelectionValue(d, i) === this._getSelectionValue(value, i));
|
|
4024
4041
|
if (!row) {
|
|
4025
4042
|
continue;
|
|
4026
4043
|
}
|
|
@@ -4069,7 +4086,7 @@ let Table = class Table {
|
|
|
4069
4086
|
return this.selectionKey ? row?.[this.selectionKey] || index : index;
|
|
4070
4087
|
}
|
|
4071
4088
|
_selectionContains(row, index, returnIndex = false) {
|
|
4072
|
-
const returnValue = this.selectedRows.findIndex(
|
|
4089
|
+
const returnValue = this.selectedRows.findIndex(item => this._getSelectionValue(row, index) ===
|
|
4073
4090
|
this._getSelectionValue(item, index));
|
|
4074
4091
|
return !returnIndex ? returnValue >= 0 : returnValue;
|
|
4075
4092
|
}
|
|
@@ -4112,8 +4129,8 @@ let Table = class Table {
|
|
|
4112
4129
|
}
|
|
4113
4130
|
_rowClick($event, index) {
|
|
4114
4131
|
const target = $event.target;
|
|
4115
|
-
if (target.tagName.toLowerCase() ===
|
|
4116
|
-
target.type ===
|
|
4132
|
+
if (target.tagName.toLowerCase() === 'input' ||
|
|
4133
|
+
target.type === 'checkbox') {
|
|
4117
4134
|
return;
|
|
4118
4135
|
}
|
|
4119
4136
|
const row = this._findRow(target);
|
|
@@ -4140,17 +4157,17 @@ let Table = class Table {
|
|
|
4140
4157
|
this._checkboxChange(checkbox, index);
|
|
4141
4158
|
}
|
|
4142
4159
|
_getActionRouterLink(routerLink, rowIndex) {
|
|
4143
|
-
if (typeof routerLink ===
|
|
4160
|
+
if (typeof routerLink === 'function') {
|
|
4144
4161
|
const item = this.parsedItems[rowIndex];
|
|
4145
4162
|
return this._getActionRouterLink(routerLink(item), rowIndex);
|
|
4146
4163
|
}
|
|
4147
|
-
if (typeof routerLink ===
|
|
4164
|
+
if (typeof routerLink === 'string' || Array.isArray(routerLink)) {
|
|
4148
4165
|
return new BehaviorSubject(routerLink);
|
|
4149
4166
|
}
|
|
4150
4167
|
return routerLink;
|
|
4151
4168
|
}
|
|
4152
4169
|
_getActionQueryParams(queryParams, rowIndex) {
|
|
4153
|
-
if (typeof queryParams ===
|
|
4170
|
+
if (typeof queryParams === 'function') {
|
|
4154
4171
|
const item = this.parsedItems[rowIndex];
|
|
4155
4172
|
return this._getActionQueryParams(queryParams(item), rowIndex);
|
|
4156
4173
|
}
|
|
@@ -4169,8 +4186,8 @@ let Table = class Table {
|
|
|
4169
4186
|
if (!action.action) {
|
|
4170
4187
|
return;
|
|
4171
4188
|
}
|
|
4172
|
-
if (action.type ===
|
|
4173
|
-
(action.type ===
|
|
4189
|
+
if (action.type === 'multi' ||
|
|
4190
|
+
(action.type === 'both' && rowIndex === undefined)) {
|
|
4174
4191
|
action.action.emit({
|
|
4175
4192
|
items: this.selectedRows,
|
|
4176
4193
|
multi: true,
|
|
@@ -4195,7 +4212,7 @@ let Table = class Table {
|
|
|
4195
4212
|
if (!el) {
|
|
4196
4213
|
return el;
|
|
4197
4214
|
}
|
|
4198
|
-
if (el?.tagName?.toLowerCase() ===
|
|
4215
|
+
if (el?.tagName?.toLowerCase() === 'p-table-row') {
|
|
4199
4216
|
return el;
|
|
4200
4217
|
}
|
|
4201
4218
|
return this._findRow(el?.parentElement);
|
|
@@ -4204,11 +4221,11 @@ let Table = class Table {
|
|
|
4204
4221
|
if (!el) {
|
|
4205
4222
|
return null;
|
|
4206
4223
|
}
|
|
4207
|
-
if (el.getAttribute(
|
|
4208
|
-
el.getAttribute(
|
|
4224
|
+
if (el.getAttribute('data-is-action') !== null &&
|
|
4225
|
+
el.getAttribute('data-is-action') !== 'false') {
|
|
4209
4226
|
return el;
|
|
4210
4227
|
}
|
|
4211
|
-
if (el?.tagName?.toLowerCase() ===
|
|
4228
|
+
if (el?.tagName?.toLowerCase() === 'p-table-row') {
|
|
4212
4229
|
return null;
|
|
4213
4230
|
}
|
|
4214
4231
|
return this._findRowAction(el?.parentElement);
|
|
@@ -4228,14 +4245,14 @@ let Table = class Table {
|
|
|
4228
4245
|
subscription.unsubscribe();
|
|
4229
4246
|
}
|
|
4230
4247
|
}
|
|
4231
|
-
this._rowActionsSubscriptions = actions.map(
|
|
4248
|
+
this._rowActionsSubscriptions = actions.map(action => action._loadingChanged
|
|
4232
4249
|
.pipe(untilDestroyed(this))
|
|
4233
4250
|
.subscribe(() => this._cd.detectChanges()));
|
|
4234
4251
|
// we hack this to any[] to make it work..
|
|
4235
|
-
const rowActionsRow = actions.filter(
|
|
4236
|
-
const rowActionsFloating = actions.filter(
|
|
4237
|
-
(a.type ===
|
|
4238
|
-
(mobile && a.type ===
|
|
4252
|
+
const rowActionsRow = actions.filter(a => a.type === 'both' || a.type === 'single');
|
|
4253
|
+
const rowActionsFloating = actions.filter(a => (this._inputEnableRowSelection &&
|
|
4254
|
+
(a.type === 'both' || a.type === 'multi')) ||
|
|
4255
|
+
(mobile && a.type === 'single' && !a.routerLink));
|
|
4239
4256
|
let rowSelectionLimit = this._inputRowSelectionLimit;
|
|
4240
4257
|
if (mobile && // we're mobile
|
|
4241
4258
|
rowActionsFloating?.length && // we have atleast 1 item in _rowActionsFloating
|
|
@@ -4254,15 +4271,15 @@ let Table = class Table {
|
|
|
4254
4271
|
this.rowActionsRow$.next(rowActionsRow);
|
|
4255
4272
|
this.rowActionsFloatingAll$.next(rowActionsFloating);
|
|
4256
4273
|
this.floatingMenuShown$
|
|
4257
|
-
.pipe(take(1), filter(
|
|
4274
|
+
.pipe(take(1), filter(v => !!v))
|
|
4258
4275
|
.subscribe(() => this._showFloatingMenu());
|
|
4259
4276
|
}, 200);
|
|
4260
4277
|
}
|
|
4261
4278
|
_showFloatingMenu() {
|
|
4262
|
-
this.rowActionsFloatingAll$.pipe(take(1)).subscribe(
|
|
4279
|
+
this.rowActionsFloatingAll$.pipe(take(1)).subscribe(actions => {
|
|
4263
4280
|
if (this.rowSelectionLimit === 1 &&
|
|
4264
|
-
actions.findIndex(
|
|
4265
|
-
actions = actions.filter(
|
|
4281
|
+
actions.findIndex(a => (a.type === 'single' || a.type === 'both') && a.showFunction) >= 0) {
|
|
4282
|
+
actions = actions.filter(a => a.type === 'multi' ||
|
|
4266
4283
|
!a.showFunction ||
|
|
4267
4284
|
a.showFunction(this.selectedRows[0]));
|
|
4268
4285
|
}
|
|
@@ -4271,18 +4288,18 @@ let Table = class Table {
|
|
|
4271
4288
|
});
|
|
4272
4289
|
}
|
|
4273
4290
|
_parseDefinitions(definitionsArray) {
|
|
4274
|
-
return definitionsArray.map(
|
|
4291
|
+
return definitionsArray.map(definition => this._parseDefinitionSizes(definition));
|
|
4275
4292
|
}
|
|
4276
4293
|
_parseDefinitionSizes(definition) {
|
|
4277
4294
|
const definitionAny = definition;
|
|
4278
|
-
let parsedSizes = { default:
|
|
4295
|
+
let parsedSizes = { default: 'full' };
|
|
4279
4296
|
for (const [index, size] of tableColumSizesOptions.entries()) {
|
|
4280
|
-
if (definitionAny.sizes ===
|
|
4281
|
-
definitionAny.sizes ===
|
|
4282
|
-
definitionAny.sizes ===
|
|
4283
|
-
typeof definitionAny.sizes ===
|
|
4297
|
+
if (definitionAny.sizes === 'auto' ||
|
|
4298
|
+
definitionAny.sizes === 'hidden' ||
|
|
4299
|
+
definitionAny.sizes === 'full' ||
|
|
4300
|
+
typeof definitionAny.sizes === 'number') {
|
|
4284
4301
|
parsedSizes[size] =
|
|
4285
|
-
definitionAny.sizes ===
|
|
4302
|
+
definitionAny.sizes === 'auto' ? 'full' : definitionAny.sizes;
|
|
4286
4303
|
continue;
|
|
4287
4304
|
}
|
|
4288
4305
|
parsedSizes[size] =
|
|
@@ -4315,23 +4332,23 @@ let Table = class Table {
|
|
|
4315
4332
|
clearTimeout(this._calculateColumnWidthsTimeout);
|
|
4316
4333
|
this._calculateColumnWidthsTimeout = 0;
|
|
4317
4334
|
}
|
|
4318
|
-
const rows = this.tableRows.map(
|
|
4319
|
-
const cells = rows.flatMap(
|
|
4335
|
+
const rows = this.tableRows.map(c => c.nativeElement);
|
|
4336
|
+
const cells = rows.flatMap(row => Array.from(row.querySelectorAll('p-table-cell-ngx')));
|
|
4320
4337
|
this._calculateColumnWidthsTimeout = setTimeout(async () => {
|
|
4321
4338
|
this._setRowsWidth(rows);
|
|
4322
4339
|
const promises = [];
|
|
4323
4340
|
for (const cell of cells) {
|
|
4324
4341
|
if (cell.style.width?.length) {
|
|
4325
|
-
cell.style.width =
|
|
4342
|
+
cell.style.width = 'unset';
|
|
4326
4343
|
}
|
|
4327
|
-
promises.push(new Promise(
|
|
4344
|
+
promises.push(new Promise(resolve => setTimeout(() => {
|
|
4328
4345
|
const rect = cell.getBoundingClientRect();
|
|
4329
|
-
cell.setAttribute(
|
|
4346
|
+
cell.setAttribute('style', `width: ${rect.width}px !important`);
|
|
4330
4347
|
resolve();
|
|
4331
4348
|
}, 100)));
|
|
4332
4349
|
}
|
|
4333
4350
|
await Promise.all(promises);
|
|
4334
|
-
this._setRowsWidth(rows,
|
|
4351
|
+
this._setRowsWidth(rows, 'min-content');
|
|
4335
4352
|
this._resetScrollPosition();
|
|
4336
4353
|
}, 200);
|
|
4337
4354
|
}
|
|
@@ -4342,21 +4359,21 @@ let Table = class Table {
|
|
|
4342
4359
|
if (!shadow) {
|
|
4343
4360
|
continue;
|
|
4344
4361
|
}
|
|
4345
|
-
const firstDiv = shadow.querySelector(
|
|
4362
|
+
const firstDiv = shadow.querySelector('*:nth-child(1)');
|
|
4346
4363
|
if (!firstDiv) {
|
|
4347
4364
|
continue;
|
|
4348
4365
|
}
|
|
4349
|
-
const secondDiv = firstDiv.querySelector(
|
|
4366
|
+
const secondDiv = firstDiv.querySelector('*:nth-child(1)');
|
|
4350
4367
|
if (!secondDiv) {
|
|
4351
4368
|
continue;
|
|
4352
4369
|
}
|
|
4353
4370
|
if (value === null) {
|
|
4354
|
-
firstDiv.setAttribute(
|
|
4355
|
-
secondDiv.setAttribute(
|
|
4371
|
+
firstDiv.setAttribute('style', '');
|
|
4372
|
+
secondDiv.setAttribute('style', '');
|
|
4356
4373
|
continue;
|
|
4357
4374
|
}
|
|
4358
|
-
firstDiv.setAttribute(
|
|
4359
|
-
secondDiv.setAttribute(
|
|
4375
|
+
firstDiv.setAttribute('style', 'width: min-content;');
|
|
4376
|
+
secondDiv.setAttribute('style', 'width: min-content;');
|
|
4360
4377
|
if (i === 0) {
|
|
4361
4378
|
this._totalWidth = firstDiv.getBoundingClientRect().width;
|
|
4362
4379
|
}
|
|
@@ -4395,13 +4412,13 @@ Table = __decorate([
|
|
|
4395
4412
|
], Table);
|
|
4396
4413
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: Table, decorators: [{
|
|
4397
4414
|
type: Component,
|
|
4398
|
-
args: [{ selector: "p-table-ngx", changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-table-container>\n\t<p-table-header\n\t\t*ngIf=\"enableHeader\"\n\t\tclass=\"mb-8\"\n\t\t[quickFilters]=\"quickFilters\"\n\t\t[activeQuickFilterIdentifier]=\"activeQuickFilterIdentifier\"\n\t\t(quickFilter)=\"onQuickFilter($event)\"\n\t\t[enableSearch]=\"enableSearch\"\n\t\t[query]=\"query\"\n\t\t(queryChange)=\"onQueryChange($event)\"\n\t\t[enableFilter]=\"enableFilter\"\n\t\t[enableFilterDesktop]=\"enableFilterDesktop\"\n\t\t[selectedFiltersAmount]=\"selectedFiltersAmount\"\n\t\t[filterButtonTemplate]=\"filterButtonTemplate\"\n\t\t(filter)=\"filterModalShow$.next(true)\"\n\t\t[enableAction]=\"enableAction\"\n\t\t[canUseAction]=\"actionButtonEnabled\"\n\t\t[actionButtonTemplate]=\"actionButtonTemplate\"\n\t\t[actionLoading]=\"actionButtonLoading\"\n\t\t[actionText]=\"actionButtonText\"\n\t\t[actionIcon]=\"actionButtonIcon\"\n\t\t(action)=\"action.emit()\"\n\t\t[itemsSelectedAmount]=\"selectedRows.length\"\n\t\t[enableExport]=\"enableExport\"\n\t\t(export)=\"export.emit()\"\n\t\t[loading]=\"headerLoading\"\n\t>\n\t\t<ng-container *ngIf=\"headerCustomFilterTemplate\">\n\t\t\t<ng-container\n\t\t\t\t*ngTemplateOutlet=\"headerCustomFilterTemplate\"\n\t\t\t></ng-container>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"headerCustomActionsTemplate\">\n\t\t\t<ng-container\n\t\t\t\t*ngTemplateOutlet=\"headerCustomActionsTemplate\"\n\t\t\t></ng-container>\n\t\t</ng-container>\n\t</p-table-header>\n\n\t<div\n\t\tclass=\"relative flex-1\"\n\t\t*ngIf=\"enableScroll; else rowsTemplate\"\n\t>\n\t\t<div\n\t\t\tclass=\"flex flex-col overflow-x-auto\"\n\t\t\t#scrollContainer\n\t\t\t[class]=\"\n\t\t\t\tcn(\n\t\t\t\t\t'before:absolute before:top-0 before:left-0 before:z-[1] before:pointer-events-none',\n\t\t\t\t\t'before:w-24 before:h-full before:transition-opacity',\n\t\t\t\t\t'before:bg-gradient-to-r before:from-white dark:before:from-hurricane-700 before:via-white/80 dark:before:via-hurricane-700/90 before:to-transparent',\n\t\t\t\t\t'after:absolute after:top-0 after:right-0 after:z-[0] before:pointer-events-none',\n\t\t\t\t\t'after:w-24 after:h-full after:transition-opacity',\n\t\t\t\t\t'after:bg-gradient-to-l after:from-white after:dark:from-hurricane-700 after:via-white/80 dark:after:via-hurricane-700/90 after:to-transparent',\n\t\t\t\t\t{\n\t\t\t\t\t\t'before:opacity-0': reachedScrollStart$ | async,\n\t\t\t\t\t\t'after:opacity-0': reachedScrollEnd$ | async,\n\t\t\t\t\t\t'before:opacity-100': (reachedScrollStart$ | async) === false,\n\t\t\t\t\t\t'after:opacity-100': (reachedScrollEnd$ | async) === false\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t\"\n\t\t\t(scroll)=\"onContainerXScroll($event)\"\n\t\t>\n\t\t\t<ng-container *ngTemplateOutlet=\"rowsTemplate\"></ng-container>\n\t\t</div>\n\t</div>\n\n\t<ng-container *ngIf=\"enableFloatingMenu && enableRowSelection\">\n\t\t<p-floating-menu-container\n\t\t\t[usedInTable]=\"true\"\n\t\t\t[class]=\"\n\t\t\t\tfloatingMenuContainerClass({\n\t\t\t\t\thasFooter: enableFooter && (footerHidden$ | async) === false,\n\t\t\t\t\tactive: selectedRows.length > 0,\n\t\t\t\t\tshown: $any(floatingMenuShown$ | async)\n\t\t\t\t})\n\t\t\t\"\n\t\t\t[amount]=\"floatingMenuAmountSelectedText\"\n\t\t\t[enableAmountSelected]=\"!!(rowActionsFloating$ | async)?.length\"\n\t\t\t(close)=\"_selectAllChange(null, false)\"\n\t\t>\n\t\t\t<p-floating-menu-item\n\t\t\t\t*ngFor=\"let action of rowActionsFloating$ | async\"\n\t\t\t\tslot=\"floating-menu-item\"\n\t\t\t\t[disabled]=\"\n\t\t\t\t\t(action['type'] === 'single' && selectedRows.length > 1) ||\n\t\t\t\t\taction['disabled']\n\t\t\t\t\"\n\t\t\t\t[loading]=\"action['loading']\"\n\t\t\t\t[icon]=\"action['icon']\"\n\t\t\t\t[iconRotate]=\"action['iconRotate']\"\n\t\t\t\t[iconFlip]=\"action['iconFlip']\"\n\t\t\t\t(click)=\"_rowActionClick(action)\"\n\t\t\t>\n\t\t\t\t{{ action['label'] }}\n\t\t\t</p-floating-menu-item>\n\t\t</p-floating-menu-container>\n\t</ng-container>\n\n\t<p-table-footer\n\t\t*ngIf=\"enableFooter\"\n\t\t[hideOnSinglePage]=\"hideOnSinglePage\"\n\t\t[enablePaginationSize]=\"enablePaginationSize\"\n\t\t[pageSize]=\"pageSize\"\n\t\t[pageSizeOptions]=\"pageSizeOptions\"\n\t\t(pageSizeChange)=\"onPageSizeChange($event)\"\n\t\t[enablePaginationPages]=\"enablePaginationPages\"\n\t\t[page]=\"page\"\n\t\t[total]=\"total\"\n\t\t(pageChange)=\"onPageChange($event)\"\n\t\t[loading]=\"footerLoading\"\n\t\t(hiddenChange)=\"footerHidden$.next($event.detail)\"\n\t\t[tableHeaderHasAction]=\"enableHeader && enableAction && actionButtonEnabled\"\n\t></p-table-footer>\n</p-table-container>\n\n<ng-template #rowsTemplate>\n\t<p-table-row\n\t\t*ngIf=\"(extraHeaders$ | async)?.length\"\n\t\tvariant=\"header-secondary\"\n\t\tclass=\"z-[2]\"\n\t\t[isLast]=\"true\"\n\t>\n\t\t<ng-container *ngFor=\"let col of extraHeaders$ | async; let index = index\">\n\t\t\t<p-table-cell-ngx\n\t\t\t\t[definition]=\"col\"\n\t\t\t\tvariant=\"header-secondary\"\n\t\t\t\t[index]=\"index\"\n\t\t\t\t[checkboxOffset]=\"index === 0 && enableRowSelection\"\n\t\t\t\t[scrollable]=\"this.enableScroll\"\n\t\t\t>\n\t\t\t\t<b>{{ col.name }}</b>\n\t\t\t</p-table-cell-ngx>\n\t\t</ng-container>\n\t</p-table-row>\n\n\t<p-table-row variant=\"header\">\n\t\t<ng-container *ngFor=\"let col of columns$ | async; let index = index\">\n\t\t\t<p-table-cell-ngx\n\t\t\t\t[definition]=\"col\"\n\t\t\t\t[value]=\"col.name\"\n\t\t\t\tvariant=\"header\"\n\t\t\t\t[index]=\"index\"\n\t\t\t\t[checkbox]=\"\n\t\t\t\t\t(index === 0 || col.hasCheckbox) && enableRowSelection\n\t\t\t\t\t\t? checkboxTemplate\n\t\t\t\t\t\t: undefined\n\t\t\t\t\"\n\t\t\t\t[scrollable]=\"this.enableScroll\"\n\t\t\t></p-table-cell-ngx>\n\t\t\t<ng-template #checkboxTemplate>\n\t\t\t\t<p-checkbox\n\t\t\t\t\t(checkedChange)=\"_selectAllChange($event)\"\n\t\t\t\t\t[checked]=\"_selectionContainsAll()\"\n\t\t\t\t\t[indeterminate]=\"_selectionIndeterminate()\"\n\t\t\t\t\t[class.opacity-0]=\"rowSelectionLimit !== undefined\"\n\t\t\t\t\t[disabled]=\"rowSelectionLimit !== undefined\"\n\t\t\t\t></p-checkbox>\n\t\t\t</ng-template>\n\t\t</ng-container>\n\t</p-table-row>\n\n\t<div class=\"flex flex-1 flex-col\">\n\t\t<ng-container *ngIf=\"loading; else contentTemplate\">\n\t\t\t<p-table-row\n\t\t\t\t*ngFor=\"let r of loadingRows; let rowIndex = index\"\n\t\t\t\tclass=\"group\"\n\t\t\t\t[enableHover]=\"enableRowSelection || enableRowClick\"\n\t\t\t\t[isLast]=\"rowIndex === loadingRows.length - 1\"\n\t\t\t>\n\t\t\t\t<ng-container *ngFor=\"let col of columns$ | async; let index = index\">\n\t\t\t\t\t<p-table-cell-ngx\n\t\t\t\t\t\t[definition]=\"col\"\n\t\t\t\t\t\tvariant=\"loading\"\n\t\t\t\t\t\t[checkbox]=\"\n\t\t\t\t\t\t\t(index === 0 || col.hasCheckbox) && enableRowSelection\n\t\t\t\t\t\t\t\t? checkboxTemplate\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t[index]=\"index\"\n\t\t\t\t\t\t[rowIndex]=\"rowIndex\"\n\t\t\t\t\t\t[scrollable]=\"this.enableScroll\"\n\t\t\t\t\t></p-table-cell-ngx>\n\t\t\t\t\t<ng-template #checkboxTemplate>\n\t\t\t\t\t\t<p-loader\n\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\tclass=\"h-6 w-6 rounded\"\n\t\t\t\t\t\t></p-loader>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</ng-container>\n\t\t\t</p-table-row>\n\t\t</ng-container>\n\n\t\t<ng-template #contentTemplate>\n\t\t\t<ng-container *ngIf=\"parsedItems?.length; else emptyStateTemplate\">\n\t\t\t\t<p-table-row\n\t\t\t\t\t*ngFor=\"let item of parsedItems; let rowIndex = index\"\n\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t[enableHover]=\"enableRowSelection || enableRowClick\"\n\t\t\t\t\t[checked]=\"_selectionContains(item, rowIndex)\"\n\t\t\t\t\t[isLast]=\"rowIndex === parsedItems.length - 1\"\n\t\t\t\t\t(click)=\"_rowClick($event, rowIndex)\"\n\t\t\t\t>\n\t\t\t\t\t<ng-container\n\t\t\t\t\t\t*ngIf=\"\n\t\t\t\t\t\t\tparseRowActionsRow(\n\t\t\t\t\t\t\t\trowActionsRow$ | async,\n\t\t\t\t\t\t\t\trowIndex\n\t\t\t\t\t\t\t) as rowActionsRow\n\t\t\t\t\t\t\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t*ngFor=\"let col of columns$ | async; let index = index\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p-table-cell-ngx\n\t\t\t\t\t\t\t\t[definition]=\"col\"\n\t\t\t\t\t\t\t\t[item]=\"item\"\n\t\t\t\t\t\t\t\t[checkbox]=\"\n\t\t\t\t\t\t\t\t\t(index === 0 || col.hasCheckbox) && enableRowSelection\n\t\t\t\t\t\t\t\t\t\t? checkboxTemplate\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t[index]=\"index\"\n\t\t\t\t\t\t\t\t[rowIndex]=\"rowIndex\"\n\t\t\t\t\t\t\t\t[template]=\"col.template\"\n\t\t\t\t\t\t\t\t[scrollable]=\"this.enableScroll\"\n\t\t\t\t\t\t\t></p-table-cell-ngx>\n\n\t\t\t\t\t\t\t<ng-template #checkboxTemplate>\n\t\t\t\t\t\t\t\t<p-checkbox\n\t\t\t\t\t\t\t\t\t(checkedChange)=\"_checkboxChange($event.target, rowIndex)\"\n\t\t\t\t\t\t\t\t\t[disabled]=\"_checkboxDisabled(item, rowIndex)\"\n\t\t\t\t\t\t\t\t\t[checked]=\"_selectionContains(item, rowIndex)\"\n\t\t\t\t\t\t\t\t></p-checkbox>\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t<p-table-row-actions-container\n\t\t\t\t\t\t\t*ngIf=\"!!rowActionsRow?.length && !(isMobile$ | async)\"\n\t\t\t\t\t\t\t[checked]=\"_selectionContains(item, rowIndex)\"\n\t\t\t\t\t\t\tslot=\"actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let action of rowActionsRow\">\n\t\t\t\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\t\t\t\t*ngIf=\"\n\t\t\t\t\t\t\t\t\t\taction.showFunction\n\t\t\t\t\t\t\t\t\t\t\t? action.showFunction(parsedItems[rowIndex])\n\t\t\t\t\t\t\t\t\t\t\t: true\n\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t[content]=\"action['label']\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\t\t\t\tdata-is-action\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"action['icon']\"\n\t\t\t\t\t\t\t\t\t\t[iconRotate]=\"action['iconRotate']\"\n\t\t\t\t\t\t\t\t\t\ticonFlip=\"action.iconFlip\"\n\t\t\t\t\t\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t[loading]=\"action['loading']\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"action['disabled']\"\n\t\t\t\t\t\t\t\t\t\t[routerLink]=\"\n\t\t\t\t\t\t\t\t\t\t\taction.routerLink\n\t\t\t\t\t\t\t\t\t\t\t\t? (_getActionRouterLink(action.routerLink, rowIndex)\n\t\t\t\t\t\t\t\t\t\t\t\t | async)\n\t\t\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t\t[queryParams]=\"\n\t\t\t\t\t\t\t\t\t\t\taction.queryParams\n\t\t\t\t\t\t\t\t\t\t\t\t? (_getActionQueryParams(action.queryParams, rowIndex)\n\t\t\t\t\t\t\t\t\t\t\t\t | async)\n\t\t\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t\t(onClick)=\"_rowActionClick(action, rowIndex)\"\n\t\t\t\t\t\t\t\t\t></p-button>\n\t\t\t\t\t\t\t\t</p-tooltip>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</p-table-row-actions-container>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</p-table-row>\n\t\t\t</ng-container>\n\t\t</ng-template>\n\n\t\t<ng-container *ngFor=\"let customRow of customRows\">\n\t\t\t<p-table-row\n\t\t\t\t[variant]=\"customRow.variant\"\n\t\t\t\t[class]=\"{\n\t\t\t\t\t'z-[2]': customRow.variant === 'secondary'\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<ng-container *ngTemplateOutlet=\"customRow.templateRef\"></ng-container>\n\t\t\t</p-table-row>\n\t\t</ng-container>\n\t</div>\n</ng-template>\n\n<ng-container *ngIf=\"filterModalTemplate\">\n\t<p-modal\n\t\t[header]=\"filterModalHeaderText\"\n\t\t[show]=\"filterModalShow$ | async\"\n\t\t(closed)=\"filterModalShow$.next(false)\"\n\t>\n\t\t<div\n\t\t\tslot=\"content\"\n\t\t\tclass=\"flex flex-col gap-6\"\n\t\t>\n\t\t\t<ng-container *ngTemplateOutlet=\"filterModalTemplate\"></ng-container>\n\t\t</div>\n\t\t<div\n\t\t\tslot=\"footer\"\n\t\t\tclass=\"flex w-full justify-between gap-4\"\n\t\t>\n\t\t\t<p-button\n\t\t\t\t*ngIf=\"filterModalShowResetMobile\"\n\t\t\t\tclass=\"flex w-full tablet:w-auto desktop-xs:hidden\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\t(onClick)=\"onFilterModalReset(true)\"\n\t\t\t>\n\t\t\t\t{{ filterModalResetText }}\n\t\t\t</p-button>\n\t\t\t<p-button\n\t\t\t\t*ngIf=\"filterModalShowReset\"\n\t\t\t\tclass=\"hidden w-full tablet:w-auto desktop-xs:flex\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\t(onClick)=\"onFilterModalReset()\"\n\t\t\t>\n\t\t\t\t{{ filterModalResetText }}\n\t\t\t</p-button>\n\t\t\t<p-button\n\t\t\t\tclass=\"ml-auto w-full tablet:w-auto\"\n\t\t\t\ticon=\"checkmark\"\n\t\t\t\t(onClick)=\"onFilterModalSave()\"\n\t\t\t>\n\t\t\t\t{{ filterModalSaveText }}\n\t\t\t</p-button>\n\t\t</div>\n\t</p-modal>\n</ng-container>\n\n<ng-template #emptyStateTemplate>\n\t<p-empty-state\n\t\t*ngIf=\"emptyStateType === 'filtered'; else emptyStateNonFilterTemplate\"\n\t\tclass=\"my-16 self-center\"\n\t\t[illustration]=\"emptyStateFilteredIllustration\"\n\t\t[header]=\"emptyStateFilteredHeader\"\n\t\t[content]=\"emptyStateFilteredContent\"\n\t\t[enableAction]=\"false\"\n\t></p-empty-state>\n</ng-template>\n\n<ng-template #emptyStateNonFilterTemplate>\n\t<p-empty-state\n\t\tclass=\"my-16 self-center\"\n\t\t[illustration]=\"emptyStateIllustration\"\n\t\t[header]=\"emptyStateHeader\"\n\t\t[content]=\"emptyStateContent\"\n\t\t[enableAction]=\"enableEmptyStateAction\"\n\t\t[actionText]=\"emptyStateAction\"\n\t\t[actionIcon]=\"emptyStateActionIcon\"\n\t\t(action)=\"emptyStateClicked()\"\n\t></p-empty-state>\n</ng-template>\n" }]
|
|
4415
|
+
args: [{ selector: 'p-table-ngx', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-table-container>\n\t<p-table-header\n\t\t*ngIf=\"enableHeader\"\n\t\tclass=\"mb-8\"\n\t\t[quickFilters]=\"quickFilters\"\n\t\t[activeQuickFilterIdentifier]=\"activeQuickFilterIdentifier\"\n\t\t(quickFilter)=\"onQuickFilter($event)\"\n\t\t[enableSearch]=\"enableSearch\"\n\t\t[query]=\"query\"\n\t\t(queryChange)=\"onQueryChange($event)\"\n\t\t[enableFilter]=\"enableFilter\"\n\t\t[enableFilterDesktop]=\"enableFilterDesktop\"\n\t\t[selectedFiltersAmount]=\"selectedFiltersAmount\"\n\t\t[filterButtonTemplate]=\"filterButtonTemplate\"\n\t\t(filter)=\"filterModalShow$.next(true)\"\n\t\t[enableAction]=\"enableAction\"\n\t\t[canUseAction]=\"actionButtonEnabled\"\n\t\t[actionButtonTemplate]=\"actionButtonTemplate\"\n\t\t[actionLoading]=\"actionButtonLoading\"\n\t\t[actionText]=\"actionButtonText\"\n\t\t[actionIcon]=\"actionButtonIcon\"\n\t\t(action)=\"action.emit()\"\n\t\t[itemsSelectedAmount]=\"selectedRows.length\"\n\t\t[enableExport]=\"enableExport\"\n\t\t(export)=\"export.emit()\"\n\t\t[loading]=\"headerLoading\"\n\t>\n\t\t<ng-container *ngIf=\"headerCustomFilterTemplate\">\n\t\t\t<ng-container\n\t\t\t\t*ngTemplateOutlet=\"headerCustomFilterTemplate\"\n\t\t\t></ng-container>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"headerCustomActionsTemplate\">\n\t\t\t<ng-container\n\t\t\t\t*ngTemplateOutlet=\"headerCustomActionsTemplate\"\n\t\t\t></ng-container>\n\t\t</ng-container>\n\t</p-table-header>\n\n\t<div\n\t\tclass=\"relative flex-1\"\n\t\t*ngIf=\"enableScroll; else rowsTemplate\"\n\t>\n\t\t<div\n\t\t\tclass=\"flex flex-col overflow-x-auto\"\n\t\t\t#scrollContainer\n\t\t\t[class]=\"\n\t\t\t\tcn(\n\t\t\t\t\t'before:absolute before:top-0 before:left-0 before:z-[1] before:pointer-events-none',\n\t\t\t\t\t'before:w-24 before:h-full before:transition-opacity',\n\t\t\t\t\t'before:bg-gradient-to-r before:from-white dark:before:from-hurricane-700 before:via-white/80 dark:before:via-hurricane-700/90 before:to-transparent',\n\t\t\t\t\t'after:absolute after:top-0 after:right-0 after:z-[0] before:pointer-events-none',\n\t\t\t\t\t'after:w-24 after:h-full after:transition-opacity',\n\t\t\t\t\t'after:bg-gradient-to-l after:from-white after:dark:from-hurricane-700 after:via-white/80 dark:after:via-hurricane-700/90 after:to-transparent',\n\t\t\t\t\t{\n\t\t\t\t\t\t'before:opacity-0': reachedScrollStart$ | async,\n\t\t\t\t\t\t'after:opacity-0': reachedScrollEnd$ | async,\n\t\t\t\t\t\t'before:opacity-100': (reachedScrollStart$ | async) === false,\n\t\t\t\t\t\t'after:opacity-100': (reachedScrollEnd$ | async) === false\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t\"\n\t\t\t(scroll)=\"onContainerXScroll($event)\"\n\t\t>\n\t\t\t<ng-container *ngTemplateOutlet=\"rowsTemplate\"></ng-container>\n\t\t</div>\n\t</div>\n\n\t<ng-container *ngIf=\"enableFloatingMenu && enableRowSelection\">\n\t\t<p-floating-menu-container\n\t\t\t[usedInTable]=\"true\"\n\t\t\t[class]=\"\n\t\t\t\tfloatingMenuContainerClass({\n\t\t\t\t\thasFooter: enableFooter && (footerHidden$ | async) === false,\n\t\t\t\t\tactive: selectedRows.length > 0,\n\t\t\t\t\tshown: $any(floatingMenuShown$ | async)\n\t\t\t\t})\n\t\t\t\"\n\t\t\t[amount]=\"floatingMenuAmountSelectedText\"\n\t\t\t[enableAmountSelected]=\"!!(rowActionsFloating$ | async)?.length\"\n\t\t\t(close)=\"_selectAllChange(null, false)\"\n\t\t>\n\t\t\t<p-floating-menu-item\n\t\t\t\t*ngFor=\"let action of rowActionsFloating$ | async\"\n\t\t\t\tslot=\"floating-menu-item\"\n\t\t\t\t[disabled]=\"\n\t\t\t\t\t(action['type'] === 'single' && selectedRows.length > 1) ||\n\t\t\t\t\taction['disabled']\n\t\t\t\t\"\n\t\t\t\t[loading]=\"action['loading']\"\n\t\t\t\t[icon]=\"action['icon']\"\n\t\t\t\t[iconRotate]=\"action['iconRotate']\"\n\t\t\t\t[iconFlip]=\"action['iconFlip']\"\n\t\t\t\t(click)=\"_rowActionClick(action)\"\n\t\t\t>\n\t\t\t\t{{ action['label'] }}\n\t\t\t</p-floating-menu-item>\n\t\t</p-floating-menu-container>\n\t</ng-container>\n\n\t<p-table-footer\n\t\t*ngIf=\"enableFooter\"\n\t\t[hideOnSinglePage]=\"hideOnSinglePage\"\n\t\t[enablePaginationSize]=\"enablePaginationSize\"\n\t\t[pageSize]=\"pageSize\"\n\t\t[pageSizeOptions]=\"pageSizeOptions\"\n\t\t(pageSizeChange)=\"onPageSizeChange($event)\"\n\t\t[enablePaginationPages]=\"enablePaginationPages\"\n\t\t[page]=\"page\"\n\t\t[total]=\"total\"\n\t\t(pageChange)=\"onPageChange($event)\"\n\t\t[loading]=\"footerLoading\"\n\t\t(hiddenChange)=\"footerHidden$.next($event.detail)\"\n\t\t[tableHeaderHasAction]=\"enableHeader && enableAction && actionButtonEnabled\"\n\t></p-table-footer>\n</p-table-container>\n\n<ng-template #rowsTemplate>\n\t<p-table-row\n\t\t*ngIf=\"(extraHeaders$ | async)?.length\"\n\t\tvariant=\"header-secondary\"\n\t\tclass=\"z-[2]\"\n\t\t[isLast]=\"true\"\n\t>\n\t\t<ng-container *ngFor=\"let col of extraHeaders$ | async; let index = index\">\n\t\t\t<p-table-cell-ngx\n\t\t\t\t[definition]=\"col\"\n\t\t\t\tvariant=\"header-secondary\"\n\t\t\t\t[index]=\"index\"\n\t\t\t\t[checkboxOffset]=\"index === 0 && enableRowSelection\"\n\t\t\t\t[scrollable]=\"this.enableScroll\"\n\t\t\t>\n\t\t\t\t<b>{{ col.name }}</b>\n\t\t\t</p-table-cell-ngx>\n\t\t</ng-container>\n\t</p-table-row>\n\n\t<p-table-row variant=\"header\">\n\t\t<ng-container *ngFor=\"let col of columns$ | async; let index = index\">\n\t\t\t<p-table-cell-ngx\n\t\t\t\t[definition]=\"col\"\n\t\t\t\t[value]=\"col.name\"\n\t\t\t\tvariant=\"header\"\n\t\t\t\t[index]=\"index\"\n\t\t\t\t[checkbox]=\"\n\t\t\t\t\t(index === 0 || col.hasCheckbox) && enableRowSelection\n\t\t\t\t\t\t? checkboxTemplate\n\t\t\t\t\t\t: undefined\n\t\t\t\t\"\n\t\t\t\t[scrollable]=\"this.enableScroll\"\n\t\t\t></p-table-cell-ngx>\n\t\t\t<ng-template #checkboxTemplate>\n\t\t\t\t<p-checkbox\n\t\t\t\t\t(checkedChange)=\"_selectAllChange($event)\"\n\t\t\t\t\t[checked]=\"_selectionContainsAll()\"\n\t\t\t\t\t[indeterminate]=\"_selectionIndeterminate()\"\n\t\t\t\t\t[class.opacity-0]=\"rowSelectionLimit !== undefined\"\n\t\t\t\t\t[disabled]=\"rowSelectionLimit !== undefined\"\n\t\t\t\t></p-checkbox>\n\t\t\t</ng-template>\n\t\t</ng-container>\n\t</p-table-row>\n\n\t<div class=\"flex flex-1 flex-col\">\n\t\t<ng-container *ngIf=\"loading; else contentTemplate\">\n\t\t\t<p-table-row\n\t\t\t\t*ngFor=\"let r of loadingRows; let rowIndex = index\"\n\t\t\t\tclass=\"group\"\n\t\t\t\t[enableHover]=\"enableRowSelection || enableRowClick\"\n\t\t\t\t[isLast]=\"rowIndex === loadingRows.length - 1\"\n\t\t\t>\n\t\t\t\t<ng-container *ngFor=\"let col of columns$ | async; let index = index\">\n\t\t\t\t\t<p-table-cell-ngx\n\t\t\t\t\t\t[definition]=\"col\"\n\t\t\t\t\t\tvariant=\"loading\"\n\t\t\t\t\t\t[checkbox]=\"\n\t\t\t\t\t\t\t(index === 0 || col.hasCheckbox) && enableRowSelection\n\t\t\t\t\t\t\t\t? checkboxTemplate\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t[index]=\"index\"\n\t\t\t\t\t\t[rowIndex]=\"rowIndex\"\n\t\t\t\t\t\t[scrollable]=\"this.enableScroll\"\n\t\t\t\t\t></p-table-cell-ngx>\n\t\t\t\t\t<ng-template #checkboxTemplate>\n\t\t\t\t\t\t<p-loader\n\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\tclass=\"h-6 w-6 rounded\"\n\t\t\t\t\t\t></p-loader>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</ng-container>\n\t\t\t</p-table-row>\n\t\t</ng-container>\n\n\t\t<ng-template #contentTemplate>\n\t\t\t<ng-container *ngIf=\"parsedItems?.length; else emptyStateTemplate\">\n\t\t\t\t<p-table-row\n\t\t\t\t\t*ngFor=\"let item of parsedItems; let rowIndex = index\"\n\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t[enableHover]=\"enableRowSelection || enableRowClick\"\n\t\t\t\t\t[checked]=\"_selectionContains(item, rowIndex)\"\n\t\t\t\t\t[isLast]=\"rowIndex === parsedItems.length - 1\"\n\t\t\t\t\t(click)=\"_rowClick($event, rowIndex)\"\n\t\t\t\t>\n\t\t\t\t\t<ng-container\n\t\t\t\t\t\t*ngIf=\"\n\t\t\t\t\t\t\tparseRowActionsRow(\n\t\t\t\t\t\t\t\trowActionsRow$ | async,\n\t\t\t\t\t\t\t\trowIndex\n\t\t\t\t\t\t\t) as rowActionsRow\n\t\t\t\t\t\t\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t*ngFor=\"let col of columns$ | async; let index = index\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p-table-cell-ngx\n\t\t\t\t\t\t\t\t[definition]=\"col\"\n\t\t\t\t\t\t\t\t[item]=\"item\"\n\t\t\t\t\t\t\t\t[checkbox]=\"\n\t\t\t\t\t\t\t\t\t(index === 0 || col.hasCheckbox) && enableRowSelection\n\t\t\t\t\t\t\t\t\t\t? checkboxTemplate\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t[index]=\"index\"\n\t\t\t\t\t\t\t\t[rowIndex]=\"rowIndex\"\n\t\t\t\t\t\t\t\t[template]=\"col.template\"\n\t\t\t\t\t\t\t\t[scrollable]=\"this.enableScroll\"\n\t\t\t\t\t\t\t></p-table-cell-ngx>\n\n\t\t\t\t\t\t\t<ng-template #checkboxTemplate>\n\t\t\t\t\t\t\t\t<p-checkbox\n\t\t\t\t\t\t\t\t\t(checkedChange)=\"_checkboxChange($event.target, rowIndex)\"\n\t\t\t\t\t\t\t\t\t[disabled]=\"_checkboxDisabled(item, rowIndex)\"\n\t\t\t\t\t\t\t\t\t[checked]=\"_selectionContains(item, rowIndex)\"\n\t\t\t\t\t\t\t\t></p-checkbox>\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t<p-table-row-actions-container\n\t\t\t\t\t\t\t*ngIf=\"!!rowActionsRow?.length && !(isMobile$ | async)\"\n\t\t\t\t\t\t\t[checked]=\"_selectionContains(item, rowIndex)\"\n\t\t\t\t\t\t\tslot=\"actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let action of rowActionsRow\">\n\t\t\t\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\t\t\t\t*ngIf=\"\n\t\t\t\t\t\t\t\t\t\taction.showFunction\n\t\t\t\t\t\t\t\t\t\t\t? action.showFunction(parsedItems[rowIndex])\n\t\t\t\t\t\t\t\t\t\t\t: true\n\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t[content]=\"action['label']\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\t\t\t\tdata-is-action\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"action['icon']\"\n\t\t\t\t\t\t\t\t\t\t[iconRotate]=\"action['iconRotate']\"\n\t\t\t\t\t\t\t\t\t\ticonFlip=\"action.iconFlip\"\n\t\t\t\t\t\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t[loading]=\"action['loading']\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"action['disabled']\"\n\t\t\t\t\t\t\t\t\t\t[routerLink]=\"\n\t\t\t\t\t\t\t\t\t\t\taction.routerLink\n\t\t\t\t\t\t\t\t\t\t\t\t? (_getActionRouterLink(action.routerLink, rowIndex)\n\t\t\t\t\t\t\t\t\t\t\t\t | async)\n\t\t\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t\t[queryParams]=\"\n\t\t\t\t\t\t\t\t\t\t\taction.queryParams\n\t\t\t\t\t\t\t\t\t\t\t\t? (_getActionQueryParams(action.queryParams, rowIndex)\n\t\t\t\t\t\t\t\t\t\t\t\t | async)\n\t\t\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t\t(onClick)=\"_rowActionClick(action, rowIndex)\"\n\t\t\t\t\t\t\t\t\t></p-button>\n\t\t\t\t\t\t\t\t</p-tooltip>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</p-table-row-actions-container>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</p-table-row>\n\t\t\t</ng-container>\n\t\t</ng-template>\n\n\t\t<ng-container *ngFor=\"let customRow of customRows\">\n\t\t\t<p-table-row\n\t\t\t\t[variant]=\"customRow.variant\"\n\t\t\t\t[class]=\"{\n\t\t\t\t\t'z-[2]': customRow.variant === 'secondary'\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<ng-container *ngTemplateOutlet=\"customRow.templateRef\"></ng-container>\n\t\t\t</p-table-row>\n\t\t</ng-container>\n\t</div>\n</ng-template>\n\n<ng-container *ngIf=\"filterModalTemplate\">\n\t<p-modal\n\t\t[header]=\"filterModalHeaderText\"\n\t\t[show]=\"filterModalShow$ | async\"\n\t\t(closed)=\"filterModalShow$.next(false)\"\n\t>\n\t\t<div\n\t\t\tslot=\"content\"\n\t\t\tclass=\"flex flex-col gap-6\"\n\t\t>\n\t\t\t<ng-container *ngTemplateOutlet=\"filterModalTemplate\"></ng-container>\n\t\t</div>\n\t\t<div\n\t\t\tslot=\"footer\"\n\t\t\tclass=\"flex w-full justify-between gap-4\"\n\t\t>\n\t\t\t<p-button\n\t\t\t\t*ngIf=\"filterModalShowResetMobile\"\n\t\t\t\tclass=\"flex w-full tablet:w-auto desktop-xs:hidden\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\t(onClick)=\"onFilterModalReset(true)\"\n\t\t\t>\n\t\t\t\t{{ filterModalResetText }}\n\t\t\t</p-button>\n\t\t\t<p-button\n\t\t\t\t*ngIf=\"filterModalShowReset\"\n\t\t\t\tclass=\"hidden w-full tablet:w-auto desktop-xs:flex\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\t(onClick)=\"onFilterModalReset()\"\n\t\t\t>\n\t\t\t\t{{ filterModalResetText }}\n\t\t\t</p-button>\n\t\t\t<p-button\n\t\t\t\tclass=\"ml-auto w-full tablet:w-auto\"\n\t\t\t\ticon=\"checkmark\"\n\t\t\t\t(onClick)=\"onFilterModalSave()\"\n\t\t\t>\n\t\t\t\t{{ filterModalSaveText }}\n\t\t\t</p-button>\n\t\t</div>\n\t</p-modal>\n</ng-container>\n\n<ng-template #emptyStateTemplate>\n\t<p-empty-state\n\t\t*ngIf=\"emptyStateType === 'filtered'; else emptyStateNonFilterTemplate\"\n\t\tclass=\"my-16 self-center\"\n\t\t[illustration]=\"emptyStateFilteredIllustration\"\n\t\t[header]=\"emptyStateFilteredHeader\"\n\t\t[content]=\"emptyStateFilteredContent\"\n\t\t[enableAction]=\"false\"\n\t></p-empty-state>\n</ng-template>\n\n<ng-template #emptyStateNonFilterTemplate>\n\t<p-empty-state\n\t\tclass=\"my-16 self-center\"\n\t\t[illustration]=\"emptyStateIllustration\"\n\t\t[header]=\"emptyStateHeader\"\n\t\t[content]=\"emptyStateContent\"\n\t\t[enableAction]=\"enableEmptyStateAction\"\n\t\t[actionText]=\"emptyStateAction\"\n\t\t[actionIcon]=\"emptyStateActionIcon\"\n\t\t(action)=\"emptyStateClicked()\"\n\t></p-empty-state>\n</ng-template>\n" }]
|
|
4399
4416
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { className: [{
|
|
4400
4417
|
type: HostBinding,
|
|
4401
|
-
args: [
|
|
4418
|
+
args: ['class']
|
|
4402
4419
|
}], theme: [{
|
|
4403
4420
|
type: HostBinding,
|
|
4404
|
-
args: [
|
|
4421
|
+
args: ['attr.data-theme']
|
|
4405
4422
|
}], items: [{
|
|
4406
4423
|
type: Input
|
|
4407
4424
|
}], loading: [{
|
|
@@ -4530,7 +4547,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4530
4547
|
args: [TableCell, { read: ElementRef }]
|
|
4531
4548
|
}], scrollContainer: [{
|
|
4532
4549
|
type: ViewChild,
|
|
4533
|
-
args: [
|
|
4550
|
+
args: ['scrollContainer']
|
|
4534
4551
|
}], emptyStateActionClick: [{
|
|
4535
4552
|
type: Output
|
|
4536
4553
|
}], shadow: [{
|
|
@@ -4585,16 +4602,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4585
4602
|
type: Output
|
|
4586
4603
|
}], onResize: [{
|
|
4587
4604
|
type: HostListener,
|
|
4588
|
-
args: [
|
|
4605
|
+
args: ['window:resize', ['$event']]
|
|
4589
4606
|
}], keyDown: [{
|
|
4590
4607
|
type: HostListener,
|
|
4591
|
-
args: [
|
|
4608
|
+
args: ['document:keydown', ['$event']]
|
|
4592
4609
|
}], keyUp: [{
|
|
4593
4610
|
type: HostListener,
|
|
4594
|
-
args: [
|
|
4611
|
+
args: ['document:keyup', ['$event']]
|
|
4595
4612
|
}], visibilityChange: [{
|
|
4596
4613
|
type: HostListener,
|
|
4597
|
-
args: [
|
|
4614
|
+
args: ['document:visibilitychange', ['$event']]
|
|
4598
4615
|
}] } });
|
|
4599
4616
|
|
|
4600
4617
|
const TABLE_COMPONENTS = [
|