@aaamb/ngx-design-system 1.5.1 → 1.5.3
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,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, computed, Component, signal, effect, forwardRef, ViewChild, HostListener, ElementRef, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, Input, Output, Attribute } from '@angular/core';
|
|
2
|
+
import { input, output, computed, Component, signal, effect, forwardRef, ViewChild, inject, DestroyRef, HostListener, ElementRef, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, Input, Output, Attribute } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/forms';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';
|
|
5
5
|
import * as i2 from '@angular/common';
|
|
6
|
-
import { CommonModule, NgClass, NgStyle } from '@angular/common';
|
|
6
|
+
import { CommonModule, NgClass, DOCUMENT, NgStyle } from '@angular/common';
|
|
7
7
|
import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';
|
|
8
8
|
import * as i1 from 'ng-zorro-antd/date-picker';
|
|
9
9
|
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
@@ -896,6 +896,7 @@ class InputDatepickerComponent {
|
|
|
896
896
|
const formatted = this.formatDate(date);
|
|
897
897
|
this.selectedDate.set(formatted);
|
|
898
898
|
this.onChange(formatted);
|
|
899
|
+
this.isDatePickerOpen = false;
|
|
899
900
|
}
|
|
900
901
|
onInputTextChange(text) {
|
|
901
902
|
const rawText = text ?? '';
|
|
@@ -1024,7 +1025,8 @@ class InputDatepickerComponent {
|
|
|
1024
1025
|
this.isDatePickerOpen = !this.isDatePickerOpen;
|
|
1025
1026
|
}
|
|
1026
1027
|
onOpenChange(isOpen) {
|
|
1027
|
-
|
|
1028
|
+
if (isOpen)
|
|
1029
|
+
this.isDatePickerOpen = true;
|
|
1028
1030
|
}
|
|
1029
1031
|
onInputBlur() {
|
|
1030
1032
|
this.onTouched();
|
|
@@ -1068,15 +1070,13 @@ class InputDatepickerComponent {
|
|
|
1068
1070
|
this.cvaDisabled = isDisabled;
|
|
1069
1071
|
}
|
|
1070
1072
|
onDocumentClick(event) {
|
|
1071
|
-
if (!this.isDatePickerOpen)
|
|
1073
|
+
if (!this.isDatePickerOpen)
|
|
1072
1074
|
return;
|
|
1073
|
-
}
|
|
1074
1075
|
const target = event.target;
|
|
1075
|
-
|
|
1076
|
-
if (target instanceof Element && containerElement?.contains(target)) {
|
|
1076
|
+
if (this.elementRef.nativeElement.contains(target))
|
|
1077
1077
|
return;
|
|
1078
|
-
|
|
1079
|
-
|
|
1078
|
+
if ([target, ...event.composedPath()].some((node) => node instanceof Element &&
|
|
1079
|
+
node.matches('.cdk-overlay-pane, [class*="ant-picker"]'))) {
|
|
1080
1080
|
return;
|
|
1081
1081
|
}
|
|
1082
1082
|
this.isDatePickerOpen = false;
|
|
@@ -1095,6 +1095,16 @@ class InputDatepickerComponent {
|
|
|
1095
1095
|
}
|
|
1096
1096
|
constructor(elementRef) {
|
|
1097
1097
|
this.elementRef = elementRef;
|
|
1098
|
+
const documentRef = inject(DOCUMENT);
|
|
1099
|
+
const closeOnEscape = (event) => {
|
|
1100
|
+
if (event.key === 'Escape') {
|
|
1101
|
+
event.preventDefault();
|
|
1102
|
+
event.stopImmediatePropagation();
|
|
1103
|
+
this.isDatePickerOpen = false;
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
documentRef.addEventListener('keydown', closeOnEscape, true);
|
|
1107
|
+
inject(DestroyRef).onDestroy(() => documentRef.removeEventListener('keydown', closeOnEscape, true));
|
|
1098
1108
|
}
|
|
1099
1109
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InputDatepickerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1100
1110
|
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: [
|
|
@@ -2040,12 +2050,14 @@ class SingleSelectorComponent {
|
|
|
2040
2050
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2041
2051
|
allowClear = input(true, ...(ngDevMode ? [{ debugName: "allowClear" }] : /* istanbul ignore next */ []));
|
|
2042
2052
|
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2053
|
+
serverSearch = input(false, ...(ngDevMode ? [{ debugName: "serverSearch" }] : /* istanbul ignore next */ []));
|
|
2043
2054
|
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
2044
2055
|
asyncOptions = input(null, ...(ngDevMode ? [{ debugName: "asyncOptions" }] : /* istanbul ignore next */ []));
|
|
2045
2056
|
value = input(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2046
2057
|
errorMessage = input('Please select at least one option.', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
2047
2058
|
labelIconName = input(null, ...(ngDevMode ? [{ debugName: "labelIconName" }] : /* istanbul ignore next */ []));
|
|
2048
2059
|
onLabelButtonClick = output();
|
|
2060
|
+
searchChange = output();
|
|
2049
2061
|
valueChange = output();
|
|
2050
2062
|
cvaMode = false;
|
|
2051
2063
|
cvaDisabled = false;
|
|
@@ -2088,6 +2100,9 @@ class SingleSelectorComponent {
|
|
|
2088
2100
|
this.onChange(value);
|
|
2089
2101
|
this.valueChange.emit(value);
|
|
2090
2102
|
}
|
|
2103
|
+
onSearch(value) {
|
|
2104
|
+
this.searchChange.emit(value);
|
|
2105
|
+
}
|
|
2091
2106
|
onBlur() {
|
|
2092
2107
|
this.onTouched();
|
|
2093
2108
|
}
|
|
@@ -2176,13 +2191,13 @@ class SingleSelectorComponent {
|
|
|
2176
2191
|
return 'children' in item;
|
|
2177
2192
|
}
|
|
2178
2193
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SingleSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2179
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: SingleSelectorComponent, isStandalone: true, selector: "ads-single-selector", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, asyncOptions: { classPropertyName: "asyncOptions", publicName: "asyncOptions", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, labelIconName: { classPropertyName: "labelIconName", publicName: "labelIconName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLabelButtonClick: "onLabelButtonClick", valueChange: "valueChange" }, providers: [
|
|
2194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: SingleSelectorComponent, isStandalone: true, selector: "ads-single-selector", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, serverSearch: { classPropertyName: "serverSearch", publicName: "serverSearch", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, asyncOptions: { classPropertyName: "asyncOptions", publicName: "asyncOptions", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, labelIconName: { classPropertyName: "labelIconName", publicName: "labelIconName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLabelButtonClick: "onLabelButtonClick", searchChange: "searchChange", valueChange: "valueChange" }, providers: [
|
|
2180
2195
|
{
|
|
2181
2196
|
provide: NG_VALUE_ACCESSOR,
|
|
2182
2197
|
useExisting: forwardRef(() => SingleSelectorComponent),
|
|
2183
2198
|
multi: true,
|
|
2184
2199
|
},
|
|
2185
|
-
], 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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i2$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i2$1.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$1.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"] }] });
|
|
2200
|
+
], 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 [nzServerSearch]=\"serverSearch()\"\n [nzFilterOption]=\"filterOption\"\n (ngModelChange)=\"onSelectionChange($event)\"\n (nzOnSearch)=\"onSearch($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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i2$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i2$1.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$1.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"] }] });
|
|
2186
2201
|
}
|
|
2187
2202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SingleSelectorComponent, decorators: [{
|
|
2188
2203
|
type: Component,
|
|
@@ -2198,8 +2213,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
2198
2213
|
useExisting: forwardRef(() => SingleSelectorComponent),
|
|
2199
2214
|
multi: true,
|
|
2200
2215
|
},
|
|
2201
|
-
], 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" }]
|
|
2202
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], allowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], asyncOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "asyncOptions", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], labelIconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelIconName", required: false }] }], onLabelButtonClick: [{ type: i0.Output, args: ["onLabelButtonClick"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
2216
|
+
], 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 [nzServerSearch]=\"serverSearch()\"\n [nzFilterOption]=\"filterOption\"\n (ngModelChange)=\"onSelectionChange($event)\"\n (nzOnSearch)=\"onSearch($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" }]
|
|
2217
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], allowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], serverSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "serverSearch", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], asyncOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "asyncOptions", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], labelIconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelIconName", required: false }] }], onLabelButtonClick: [{ type: i0.Output, args: ["onLabelButtonClick"] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
2203
2218
|
|
|
2204
2219
|
class FilterButtonComponent {
|
|
2205
2220
|
el;
|
|
@@ -2586,7 +2601,7 @@ class FilterButtonComponent {
|
|
|
2586
2601
|
}
|
|
2587
2602
|
}
|
|
2588
2603
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterButtonComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2589
|
-
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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\n ></ads-single-selector>\n\n <ads-single-selector\n formControlName=\"direction\"\n placeholder=\"Direction\"\n [options]=\"sortValueOptions()\"\n [errorMessage]=\"''\"\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: i2.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", "iconColor"], 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"] }] });
|
|
2604
|
+
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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\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 [errorMessage]=\"''\"\n ></ads-single-selector>\n\n <ads-single-selector\n formControlName=\"direction\"\n placeholder=\"Direction\"\n [options]=\"sortValueOptions()\"\n [errorMessage]=\"''\"\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: i2.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", "iconColor"], 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", "serverSearch", "options", "asyncOptions", "value", "errorMessage", "labelIconName"], outputs: ["onLabelButtonClick", "searchChange", "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"] }] });
|
|
2590
2605
|
}
|
|
2591
2606
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterButtonComponent, decorators: [{
|
|
2592
2607
|
type: Component,
|
|
@@ -3685,7 +3700,7 @@ class FeedbackModalComponent {
|
|
|
3685
3700
|
return '';
|
|
3686
3701
|
}
|
|
3687
3702
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FeedbackModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3688
|
-
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: i2.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: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton", "iconColor"], 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"] }] });
|
|
3703
|
+
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: i2.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: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton", "iconColor"], 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", "serverSearch", "options", "asyncOptions", "value", "errorMessage", "labelIconName"], outputs: ["onLabelButtonClick", "searchChange", "valueChange"] }] });
|
|
3689
3704
|
}
|
|
3690
3705
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FeedbackModalComponent, decorators: [{
|
|
3691
3706
|
type: Component,
|