UNPKG

@alauda-fe/common

Version:

Alauda frontend team common codes.

1,016 lines 147 kB
import { __decorate, __metadata } from "tslib"; import { CheckboxComponent, TooltipDirective, InputComponent, ButtonComponent, } from '@alauda/ui'; import { AsyncPipe, NgClass, NgFor, NgIf, NgTemplateOutlet, } from '@angular/common'; import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Injector, Input, Output, ViewChild, } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { cloneDeep, debounce } from 'lodash-es'; import { BaseResourceFormComponent } from 'ng-resource-form-util'; import { BehaviorSubject, combineLatest, map, Observable, takeUntil, } from 'rxjs'; import { ObservableInput, publishRef, PurePipe } from '../../core/public-api'; import { TRANSLATE_MODULE } from '../../translate/public-api'; import { DEFAULT_OPERATOR } from '../utils'; import * as i0 from "@angular/core"; import * as i1 from "../../translate/translate.pipe"; import * as i2 from "@angular/forms"; const _c0 = ["inputRef"]; const _c1 = ["toolTipRef"]; const _c2 = a0 => ({ "mock-input": a0 }); const _c3 = (a0, a1) => ({ normal: a0, groups: a1 }); const _c4 = a0 => ({ conditions: a0 }); const _c5 = a0 => [a0]; const _c6 = (a0, a1) => ({ isSelect: a0, label: a1 }); const _c7 = (a0, a1) => ({ values: a0, activeCondition: a1 }); const _c8 = (a0, a1) => ({ "tw-text-p-2": a0, "tw-bg-p-6": a1 }); const _c9 = (a0, a1, a2) => ({ isSelect: a0, label: a1, isMulti: a2 }); const _c10 = a0 => ({ "is-multi-value-select": a0 }); function MultiSearchActionInputComponent_ng_container_1_span_4_Template(rf, ctx) { if (rf & 1) { const _r4 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "span", 13); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_container_1_span_4_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.activeOperatorClick(); return i0.ɵɵresetView($event.stopPropagation()); }); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { const activeCondition_r5 = i0.ɵɵnextContext().ngIf; i0.ɵɵadvance(); i0.ɵɵtextInterpolate1(" ", activeCondition_r5.operator, " "); } } function MultiSearchActionInputComponent_ng_container_1_span_5_Template(rf, ctx) { if (rf & 1) { const _r6 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "span", 10); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_container_1_span_5_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.activeValueClick(); return i0.ɵɵresetView($event.stopPropagation()); }); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { const activeCondition_r5 = i0.ɵɵnextContext().ngIf; const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵtextInterpolate1(" ", ctx_r2.getValueContent(activeCondition_r5), " "); } } function MultiSearchActionInputComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) { const _r2 = i0.ɵɵgetCurrentView(); i0.ɵɵelementContainerStart(0); i0.ɵɵelementStart(1, "span", 10); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_container_1_Template_span_click_1_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); ctx_r2.activeConditionClick(); return i0.ɵɵresetView($event.stopPropagation()); }); i0.ɵɵtext(2); i0.ɵɵpipe(3, "pure"); i0.ɵɵelementEnd(); i0.ɵɵtemplate(4, MultiSearchActionInputComponent_ng_container_1_span_4_Template, 2, 1, "span", 11)(5, MultiSearchActionInputComponent_ng_container_1_span_5_Template, 2, 1, "span", 12); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const activeCondition_r5 = ctx.ngIf; const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 3, activeCondition_r5, ctx_r2.getConditionLabel), " "); i0.ɵɵadvance(2); i0.ɵɵproperty("ngIf", activeCondition_r5.operator); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.isEditing); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_1_ul_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "ul", 16); i0.ɵɵelementContainer(1, 17); i0.ɵɵpipe(2, "async"); i0.ɵɵpipe(3, "async"); i0.ɵɵelementEnd(); } if (rf & 2) { i0.ɵɵnextContext(); const categoriesTemp_r8 = i0.ɵɵreference(6); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", categoriesTemp_r8)("ngTemplateOutletContext", i0.ɵɵpureFunction2(6, _c3, i0.ɵɵpipeBind1(2, 2, ctx_r2.normalConditions$), i0.ɵɵpipeBind1(3, 4, ctx_r2.groupConditions$))); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_1_ng_template_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "ul", 16)(1, "div", 18); i0.ɵɵtext(2); i0.ɵɵpipe(3, "translate"); i0.ɵɵelementEnd(); i0.ɵɵelementContainer(4, 17); i0.ɵɵpipe(5, "async"); i0.ɵɵpipe(6, "async"); i0.ɵɵelementEnd(); } if (rf & 2) { i0.ɵɵnextContext(); const categoriesTemp_r8 = i0.ɵɵreference(6); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 3, "no_match_categories_tip"), " "); i0.ɵɵadvance(2); i0.ɵɵproperty("ngTemplateOutlet", categoriesTemp_r8)("ngTemplateOutletContext", i0.ɵɵpureFunction2(9, _c3, i0.ɵɵpipeBind1(5, 5, ctx_r2.normalConditionsResource$), i0.ɵɵpipeBind1(6, 7, ctx_r2.groupConditionsResource$))); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_1_ng_template_5_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵelementStart(1, "div", 20); i0.ɵɵtext(2); i0.ɵɵelementEnd(); i0.ɵɵelementContainer(3, 17); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const group_r9 = i0.ɵɵnextContext().$implicit; i0.ɵɵnextContext(4); const liConditionTemp_r10 = i0.ɵɵreference(8); i0.ɵɵadvance(); i0.ɵɵproperty("title", group_r9.group); i0.ɵɵadvance(); i0.ɵɵtextInterpolate1(" ", group_r9.group, " "); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", liConditionTemp_r10)("ngTemplateOutletContext", i0.ɵɵpureFunction1(4, _c4, group_r9.member)); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_1_ng_template_5_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_5_ng_container_1_ng_template_5_ng_container_1_ng_container_1_Template, 4, 6, "ng-container", 8); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const group_r9 = ctx.$implicit; i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", group_r9.member == null ? null : group_r9.member.length); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_1_ng_template_5_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0, 17); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_5_ng_container_1_ng_template_5_ng_container_1_Template, 2, 1, "ng-container", 19); } if (rf & 2) { const normal_r11 = ctx.normal; const groups_r12 = ctx.groups; i0.ɵɵnextContext(3); const liConditionTemp_r10 = i0.ɵɵreference(8); i0.ɵɵproperty("ngTemplateOutlet", liConditionTemp_r10)("ngTemplateOutletContext", i0.ɵɵpureFunction1(3, _c4, normal_r11)); i0.ɵɵadvance(); i0.ɵɵproperty("ngForOf", groups_r12); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_5_ng_container_1_ul_1_Template, 4, 9, "ul", 15); i0.ɵɵpipe(2, "async"); i0.ɵɵtemplate(3, MultiSearchActionInputComponent_ng_template_5_ng_container_1_ng_template_3_Template, 7, 12, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor)(5, MultiSearchActionInputComponent_ng_template_5_ng_container_1_ng_template_5_Template, 2, 5, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const nonFilteredCategories_r13 = i0.ɵɵreference(4); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(2, 2, ctx_r2.hasFilteredConditions$))("ngIfElse", nonFilteredCategories_r13); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_1_li_2_Template(rf, ctx) { if (rf & 1) { const _r14 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "li", 23); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_1_li_2_Template_li_click_0_listener() { const operator_r15 = i0.ɵɵrestoreView(_r14).$implicit; const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.selectActiveOperator(operator_r15)); }); i0.ɵɵelementContainer(1, 17); i0.ɵɵelementEnd(); } if (rf & 2) { const operator_r15 = ctx.$implicit; const ctx_r2 = i0.ɵɵnextContext(4); const basicLiContentTemp_r16 = i0.ɵɵreference(12); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", basicLiContentTemp_r16)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c6, operator_r15 === ctx_r2.conditionsModel, operator_r15)); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵelementStart(1, "ul", 21); i0.ɵɵtemplate(2, MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_1_li_2_Template, 2, 5, "li", 22); i0.ɵɵelementEnd(); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const activeCondition_r17 = i0.ɵɵnextContext().ngIf; const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(2); i0.ɵɵproperty("ngForOf", activeCondition_r17.operators || i0.ɵɵpureFunction1(1, _c5, ctx_r2.DEFAULT_OPERATOR)); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_li_1_Template(rf, ctx) { if (rf & 1) { const _r18 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "li", 26)(1, "div", 27); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_li_1_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r18); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.selectAllClick()); }); i0.ɵɵelementStart(2, "div", 28); i0.ɵɵelement(3, "aui-checkbox", 29); i0.ɵɵelementStart(4, "div", 30); i0.ɵɵtext(5); i0.ɵɵpipe(6, "translate"); i0.ɵɵelementEnd()()()(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(5); i0.ɵɵadvance(); i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(6, _c8, ctx_r2.isSelectAll, ctx_r2.isSelectAll)); i0.ɵɵadvance(2); i0.ɵɵproperty("value", ctx_r2.isSelectAll)("indeterminate", ctx_r2.isIndeterminate); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 4, "all"), " "); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵelementStart(1, "div", 20); i0.ɵɵtext(2); i0.ɵɵelementEnd(); i0.ɵɵelementContainer(3, 17); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const group_r19 = i0.ɵɵnextContext().$implicit; const activeCondition_r17 = i0.ɵɵnextContext(3).ngIf; i0.ɵɵnextContext(2); const liValueTemp_r20 = i0.ɵɵreference(10); i0.ɵɵadvance(); i0.ɵɵproperty("title", group_r19.group); i0.ɵɵadvance(); i0.ɵɵtextInterpolate1(" ", group_r19.group, " "); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", liValueTemp_r20)("ngTemplateOutletContext", i0.ɵɵpureFunction2(4, _c7, group_r19.member, activeCondition_r17)); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_ng_container_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_ng_container_4_ng_container_1_Template, 4, 7, "ng-container", 8); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const group_r19 = ctx.$implicit; i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", group_r19.member == null ? null : group_r19.member.length); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "ul", 16); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_li_1_Template, 7, 9, "li", 25); i0.ɵɵelementContainer(2, 17); i0.ɵɵpipe(3, "pure"); i0.ɵɵtemplate(4, MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_ng_container_4_Template, 2, 1, "ng-container", 19); i0.ɵɵpipe(5, "pure"); i0.ɵɵelementEnd(); } if (rf & 2) { const activeCondition_r17 = i0.ɵɵnextContext(2).ngIf; const ctx_r2 = i0.ɵɵnextContext(2); const liValueTemp_r20 = i0.ɵɵreference(10); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", activeCondition_r17.allowSelectAll && activeCondition_r17.isMulti); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", liValueTemp_r20)("ngTemplateOutletContext", i0.ɵɵpureFunction2(14, _c7, i0.ɵɵpipeBind4(3, 4, activeCondition_r17, ctx_r2.getNormalValues, ctx_r2.conditionsModel, activeCondition_r17.isMulti), activeCondition_r17)); i0.ɵɵadvance(2); i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind4(5, 9, activeCondition_r17, ctx_r2.getValuesGroup, ctx_r2.conditionsModel, activeCondition_r17.isMulti)); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_ul_1_Template, 6, 17, "ul", 24); i0.ɵɵpipe(2, "pure"); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const activeCondition_r17 = i0.ɵɵnextContext().ngIf; const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind4(2, 1, activeCondition_r17, ctx_r2.hasFilteredValues, ctx_r2.conditionsModel, activeCondition_r17.isMulti)); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_1_Template, 3, 3, "ng-container", 8)(2, MultiSearchActionInputComponent_ng_template_5_ng_container_3_ng_container_2_Template, 3, 6, "ng-container", 8); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.isOperatorSelecting); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.isValueSelecting); } } function MultiSearchActionInputComponent_ng_template_5_ng_container_4_Template(rf, ctx) { if (rf & 1) { const _r21 = i0.ɵɵgetCurrentView(); i0.ɵɵelementContainerStart(0); i0.ɵɵelementStart(1, "div", 31)(2, "button", 32); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_template_5_ng_container_4_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r21); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.confirmSelection()); }); i0.ɵɵtext(3); i0.ɵɵpipe(4, "translate"); i0.ɵɵelementEnd(); i0.ɵɵelementStart(5, "button", 33); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_template_5_ng_container_4_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r21); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.toolTipHide()); }); i0.ɵɵtext(6); i0.ɵɵpipe(7, "translate"); i0.ɵɵelementEnd()(); i0.ɵɵelementContainerEnd(); } if (rf & 2) { i0.ɵɵadvance(3); i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 2, "confirm"), " "); i0.ɵɵadvance(3); i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 4, "cancel"), " "); } } function MultiSearchActionInputComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) { const _r7 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "div", 14); i0.ɵɵlistener("mousedown", function MultiSearchActionInputComponent_ng_template_5_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r7); return i0.ɵɵresetView($event.preventDefault()); })("click", function MultiSearchActionInputComponent_ng_template_5_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r7); return i0.ɵɵresetView($event.stopPropagation()); }); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_5_ng_container_1_Template, 7, 4, "ng-container", 8); i0.ɵɵpipe(2, "async"); i0.ɵɵtemplate(3, MultiSearchActionInputComponent_ng_template_5_ng_container_3_Template, 3, 2, "ng-container", 8)(4, MultiSearchActionInputComponent_ng_template_5_ng_container_4_Template, 8, 6, "ng-container", 8); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.isConditionSelecting && i0.ɵɵpipeBind1(2, 3, ctx_r2.conditionsShouldShow$)); i0.ɵɵadvance(2); i0.ɵɵproperty("ngIf", ctx_r2.form.value); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.showFootAction && (ctx_r2.form == null ? null : ctx_r2.form.value == null ? null : ctx_r2.form.value.isMulti)); } } function MultiSearchActionInputComponent_ng_template_7_li_0_Template(rf, ctx) { if (rf & 1) { const _r22 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "li", 35); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_template_7_li_0_Template_li_click_0_listener() { const condition_r23 = i0.ɵɵrestoreView(_r22).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.selectActiveCondition(condition_r23)); }); i0.ɵɵelementContainer(1, 17); i0.ɵɵpipe(2, "pure"); i0.ɵɵpipe(3, "pure"); i0.ɵɵpipe(4, "pure"); i0.ɵɵelementEnd(); } if (rf & 2) { const condition_r23 = ctx.$implicit; const ctx_r2 = i0.ɵɵnextContext(2); const basicLiContentTemp_r16 = i0.ɵɵreference(12); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", basicLiContentTemp_r16)("ngTemplateOutletContext", i0.ɵɵpureFunction2(12, _c6, i0.ɵɵpipeBind3(3, 5, i0.ɵɵpipeBind2(2, 2, condition_r23, ctx_r2.getConditionLabel), ctx_r2.isConditionSelected, ctx_r2.conditionsModel), i0.ɵɵpipeBind2(4, 9, condition_r23, ctx_r2.getConditionLabel))); } } function MultiSearchActionInputComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, MultiSearchActionInputComponent_ng_template_7_li_0_Template, 5, 15, "li", 34); } if (rf & 2) { const conditions_r24 = ctx.conditions; i0.ɵɵproperty("ngForOf", conditions_r24); } } function MultiSearchActionInputComponent_ng_template_9_li_0_Template(rf, ctx) { if (rf & 1) { const _r25 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "li", 35); i0.ɵɵlistener("click", function MultiSearchActionInputComponent_ng_template_9_li_0_Template_li_click_0_listener($event) { const value_r26 = i0.ɵɵrestoreView(_r25).$implicit; const activeCondition_r27 = i0.ɵɵnextContext().activeCondition; const ctx_r2 = i0.ɵɵnextContext(); ctx_r2.selectValue(value_r26, activeCondition_r27.isMulti); $event.stopPropagation(); return i0.ɵɵresetView($event.preventDefault()); }); i0.ɵɵelementContainer(1, 17); i0.ɵɵpipe(2, "pure"); i0.ɵɵpipe(3, "pure"); i0.ɵɵpipe(4, "pure"); i0.ɵɵpipe(5, "pure"); i0.ɵɵelementEnd(); } if (rf & 2) { const value_r26 = ctx.$implicit; const activeCondition_r27 = i0.ɵɵnextContext().activeCondition; const ctx_r2 = i0.ɵɵnextContext(); const basicLiContentTemp_r16 = i0.ɵɵreference(12); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", basicLiContentTemp_r16)("ngTemplateOutletContext", i0.ɵɵpureFunction3(16, _c9, i0.ɵɵpipeBind4(4, 8, i0.ɵɵpipeBind2(2, 2, value_r26, ctx_r2.getValueLabel), ctx_r2.isValueSelected, ctx_r2.conditionsModel || i0.ɵɵpipeBind2(3, 5, ctx_r2.form.value, ctx_r2.getValueContent), activeCondition_r27), i0.ɵɵpipeBind2(5, 13, value_r26, ctx_r2.getValueLabel), activeCondition_r27.isMulti)); } } function MultiSearchActionInputComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, MultiSearchActionInputComponent_ng_template_9_li_0_Template, 6, 20, "li", 34); } if (rf & 2) { const values_r28 = ctx.values; i0.ɵɵproperty("ngForOf", values_r28); } } function MultiSearchActionInputComponent_ng_template_11_div_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "div", 28); i0.ɵɵelement(1, "aui-checkbox", 39); i0.ɵɵelementStart(2, "div", 40); i0.ɵɵtext(3); i0.ɵɵelementEnd()(); } if (rf & 2) { const ctx_r28 = i0.ɵɵnextContext(); const isSelect_r30 = ctx_r28.isSelect; const label_r31 = ctx_r28.label; i0.ɵɵadvance(); i0.ɵɵproperty("value", isSelect_r30); i0.ɵɵadvance(); i0.ɵɵproperty("title", label_r31); i0.ɵɵadvance(); i0.ɵɵtextInterpolate1(" ", label_r31, " "); } } function MultiSearchActionInputComponent_ng_template_11_div_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "div", 40); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { const label_r31 = i0.ɵɵnextContext().label; i0.ɵɵproperty("title", label_r31); i0.ɵɵadvance(); i0.ɵɵtextInterpolate1(" ", label_r31, " "); } } function MultiSearchActionInputComponent_ng_template_11_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "div", 36); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_template_11_div_1_Template, 4, 3, "div", 37)(2, MultiSearchActionInputComponent_ng_template_11_div_2_Template, 2, 2, "div", 38); i0.ɵɵelementEnd(); } if (rf & 2) { const isSelect_r30 = ctx.isSelect; const isMulti_r32 = ctx.isMulti; const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵclassMap(ctx_r2.DROPDOWN_ITEM_CLASS); i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c10, isSelect_r30)); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", isMulti_r32); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !isMulti_r32); } } var KeyCode; (function (KeyCode) { KeyCode["DELETE"] = "Backspace"; KeyCode["ENTER"] = "Enter"; KeyCode["TAB"] = "Tab"; KeyCode["ArrowDown"] = "ArrowDown"; KeyCode["ArrowUp"] = "ArrowUp"; })(KeyCode || (KeyCode = {})); const ARROW_EVENTS = new Set([KeyCode.ArrowDown, KeyCode.ArrowUp]); const DROPDOWN_ITEM_CLASS = 'search-dropdown-item'; export class MultiSearchActionInputComponent extends BaseResourceFormComponent { get hiddenState() { return this.hidden; } get conditionsModel() { return this.conditionsModel$$.value; } set conditionsModel(v) { this.conditionsModel$$.next(v); } valuesFilter(conditions, condition, separator, isMulti = false) { const searchVal = this.getMultiSearchVal(separator); const already = conditions.some(condition => this.getValueLabel(condition) === searchVal); return ((isMulti && already) || this.getValueLabel(condition).includes(searchVal)); } get isConditionSelecting() { return !this.form?.value; } get isOperatorSelecting() { return this.form?.value && !this.form.value.operator; } get isValueSelecting() { return this.form?.value && this.form.value.operator; } get isInitialized() { return this.isConditionSelecting && !this.conditionsModel; } get isOperationComplete() { const activeCondition = this.form.value; return (activeCondition?.selectedValues?.length && activeCondition?.operator && activeCondition.condition); } get isSelectAll() { if (!this.isValueSelecting) return false; const conditionsModel = this.conditionsModel; const activeCondition = this.form.value; const valueLabels = conditionsModel ? conditionsModel.split(this.getSeparator(activeCondition)) : []; return activeCondition.values?.every(value => valueLabels?.some(label => this.getValueLabel(value) === label)); } get isIndeterminate() { if (!this.isValueSelecting || this.isSelectAll) return false; const conditionsModel = this.conditionsModel; const activeCondition = this.form.value; const valueLabels = conditionsModel ? conditionsModel.split(this.getSeparator(activeCondition)) : []; return activeCondition.values?.some(value => valueLabels?.some(label => this.getValueLabel(value) === label)); } get inputElement() { return this.inputRef?.elementRef?.nativeElement; } get optionElements() { return document.querySelectorAll(`.${DROPDOWN_ITEM_CLASS}`); } constructor(injector) { super(injector); this.injector = injector; // 是否为编辑态 this.isEditing = false; // 完成事件 this.completed = new EventEmitter(); // 转换为编辑态 this.editing = new EventEmitter(); // 键盘delete事件。 this.delete = new EventEmitter(); // 键盘enter事件 this.search = new EventEmitter(); this.focusIn = new EventEmitter(); this.focusOut = new EventEmitter(); this._conditionsModel = ''; this.conditionsModel$$ = new BehaviorSubject(''); this.hasFilteredConditions$ = combineLatest([ this.conditionConfig$, this.conditionsModel$$, this.existingConditions$, ]).pipe(map(([conditionConfig, model, existingConditions]) => { return (!model || conditionConfig?.filter(config => this.getConditionLabel(config)?.includes(model) && this.conditionFilterByExists(config, existingConditions))?.length > 0); }), publishRef()); this.conditionsShouldShow$ = combineLatest([ this.conditionConfig$, this.conditionsModel$$, this.existingConditions$, ]).pipe(map(([conditionConfig, model, existingConditions]) => { return (model || conditionConfig?.filter(config => this.conditionFilterByExists(config, existingConditions))?.length > 0); }), publishRef()); this.normalConditionsResource$ = combineLatest([ this.conditionConfig$, this.existingConditions$, ]).pipe(map(([conditionConfig, existingConditions]) => conditionConfig?.filter(config => !config.condition.group && this.conditionFilterByExists(config, existingConditions))), publishRef()); this.normalConditions$ = combineLatest([ this.normalConditionsResource$, this.conditionsModel$$, ]).pipe(map(([normalConditions, model]) => { return normalConditions.filter(condition => !model || this.getConditionLabel(condition)?.includes(model)); })); this.groupConditionsResource$ = combineLatest([ this.conditionConfig$, this.existingConditions$, ]).pipe(map(([conditionConfig, existingConditions]) => conditionConfig?.filter(config => config.condition.group && this.conditionFilterByExists(config, existingConditions))), map(conditionConfig => { return this.resolveGroup(conditionConfig, config => config.condition.group); }), publishRef()); this.groupConditions$ = combineLatest([ this.groupConditionsResource$, this.conditionsModel$$, ]).pipe(map(([groupConditions, model]) => { return groupConditions.map(group => ({ group: group.group, member: group.member.filter(condition => !model || this.getConditionLabel(condition).includes(model)), })); })); this.hasFilteredValues = (activeCondition, model, isMulti = false) => { const values = activeCondition?.values; if (!model) return values?.length > 0; return (values?.filter(value => this.valuesFilter(values, value, this.getSeparator(activeCondition), isMulti))?.length > 0); }; this.getNormalValues = (activeCondition, model, isMulti = false) => { const normalConditions = activeCondition.values?.filter(value => !value.group); if (!model) return normalConditions; return normalConditions?.filter(condition => this.valuesFilter(activeCondition.values, condition, this.getSeparator(activeCondition), isMulti)); }; this.getValuesGroup = (activeCondition, model, isMulti) => { const groupCondition = activeCondition.values?.filter(value => value.group); const groups = this.resolveGroup(groupCondition, value => value.group); if (!model) return groups; return groups?.map(group => ({ group: group.group, member: group.member.filter(condition => this.valuesFilter(activeCondition.values, condition, this.getSeparator(activeCondition), isMulti)), })); }; // 键盘操作指针 this.arrowCursor = -1; this.MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; this.DEFAULT_OPERATOR = DEFAULT_OPERATOR; this.DROPDOWN_ITEM_CLASS = DROPDOWN_ITEM_CLASS; this.selectAllClick = debounce(() => { if (this.isSelectAll) { this.deselectAllValues(); } else { this.selectAllValues(); } this.refreshCursor(); }, 50); this.getValueContent = (condition) => { return condition?.selectedValues ?.map(value => value.label || value.value) ?.join(this.getSeparator(condition)); }; this.isValueSelected = (current, conditionsModel, condition) => { return conditionsModel ?.split(this.getSeparator(condition)) ?.includes(current); }; this.resolveHideSync(); this.resolveFormModelChangeSync(); } resolveHideSync() { this.hidden$.pipe(takeUntil(this.destroy$)).subscribe(hidden => { // 控件被隐藏时,确保tooltip也一并隐藏 if (hidden) { this.toolTipHide(); } }); } // input内容发生变化时,确保formModel也同步更新 resolveFormModelChangeSync() { this.conditionsModel$$ .pipe(takeUntil(this.destroy$)) .subscribe(conditionsModel => { if (this.isValueSelecting) { this.valuesSync(conditionsModel); } }); } conditionSync(conditionsModel) { const config = this.conditionConfig?.find(config => this.getConditionLabel(config) === conditionsModel); let activeCondition = { condition: { value: conditionsModel }, }; if (config) { activeCondition = { ...config }; // 当operators只有一个选项时,会默认选中 if (config.operators?.length === 1) { activeCondition.operator = config.operators[0]; } else if (!config.operators?.length) { activeCondition.operator = DEFAULT_OPERATOR; } } else { activeCondition.operator = DEFAULT_OPERATOR; } activeCondition.isEditing = true; this.form.reset(activeCondition); } valuesSync(conditionsModel) { const activeCondition = this.form.value; const valueLabels = conditionsModel ? conditionsModel.split(this.getSeparator(activeCondition)) : []; const conditions = valueLabels.map(label => { const find = activeCondition.values?.find(value => this.getValueLabel(value) === label); return find || { label, value: label }; }); this.setValues(conditions); } createForm() { return this.fb.control(null); } adaptResourceModel(resource) { if (this.isEditing) { this.initModel(resource); } else { this.manualFocus(); } return resource; } initModel(condition) { if ((this.conditionsModel = this.getValueContent(condition))) { this.manualFocus(); } } // 设置当前操作的condition selectActiveCondition(conditionConfig) { this.resetArrowCursor(); this.changeToEditing(); // 只在点击事件中设置form.value this.conditionsModel = this.getConditionLabel(conditionConfig); this.setConditionByModel(); } setConditionByModel() { this.conditionSync(this.conditionsModel); this.conditionsModel = null; this.manualFocus(); this.refreshCursor(); } // 选择当前condition的operator selectActiveOperator(operator) { this.resetArrowCursor(); this.changeToEditing(); // operator选择不依赖resolveFormModelChangeSync,只依赖选择 this.setActiveOperator(operator); this.conditionsModel = null; this.manualFocus(); } // 选择条件 // 多选不会重置arrowCursor,当激活arrowCursor时,需要tab完成多选事件 selectValue(condition, isMulti) { this.changeToEditing(); // 利用resolveFormModelChangeSync设置form.value.selectedValues if (isMulti) { this.selectMultiValue(condition); this.refreshCursor(); } else { this.resetArrowCursor(); const currentLabel = this.getValueLabel(condition); this.conditionsModel = currentLabel; // 如果是单选,则需要在选中时抛出complete事件,并抛出search事件 this.ifComplete(false, true); this.search.emit(); } } // 多选 selectMultiValue(condition) { const activeCondition = this.form.value; const currentLabel = this.getValueLabel(condition); const separator = this.getSeparator(activeCondition); const selected = activeCondition.selectedValues?.map(value => this.getValueLabel(value)) || []; const find = selected.includes(currentLabel); if (find) { const idx = selected.indexOf(currentLabel); selected.splice(idx, 1); } else { const lastVal = selected?.at(-1); // 只有当输入的内容不存在于选项中时,才能算是searchVal const searchVal = activeCondition.values?.some(v => this.getValueLabel(v) === lastVal) ? '' : selected?.at(-1); // 如果当前选中的值包含末尾用户的输入值,则代表应该补全而非末尾处新增 /** * 如: * 输入框中为 value1|value2|val * 若此时选择下拉选项中的 value3,应补全为value1|value2|value3 * 若此时选择了 xxxx,则结果应为value1|value2|val|xxxx */ if (searchVal && currentLabel.includes(searchVal)) { selected.pop(); } selected.push(currentLabel); } this.conditionsModel = selected.join(separator); } selectAllValues() { const conditionsModel = this.conditionsModel; const activeCondition = this.form.value; const valueLabels = conditionsModel ? conditionsModel.split(this.getSeparator(activeCondition)) : []; const shouldPush = activeCondition.values ?.filter(value => valueLabels?.every(label => this.getValueLabel(value) !== label)) ?.map(condition => this.getValueLabel(condition)); const final = [...valueLabels, ...shouldPush]; this.conditionsModel = final.join(this.getSeparator(activeCondition)); } deselectAllValues() { const conditionsModel = this.conditionsModel; const activeCondition = this.form.value; const valueLabels = conditionsModel ? conditionsModel.split(this.getSeparator(activeCondition)) : []; const final = valueLabels.filter(label => activeCondition.values.every(value => this.getValueLabel(value) !== label)); this.conditionsModel = final.join(this.getSeparator(activeCondition)); } // 点击操作中已选择的类目 activeConditionClick() { this.changeToEditing(); this.conditionsModel = this.getConditionLabel(this.form.value); this.clearActiveCondition(); this.manualFocus(); } // 点击操作中已选择的operator activeOperatorClick() { this.changeToEditing(); this.conditionsModel = null; this.setActiveOperator(null); this.setValues([]); this.manualFocus(); } // 点击操作中已选择的条件 activeValueClick() { this.changeToEditing(); const activeCondition = this.form.value; this.conditionsModel = this.getValueContent(activeCondition); this.manualFocus(); } setActiveOperator(operator) { this.form.patchValue({ ...this.form.value, operator }); } setValues(conditions) { this.form.patchValue({ ...this.form.value, selectedValues: conditions, }); } clearActiveCondition() { this.form.patchValue(null); } changeToEditing() { if (!this.isEditing) { this.editing.emit(); } } inputFocus() { this.focusIn.emit(); this.toolTipShow(); } inputKeydown(e) { switch (e.code) { case KeyCode.DELETE: { this.resolveDeleteEvent(); break; } case KeyCode.ENTER: { this.resolveEnterEvent(); break; } case KeyCode.TAB: { this.resolveTabEvent(); break; } default: { if (ARROW_EVENTS.has(e.code)) { this.resolveArrowEvent(e); } else { // 删除状态时,若输入内容,则会转变为编辑状态 this.changeToEditingIfNeed(); // 输入内容时,会自动打开tooltip this.toolTipShow(); } } } } confirmSelection() { this.resolveEnterEvent(); } changeToEditingIfNeed() { if (!this.isEditing) { if (this.isConditionSelecting) { this.activeConditionClick(); } else if (this.isValueSelecting) { this.activeValueClick(); } } } resolveTabEvent() { // 当激活arrowCursor时,tab事件会切换为enter事件交互 if (this.arrowCursor > -1) { this.resetArrowCursor(); this.resolveEnterEvent(); } else { requestAnimationFrame(() => { this.ifComplete(); this.focusOut.emit(); }); } } resolveArrowEvent(e) { const options = this.optionElements; const length = options.length; if (e.code === KeyCode.ArrowDown) { this.arrowCursor = this.arrowCursor === length - 1 ? 0 : this.arrowCursor + 1; } else if (e.code === KeyCode.ArrowUp) { this.arrowCursor = this.arrowCursor === 0 ? length - 1 : this.arrowCursor - 1; } options.forEach(option => option.classList.remove('cursor-light')); options.item(this.arrowCursor)?.classList?.add('cursor-light'); e.preventDefault(); } resolveDeleteEvent() { if (!this.conditionsModel) { const activeCondition = cloneDeep(this.form.value); // 若当前存在activeCondition内容,则需要先删除当前内容,删除完成后再触发删除联动 if (activeCondition) { this.deleteSelf(activeCondition); // 自动展示选项 this.manualFocus(); } else { if (this.resourceModel) { this._complete(null); } this.delete.emit(); } } } resolveEnterEvent() { if (this.arrowCursor > -1) { this.optionElements.item(this.arrowCursor)?.click(); } else { // 当前操作内容已完成,,则会抛出enter事件 if (this.ifComplete(false, true)) { this.search.emit(); } else if (this.conditionCreatable && this.isConditionSelecting) { this.setConditionByModel(); } } } deleteSelf(activeCondition) { // 此时,先删除operator,再删除当前activeCondition,并抛出complete事件 if (activeCondition.selectedValues?.length) { activeCondition.selectedValues.pop(); this.setValues(activeCondition.selectedValues); } else if (activeCondition.operator) { this.setActiveOperator(null); } else { // 清空后,需要在下一次delete时才会从数据源中删除,在此期间,依旧可以重新进行编辑操作 this.clearActiveCondition(); } } resetArrowCursor() { this.arrowCursor = -1; } manualFocus(silence) { requestAnimationFrame(() => { if (this.autoScroll) { this.inputElement?.scrollIntoView({ behavior: 'smooth', }); } this.inputElement?.focus(); if (silence) { this.toolTipHide(); } else { this.refreshDropdown(); } }); } manualBlur() { this.toolTipHide(); requestAnimationFrame(() => { this.inputElement?.blur(); }); } refreshDropdown() { if (this.hidden) return; this.toolTipHide(); this.toolTipShow(); } refreshCursor() { requestAnimationFrame(() => { this.inputElement?.blur(); this.inputElement?.focus(); }); } toolTipHide() { this.toolTipRef?.hide(); } toolTipShow() { this.toolTipRef?.show(); } ifComplete(toContinue = false, manualFocus = false) { const activeCondition = this.form.value; // 完成所有选项,或者内容为空,则代表complete if (this.isOperationComplete || this.isInitialized) { this._complete(activeCondition, toContinue, manualFocus); return true; } } _complete(activeCondition, toContinue = false, manualFocus = true) { this.toolTipHide(); this.completed.emit({ activeCondition, toContinue, manualFocus }); this.clearActiveCondition(); this.initModel(null); } conditionFilterByExists(condition, existingConditions) { return existingConditions.every(exist => condition.condition.value !== exist.condition.value || exist.condition.value === this.resourceModel?.condition?.value); } resolveGroup(items, getGroupKey) { const groups = []; items?.forEach(config => { const groupKey = getGroupKey(config); const find = groups.find(group => group.group === groupKey); if (find) { find.member.push(config); } else { groups.push({ group: groupKey, member: [config], }); } }); return groups; } getConditionLabel(condition) { return condition?.condition?.label ?? condition?.condition?.value; } getSeparator(condition) { return condition.separator ?? ' | '; } getValueLabel(value) { return value.label ?? value.value; } getMultiSearchVal(separator) { const latestSeparatorIdx = this.conditionsModel?.lastIndexOf(separator); return latestSeparatorIdx >= 0 ? this.conditionsModel.slice(latestSeparatorIdx + separator.length) : this.conditionsModel; } isConditionSelected(current, conditionsModel) { return conditionsModel === current; } static { this.ɵfac = function MultiSearchActionInputComponent_Factory(t) { return new (t || MultiSearchActionInputComponent)(i0.ɵɵdirectiveInject(i0.Injector)); }; } static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MultiSearchActionInputComponent, selectors: [["acl-multi-search-action-input"]], viewQuery: function MultiSearchActionInputComponent_Query(rf, ctx) { if (rf & 1) { i0.ɵɵviewQuery(_c0, 5); i0.ɵɵviewQuery(_c1, 5); } if (rf & 2) { let _t; i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputRef = _t.first); i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.toolTipRef = _t.first); } }, hostVars: 1, hostBindings: function MultiSearchActionInputComponent_HostBindings(rf, ctx) { if (rf & 2) { i0.ɵɵhostProperty("hidden", ctx.hiddenState); } }, inputs: { placeholder: "placeholder", conditionCreatable: "conditionCreatable", isEditing: "isEditing", hidden: "hidden", autoScroll: "autoScroll", conditionConfig: "conditionConfig", showFootAction: "showFootAction", existingConditions: "existingConditions" }, outputs: { completed: "completed", editing: "editing", delete: "delete", search: "search", focusIn: "focusIn", focusOut: "focusOut" }, standalone: true, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 13, vars: 8, consts: [["inputRef", "", "toolTipRef", "auiTooltip"], ["templateRef", ""], ["liConditionTemp", ""], ["liValueTemp", ""], ["basicLiContentTemp", ""], ["nonFilteredCategories", ""], ["categoriesTemp", ""], [1, "tw-flex", "tw-items-center", "tw-text-m"], [4, "ngIf"], ["aui-input", "", "auiTooltipAnimType", "none", "auiTooltipTrigger", "manual", "auiTooltipType", "info", "auiTooltipClass", "multi-search-dropdown", "auiTooltipPosition", "bottom start", 1, "search-input", 3, "ngModelChange", "keydown", "focus", "ngClass", "maxlength", "placeholder", "ngModel", "auiTooltip"], [1, "tw-ml-6", "tw-max-w-[45%]", "tw-flex-shrink-0", "tw-text-ellipsis", "tw-overflow-hidden", 3, "click"], ["class", "tw-ml-6", 3, "click", 4, "ngIf"], ["class", "tw-ml-6 tw-max-w-[45%] tw-flex-shrink-0 tw-text-ellipsis tw-overflow-hidden", 3, "click", 4, "ngIf"], [1, "tw-ml-6", 3, "click"], [3, "mousedown", "click"], ["class", "tw-min-w-[260px] tw-max-w-[400px]", 4, "ngIf", "ngIfElse"], [1, "tw-min-w-[260px]", "tw-max-w-[400px]"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "no-match-categories-tip"], [4, "ngFor", "ngForOf"], [1, "dropdown-group-label", "dropdown-content", 3, "title"], [1, "tw-min-w-[160px]"], [3, "click", 4, "ngFor", "ngForOf"], [3, "click"], ["class", "tw-min-w-[260px] tw-max-w-[400px]", 4, "ngIf"], ["class", "dropdown-content select-all", 4, "ngIf"], [1, "dropdown-content", "select-all"], [1, "search-dropdown-item", 3, "click", "ngClass"], [1, "multi-item"], [3, "value", "indeterminate"], [1, "search-dropdown-item-label"], [1, "footer"], ["aui-button", "text", "size", "mini", 3, "click"], ["aui-button", "text", "size", "mini", 1, "cancel", 3, "click"], ["class", "dropdown-content", 3, "click", 4, "ngFor", "ngForOf"], [1, "dropdown-content", 3, "click"], [3, "ngClass"], ["class", "multi-item", 4, "ngIf"], ["class", "search-dropdown-item-label", 3, "title", 4, "ngIf"], [3, "value"], [1, "search-dropdown-item-label", 3, "title"]], template: function MultiSearchActionInputComponent_Template(rf, ctx) { if (rf & 1) { const _r1 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "div", 7); i0.ɵɵtemplate(1, MultiSearchActionInputComponent_ng_container_1_Template, 6, 6, "ng-container", 8); i0.ɵɵelementStart(2, "input", 9, 0); i0.ɵɵtwoWayListener("ngModelChange", function MultiSearchActionInputComponent_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.conditionsModel, $event) || (ctx.conditionsModel = $event); return i0.ɵɵresetView($event); }); i0.ɵɵlistener("ngModelChange", function MultiSearchActionInputComponent_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.conditionsModel$$.next($event)); })("keydown", function MultiSearchActionInputComponent_Template_input_keydown_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.inputKeydown($event)); })("focus", function MultiSearchActionInputComponent_Template_input_focus_2_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.inputFocus()); }); i0.ɵɵelementEnd()(); i0.ɵɵtemplate(5, MultiSearchActionInputComponent_ng_template_5_Template, 5, 5, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(7, MultiSearchActionInputComponent_ng_template_7_Template, 1, 1, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(9, MultiSearchActionInputComponent_ng_template_9_Template, 1, 1, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor)(11, MultiSearchActionInputComponent_ng_template_11_Template, 3, 7, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor); } if (rf & 2) { const templateRef_r33 = i0.ɵɵreference(6); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx.form.value); i0.ɵɵadvance(); i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c2, !ctx.isEditing && !ctx.isConditionSelecting || ctx.isOperatorSelecting))("maxlength", ctx.isOperatorSelecting ? 0 : ctx.MAX_SAFE_INTEGER)("placeholder", ctx.isConditionSelecting ? ctx.placeholder : ""); i0.ɵɵtwoWayProperty("ngModel", ctx.conditionsModel); i0.ɵɵproperty("auiTooltip", templateRef_r33); } }, dependencies: [InputComponent, PurePipe, NgIf, NgFor, NgClass, TooltipDirective, AsyncPipe, i1.TranslatePipe, CheckboxComponent, NgTemplateOutlet, FormsModule, i2.DefaultValueAccessor, i2.NgControlStatus, i2.MaxLengthValidator, i2.NgModel, ButtonComponent], styles: ["[_nghost-%COMP%]{display:block;padding-top:5px}.search-input[_ngcontent-%COMP%]{border:none;box-shadow:none!important;height:22px}.mock-input[_ngcontent-%COMP%]{width:1px!important;flex-shrink:0;padding:0;margin-left:7px} .multi-search-dropdown{padding:0!important;margin-top:8px!important;cursor:pointer;max-height:284px;overflow-y:auto} .multi-search-dropdown ul .dropdown-content:first-child{border:none;padding-to