@aaamb/ngx-design-system 1.1.1 → 1.2.0
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.
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, output, computed, Component, signal, effect, forwardRef, ViewChild, HostListener, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, Input, Output, Attribute } from '@angular/core';
|
|
3
|
-
import * as i1$
|
|
3
|
+
import * as i1$2 from '@angular/forms';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
6
6
|
import { CommonModule, NgClass, NgStyle } from '@angular/common';
|
|
7
7
|
import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i1$1 from 'ng-zorro-antd/date-picker';
|
|
9
9
|
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
10
10
|
import { en_US, NZ_I18N, NZ_DATE_CONFIG } from 'ng-zorro-antd/i18n';
|
|
11
11
|
import * as i2 from 'ng-zorro-antd/select';
|
|
12
12
|
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
13
|
-
import * as i1$
|
|
13
|
+
import * as i1$3 from 'ng-zorro-antd/tooltip';
|
|
14
14
|
import { NzTooltipModule } from 'ng-zorro-antd/tooltip';
|
|
15
|
-
import * as i1$
|
|
15
|
+
import * as i1$4 from '@angular/cdk/drag-drop';
|
|
16
16
|
import { DragDropModule, CdkDrag, CdkDropList } from '@angular/cdk/drag-drop';
|
|
17
17
|
import { FlexRenderDirective } from '@tanstack/angular-table';
|
|
18
18
|
|
|
@@ -835,6 +835,7 @@ class InputDatepickerComponent {
|
|
|
835
835
|
invalidInput = signal(false, ...(ngDevMode ? [{ debugName: "invalidInput" }] : /* istanbul ignore next */ []));
|
|
836
836
|
futureDatesAllowed = input(false, ...(ngDevMode ? [{ debugName: "futureDatesAllowed" }] : /* istanbul ignore next */ []));
|
|
837
837
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
838
|
+
monthlyPicker = input(false, ...(ngDevMode ? [{ debugName: "monthlyPicker" }] : /* istanbul ignore next */ []));
|
|
838
839
|
datePickerRef;
|
|
839
840
|
cvaDisabled = false;
|
|
840
841
|
onChange = () => { };
|
|
@@ -913,6 +914,12 @@ class InputDatepickerComponent {
|
|
|
913
914
|
}
|
|
914
915
|
normalizeToUsDateFormat(text) {
|
|
915
916
|
const digits = text.replace(/\D/g, '');
|
|
917
|
+
if (this.monthlyPicker()) {
|
|
918
|
+
if (digits.length === 6) {
|
|
919
|
+
return `${digits.slice(0, 2)}/${digits.slice(2, 6)}`;
|
|
920
|
+
}
|
|
921
|
+
return text;
|
|
922
|
+
}
|
|
916
923
|
if (digits.length === 8) {
|
|
917
924
|
return `${digits.slice(0, 2)}/${digits.slice(2, 4)}/${digits.slice(4, 8)}`;
|
|
918
925
|
}
|
|
@@ -920,6 +927,22 @@ class InputDatepickerComponent {
|
|
|
920
927
|
}
|
|
921
928
|
parseDate(text) {
|
|
922
929
|
const normalized = text.trim();
|
|
930
|
+
if (this.monthlyPicker()) {
|
|
931
|
+
const monthlyPattern = /^\d{2}\/\d{4}$/;
|
|
932
|
+
if (!monthlyPattern.test(normalized))
|
|
933
|
+
return null;
|
|
934
|
+
const parts = normalized.split('/');
|
|
935
|
+
if (parts.length !== 2)
|
|
936
|
+
return null;
|
|
937
|
+
const [monthStr, yearStr] = parts;
|
|
938
|
+
const month = parseInt(monthStr, 10);
|
|
939
|
+
const year = parseInt(yearStr, 10);
|
|
940
|
+
if (isNaN(month) || isNaN(year))
|
|
941
|
+
return null;
|
|
942
|
+
if (month < 1 || month > 12)
|
|
943
|
+
return null;
|
|
944
|
+
return new Date(year, month - 1, 1);
|
|
945
|
+
}
|
|
923
946
|
const strictDatePattern = /^\d{2}\/\d{2}\/\d{4}$/;
|
|
924
947
|
if (!strictDatePattern.test(normalized))
|
|
925
948
|
return null;
|
|
@@ -974,8 +997,11 @@ class InputDatepickerComponent {
|
|
|
974
997
|
}
|
|
975
998
|
formatDate(date) {
|
|
976
999
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
977
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
978
1000
|
const year = date.getFullYear();
|
|
1001
|
+
if (this.monthlyPicker()) {
|
|
1002
|
+
return `${month}/${year}`;
|
|
1003
|
+
}
|
|
1004
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
979
1005
|
return `${month}/${day}/${year}`;
|
|
980
1006
|
}
|
|
981
1007
|
openDatePicker() {
|
|
@@ -1055,14 +1081,14 @@ class InputDatepickerComponent {
|
|
|
1055
1081
|
this.elementRef = elementRef;
|
|
1056
1082
|
}
|
|
1057
1083
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InputDatepickerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1058
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
1084
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: InputDatepickerComponent, isStandalone: true, selector: "ads-input-datepicker", inputs: { isPickerDisabled: { classPropertyName: "isPickerDisabled", publicName: "isPickerDisabled", isSignal: true, isRequired: false, transformFunction: null }, datePickerPlaceholder: { classPropertyName: "datePickerPlaceholder", publicName: "datePickerPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, futureDatesAllowed: { classPropertyName: "futureDatesAllowed", publicName: "futureDatesAllowed", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, monthlyPicker: { classPropertyName: "monthlyPicker", publicName: "monthlyPicker", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, providers: [
|
|
1059
1085
|
provideNgxMask(),
|
|
1060
1086
|
{
|
|
1061
1087
|
provide: NG_VALUE_ACCESSOR,
|
|
1062
1088
|
useExisting: forwardRef(() => InputDatepickerComponent),
|
|
1063
1089
|
multi: true,
|
|
1064
1090
|
},
|
|
1065
|
-
], viewQueries: [{ propertyName: "datePickerRef", first: true, predicate: ["datePicker"], descendants: true }], ngImport: i0, template: "<div class=\"flex w-full flex-col\">\n <ads-label [text]=\"label()\"></ads-label>\n\n <div class=\"relative w-full h-9.5\">\n <input\n type=\"text\"\n [class]=\"inputStateClass()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"datePickerPlaceholder()\"\n [ngModel]=\"selectedDate()\"\n (ngModelChange)=\"onInputTextChange($event)\"\n (blur)=\"onInputBlur()\"\n [mask]=\"'00/00/0000'\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"openDatePicker()\"\n class=\"w-6 h-6 top-[50%] translate-y-[-50%] absolute right-3 flex items-center justify-center border-0 outline-none ring-0 focus:outline-none focus:ring-0 active:outline-none active:ring-0 bg-transparent\"\n >\n <ads-icon\n [ngClass]=\"{\n 'cursor-pointer': !isDisabled(),\n 'text-green-1': !hasVisualError() && !isDisabled(),\n 'text-red-2': hasVisualError(),\n 'text-gray-500': isDisabled(),\n }\"\n [iconName]=\"'calendar'\"\n [size]=\"24\"\n ></ads-icon>\n </button>\n <nz-date-picker\n
|
|
1091
|
+
], viewQueries: [{ propertyName: "datePickerRef", first: true, predicate: ["datePicker"], descendants: true }], ngImport: i0, template: "<div class=\"flex w-full flex-col\">\n <ads-label [text]=\"label()\"></ads-label>\n\n <div class=\"relative w-full h-9.5\">\n <input\n type=\"text\"\n [class]=\"inputStateClass()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"datePickerPlaceholder()\"\n [ngModel]=\"selectedDate()\"\n (ngModelChange)=\"onInputTextChange($event)\"\n (blur)=\"onInputBlur()\"\n [mask]=\"monthlyPicker() ? '00/0000' : '00/00/0000'\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"openDatePicker()\"\n class=\"w-6 h-6 top-[50%] translate-y-[-50%] absolute right-3 flex items-center justify-center border-0 outline-none ring-0 focus:outline-none focus:ring-0 active:outline-none active:ring-0 bg-transparent\"\n >\n <ads-icon\n [ngClass]=\"{\n 'cursor-pointer': !isDisabled(),\n 'text-green-1': !hasVisualError() && !isDisabled(),\n 'text-red-2': hasVisualError(),\n 'text-gray-500': isDisabled(),\n }\"\n [iconName]=\"'calendar'\"\n [size]=\"24\"\n ></ads-icon>\n </button>\n @if (!monthlyPicker()) {\n <nz-date-picker\n style=\"position: absolute\"\n class=\"opacity-0 pointer-events-none w-full h-full left-0 top-0\"\n #datePicker\n [ngModel]=\"selectedDateObj()\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disabledDate\"\n [nzOpen]=\"isDatePickerOpen\"\n [nzPlaceHolder]=\"datePickerPlaceholder()\"\n [nzPlacement]=\"'bottomRight'\"\n [nzFormat]=\"'MM/dd/yyyy'\"\n (ngModelChange)=\"onInputValue($event)\"\n (nzOnOpenChange)=\"onOpenChange($event)\"\n ></nz-date-picker>\n } @else {\n <nz-month-picker\n style=\"position: absolute\"\n class=\"opacity-0 pointer-events-none w-full h-full left-0 top-0\"\n #datePicker\n [ngModel]=\"selectedDateObj()\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disabledDate\"\n [nzOpen]=\"isDatePickerOpen\"\n [nzPlaceHolder]=\"datePickerPlaceholder()\"\n [nzPlacement]=\"'bottomRight'\"\n [nzFormat]=\"'MM/yyyy'\"\n (ngModelChange)=\"onInputValue($event)\"\n (nzOnOpenChange)=\"onOpenChange($event)\"\n ></nz-month-picker>\n }\n </div>\n\n <ads-error-message\n [hasError]=\"hasVisualError()\"\n [errorMessage]=\"resolvedErrorMessage()\"\n ></ads-error-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i1$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i1$1.NzMonthPickerComponent, selector: "nz-month-picker", exportAs: ["nzMonthPicker"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix", "value", "errors", "disabled", "touched", "dirty", "invalid", "pending", "readonly", "required", "name"], outputs: ["valueChange", "touchedChange", "maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: LabelComponent, selector: "ads-label", inputs: ["text", "iconName", "iconSize"], outputs: ["iconClicked"] }, { kind: "component", type: ErrorMessageComponent, selector: "ads-error-message", inputs: ["hasError", "errorMessage"] }] });
|
|
1066
1092
|
}
|
|
1067
1093
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InputDatepickerComponent, decorators: [{
|
|
1068
1094
|
type: Component,
|
|
@@ -1081,8 +1107,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1081
1107
|
useExisting: forwardRef(() => InputDatepickerComponent),
|
|
1082
1108
|
multi: true,
|
|
1083
1109
|
},
|
|
1084
|
-
], template: "<div class=\"flex w-full flex-col\">\n <ads-label [text]=\"label()\"></ads-label>\n\n <div class=\"relative w-full h-9.5\">\n <input\n type=\"text\"\n [class]=\"inputStateClass()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"datePickerPlaceholder()\"\n [ngModel]=\"selectedDate()\"\n (ngModelChange)=\"onInputTextChange($event)\"\n (blur)=\"onInputBlur()\"\n [mask]=\"'00/00/0000'\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"openDatePicker()\"\n class=\"w-6 h-6 top-[50%] translate-y-[-50%] absolute right-3 flex items-center justify-center border-0 outline-none ring-0 focus:outline-none focus:ring-0 active:outline-none active:ring-0 bg-transparent\"\n >\n <ads-icon\n [ngClass]=\"{\n 'cursor-pointer': !isDisabled(),\n 'text-green-1': !hasVisualError() && !isDisabled(),\n 'text-red-2': hasVisualError(),\n 'text-gray-500': isDisabled(),\n }\"\n [iconName]=\"'calendar'\"\n [size]=\"24\"\n ></ads-icon>\n </button>\n <nz-date-picker\n
|
|
1085
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { isPickerDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPickerDisabled", required: false }] }], datePickerPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "datePickerPlaceholder", required: false }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], futureDatesAllowed: [{ type: i0.Input, args: [{ isSignal: true, alias: "futureDatesAllowed", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], datePickerRef: [{
|
|
1110
|
+
], template: "<div class=\"flex w-full flex-col\">\n <ads-label [text]=\"label()\"></ads-label>\n\n <div class=\"relative w-full h-9.5\">\n <input\n type=\"text\"\n [class]=\"inputStateClass()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"datePickerPlaceholder()\"\n [ngModel]=\"selectedDate()\"\n (ngModelChange)=\"onInputTextChange($event)\"\n (blur)=\"onInputBlur()\"\n [mask]=\"monthlyPicker() ? '00/0000' : '00/00/0000'\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"openDatePicker()\"\n class=\"w-6 h-6 top-[50%] translate-y-[-50%] absolute right-3 flex items-center justify-center border-0 outline-none ring-0 focus:outline-none focus:ring-0 active:outline-none active:ring-0 bg-transparent\"\n >\n <ads-icon\n [ngClass]=\"{\n 'cursor-pointer': !isDisabled(),\n 'text-green-1': !hasVisualError() && !isDisabled(),\n 'text-red-2': hasVisualError(),\n 'text-gray-500': isDisabled(),\n }\"\n [iconName]=\"'calendar'\"\n [size]=\"24\"\n ></ads-icon>\n </button>\n @if (!monthlyPicker()) {\n <nz-date-picker\n style=\"position: absolute\"\n class=\"opacity-0 pointer-events-none w-full h-full left-0 top-0\"\n #datePicker\n [ngModel]=\"selectedDateObj()\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disabledDate\"\n [nzOpen]=\"isDatePickerOpen\"\n [nzPlaceHolder]=\"datePickerPlaceholder()\"\n [nzPlacement]=\"'bottomRight'\"\n [nzFormat]=\"'MM/dd/yyyy'\"\n (ngModelChange)=\"onInputValue($event)\"\n (nzOnOpenChange)=\"onOpenChange($event)\"\n ></nz-date-picker>\n } @else {\n <nz-month-picker\n style=\"position: absolute\"\n class=\"opacity-0 pointer-events-none w-full h-full left-0 top-0\"\n #datePicker\n [ngModel]=\"selectedDateObj()\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disabledDate\"\n [nzOpen]=\"isDatePickerOpen\"\n [nzPlaceHolder]=\"datePickerPlaceholder()\"\n [nzPlacement]=\"'bottomRight'\"\n [nzFormat]=\"'MM/yyyy'\"\n (ngModelChange)=\"onInputValue($event)\"\n (nzOnOpenChange)=\"onOpenChange($event)\"\n ></nz-month-picker>\n }\n </div>\n\n <ads-error-message\n [hasError]=\"hasVisualError()\"\n [errorMessage]=\"resolvedErrorMessage()\"\n ></ads-error-message>\n</div>\n" }]
|
|
1111
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { isPickerDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPickerDisabled", required: false }] }], datePickerPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "datePickerPlaceholder", required: false }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], futureDatesAllowed: [{ type: i0.Input, args: [{ isSignal: true, alias: "futureDatesAllowed", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], monthlyPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthlyPicker", required: false }] }], datePickerRef: [{
|
|
1086
1112
|
type: ViewChild,
|
|
1087
1113
|
args: ['datePicker']
|
|
1088
1114
|
}], onDocumentClick: [{
|
|
@@ -1360,7 +1386,7 @@ class InputRangepickerComponent {
|
|
|
1360
1386
|
useExisting: forwardRef(() => InputRangepickerComponent),
|
|
1361
1387
|
multi: true,
|
|
1362
1388
|
},
|
|
1363
|
-
], ngImport: i0, template: "<div class=\"flex w-full flex-col\">\n <ads-label [text]=\"label()\"></ads-label>\n\n <div class=\"relative w-full h-9.5\">\n <input\n type=\"text\"\n [class]=\"inputStateClass()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"rangePickerPlaceholder()\"\n [ngModel]=\"selectedRange()\"\n (ngModelChange)=\"onInputTextChange($event)\"\n (blur)=\"onInputBlur()\"\n [mask]=\"'00/00/0000 - 00/00/0000'\"\n />\n\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"openDatePicker()\"\n class=\"w-6 h-6 top-[50%] translate-y-[-50%] absolute right-3 flex items-center justify-center border-0 outline-none ring-0 focus:outline-none focus:ring-0 active:outline-none active:ring-0 bg-transparent\"\n >\n <ads-icon\n [ngClass]=\"{\n 'cursor-pointer': !isDisabled(),\n 'text-green-1': !hasVisualError() && !isDisabled(),\n 'text-red-2': hasVisualError(),\n 'text-gray-500': isDisabled(),\n }\"\n [iconName]=\"'calendar'\"\n [size]=\"24\"\n ></ads-icon>\n </button>\n\n <nz-range-picker\n style=\"position: absolute\"\n class=\"opacity-0 pointer-events-none w-full h-full left-0 top-0\"\n [ngModel]=\"selectedRangeObj()\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disabledDate\"\n [nzOpen]=\"isDatePickerOpen\"\n [nzPlaceHolder]=\"[rangePickerPlaceholder(), rangePickerPlaceholder()]\"\n [nzPlacement]=\"'bottomRight'\"\n [nzFormat]=\"'MM/dd/yyyy'\"\n (ngModelChange)=\"onRangeValue($event)\"\n (nzOnOpenChange)=\"onOpenChange($event)\"\n ></nz-range-picker>\n </div>\n\n <ads-error-message\n [hasError]=\"hasVisualError()\"\n [errorMessage]=\"resolvedErrorMessage()\"\n ></ads-error-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$
|
|
1389
|
+
], ngImport: i0, template: "<div class=\"flex w-full flex-col\">\n <ads-label [text]=\"label()\"></ads-label>\n\n <div class=\"relative w-full h-9.5\">\n <input\n type=\"text\"\n [class]=\"inputStateClass()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"rangePickerPlaceholder()\"\n [ngModel]=\"selectedRange()\"\n (ngModelChange)=\"onInputTextChange($event)\"\n (blur)=\"onInputBlur()\"\n [mask]=\"'00/00/0000 - 00/00/0000'\"\n />\n\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"openDatePicker()\"\n class=\"w-6 h-6 top-[50%] translate-y-[-50%] absolute right-3 flex items-center justify-center border-0 outline-none ring-0 focus:outline-none focus:ring-0 active:outline-none active:ring-0 bg-transparent\"\n >\n <ads-icon\n [ngClass]=\"{\n 'cursor-pointer': !isDisabled(),\n 'text-green-1': !hasVisualError() && !isDisabled(),\n 'text-red-2': hasVisualError(),\n 'text-gray-500': isDisabled(),\n }\"\n [iconName]=\"'calendar'\"\n [size]=\"24\"\n ></ads-icon>\n </button>\n\n <nz-range-picker\n style=\"position: absolute\"\n class=\"opacity-0 pointer-events-none w-full h-full left-0 top-0\"\n [ngModel]=\"selectedRangeObj()\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disabledDate\"\n [nzOpen]=\"isDatePickerOpen\"\n [nzPlaceHolder]=\"[rangePickerPlaceholder(), rangePickerPlaceholder()]\"\n [nzPlacement]=\"'bottomRight'\"\n [nzFormat]=\"'MM/dd/yyyy'\"\n (ngModelChange)=\"onRangeValue($event)\"\n (nzOnOpenChange)=\"onOpenChange($event)\"\n ></nz-range-picker>\n </div>\n\n <ads-error-message\n [hasError]=\"hasVisualError()\"\n [errorMessage]=\"resolvedErrorMessage()\"\n ></ads-error-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i1$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i1$1.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix", "value", "errors", "disabled", "touched", "dirty", "invalid", "pending", "readonly", "required", "name"], outputs: ["valueChange", "touchedChange", "maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: LabelComponent, selector: "ads-label", inputs: ["text", "iconName", "iconSize"], outputs: ["iconClicked"] }, { kind: "component", type: ErrorMessageComponent, selector: "ads-error-message", inputs: ["hasError", "errorMessage"] }] });
|
|
1364
1390
|
}
|
|
1365
1391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InputRangepickerComponent, decorators: [{
|
|
1366
1392
|
type: Component,
|
|
@@ -1574,7 +1600,7 @@ class DatepickerSelectorComponent {
|
|
|
1574
1600
|
useExisting: forwardRef(() => DatepickerSelectorComponent),
|
|
1575
1601
|
multi: true,
|
|
1576
1602
|
},
|
|
1577
|
-
], viewQueries: [{ propertyName: "selectorTriggerRef", first: true, predicate: ["selectorTrigger"], descendants: true }], ngImport: i0, template: "<div class=\"relative inline-flex flex-col gap-3 w-full max-w-90\">\n <div class=\"flex items-center justify-between gap-3\">\n <button\n #selectorTrigger\n ads-button=\"\"\n type=\"button\"\n [variant]=\"buttonVariant()\"\n [color]=\"buttonColor()\"\n [onlyIconButton]=\"buttonOnlyIconButton()\"\n [iconButton]=\"buttonIcon()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggleSelector()\"\n [attr.aria-expanded]=\"isSelectorOpen()\"\n aria-haspopup=\"menu\"\n >\n <ads-icon [iconName]=\"buttonIcon()\" [size]=\"16\"></ads-icon>\n @if (!buttonOnlyIconButton()) {\n <span>{{ currentTimeFrameLabel() }}</span>\n }\n </button>\n\n @if (isSelectorOpen()) {\n <div\n class=\"absolute top-[calc(100%+0.5rem)] z-20 flex items-start gap-3\"\n [class.left-0]=\"!openToLeft()\"\n [class.right-0]=\"openToLeft()\"\n [class.flex-row]=\"!openToLeft()\"\n [class.flex-row-reverse]=\"openToLeft()\"\n role=\"menu\"\n (mouseleave)=\"clearPreview()\"\n >\n <div class=\"w-60 overflow-hidden rounded-lg shadow-lg\">\n @for (option of pickerOptions; track option.mode) {\n <div\n type=\"button\"\n class=\"flex w-full items-center justify-between border-b border-b-neutral-disabled-bg bg-white px-4 py-3 text-left text-sm text-green-base transition-colors last:border-b-0 hover:bg-aqua-6 cursor-pointer\"\n (mouseenter)=\"previewTimeFrame(option.mode)\"\n role=\"menuitem\"\n >\n <span>{{ option.label }}</span>\n </div>\n }\n </div>\n\n @if (activePreviewTimeFrame()) {\n @switch (activePreviewTimeFrame()) {\n @case (dateOptions.annually) {\n <nz-date-picker\n nzDropdownClassName=\"datePicker-box\"\n nzInline\n nzMode=\"year\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.annually, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n @case (dateOptions.monthly) {\n <nz-date-picker\n nzInline\n nzMode=\"month\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.monthly, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n @case (dateOptions.weekly) {\n <nz-date-picker\n nzInline\n nzMode=\"week\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.weekly, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n @case (dateOptions.quarterly) {\n <nz-date-picker\n nzInline\n nzMode=\"quarter\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.quarterly, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n @case (dateOptions.daily) {\n <nz-date-picker\n nzInline\n [nzShowToday]=\"false\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.daily, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n }\n }\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$
|
|
1603
|
+
], viewQueries: [{ propertyName: "selectorTriggerRef", first: true, predicate: ["selectorTrigger"], descendants: true }], ngImport: i0, template: "<div class=\"relative inline-flex flex-col gap-3 w-full max-w-90\">\n <div class=\"flex items-center justify-between gap-3\">\n <button\n #selectorTrigger\n ads-button=\"\"\n type=\"button\"\n [variant]=\"buttonVariant()\"\n [color]=\"buttonColor()\"\n [onlyIconButton]=\"buttonOnlyIconButton()\"\n [iconButton]=\"buttonIcon()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggleSelector()\"\n [attr.aria-expanded]=\"isSelectorOpen()\"\n aria-haspopup=\"menu\"\n >\n <ads-icon [iconName]=\"buttonIcon()\" [size]=\"16\"></ads-icon>\n @if (!buttonOnlyIconButton()) {\n <span>{{ currentTimeFrameLabel() }}</span>\n }\n </button>\n\n @if (isSelectorOpen()) {\n <div\n class=\"absolute top-[calc(100%+0.5rem)] z-20 flex items-start gap-3\"\n [class.left-0]=\"!openToLeft()\"\n [class.right-0]=\"openToLeft()\"\n [class.flex-row]=\"!openToLeft()\"\n [class.flex-row-reverse]=\"openToLeft()\"\n role=\"menu\"\n (mouseleave)=\"clearPreview()\"\n >\n <div class=\"w-60 overflow-hidden rounded-lg shadow-lg\">\n @for (option of pickerOptions; track option.mode) {\n <div\n type=\"button\"\n class=\"flex w-full items-center justify-between border-b border-b-neutral-disabled-bg bg-white px-4 py-3 text-left text-sm text-green-base transition-colors last:border-b-0 hover:bg-aqua-6 cursor-pointer\"\n (mouseenter)=\"previewTimeFrame(option.mode)\"\n role=\"menuitem\"\n >\n <span>{{ option.label }}</span>\n </div>\n }\n </div>\n\n @if (activePreviewTimeFrame()) {\n @switch (activePreviewTimeFrame()) {\n @case (dateOptions.annually) {\n <nz-date-picker\n nzDropdownClassName=\"datePicker-box\"\n nzInline\n nzMode=\"year\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.annually, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n @case (dateOptions.monthly) {\n <nz-date-picker\n nzInline\n nzMode=\"month\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.monthly, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n @case (dateOptions.weekly) {\n <nz-date-picker\n nzInline\n nzMode=\"week\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.weekly, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n @case (dateOptions.quarterly) {\n <nz-date-picker\n nzInline\n nzMode=\"quarter\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.quarterly, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n @case (dateOptions.daily) {\n <nz-date-picker\n nzInline\n [nzShowToday]=\"false\"\n [(ngModel)]=\"date\"\n (ngModelChange)=\"onDateChange(dateOptions.daily, $event)\"\n [nzDisabled]=\"isDisabled()\"\n [nzDisabledDate]=\"disableFutureDates\"\n ></nz-date-picker>\n }\n }\n }\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i1$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton"], outputs: ["clicked"] }] });
|
|
1578
1604
|
}
|
|
1579
1605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DatepickerSelectorComponent, decorators: [{
|
|
1580
1606
|
type: Component,
|
|
@@ -1754,7 +1780,7 @@ class SingleSelectorComponent {
|
|
|
1754
1780
|
useExisting: forwardRef(() => SingleSelectorComponent),
|
|
1755
1781
|
multi: true,
|
|
1756
1782
|
},
|
|
1757
|
-
], ngImport: i0, template: "<div class=\"flex w-full flex-col\">\n <ads-label\n [text]=\"label()\"\n [iconName]=\"labelIconName()\"\n (iconClicked)=\"onLabelClicked()\"\n ></ads-label>\n\n <nz-select\n class=\"w-full\"\n [ngModel]=\"currentValue()\"\n [nzPlaceHolder]=\"placeholder()\"\n [nzShowSearch]=\"true\"\n [nzAllowClear]=\"allowClear()\"\n [nzDisabled]=\"isDisabled()\"\n [nzLoading]=\"isLoading()\"\n [nzFilterOption]=\"filterOption\"\n (ngModelChange)=\"onSelectionChange($event)\"\n (nzBlur)=\"onBlur()\"\n [nzStatus]=\"errorMessage() ? 'error' : ''\"\n >\n @for (option of resolvedOptions(); track $index) {\n @if (isOptionGroup(option)) {\n <nz-option-group [nzLabel]=\"option.label\">\n @for (item of option.children; track item.value) {\n <nz-option\n [nzValue]=\"item.value\"\n [nzLabel]=\"item.label\"\n [nzDisabled]=\"item.disabled\"\n ></nz-option>\n }\n </nz-option-group>\n } @else {\n <nz-option\n [nzValue]=\"option.value\"\n [nzLabel]=\"option.label\"\n [nzDisabled]=\"option.disabled\"\n ></nz-option>\n }\n }\n </nz-select>\n\n <ads-error-message\n [hasError]=\"!!errorMessage()\"\n [errorMessage]=\"errorMessage()\"\n ></ads-error-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$
|
|
1783
|
+
], ngImport: i0, template: "<div class=\"flex w-full flex-col\">\n <ads-label\n [text]=\"label()\"\n [iconName]=\"labelIconName()\"\n (iconClicked)=\"onLabelClicked()\"\n ></ads-label>\n\n <nz-select\n class=\"w-full\"\n [ngModel]=\"currentValue()\"\n [nzPlaceHolder]=\"placeholder()\"\n [nzShowSearch]=\"true\"\n [nzAllowClear]=\"allowClear()\"\n [nzDisabled]=\"isDisabled()\"\n [nzLoading]=\"isLoading()\"\n [nzFilterOption]=\"filterOption\"\n (ngModelChange)=\"onSelectionChange($event)\"\n (nzBlur)=\"onBlur()\"\n [nzStatus]=\"errorMessage() ? 'error' : ''\"\n >\n @for (option of resolvedOptions(); track $index) {\n @if (isOptionGroup(option)) {\n <nz-option-group [nzLabel]=\"option.label\">\n @for (item of option.children; track item.value) {\n <nz-option\n [nzValue]=\"item.value\"\n [nzLabel]=\"item.label\"\n [nzDisabled]=\"item.disabled\"\n ></nz-option>\n }\n </nz-option-group>\n } @else {\n <nz-option\n [nzValue]=\"option.value\"\n [nzLabel]=\"option.label\"\n [nzDisabled]=\"option.disabled\"\n ></nz-option>\n }\n }\n </nz-select>\n\n <ads-error-message\n [hasError]=\"!!errorMessage()\"\n [errorMessage]=\"errorMessage()\"\n ></ads-error-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i2.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i2.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "component", type: i2.NzOptionGroupComponent, selector: "nz-option-group", inputs: ["nzLabel"], exportAs: ["nzOptionGroup"] }, { kind: "component", type: LabelComponent, selector: "ads-label", inputs: ["text", "iconName", "iconSize"], outputs: ["iconClicked"] }, { kind: "component", type: ErrorMessageComponent, selector: "ads-error-message", inputs: ["hasError", "errorMessage"] }] });
|
|
1758
1784
|
}
|
|
1759
1785
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SingleSelectorComponent, decorators: [{
|
|
1760
1786
|
type: Component,
|
|
@@ -2151,8 +2177,8 @@ class FilterButtonComponent {
|
|
|
2151
2177
|
this.closePanel();
|
|
2152
2178
|
}
|
|
2153
2179
|
}
|
|
2154
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterButtonComponent, deps: [{ token: i0.ElementRef }, { token: i1$
|
|
2155
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FilterButtonComponent, isStandalone: true, selector: "ads-filter-button", inputs: { buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: true, isRequired: false, transformFunction: null }, buttonIcon: { classPropertyName: "buttonIcon", publicName: "buttonIcon", isSignal: true, isRequired: false, transformFunction: null }, showButtonIcon: { classPropertyName: "showButtonIcon", publicName: "showButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, buttonVariant: { classPropertyName: "buttonVariant", publicName: "buttonVariant", isSignal: true, isRequired: false, transformFunction: null }, buttonColor: { classPropertyName: "buttonColor", publicName: "buttonColor", isSignal: true, isRequired: false, transformFunction: null }, buttonOpenVariant: { classPropertyName: "buttonOpenVariant", publicName: "buttonOpenVariant", isSignal: true, isRequired: false, transformFunction: null }, buttonOpenColor: { classPropertyName: "buttonOpenColor", publicName: "buttonOpenColor", isSignal: true, isRequired: false, transformFunction: null }, buttonDisabled: { classPropertyName: "buttonDisabled", publicName: "buttonDisabled", isSignal: true, isRequired: false, transformFunction: null }, panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, addFilterLabel: { classPropertyName: "addFilterLabel", publicName: "addFilterLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null }, applyLabel: { classPropertyName: "applyLabel", publicName: "applyLabel", isSignal: true, isRequired: false, transformFunction: null }, columnOptions: { classPropertyName: "columnOptions", publicName: "columnOptions", isSignal: true, isRequired: false, transformFunction: null }, columnPlaceholder: { classPropertyName: "columnPlaceholder", publicName: "columnPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, valuePlaceholder: { classPropertyName: "valuePlaceholder", publicName: "valuePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noFiltersText: { classPropertyName: "noFiltersText", publicName: "noFiltersText", isSignal: true, isRequired: false, transformFunction: null }, sortableColumnOptions: { classPropertyName: "sortableColumnOptions", publicName: "sortableColumnOptions", isSignal: true, isRequired: false, transformFunction: null }, noSortText: { classPropertyName: "noSortText", publicName: "noSortText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addFilter: "addFilter", resetFilters: "resetFilters", applyFilters: "applyFilters", addSort: "addSort", resetSorts: "resetSorts", applySorts: "applySorts", openChange: "openChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<div class=\"relative flex h-full w-fit gap-4\">\n <div class=\"relative flex h-full items-center gap-2\">\n <button\n ads-button\n type=\"button\"\n [variant]=\"resolvedButtonVariant()\"\n [color]=\"resolvedButtonColor()\"\n [disabled]=\"buttonDisabled()\"\n [iconButton]=\"resolvedIconGapValue()\"\n (clicked)=\"togglePanel()\"\n >\n {{ buttonLabel() }}\n @if (showButtonIcon()) {\n <ads-icon [iconName]=\"buttonIcon()\" [size]=\"16\"></ads-icon>\n }\n </button>\n\n <ng-content select=\"[filter-button-extra]\"></ng-content>\n </div>\n\n @if (isOpen()) {\n <div\n class=\"absolute right-0 top-[calc(100%+0.25rem)] z-400 h-fit min-h-40 w-[min(48rem,calc(100vw-3rem))] overflow-visible rounded-lg bg-white px-8 py-5 shadow-[0px_2px_10px_-4px_#00000040]\"\n animate.enter=\"fade-in\"\n animate.leave=\"fade-out\"\n >\n <div\n class=\"mb-4 flex w-full items-center justify-between border-b border-[#e7e7e7] pb-2\"\n >\n <h4 class=\"m-0 text-[1.12rem] font-medium text-black\">\n {{ panelTitle() }}\n </h4>\n\n <button\n ads-button\n type=\"button\"\n variant=\"secondary\"\n color=\"text\"\n [iconButton]=\"'plus'\"\n [disabled]=\"!canAddFilter()\"\n class=\"px-1! py-1! text-[1.12rem]! font-normal! leading-none!\"\n (click)=\"onAddFilterClick()\"\n >\n <ads-icon\n iconName=\"plus\"\n [size]=\"16\"\n [ngClass]=\"{\n 'text-gray-400': !canAddFilter(),\n 'text-aqua-0': canAddFilter(),\n }\"\n ></ads-icon>\n {{ addFilterLabel() }}\n </button>\n </div>\n\n <div class=\"mb-5 min-w-136\">\n <form [formGroup]=\"filterForm\" class=\"space-y-3\">\n @if (hasFilters()) {\n <div class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3 mb-1\">\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Column</p>\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Value</p>\n <span aria-hidden=\"true\" style=\"width: 40px\"></span>\n </div>\n }\n\n <div formArrayName=\"filters\" class=\"space-y-2\">\n @if (hasFilters()) {\n @for (\n group of filtersArray.controls;\n track group;\n let i = $index\n ) {\n <div\n [formGroupName]=\"i\"\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3\"\n >\n <ads-single-selector\n formControlName=\"column\"\n [placeholder]=\"columnPlaceholder()\"\n [options]=\"columnOptionsForRow(i)\"\n (valueChange)=\"onColumnChange(i, $event)\"\n ></ads-single-selector>\n\n @switch (rowValueType(i)) {\n @case (\"date\") {\n <ads-input-datepicker\n formControlName=\"value\"\n datePickerPlaceholder=\"MM/DD/YYYY\"\n [hasError]=\"hasDateError(i)\"\n ></ads-input-datepicker>\n }\n @case (\"number\") {\n <ads-input\n formControlName=\"value\"\n inputType=\"number\"\n [label]=\"''\"\n placeholder=\"0000000\"\n ></ads-input>\n }\n @case (\"boolean\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"status\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"codes\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"custom\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @default {\n <ads-input\n formControlName=\"value\"\n inputType=\"text\"\n [label]=\"''\"\n [placeholder]=\"valuePlaceholder()\"\n ></ads-input>\n }\n }\n\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"text\"\n [onlyIconButton]=\"true\"\n aria-label=\"Remove filter\"\n (clicked)=\"onRemoveFilterClick(i)\"\n >\n <ads-icon\n [iconName]=\"'error'\"\n [size]=\"16\"\n color=\"#014744\"\n ></ads-icon>\n </button>\n </div>\n }\n } @else {\n <div\n class=\"flex min-h-28 items-center justify-center rounded-lg border border-dashed border-[#d7d7d7] bg-white px-4 text-sm text-[#666]\"\n >\n {{ noFiltersText() }}\n </div>\n }\n </div>\n\n @if (sortableColumnOptions().length > 0) {\n <div class=\"mt-4 border-t border-[#e7e7e7] pt-4\">\n <div class=\"mb-3 flex w-full items-center justify-between\">\n <h4 class=\"m-0 text-[1.12rem] font-medium text-black\">Sort</h4>\n\n <button\n ads-button\n type=\"button\"\n variant=\"secondary\"\n color=\"text\"\n [iconButton]=\"'plus'\"\n [disabled]=\"!canAddSort()\"\n class=\"px-1! py-1! text-[1.12rem]! font-normal! leading-none!\"\n (click)=\"onAddSortClick()\"\n >\n <ads-icon\n iconName=\"plus\"\n [size]=\"16\"\n [ngClass]=\"{\n 'text-gray-400': !canAddSort(),\n 'text-aqua-0': canAddSort(),\n }\"\n ></ads-icon>\n Add Sort\n </button>\n </div>\n\n @if (hasSorts()) {\n <div\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3 mb-1\"\n >\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Column</p>\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">\n Direction\n </p>\n <span aria-hidden=\"true\" style=\"width: 40px\"></span>\n </div>\n\n <div formArrayName=\"sorts\" class=\"space-y-2\">\n @for (\n group of sortsArray.controls;\n track group;\n let i = $index\n ) {\n <div\n [formGroupName]=\"i\"\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3\"\n >\n <ads-single-selector\n formControlName=\"column\"\n placeholder=\"Select a sort field\"\n [options]=\"sortColumnOptionsForRow(i)\"\n ></ads-single-selector>\n\n <ads-single-selector\n formControlName=\"direction\"\n placeholder=\"Direction\"\n [options]=\"sortValueOptions()\"\n ></ads-single-selector>\n\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"text\"\n [onlyIconButton]=\"true\"\n aria-label=\"Remove sort\"\n (clicked)=\"onRemoveSortClick(i)\"\n >\n <ads-icon\n [iconName]=\"'error'\"\n [size]=\"16\"\n color=\"#014744\"\n ></ads-icon>\n </button>\n </div>\n }\n </div>\n } @else {\n <div\n class=\"flex min-h-20 items-center justify-center rounded-lg border border-dashed border-[#d7d7d7] bg-white px-4 text-sm text-[#666]\"\n >\n {{ noSortText() }}\n </div>\n }\n </div>\n }\n </form>\n </div>\n\n @if (hasFilters() || hasSorts()) {\n <div class=\"mt-2 flex h-10 items-center justify-end gap-3\">\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"white\"\n (click)=\"onResetClick()\"\n >\n {{ resetLabel() }}\n </button>\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"green\"\n [disabled]=\"!canApplyFilters()\"\n (click)=\"onApplyClick()\"\n >\n {{ applyLabel() }}\n </button>\n </div>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton"], outputs: ["clicked"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: SingleSelectorComponent, selector: "ads-single-selector", inputs: ["label", "placeholder", "disabled", "allowClear", "loading", "options", "asyncOptions", "value", "errorMessage", "labelIconName"], outputs: ["onLabelButtonClick", "valueChange"] }, { kind: "component", type: InputComponent, selector: "ads-input", inputs: ["label", "placeholder", "inputType", "textAreaRows", "value", "hasError", "disabled", "errorMessage"], outputs: ["valueChange"] }, { kind: "component", type: InputDatepickerComponent, selector: "ads-input-datepicker", inputs: ["isPickerDisabled", "datePickerPlaceholder", "hasError", "errorMessage", "futureDatesAllowed", "label"] }] });
|
|
2180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterButtonComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FilterButtonComponent, isStandalone: true, selector: "ads-filter-button", inputs: { buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: true, isRequired: false, transformFunction: null }, buttonIcon: { classPropertyName: "buttonIcon", publicName: "buttonIcon", isSignal: true, isRequired: false, transformFunction: null }, showButtonIcon: { classPropertyName: "showButtonIcon", publicName: "showButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, buttonVariant: { classPropertyName: "buttonVariant", publicName: "buttonVariant", isSignal: true, isRequired: false, transformFunction: null }, buttonColor: { classPropertyName: "buttonColor", publicName: "buttonColor", isSignal: true, isRequired: false, transformFunction: null }, buttonOpenVariant: { classPropertyName: "buttonOpenVariant", publicName: "buttonOpenVariant", isSignal: true, isRequired: false, transformFunction: null }, buttonOpenColor: { classPropertyName: "buttonOpenColor", publicName: "buttonOpenColor", isSignal: true, isRequired: false, transformFunction: null }, buttonDisabled: { classPropertyName: "buttonDisabled", publicName: "buttonDisabled", isSignal: true, isRequired: false, transformFunction: null }, panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, addFilterLabel: { classPropertyName: "addFilterLabel", publicName: "addFilterLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null }, applyLabel: { classPropertyName: "applyLabel", publicName: "applyLabel", isSignal: true, isRequired: false, transformFunction: null }, columnOptions: { classPropertyName: "columnOptions", publicName: "columnOptions", isSignal: true, isRequired: false, transformFunction: null }, columnPlaceholder: { classPropertyName: "columnPlaceholder", publicName: "columnPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, valuePlaceholder: { classPropertyName: "valuePlaceholder", publicName: "valuePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noFiltersText: { classPropertyName: "noFiltersText", publicName: "noFiltersText", isSignal: true, isRequired: false, transformFunction: null }, sortableColumnOptions: { classPropertyName: "sortableColumnOptions", publicName: "sortableColumnOptions", isSignal: true, isRequired: false, transformFunction: null }, noSortText: { classPropertyName: "noSortText", publicName: "noSortText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addFilter: "addFilter", resetFilters: "resetFilters", applyFilters: "applyFilters", addSort: "addSort", resetSorts: "resetSorts", applySorts: "applySorts", openChange: "openChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<div class=\"relative flex h-full w-fit gap-4\">\n <div class=\"relative flex h-full items-center gap-2\">\n <button\n ads-button\n type=\"button\"\n [variant]=\"resolvedButtonVariant()\"\n [color]=\"resolvedButtonColor()\"\n [disabled]=\"buttonDisabled()\"\n [iconButton]=\"resolvedIconGapValue()\"\n (clicked)=\"togglePanel()\"\n >\n {{ buttonLabel() }}\n @if (showButtonIcon()) {\n <ads-icon [iconName]=\"buttonIcon()\" [size]=\"16\"></ads-icon>\n }\n </button>\n\n <ng-content select=\"[filter-button-extra]\"></ng-content>\n </div>\n\n @if (isOpen()) {\n <div\n class=\"absolute right-0 top-[calc(100%+0.25rem)] z-400 h-fit min-h-40 w-[min(48rem,calc(100vw-3rem))] overflow-visible rounded-lg bg-white px-8 py-5 shadow-[0px_2px_10px_-4px_#00000040]\"\n animate.enter=\"fade-in\"\n animate.leave=\"fade-out\"\n >\n <div\n class=\"mb-4 flex w-full items-center justify-between border-b border-[#e7e7e7] pb-2\"\n >\n <h4 class=\"m-0 text-[1.12rem] font-medium text-black\">\n {{ panelTitle() }}\n </h4>\n\n <button\n ads-button\n type=\"button\"\n variant=\"secondary\"\n color=\"text\"\n [iconButton]=\"'plus'\"\n [disabled]=\"!canAddFilter()\"\n class=\"px-1! py-1! text-[1.12rem]! font-normal! leading-none!\"\n (click)=\"onAddFilterClick()\"\n >\n <ads-icon\n iconName=\"plus\"\n [size]=\"16\"\n [ngClass]=\"{\n 'text-gray-400': !canAddFilter(),\n 'text-aqua-0': canAddFilter(),\n }\"\n ></ads-icon>\n {{ addFilterLabel() }}\n </button>\n </div>\n\n <div class=\"mb-5 min-w-136\">\n <form [formGroup]=\"filterForm\" class=\"space-y-3\">\n @if (hasFilters()) {\n <div class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3 mb-1\">\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Column</p>\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Value</p>\n <span aria-hidden=\"true\" style=\"width: 40px\"></span>\n </div>\n }\n\n <div formArrayName=\"filters\" class=\"space-y-2\">\n @if (hasFilters()) {\n @for (\n group of filtersArray.controls;\n track group;\n let i = $index\n ) {\n <div\n [formGroupName]=\"i\"\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3\"\n >\n <ads-single-selector\n formControlName=\"column\"\n [placeholder]=\"columnPlaceholder()\"\n [options]=\"columnOptionsForRow(i)\"\n (valueChange)=\"onColumnChange(i, $event)\"\n ></ads-single-selector>\n\n @switch (rowValueType(i)) {\n @case (\"date\") {\n <ads-input-datepicker\n formControlName=\"value\"\n datePickerPlaceholder=\"MM/DD/YYYY\"\n [hasError]=\"hasDateError(i)\"\n ></ads-input-datepicker>\n }\n @case (\"number\") {\n <ads-input\n formControlName=\"value\"\n inputType=\"number\"\n [label]=\"''\"\n placeholder=\"0000000\"\n ></ads-input>\n }\n @case (\"boolean\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"status\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"codes\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"custom\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @default {\n <ads-input\n formControlName=\"value\"\n inputType=\"text\"\n [label]=\"''\"\n [placeholder]=\"valuePlaceholder()\"\n ></ads-input>\n }\n }\n\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"text\"\n [onlyIconButton]=\"true\"\n aria-label=\"Remove filter\"\n (clicked)=\"onRemoveFilterClick(i)\"\n >\n <ads-icon\n [iconName]=\"'error'\"\n [size]=\"16\"\n color=\"#014744\"\n ></ads-icon>\n </button>\n </div>\n }\n } @else {\n <div\n class=\"flex min-h-28 items-center justify-center rounded-lg border border-dashed border-[#d7d7d7] bg-white px-4 text-sm text-[#666]\"\n >\n {{ noFiltersText() }}\n </div>\n }\n </div>\n\n @if (sortableColumnOptions().length > 0) {\n <div class=\"mt-4 border-t border-[#e7e7e7] pt-4\">\n <div class=\"mb-3 flex w-full items-center justify-between\">\n <h4 class=\"m-0 text-[1.12rem] font-medium text-black\">Sort</h4>\n\n <button\n ads-button\n type=\"button\"\n variant=\"secondary\"\n color=\"text\"\n [iconButton]=\"'plus'\"\n [disabled]=\"!canAddSort()\"\n class=\"px-1! py-1! text-[1.12rem]! font-normal! leading-none!\"\n (click)=\"onAddSortClick()\"\n >\n <ads-icon\n iconName=\"plus\"\n [size]=\"16\"\n [ngClass]=\"{\n 'text-gray-400': !canAddSort(),\n 'text-aqua-0': canAddSort(),\n }\"\n ></ads-icon>\n Add Sort\n </button>\n </div>\n\n @if (hasSorts()) {\n <div\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3 mb-1\"\n >\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Column</p>\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">\n Direction\n </p>\n <span aria-hidden=\"true\" style=\"width: 40px\"></span>\n </div>\n\n <div formArrayName=\"sorts\" class=\"space-y-2\">\n @for (\n group of sortsArray.controls;\n track group;\n let i = $index\n ) {\n <div\n [formGroupName]=\"i\"\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3\"\n >\n <ads-single-selector\n formControlName=\"column\"\n placeholder=\"Select a sort field\"\n [options]=\"sortColumnOptionsForRow(i)\"\n ></ads-single-selector>\n\n <ads-single-selector\n formControlName=\"direction\"\n placeholder=\"Direction\"\n [options]=\"sortValueOptions()\"\n ></ads-single-selector>\n\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"text\"\n [onlyIconButton]=\"true\"\n aria-label=\"Remove sort\"\n (clicked)=\"onRemoveSortClick(i)\"\n >\n <ads-icon\n [iconName]=\"'error'\"\n [size]=\"16\"\n color=\"#014744\"\n ></ads-icon>\n </button>\n </div>\n }\n </div>\n } @else {\n <div\n class=\"flex min-h-20 items-center justify-center rounded-lg border border-dashed border-[#d7d7d7] bg-white px-4 text-sm text-[#666]\"\n >\n {{ noSortText() }}\n </div>\n }\n </div>\n }\n </form>\n </div>\n\n @if (hasFilters() || hasSorts()) {\n <div class=\"mt-2 flex h-10 items-center justify-end gap-3\">\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"white\"\n (click)=\"onResetClick()\"\n >\n {{ resetLabel() }}\n </button>\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"green\"\n [disabled]=\"!canApplyFilters()\"\n (click)=\"onApplyClick()\"\n >\n {{ applyLabel() }}\n </button>\n </div>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton"], outputs: ["clicked"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: SingleSelectorComponent, selector: "ads-single-selector", inputs: ["label", "placeholder", "disabled", "allowClear", "loading", "options", "asyncOptions", "value", "errorMessage", "labelIconName"], outputs: ["onLabelButtonClick", "valueChange"] }, { kind: "component", type: InputComponent, selector: "ads-input", inputs: ["label", "placeholder", "inputType", "textAreaRows", "value", "hasError", "disabled", "errorMessage"], outputs: ["valueChange"] }, { kind: "component", type: InputDatepickerComponent, selector: "ads-input-datepicker", inputs: ["isPickerDisabled", "datePickerPlaceholder", "hasError", "errorMessage", "futureDatesAllowed", "label", "monthlyPicker"] }] });
|
|
2156
2182
|
}
|
|
2157
2183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterButtonComponent, decorators: [{
|
|
2158
2184
|
type: Component,
|
|
@@ -2165,7 +2191,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
2165
2191
|
InputComponent,
|
|
2166
2192
|
InputDatepickerComponent,
|
|
2167
2193
|
], template: "<div class=\"relative flex h-full w-fit gap-4\">\n <div class=\"relative flex h-full items-center gap-2\">\n <button\n ads-button\n type=\"button\"\n [variant]=\"resolvedButtonVariant()\"\n [color]=\"resolvedButtonColor()\"\n [disabled]=\"buttonDisabled()\"\n [iconButton]=\"resolvedIconGapValue()\"\n (clicked)=\"togglePanel()\"\n >\n {{ buttonLabel() }}\n @if (showButtonIcon()) {\n <ads-icon [iconName]=\"buttonIcon()\" [size]=\"16\"></ads-icon>\n }\n </button>\n\n <ng-content select=\"[filter-button-extra]\"></ng-content>\n </div>\n\n @if (isOpen()) {\n <div\n class=\"absolute right-0 top-[calc(100%+0.25rem)] z-400 h-fit min-h-40 w-[min(48rem,calc(100vw-3rem))] overflow-visible rounded-lg bg-white px-8 py-5 shadow-[0px_2px_10px_-4px_#00000040]\"\n animate.enter=\"fade-in\"\n animate.leave=\"fade-out\"\n >\n <div\n class=\"mb-4 flex w-full items-center justify-between border-b border-[#e7e7e7] pb-2\"\n >\n <h4 class=\"m-0 text-[1.12rem] font-medium text-black\">\n {{ panelTitle() }}\n </h4>\n\n <button\n ads-button\n type=\"button\"\n variant=\"secondary\"\n color=\"text\"\n [iconButton]=\"'plus'\"\n [disabled]=\"!canAddFilter()\"\n class=\"px-1! py-1! text-[1.12rem]! font-normal! leading-none!\"\n (click)=\"onAddFilterClick()\"\n >\n <ads-icon\n iconName=\"plus\"\n [size]=\"16\"\n [ngClass]=\"{\n 'text-gray-400': !canAddFilter(),\n 'text-aqua-0': canAddFilter(),\n }\"\n ></ads-icon>\n {{ addFilterLabel() }}\n </button>\n </div>\n\n <div class=\"mb-5 min-w-136\">\n <form [formGroup]=\"filterForm\" class=\"space-y-3\">\n @if (hasFilters()) {\n <div class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3 mb-1\">\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Column</p>\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Value</p>\n <span aria-hidden=\"true\" style=\"width: 40px\"></span>\n </div>\n }\n\n <div formArrayName=\"filters\" class=\"space-y-2\">\n @if (hasFilters()) {\n @for (\n group of filtersArray.controls;\n track group;\n let i = $index\n ) {\n <div\n [formGroupName]=\"i\"\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3\"\n >\n <ads-single-selector\n formControlName=\"column\"\n [placeholder]=\"columnPlaceholder()\"\n [options]=\"columnOptionsForRow(i)\"\n (valueChange)=\"onColumnChange(i, $event)\"\n ></ads-single-selector>\n\n @switch (rowValueType(i)) {\n @case (\"date\") {\n <ads-input-datepicker\n formControlName=\"value\"\n datePickerPlaceholder=\"MM/DD/YYYY\"\n [hasError]=\"hasDateError(i)\"\n ></ads-input-datepicker>\n }\n @case (\"number\") {\n <ads-input\n formControlName=\"value\"\n inputType=\"number\"\n [label]=\"''\"\n placeholder=\"0000000\"\n ></ads-input>\n }\n @case (\"boolean\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"status\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"codes\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @case (\"custom\") {\n <ads-single-selector\n formControlName=\"value\"\n placeholder=\"Select an option\"\n [options]=\"valueOptionsForRow(i)\"\n ></ads-single-selector>\n }\n @default {\n <ads-input\n formControlName=\"value\"\n inputType=\"text\"\n [label]=\"''\"\n [placeholder]=\"valuePlaceholder()\"\n ></ads-input>\n }\n }\n\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"text\"\n [onlyIconButton]=\"true\"\n aria-label=\"Remove filter\"\n (clicked)=\"onRemoveFilterClick(i)\"\n >\n <ads-icon\n [iconName]=\"'error'\"\n [size]=\"16\"\n color=\"#014744\"\n ></ads-icon>\n </button>\n </div>\n }\n } @else {\n <div\n class=\"flex min-h-28 items-center justify-center rounded-lg border border-dashed border-[#d7d7d7] bg-white px-4 text-sm text-[#666]\"\n >\n {{ noFiltersText() }}\n </div>\n }\n </div>\n\n @if (sortableColumnOptions().length > 0) {\n <div class=\"mt-4 border-t border-[#e7e7e7] pt-4\">\n <div class=\"mb-3 flex w-full items-center justify-between\">\n <h4 class=\"m-0 text-[1.12rem] font-medium text-black\">Sort</h4>\n\n <button\n ads-button\n type=\"button\"\n variant=\"secondary\"\n color=\"text\"\n [iconButton]=\"'plus'\"\n [disabled]=\"!canAddSort()\"\n class=\"px-1! py-1! text-[1.12rem]! font-normal! leading-none!\"\n (click)=\"onAddSortClick()\"\n >\n <ads-icon\n iconName=\"plus\"\n [size]=\"16\"\n [ngClass]=\"{\n 'text-gray-400': !canAddSort(),\n 'text-aqua-0': canAddSort(),\n }\"\n ></ads-icon>\n Add Sort\n </button>\n </div>\n\n @if (hasSorts()) {\n <div\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3 mb-1\"\n >\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">Column</p>\n <p class=\"m-0 pt-1 text-sm font-medium leading-6\">\n Direction\n </p>\n <span aria-hidden=\"true\" style=\"width: 40px\"></span>\n </div>\n\n <div formArrayName=\"sorts\" class=\"space-y-2\">\n @for (\n group of sortsArray.controls;\n track group;\n let i = $index\n ) {\n <div\n [formGroupName]=\"i\"\n class=\"grid grid-cols-[1fr_1fr_auto] items-start gap-3\"\n >\n <ads-single-selector\n formControlName=\"column\"\n placeholder=\"Select a sort field\"\n [options]=\"sortColumnOptionsForRow(i)\"\n ></ads-single-selector>\n\n <ads-single-selector\n formControlName=\"direction\"\n placeholder=\"Direction\"\n [options]=\"sortValueOptions()\"\n ></ads-single-selector>\n\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"text\"\n [onlyIconButton]=\"true\"\n aria-label=\"Remove sort\"\n (clicked)=\"onRemoveSortClick(i)\"\n >\n <ads-icon\n [iconName]=\"'error'\"\n [size]=\"16\"\n color=\"#014744\"\n ></ads-icon>\n </button>\n </div>\n }\n </div>\n } @else {\n <div\n class=\"flex min-h-20 items-center justify-center rounded-lg border border-dashed border-[#d7d7d7] bg-white px-4 text-sm text-[#666]\"\n >\n {{ noSortText() }}\n </div>\n }\n </div>\n }\n </form>\n </div>\n\n @if (hasFilters() || hasSorts()) {\n <div class=\"mt-2 flex h-10 items-center justify-end gap-3\">\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"white\"\n (click)=\"onResetClick()\"\n >\n {{ resetLabel() }}\n </button>\n <button\n ads-button\n type=\"button\"\n variant=\"primary\"\n color=\"green\"\n [disabled]=\"!canApplyFilters()\"\n (click)=\"onApplyClick()\"\n >\n {{ applyLabel() }}\n </button>\n </div>\n }\n </div>\n }\n</div>\n" }]
|
|
2168
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$
|
|
2194
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$2.FormBuilder }], propDecorators: { buttonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonLabel", required: false }] }], buttonIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonIcon", required: false }] }], showButtonIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtonIcon", required: false }] }], buttonVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonVariant", required: false }] }], buttonColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonColor", required: false }] }], buttonOpenVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonOpenVariant", required: false }] }], buttonOpenColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonOpenColor", required: false }] }], buttonDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonDisabled", required: false }] }], panelTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelTitle", required: false }] }], addFilterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "addFilterLabel", required: false }] }], resetLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetLabel", required: false }] }], applyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyLabel", required: false }] }], columnOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnOptions", required: false }] }], columnPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnPlaceholder", required: false }] }], valuePlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePlaceholder", required: false }] }], noFiltersText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noFiltersText", required: false }] }], sortableColumnOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortableColumnOptions", required: false }] }], noSortText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noSortText", required: false }] }], addFilter: [{ type: i0.Output, args: ["addFilter"] }], resetFilters: [{ type: i0.Output, args: ["resetFilters"] }], applyFilters: [{ type: i0.Output, args: ["applyFilters"] }], addSort: [{ type: i0.Output, args: ["addSort"] }], resetSorts: [{ type: i0.Output, args: ["resetSorts"] }], applySorts: [{ type: i0.Output, args: ["applySorts"] }], openChange: [{ type: i0.Output, args: ["openChange"] }], onDocumentClick: [{
|
|
2169
2195
|
type: HostListener,
|
|
2170
2196
|
args: ['document:click', ['$event']]
|
|
2171
2197
|
}] } });
|
|
@@ -2487,7 +2513,7 @@ class SideNavComponent {
|
|
|
2487
2513
|
</div>
|
|
2488
2514
|
}
|
|
2489
2515
|
</aside>
|
|
2490
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i1$
|
|
2516
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i1$3.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }] });
|
|
2491
2517
|
}
|
|
2492
2518
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SideNavComponent, decorators: [{
|
|
2493
2519
|
type: Component,
|
|
@@ -2867,7 +2893,7 @@ class MultipleSelectorComponent {
|
|
|
2867
2893
|
useExisting: forwardRef(() => MultipleSelectorComponent),
|
|
2868
2894
|
multi: true,
|
|
2869
2895
|
},
|
|
2870
|
-
], ngImport: i0, template: "<div class=\"flex w-full flex-col\">\n <ads-label\n [text]=\"label()\"\n [iconName]=\"labelIconName()\"\n (iconClicked)=\"onLabelClicked()\"\n ></ads-label>\n\n <nz-select\n [nzMaxTagCount]=\"0\"\n class=\"w-full\"\n nzMode=\"multiple\"\n [ngModel]=\"currentValue()\"\n [nzPlaceHolder]=\"placeholder()\"\n [nzShowSearch]=\"true\"\n [nzAllowClear]=\"allowClear()\"\n [nzDisabled]=\"isDisabled()\"\n [nzLoading]=\"isLoading()\"\n [nzFilterOption]=\"filterOption\"\n (ngModelChange)=\"onSelectionChange($event)\"\n (nzBlur)=\"onBlur()\"\n [nzMaxTagPlaceholder]=\"tagPlaceHolder\"\n [nzStatus]=\"errorMessage() ? 'error' : ''\"\n >\n @for (option of resolvedOptions(); track $index) {\n @if (isOptionGroup(option)) {\n <nz-optgroup [nzLabel]=\"option.label\">\n @for (item of option.children; track item.value) {\n <nz-option\n [nzValue]=\"item.value\"\n [nzLabel]=\"item.label\"\n [nzDisabled]=\"item.disabled\"\n ></nz-option>\n }\n </nz-optgroup>\n } @else {\n <nz-option\n [nzValue]=\"option.value\"\n [nzLabel]=\"option.label\"\n [nzDisabled]=\"option.disabled\"\n ></nz-option>\n }\n }\n </nz-select>\n <ng-template #tagPlaceHolder let-selectedList>\n {{ selectedItemsSummary(selectedList.length) }}\n </ng-template>\n <ads-error-message\n [hasError]=\"!!errorMessage()\"\n [errorMessage]=\"errorMessage()\"\n ></ads-error-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$
|
|
2896
|
+
], ngImport: i0, template: "<div class=\"flex w-full flex-col\">\n <ads-label\n [text]=\"label()\"\n [iconName]=\"labelIconName()\"\n (iconClicked)=\"onLabelClicked()\"\n ></ads-label>\n\n <nz-select\n [nzMaxTagCount]=\"0\"\n class=\"w-full\"\n nzMode=\"multiple\"\n [ngModel]=\"currentValue()\"\n [nzPlaceHolder]=\"placeholder()\"\n [nzShowSearch]=\"true\"\n [nzAllowClear]=\"allowClear()\"\n [nzDisabled]=\"isDisabled()\"\n [nzLoading]=\"isLoading()\"\n [nzFilterOption]=\"filterOption\"\n (ngModelChange)=\"onSelectionChange($event)\"\n (nzBlur)=\"onBlur()\"\n [nzMaxTagPlaceholder]=\"tagPlaceHolder\"\n [nzStatus]=\"errorMessage() ? 'error' : ''\"\n >\n @for (option of resolvedOptions(); track $index) {\n @if (isOptionGroup(option)) {\n <nz-optgroup [nzLabel]=\"option.label\">\n @for (item of option.children; track item.value) {\n <nz-option\n [nzValue]=\"item.value\"\n [nzLabel]=\"item.label\"\n [nzDisabled]=\"item.disabled\"\n ></nz-option>\n }\n </nz-optgroup>\n } @else {\n <nz-option\n [nzValue]=\"option.value\"\n [nzLabel]=\"option.label\"\n [nzDisabled]=\"option.disabled\"\n ></nz-option>\n }\n }\n </nz-select>\n <ng-template #tagPlaceHolder let-selectedList>\n {{ selectedItemsSummary(selectedList.length) }}\n </ng-template>\n <ads-error-message\n [hasError]=\"!!errorMessage()\"\n [errorMessage]=\"errorMessage()\"\n ></ads-error-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i2.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i2.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "component", type: LabelComponent, selector: "ads-label", inputs: ["text", "iconName", "iconSize"], outputs: ["iconClicked"] }, { kind: "component", type: ErrorMessageComponent, selector: "ads-error-message", inputs: ["hasError", "errorMessage"] }] });
|
|
2871
2897
|
}
|
|
2872
2898
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MultipleSelectorComponent, decorators: [{
|
|
2873
2899
|
type: Component,
|
|
@@ -3199,7 +3225,7 @@ class FeedbackModalComponent {
|
|
|
3199
3225
|
return '';
|
|
3200
3226
|
}
|
|
3201
3227
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FeedbackModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3202
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FeedbackModalComponent, isStandalone: true, selector: "ads-feedback-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, top: { classPropertyName: "top", publicName: "top", isSignal: true, isRequired: false, transformFunction: null }, right: { classPropertyName: "right", publicName: "right", isSignal: true, isRequired: false, transformFunction: null }, bottom: { classPropertyName: "bottom", publicName: "bottom", isSignal: true, isRequired: false, transformFunction: null }, left: { classPropertyName: "left", publicName: "left", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, categoryOptions: { classPropertyName: "categoryOptions", publicName: "categoryOptions", isSignal: true, isRequired: false, transformFunction: null }, responseOpen: { classPropertyName: "responseOpen", publicName: "responseOpen", isSignal: true, isRequired: false, transformFunction: null }, responseType: { classPropertyName: "responseType", publicName: "responseType", isSignal: true, isRequired: false, transformFunction: null }, responseTitle: { classPropertyName: "responseTitle", publicName: "responseTitle", isSignal: true, isRequired: false, transformFunction: null }, responseDescription: { classPropertyName: "responseDescription", publicName: "responseDescription", isSignal: true, isRequired: false, transformFunction: null }, responseButtonText: { classPropertyName: "responseButtonText", publicName: "responseButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", submitted: "submitted", responseAction: "responseAction" }, ngImport: i0, template: "@if (open()) {\n <div\n class=\"fixed inset-0 z-50\"\n (click)=\"onBackdropClick($event)\"\n animate.enter=\"fade-in\"\n animate.leave=\"fade-out\"\n >\n <section\n class=\"absolute overflow-hidden rounded-[0.8rem] bg-white-base shadow-[0px_1px_17px_-7px_rgba(128,128,128,1)]\"\n [style.top]=\"modalPositionStyles()['top']\"\n [style.right]=\"modalPositionStyles()['right']\"\n [style.bottom]=\"modalPositionStyles()['bottom']\"\n [style.left]=\"modalPositionStyles()['left']\"\n [style.width]=\"modalPositionStyles()['width']\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (!responseOpen()) {\n <div\n class=\"flex h-28 flex-col items-center justify-center bg-green-base px-6 text-center\"\n >\n <h2 class=\"m-0 text-[1.4rem] font-semibold text-white-base\">\n {{ title() }}\n </h2>\n <p class=\"m-0 text-[0.9rem] text-white-base\">{{ subtitle() }}</p>\n </div>\n\n <form\n class=\"flex flex-col gap-2 p-8\"\n [formGroup]=\"form\"\n (ngSubmit)=\"submitFeedback()\"\n >\n <ads-input\n label=\"Subject*\"\n formControlName=\"subject\"\n placeholder=\"Enter subject\"\n inputType=\"text\"\n [hasError]=\"!!subjectError()\"\n [errorMessage]=\"subjectError()\"\n ></ads-input>\n\n <ads-single-selector\n label=\"Category\"\n formControlName=\"category\"\n placeholder=\"Select a category\"\n [options]=\"categoryOptions()\"\n ></ads-single-selector>\n\n <ads-input\n label=\"Description*\"\n formControlName=\"description\"\n placeholder=\"Enter description\"\n inputType=\"text_area\"\n [hasError]=\"!!descriptionError()\"\n [errorMessage]=\"descriptionError()\"\n ></ads-input>\n\n <div class=\"flex items-center justify-between\">\n <span class=\"text-xs text-neutral-disabled-text\"\n >200 characters max.</span\n >\n </div>\n\n <button\n ads-button\n type=\"submit\"\n variant=\"primary\"\n color=\"green\"\n [disabled]=\"form.invalid\"\n class=\"mt-2\"\n >\n Submit\n </button>\n </form>\n }\n\n @if (responseOpen()) {\n <button\n type=\"button\"\n class=\"absolute right-2 top-2 inline-flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent text-green-base hover:text-green-2\"\n (click)=\"closeModal()\"\n aria-label=\"Close\"\n >\n <ads-icon iconName=\"error\" [size]=\"16\"></ads-icon>\n </button>\n\n <div class=\"flex flex-col items-center gap-2 px-12 py-8 text-center\">\n <div\n class=\"inline-flex h-12 w-12 items-center justify-center rounded-full border-2 text-xl font-semibold\"\n [ngClass]=\"responseIconStyles().containerClass\"\n >\n <ads-icon\n [iconName]=\"responseIconStyles().iconName\"\n [size]=\"24\"\n ></ads-icon>\n </div>\n\n <h3 class=\"m-0 text-[1.3rem] font-bold text-green-base\">\n {{ responseTitle() }}\n </h3>\n <p class=\"m-0 text-[0.8rem] text-[#3d3d3d]\">\n {{ responseDescription() }}\n </p>\n\n <button\n ads-button\n type=\"button\"\n variant=\"secondary\"\n color=\"text\"\n class=\"mt-2\"\n (click)=\"onResponseButtonClick()\"\n >\n {{ responseButtonText() }}\n </button>\n </div>\n }\n </section>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$
|
|
3228
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FeedbackModalComponent, isStandalone: true, selector: "ads-feedback-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, top: { classPropertyName: "top", publicName: "top", isSignal: true, isRequired: false, transformFunction: null }, right: { classPropertyName: "right", publicName: "right", isSignal: true, isRequired: false, transformFunction: null }, bottom: { classPropertyName: "bottom", publicName: "bottom", isSignal: true, isRequired: false, transformFunction: null }, left: { classPropertyName: "left", publicName: "left", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, categoryOptions: { classPropertyName: "categoryOptions", publicName: "categoryOptions", isSignal: true, isRequired: false, transformFunction: null }, responseOpen: { classPropertyName: "responseOpen", publicName: "responseOpen", isSignal: true, isRequired: false, transformFunction: null }, responseType: { classPropertyName: "responseType", publicName: "responseType", isSignal: true, isRequired: false, transformFunction: null }, responseTitle: { classPropertyName: "responseTitle", publicName: "responseTitle", isSignal: true, isRequired: false, transformFunction: null }, responseDescription: { classPropertyName: "responseDescription", publicName: "responseDescription", isSignal: true, isRequired: false, transformFunction: null }, responseButtonText: { classPropertyName: "responseButtonText", publicName: "responseButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", submitted: "submitted", responseAction: "responseAction" }, ngImport: i0, template: "@if (open()) {\n <div\n class=\"fixed inset-0 z-50\"\n (click)=\"onBackdropClick($event)\"\n animate.enter=\"fade-in\"\n animate.leave=\"fade-out\"\n >\n <section\n class=\"absolute overflow-hidden rounded-[0.8rem] bg-white-base shadow-[0px_1px_17px_-7px_rgba(128,128,128,1)]\"\n [style.top]=\"modalPositionStyles()['top']\"\n [style.right]=\"modalPositionStyles()['right']\"\n [style.bottom]=\"modalPositionStyles()['bottom']\"\n [style.left]=\"modalPositionStyles()['left']\"\n [style.width]=\"modalPositionStyles()['width']\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (!responseOpen()) {\n <div\n class=\"flex h-28 flex-col items-center justify-center bg-green-base px-6 text-center\"\n >\n <h2 class=\"m-0 text-[1.4rem] font-semibold text-white-base\">\n {{ title() }}\n </h2>\n <p class=\"m-0 text-[0.9rem] text-white-base\">{{ subtitle() }}</p>\n </div>\n\n <form\n class=\"flex flex-col gap-2 p-8\"\n [formGroup]=\"form\"\n (ngSubmit)=\"submitFeedback()\"\n >\n <ads-input\n label=\"Subject*\"\n formControlName=\"subject\"\n placeholder=\"Enter subject\"\n inputType=\"text\"\n [hasError]=\"!!subjectError()\"\n [errorMessage]=\"subjectError()\"\n ></ads-input>\n\n <ads-single-selector\n label=\"Category\"\n formControlName=\"category\"\n placeholder=\"Select a category\"\n [options]=\"categoryOptions()\"\n ></ads-single-selector>\n\n <ads-input\n label=\"Description*\"\n formControlName=\"description\"\n placeholder=\"Enter description\"\n inputType=\"text_area\"\n [hasError]=\"!!descriptionError()\"\n [errorMessage]=\"descriptionError()\"\n ></ads-input>\n\n <div class=\"flex items-center justify-between\">\n <span class=\"text-xs text-neutral-disabled-text\"\n >200 characters max.</span\n >\n </div>\n\n <button\n ads-button\n type=\"submit\"\n variant=\"primary\"\n color=\"green\"\n [disabled]=\"form.invalid\"\n class=\"mt-2\"\n >\n Submit\n </button>\n </form>\n }\n\n @if (responseOpen()) {\n <button\n type=\"button\"\n class=\"absolute right-2 top-2 inline-flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent text-green-base hover:text-green-2\"\n (click)=\"closeModal()\"\n aria-label=\"Close\"\n >\n <ads-icon iconName=\"error\" [size]=\"16\"></ads-icon>\n </button>\n\n <div class=\"flex flex-col items-center gap-2 px-12 py-8 text-center\">\n <div\n class=\"inline-flex h-12 w-12 items-center justify-center rounded-full border-2 text-xl font-semibold\"\n [ngClass]=\"responseIconStyles().containerClass\"\n >\n <ads-icon\n [iconName]=\"responseIconStyles().iconName\"\n [size]=\"24\"\n ></ads-icon>\n </div>\n\n <h3 class=\"m-0 text-[1.3rem] font-bold text-green-base\">\n {{ responseTitle() }}\n </h3>\n <p class=\"m-0 text-[0.8rem] text-[#3d3d3d]\">\n {{ responseDescription() }}\n </p>\n\n <button\n ads-button\n type=\"button\"\n variant=\"secondary\"\n color=\"text\"\n class=\"mt-2\"\n (click)=\"onResponseButtonClick()\"\n >\n {{ responseButtonText() }}\n </button>\n </div>\n }\n </section>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton"], outputs: ["clicked"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: InputComponent, selector: "ads-input", inputs: ["label", "placeholder", "inputType", "textAreaRows", "value", "hasError", "disabled", "errorMessage"], outputs: ["valueChange"] }, { kind: "component", type: SingleSelectorComponent, selector: "ads-single-selector", inputs: ["label", "placeholder", "disabled", "allowClear", "loading", "options", "asyncOptions", "value", "errorMessage", "labelIconName"], outputs: ["onLabelButtonClick", "valueChange"] }] });
|
|
3203
3229
|
}
|
|
3204
3230
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FeedbackModalComponent, decorators: [{
|
|
3205
3231
|
type: Component,
|
|
@@ -3574,7 +3600,7 @@ class TableComponent {
|
|
|
3574
3600
|
return this.getHeaderCells().length + (this.showButtons ? 1 : 0);
|
|
3575
3601
|
}
|
|
3576
3602
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TableComponent, deps: [{ token: 'data-testid', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3577
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: TableComponent, isStandalone: true, selector: "ads-table", inputs: { table: "table", isLoading: "isLoading", selectedSortingHeader: "selectedSortingHeader", sortDirection: "sortDirection", showButtons: "showButtons", allContentLeft: "allContentLeft", totalRegisters: "totalRegisters", areColumnsDraggable: "areColumnsDraggable", currentPage: "currentPage", totalPages: "totalPages", pageSize: "pageSize", enableMultiSort: "enableMultiSort", multiSortCriteria: "multiSortCriteria", actionButtons: "actionButtons", statusStateStyles: "statusStateStyles", activeStateStyles: "activeStateStyles" }, outputs: { sortEvent: "sortEvent", columnOrderChange: "columnOrderChange", pageChange: "pageChange", columnSizingChange: "columnSizingChange", pageSizeChange: "pageSizeChange", multiSortEvent: "multiSortEvent" }, ngImport: i0, template: "@if (getRows().length > 0 || isLoading) {\n <!-- Main table layout: data grid + footer pagination area -->\n <div class=\"flex min-h-[60vh] w-full flex-col justify-between gap-4\">\n <!-- @if (isLoading) {\n <div\n class=\"flex min-h-40 items-center justify-center rounded-2xl bg-white-base/80 px-6 py-8 shadow-sm\"\n >\n <div class=\"flex items-center gap-3 text-green-1\">\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-t-green-1\"\n ></span>\n <span class=\"text-sm font-medium\">Loading table data</span>\n </div>\n </div>\n } -->\n\n <div class=\"w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <!-- Interactive header row: sorting, drag-and-drop, and column resizing -->\n <thead class=\"bg-green-1 text-white-base\">\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"h-10 min-h-10 max-h-11.25\"\n (cdkDropListDropped)=\"drop($event)\"\n [ngStyle]=\"allContentLeft ? { 'text-align': 'left' } : null\"\n >\n @for (\n column of getHeaderCells();\n track column.id + \"-\" + headerRenderVersion\n ) {\n @if (isColumnSortable(column)) {\n @if (areColumnsDraggable) {\n <!-- Sortable + draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0 overflow-hidden cursor-grab active:cursor-grabbing\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n cdkDragHandle\n class=\"group flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 border-none outline-0 bg-transparent hover:bg-white/10\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n <!-- When right-aligned, the sort indicator is shown before the header text -->\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n <!-- For left/center aligned headers, the sort indicator is shown after the text -->\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Sortable header cell without drag-and-drop -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n class=\"flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 hover:bg-white/10 bg-green-base\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n } @else {\n @if (areColumnsDraggable) {\n <!-- Non-sortable but draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n cdkDragHandle\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Plain header cell (no sort, no drag) -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n }\n }\n\n @if (showButtons) {\n <!-- Optional actions column header -->\n <th\n [attr.data-testid]=\"contentTestId + '-header-actions'\"\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium whitespace-nowrap rounded-r-2xl\"\n [ngStyle]=\"{ width: '1%' }\"\n >\n Actions\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n <!-- Data rows -->\n @for (row of getRows(); track trackByFn($index, row)) {\n <tr\n [attr.data-testid]=\"getRowTestId(row, $index)\"\n class=\"h-10 min-h-10 max-h-11.25\"\n >\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td\n class=\"border-b border-[#aedad8] px-3 py-0 text-sm whitespace-pre-line wrap-break-word text-black-base\"\n [ngClass]=\"cellAlignmentClass(cell)\"\n [ngStyle]=\"allContentLeft ? { padding: '0' } : null\"\n >\n @if (isStateCell(cell)) {\n <!-- State-like values (status/active) are rendered with ads-state for a consistent visual token -->\n <ads-state\n [shape]=\"getStateStyle(cell).shape ?? statusShape\"\n [containerShapes]=\"getStateStyle(cell).shape ?? statusShape\"\n [borderColor]=\"getStateStyle(cell).borderColor\"\n [bgColor]=\"getStateStyle(cell).bgColor\"\n [textColor]=\"getStateStyle(cell).textColor\"\n [text]=\"getStateText(cell)\"\n [fullWidth]=\"getStateStyle(cell).fullWidth ?? false\"\n [boldText]=\"getStateStyle(cell).boldText ?? true\"\n ></ads-state>\n } @else {\n <!-- Generic cell rendering for non-state columns via TanStack flexRender output -->\n <ng-container\n *flexRender=\"\n cell.column.columnDef.cell;\n props: cell.getContext();\n let renderedCell\n \"\n >\n <div\n [innerHTML]=\"renderedCell\"\n [ngStyle]=\"\n allContentLeft ? { 'text-align': 'left' } : null\n \"\n ></div>\n </ng-container>\n }\n </td>\n }\n\n @if (showButtons && actionButtons.length > 0) {\n <!-- Optional row action buttons -->\n <td\n class=\"border-b border-[#aedad8] px-1 py-1 align-middle text-center whitespace-nowrap\"\n >\n <div\n class=\"flex w-full items-center justify-center gap-1 p-0\"\n >\n @for (button of actionButtons; track $index) {\n @if (\n !button.condition || button.condition(row.original)\n ) {\n <button\n nz-tooltip\n [nzTooltipTitle]=\"\n getTooltipText(button, row.original)\n \"\n ads-button\n type=\"button\"\n [onlyIconButton]=\"true\"\n color=\"white\"\n [attr.data-testid]=\"\n getActionButtonTestId(row, button, $index)\n \"\n [title]=\"getTooltipText(button, row.original)\"\n [disabled]=\"\n isActionButtonDisabled(button, row.original)\n \"\n (click)=\"button.callback(row.original)\"\n >\n <ads-icon\n [ngClass]=\"\n isActionButtonDisabled(button, row.original)\n ? 'text-neutral-disabled-text'\n : 'text-green-1'\n \"\n [iconName]=\"iconNameFor(button.icon)\"\n [size]=\"16\"\n ></ads-icon>\n </button>\n }\n }\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Footer controls: page size selector, page navigation, and total record counter -->\n <div class=\"flex w-full flex-wrap items-center justify-end gap-4 py-2\">\n <div class=\"mr-auto flex items-center gap-2 text-sm text-green-1\">\n <span class=\"whitespace-nowrap font-medium\">Rows per page</span>\n <select\n class=\"h-8 cursor-pointer rounded border border-aqua-1 bg-white-base px-2 text-sm text-green-1 outline-none transition hover:border-green-1 focus:border-green-1 focus:ring-2 focus:ring-green-1/20\"\n [value]=\"pageSize\"\n (change)=\"onPageSizeChange($event)\"\n [attr.data-testid]=\"contentTestId + '-page-size-select'\"\n >\n <option value=\"10\">10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n </select>\n </div>\n\n <div class=\"flex w-fit items-center justify-center gap-1\">\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === 1\"\n (click)=\"previousPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-previous'\"\n >\n <span class=\"text-lg leading-none\">\u2039</span>\n Previous\n </button>\n\n <div class=\"flex items-center justify-center gap-1\">\n @for (page of getPageNumbers(); track $index) {\n @if (page === null) {\n <span\n class=\"inline-flex h-8 min-w-8 select-none items-center justify-center px-2 font-medium text-neutral-disabled-text\"\n >...</span\n >\n } @else {\n <button\n type=\"button\"\n class=\"inline-flex h-8 min-w-8 items-center justify-center rounded px-2 font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 outline-0 border-none\"\n [ngClass]=\"{\n 'bg-green-1 text-white-base hover:text-white-base':\n currentPage === page,\n 'bg-transparent': currentPage !== page,\n }\"\n [disabled]=\"false\"\n (click)=\"goToPage(page)\"\n [attr.data-testid]=\"contentTestId + '-pagination-page-' + page\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === totalPages\"\n (click)=\"nextPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-next'\"\n >\n Next\n <span class=\"text-lg leading-none\">\u203A</span>\n </button>\n </div>\n\n @if (totalRegisters) {\n <div\n class=\"w-fit min-w-20 text-sm font-medium text-neutral-disabled-text\"\n [attr.data-testid]=\"contentTestId + '-pagination-info'\"\n >\n Total Records: {{ totalRegisters }}\n </div>\n }\n </div>\n </div>\n} @else {\n <!-- Empty state layout when there are no rows to display -->\n <div class=\"w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <thead class=\"bg-green-1 text-white-base\">\n <tr class=\"h-10 min-h-10 max-h-11.25\">\n @for (column of getHeaderCells(); track column.id) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-left font-medium first:rounded-l-2xl\"\n >\n {{ column.column.columnDef.header }}\n </th>\n }\n @if (showButtons) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium rounded-r-2xl\"\n >\n Options\n </th>\n }\n </tr>\n </thead>\n <tbody>\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"py-2\">\n <div\n class=\"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-aqua-2 bg-aqua-5/40 px-6 py-5 text-center\"\n >\n <span class=\"text-base font-semibold text-green-1\"\n >No available data</span\n >\n <span class=\"text-sm text-neutral-disabled-text\"\n >No data to display right now.</span\n >\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n}\n", styles: [":host ::ng-deep .cdk-drag-preview{background-color:#014744!important;color:#fff!important;border-radius:1rem!important;border-right:1px solid rgba(255,255,255,.2)!important;box-shadow:0 12px 28px #01474447!important;overflow:hidden!important}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging th.cdk-drag:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(.2,0,0,1)}:host ::ng-deep th.cdk-drag-animating{transition:transform .22s cubic-bezier(.2,0,0,1)}::ng-deep .cdk-drag-preview{background:#014743a9!important;color:#fff!important;box-shadow:none!important;border:none!important;border-radius:10rem!important}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: FlexRenderDirective, selector: "[flexRender]", inputs: ["flexRender", "flexRenderProps", "flexRenderInjector"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton"], outputs: ["clicked"] }, { kind: "component", type: StateComponent, selector: "ads-state", inputs: ["boldText", "fullWidth", "shape", "text", "borderColor", "bgColor", "textColor", "containerShapes"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i1$2.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }] });
|
|
3603
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: TableComponent, isStandalone: true, selector: "ads-table", inputs: { table: "table", isLoading: "isLoading", selectedSortingHeader: "selectedSortingHeader", sortDirection: "sortDirection", showButtons: "showButtons", allContentLeft: "allContentLeft", totalRegisters: "totalRegisters", areColumnsDraggable: "areColumnsDraggable", currentPage: "currentPage", totalPages: "totalPages", pageSize: "pageSize", enableMultiSort: "enableMultiSort", multiSortCriteria: "multiSortCriteria", actionButtons: "actionButtons", statusStateStyles: "statusStateStyles", activeStateStyles: "activeStateStyles" }, outputs: { sortEvent: "sortEvent", columnOrderChange: "columnOrderChange", pageChange: "pageChange", columnSizingChange: "columnSizingChange", pageSizeChange: "pageSizeChange", multiSortEvent: "multiSortEvent" }, ngImport: i0, template: "@if (getRows().length > 0 || isLoading) {\n <!-- Main table layout: data grid + footer pagination area -->\n <div class=\"flex min-h-[60vh] w-full flex-col justify-between gap-4\">\n <!-- @if (isLoading) {\n <div\n class=\"flex min-h-40 items-center justify-center rounded-2xl bg-white-base/80 px-6 py-8 shadow-sm\"\n >\n <div class=\"flex items-center gap-3 text-green-1\">\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-t-green-1\"\n ></span>\n <span class=\"text-sm font-medium\">Loading table data</span>\n </div>\n </div>\n } -->\n\n <div class=\"w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <!-- Interactive header row: sorting, drag-and-drop, and column resizing -->\n <thead class=\"bg-green-1 text-white-base\">\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"h-10 min-h-10 max-h-11.25\"\n (cdkDropListDropped)=\"drop($event)\"\n [ngStyle]=\"allContentLeft ? { 'text-align': 'left' } : null\"\n >\n @for (\n column of getHeaderCells();\n track column.id + \"-\" + headerRenderVersion\n ) {\n @if (isColumnSortable(column)) {\n @if (areColumnsDraggable) {\n <!-- Sortable + draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0 overflow-hidden cursor-grab active:cursor-grabbing\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n cdkDragHandle\n class=\"group flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 border-none outline-0 bg-transparent hover:bg-white/10\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n <!-- When right-aligned, the sort indicator is shown before the header text -->\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n <!-- For left/center aligned headers, the sort indicator is shown after the text -->\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Sortable header cell without drag-and-drop -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n class=\"flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 hover:bg-white/10 bg-green-base\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n } @else {\n @if (areColumnsDraggable) {\n <!-- Non-sortable but draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n cdkDragHandle\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Plain header cell (no sort, no drag) -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n }\n }\n\n @if (showButtons) {\n <!-- Optional actions column header -->\n <th\n [attr.data-testid]=\"contentTestId + '-header-actions'\"\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium whitespace-nowrap rounded-r-2xl\"\n [ngStyle]=\"{ width: '1%' }\"\n >\n Actions\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n <!-- Data rows -->\n @for (row of getRows(); track trackByFn($index, row)) {\n <tr\n [attr.data-testid]=\"getRowTestId(row, $index)\"\n class=\"h-10 min-h-10 max-h-11.25\"\n >\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td\n class=\"border-b border-[#aedad8] px-3 py-0 text-sm whitespace-pre-line wrap-break-word text-black-base\"\n [ngClass]=\"cellAlignmentClass(cell)\"\n [ngStyle]=\"allContentLeft ? { padding: '0' } : null\"\n >\n @if (isStateCell(cell)) {\n <!-- State-like values (status/active) are rendered with ads-state for a consistent visual token -->\n <ads-state\n [shape]=\"getStateStyle(cell).shape ?? statusShape\"\n [containerShapes]=\"getStateStyle(cell).shape ?? statusShape\"\n [borderColor]=\"getStateStyle(cell).borderColor\"\n [bgColor]=\"getStateStyle(cell).bgColor\"\n [textColor]=\"getStateStyle(cell).textColor\"\n [text]=\"getStateText(cell)\"\n [fullWidth]=\"getStateStyle(cell).fullWidth ?? false\"\n [boldText]=\"getStateStyle(cell).boldText ?? true\"\n ></ads-state>\n } @else {\n <!-- Generic cell rendering for non-state columns via TanStack flexRender output -->\n <ng-container\n *flexRender=\"\n cell.column.columnDef.cell;\n props: cell.getContext();\n let renderedCell\n \"\n >\n <div\n [innerHTML]=\"renderedCell\"\n [ngStyle]=\"\n allContentLeft ? { 'text-align': 'left' } : null\n \"\n ></div>\n </ng-container>\n }\n </td>\n }\n\n @if (showButtons && actionButtons.length > 0) {\n <!-- Optional row action buttons -->\n <td\n class=\"border-b border-[#aedad8] px-1 py-1 align-middle text-center whitespace-nowrap\"\n >\n <div\n class=\"flex w-full items-center justify-center gap-1 p-0\"\n >\n @for (button of actionButtons; track $index) {\n @if (\n !button.condition || button.condition(row.original)\n ) {\n <button\n nz-tooltip\n [nzTooltipTitle]=\"\n getTooltipText(button, row.original)\n \"\n ads-button\n type=\"button\"\n [onlyIconButton]=\"true\"\n color=\"white\"\n [attr.data-testid]=\"\n getActionButtonTestId(row, button, $index)\n \"\n [title]=\"getTooltipText(button, row.original)\"\n [disabled]=\"\n isActionButtonDisabled(button, row.original)\n \"\n (click)=\"button.callback(row.original)\"\n >\n <ads-icon\n [ngClass]=\"\n isActionButtonDisabled(button, row.original)\n ? 'text-neutral-disabled-text'\n : 'text-green-1'\n \"\n [iconName]=\"iconNameFor(button.icon)\"\n [size]=\"16\"\n ></ads-icon>\n </button>\n }\n }\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Footer controls: page size selector, page navigation, and total record counter -->\n <div class=\"flex w-full flex-wrap items-center justify-end gap-4 py-2\">\n <div class=\"mr-auto flex items-center gap-2 text-sm text-green-1\">\n <span class=\"whitespace-nowrap font-medium\">Rows per page</span>\n <select\n class=\"h-8 cursor-pointer rounded border border-aqua-1 bg-white-base px-2 text-sm text-green-1 outline-none transition hover:border-green-1 focus:border-green-1 focus:ring-2 focus:ring-green-1/20\"\n [value]=\"pageSize\"\n (change)=\"onPageSizeChange($event)\"\n [attr.data-testid]=\"contentTestId + '-page-size-select'\"\n >\n <option value=\"10\">10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n </select>\n </div>\n\n <div class=\"flex w-fit items-center justify-center gap-1\">\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === 1\"\n (click)=\"previousPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-previous'\"\n >\n <span class=\"text-lg leading-none\">\u2039</span>\n Previous\n </button>\n\n <div class=\"flex items-center justify-center gap-1\">\n @for (page of getPageNumbers(); track $index) {\n @if (page === null) {\n <span\n class=\"inline-flex h-8 min-w-8 select-none items-center justify-center px-2 font-medium text-neutral-disabled-text\"\n >...</span\n >\n } @else {\n <button\n type=\"button\"\n class=\"inline-flex h-8 min-w-8 items-center justify-center rounded px-2 font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 outline-0 border-none\"\n [ngClass]=\"{\n 'bg-green-1 text-white-base hover:text-white-base':\n currentPage === page,\n 'bg-transparent': currentPage !== page,\n }\"\n [disabled]=\"false\"\n (click)=\"goToPage(page)\"\n [attr.data-testid]=\"contentTestId + '-pagination-page-' + page\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === totalPages\"\n (click)=\"nextPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-next'\"\n >\n Next\n <span class=\"text-lg leading-none\">\u203A</span>\n </button>\n </div>\n\n @if (totalRegisters) {\n <div\n class=\"w-fit min-w-20 text-sm font-medium text-neutral-disabled-text\"\n [attr.data-testid]=\"contentTestId + '-pagination-info'\"\n >\n Total Records: {{ totalRegisters }}\n </div>\n }\n </div>\n </div>\n} @else {\n <!-- Empty state layout when there are no rows to display -->\n <div class=\"w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <thead class=\"bg-green-1 text-white-base\">\n <tr class=\"h-10 min-h-10 max-h-11.25\">\n @for (column of getHeaderCells(); track column.id) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-left font-medium first:rounded-l-2xl\"\n >\n {{ column.column.columnDef.header }}\n </th>\n }\n @if (showButtons) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium rounded-r-2xl\"\n >\n Options\n </th>\n }\n </tr>\n </thead>\n <tbody>\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"py-2\">\n <div\n class=\"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-aqua-2 bg-aqua-5/40 px-6 py-5 text-center\"\n >\n <span class=\"text-base font-semibold text-green-1\"\n >No available data</span\n >\n <span class=\"text-sm text-neutral-disabled-text\"\n >No data to display right now.</span\n >\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n}\n", styles: [":host ::ng-deep .cdk-drag-preview{background-color:#014744!important;color:#fff!important;border-radius:1rem!important;border-right:1px solid rgba(255,255,255,.2)!important;box-shadow:0 12px 28px #01474447!important;overflow:hidden!important}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging th.cdk-drag:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(.2,0,0,1)}:host ::ng-deep th.cdk-drag-animating{transition:transform .22s cubic-bezier(.2,0,0,1)}::ng-deep .cdk-drag-preview{background:#014743a9!important;color:#fff!important;box-shadow:none!important;border:none!important;border-radius:10rem!important}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$4.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: FlexRenderDirective, selector: "[flexRender]", inputs: ["flexRender", "flexRenderProps", "flexRenderInjector"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton"], outputs: ["clicked"] }, { kind: "component", type: StateComponent, selector: "ads-state", inputs: ["boldText", "fullWidth", "shape", "text", "borderColor", "bgColor", "textColor", "containerShapes"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i1$3.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }] });
|
|
3578
3604
|
}
|
|
3579
3605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TableComponent, decorators: [{
|
|
3580
3606
|
type: Component,
|