@aaamb/ngx-design-system 1.3.3 → 1.3.4
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.
|
@@ -1978,8 +1978,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1978
1978
|
}] } });
|
|
1979
1979
|
|
|
1980
1980
|
class SingleSelectorComponent {
|
|
1981
|
-
booleanFalseToken = '__ads_boolean_false__';
|
|
1982
|
-
booleanTrueToken = '__ads_boolean_true__';
|
|
1983
1981
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1984
1982
|
placeholder = input('Select an option', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1985
1983
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -2117,15 +2115,6 @@ class SingleSelectorComponent {
|
|
|
2117
2115
|
onLabelClicked() {
|
|
2118
2116
|
this.onLabelButtonClick.emit();
|
|
2119
2117
|
}
|
|
2120
|
-
encodeValue(value) {
|
|
2121
|
-
if (value === true) {
|
|
2122
|
-
return this.booleanTrueToken;
|
|
2123
|
-
}
|
|
2124
|
-
if (value === false) {
|
|
2125
|
-
return this.booleanFalseToken;
|
|
2126
|
-
}
|
|
2127
|
-
return value;
|
|
2128
|
-
}
|
|
2129
2118
|
isOptionGroup(item) {
|
|
2130
2119
|
return 'children' in item;
|
|
2131
2120
|
}
|
|
@@ -2136,7 +2125,7 @@ class SingleSelectorComponent {
|
|
|
2136
2125
|
useExisting: forwardRef(() => SingleSelectorComponent),
|
|
2137
2126
|
multi: true,
|
|
2138
2127
|
},
|
|
2139
|
-
], 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]=\"
|
|
2128
|
+
], 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"] }] });
|
|
2140
2129
|
}
|
|
2141
2130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SingleSelectorComponent, decorators: [{
|
|
2142
2131
|
type: Component,
|
|
@@ -2152,7 +2141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
2152
2141
|
useExisting: forwardRef(() => SingleSelectorComponent),
|
|
2153
2142
|
multi: true,
|
|
2154
2143
|
},
|
|
2155
|
-
], 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]=\"
|
|
2144
|
+
], 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" }]
|
|
2156
2145
|
}], 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"] }] } });
|
|
2157
2146
|
|
|
2158
2147
|
class FilterButtonComponent {
|
|
@@ -2540,7 +2529,7 @@ class FilterButtonComponent {
|
|
|
2540
2529
|
}
|
|
2541
2530
|
}
|
|
2542
2531
|
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 });
|
|
2543
|
-
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 ></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: 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"], 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"] }] });
|
|
2532
|
+
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"], 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"] }] });
|
|
2544
2533
|
}
|
|
2545
2534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterButtonComponent, decorators: [{
|
|
2546
2535
|
type: Component,
|
|
@@ -2552,7 +2541,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
2552
2541
|
SingleSelectorComponent,
|
|
2553
2542
|
InputComponent,
|
|
2554
2543
|
InputDatepickerComponent,
|
|
2555
|
-
], 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 ></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" }]
|
|
2544
|
+
], 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" }]
|
|
2556
2545
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.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: [{
|
|
2557
2546
|
type: HostListener,
|
|
2558
2547
|
args: ['document:click', ['$event']]
|