UNPKG

@pepperi/lib

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.1.

799 lines 105 kB
import { Component, Input, Output, EventEmitter, ViewChild, ChangeDetectionStrategy, } from '@angular/core'; import { trigger, state, style, animate, transition } from '@angular/animations'; import { LAYOUT_TYPE, STYLE_TYPE, CustomizationService } from '@pepperi/lib'; import * as $ from 'jquery'; import * as i0 from "@angular/core"; import * as i1 from "@pepperi/lib"; import * as i2 from "@angular/forms"; import * as i3 from "@angular/common"; import * as i4 from "@pepperi/lib/field-title"; import * as i5 from "@angular/material/button"; import * as i6 from "@angular/material/form-field"; import * as i7 from "@angular/material/input"; import * as i8 from "@angular/material/icon"; import * as i9 from "@pepperi/lib/icon"; import * as i10 from "@angular/material/badge"; import * as i11 from "./quantity-selector.pipes"; import * as i12 from "@ngx-translate/core"; const _c0 = ["QSCont"]; const _c1 = ["QSInput"]; function PepperiQuantitySelectorComponent_ng_template_1_pep_field_title_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "pep-field-title", 6); } if (rf & 2) { const ctx_r7 = i0.ɵɵnextContext(2); i0.ɵɵproperty("label", ctx_r7.label)("required", ctx_r7.required)("disabled", ctx_r7.disabled)("showTitle", ctx_r7.showTitle)("xAlignment", ctx_r7.xAlignment); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } const _c2 = function (a0, a1, a2) { return { caution: a0, md: a1, xs: a2 }; }; function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "button", 10); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r14 = i0.ɵɵnextContext(3); i0.ɵɵclassMapInterpolate1("pepperi-button ", ctx_r14.styleClass, " ellipsis"); i0.ɵɵpropertyInterpolate("title", ctx_r14.formattedValue); i0.ɵɵproperty("id", ctx_r14.key)("ngClass", i0.ɵɵpureFunction3(7, _c2, ctx_r14.isCaution, ctx_r14.rowSpan !== 1, ctx_r14.rowSpan === 1)); i0.ɵɵadvance(1); i0.ɵɵtextInterpolate1(" ", ctx_r14.formattedValue, " "); } } const _c3 = function (a0, a1) { return { caution: a0, "keep-background-on-focus": a1 }; }; function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_button_4_Template(rf, ctx) { if (rf & 1) { const _r22 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "button", 16); i0.ɵɵlistener("click", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_button_4_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(4); return ctx_r21.decrement($event); }); i0.ɵɵelementStart(1, "mat-icon"); i0.ɵɵelement(2, "pep-icon", 17); i0.ɵɵelementEnd(); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r18 = i0.ɵɵnextContext(4); i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c3, ctx_r18.isCaution && ctx_r18.styleClass !== ctx_r18.STYLE_TYPE.Strong, ctx_r18.styleClass === ctx_r18.STYLE_TYPE.Strong)); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_button_5_Template(rf, ctx) { if (rf & 1) { const _r24 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "button", 18); i0.ɵɵlistener("click", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_button_5_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r23 = i0.ɵɵnextContext(4); return ctx_r23.increment($event); }); i0.ɵɵelementStart(1, "mat-icon"); i0.ɵɵelement(2, "pep-icon", 19); i0.ɵɵelementEnd(); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r19 = i0.ɵɵnextContext(4); i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c3, ctx_r19.isCaution && ctx_r19.styleClass !== ctx_r19.STYLE_TYPE.Strong, ctx_r19.styleClass === ctx_r19.STYLE_TYPE.Strong)); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_mat_error_6_span_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span", 21); i0.ɵɵtext(1); i0.ɵɵpipe(2, "translate"); i0.ɵɵelementEnd(); } if (rf & 2) { const msg_r26 = ctx.$implicit; i0.ɵɵadvance(1); i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind1(2, 2, msg_r26.Key), " : ", msg_r26.Value, " "); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_mat_error_6_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "mat-error"); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_mat_error_6_span_1_Template, 3, 4, "span", 20); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r20 = i0.ɵɵnextContext(4); i0.ɵɵadvance(1); i0.ɵɵproperty("ngForOf", ctx_r20.messages); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_Template(rf, ctx) { if (rf & 1) { const _r28 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "mat-form-field", 11); i0.ɵɵelementStart(1, "input", 12, 13); i0.ɵɵlistener("keypress", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_Template_input_keypress_1_listener($event) { i0.ɵɵrestoreView(_r28); const ctx_r27 = i0.ɵɵnextContext(3); return ctx_r27.onKeyPress($event); })("click", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_Template_input_click_1_listener($event) { i0.ɵɵrestoreView(_r28); return $event.target.setSelectionRange(0, 999); })("blur", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_Template_input_blur_1_listener($event) { i0.ɵɵrestoreView(_r28); const ctx_r30 = i0.ɵɵnextContext(3); return ctx_r30.onBlur($event); })("focus", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_Template_input_focus_1_listener($event) { i0.ɵɵrestoreView(_r28); const ctx_r31 = i0.ɵɵnextContext(3); return ctx_r31.onFocus($event); }); i0.ɵɵpipe(3, "quantitySelectorNumber"); i0.ɵɵelementEnd(); i0.ɵɵtemplate(4, PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_button_4_Template, 3, 4, "button", 14); i0.ɵɵtemplate(5, PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_button_5_Template, 3, 4, "button", 15); i0.ɵɵtemplate(6, PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_mat_error_6_Template, 2, 1, "mat-error", 2); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r16 = i0.ɵɵnextContext(3); i0.ɵɵadvance(1); i0.ɵɵpropertyInterpolate("name", ctx_r16.key); i0.ɵɵpropertyInterpolate("title", ctx_r16.formattedValue); i0.ɵɵproperty("id", ctx_r16.key)("formControlName", ctx_r16.key)("value", ctx_r16.isFocus ? i0.ɵɵpipeBind2(3, 9, ctx_r16.value, ctx_r16.alowDecimal) : ctx_r16.formattedValue)("disabled", ctx_r16.disabled); i0.ɵɵadvance(3); i0.ɵɵproperty("ngIf", ctx_r16.showQsBtn); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r16.showQsBtn); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", (ctx_r16.messages == null ? null : ctx_r16.messages.length) > 0); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_container_1_Template, 1, 0, "ng-container", 7); i0.ɵɵtemplate(2, PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_2_Template, 2, 11, "ng-template", null, 8, i0.ɵɵtemplateRefExtractor); i0.ɵɵtemplate(4, PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_ng_template_4_Template, 7, 12, "ng-template", null, 9, i0.ɵɵtemplateRefExtractor); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const _r13 = i0.ɵɵreference(3); const _r15 = i0.ɵɵreference(5); const ctx_r8 = i0.ɵɵnextContext(2); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r8.readonly)("ngIfThen", _r13)("ngIfElse", _r15); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "button", 22); i0.ɵɵtext(1, " X "); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r34 = i0.ɵɵnextContext(3); i0.ɵɵclassMapInterpolate1("pepperi-button ", ctx_r34.styleClass, " disabled"); i0.ɵɵproperty("id", ctx_r34.key)("ngClass", i0.ɵɵpureFunction3(5, _c2, ctx_r34.isCaution, ctx_r34.rowSpan !== 1, ctx_r34.rowSpan === 1)); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_span_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "span", 27); } if (rf & 2) { const ctx_r37 = i0.ɵɵnextContext(4); i0.ɵɵpropertyInterpolate("matBadge", ctx_r37.additionalValue); i0.ɵɵproperty("@showHide", ctx_r37.getAdditionalValue); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_mat_error_5_span_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span", 21); i0.ɵɵtext(1); i0.ɵɵpipe(2, "translate"); i0.ɵɵelementEnd(); } if (rf & 2) { const msg_r42 = ctx.$implicit; i0.ɵɵadvance(1); i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind1(2, 2, msg_r42.Key), " : ", msg_r42.Value, " "); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_mat_error_5_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "mat-error"); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_mat_error_5_span_1_Template, 3, 4, "span", 20); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r39 = i0.ɵɵnextContext(4); i0.ɵɵadvance(1); i0.ɵɵproperty("ngForOf", ctx_r39.messages); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_span_6_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "span", 28); } if (rf & 2) { const ctx_r40 = i0.ɵɵnextContext(4); i0.ɵɵpropertyInterpolate("matBadge", ctx_r40.additionalValue); i0.ɵɵproperty("@showHide", ctx_r40.getAdditionalValue); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_Template(rf, ctx) { if (rf & 1) { const _r44 = i0.ɵɵgetCurrentView(); i0.ɵɵtemplate(0, PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_span_0_Template, 1, 2, "span", 23); i0.ɵɵelementStart(1, "mat-form-field", 24); i0.ɵɵlistener("mouseleave", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_Template_mat_form_field_mouseleave_1_listener($event) { i0.ɵɵrestoreView(_r44); const ctx_r43 = i0.ɵɵnextContext(3); return !ctx_r43.isFocus ? ctx_r43.onMatrixMouseleave($event) : null; }); i0.ɵɵelementStart(2, "input", 25, 13); i0.ɵɵlistener("keypress", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_Template_input_keypress_2_listener($event) { i0.ɵɵrestoreView(_r44); const ctx_r45 = i0.ɵɵnextContext(3); return ctx_r45.onKeyPress($event); })("click", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_Template_input_click_2_listener($event) { i0.ɵɵrestoreView(_r44); const ctx_r46 = i0.ɵɵnextContext(3); ctx_r46.onMatrixClick($event); return $event.target.setSelectionRange(0, 999); })("blur", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_Template_input_blur_2_listener($event) { i0.ɵɵrestoreView(_r44); const ctx_r47 = i0.ɵɵnextContext(3); return ctx_r47.onMatrixBlur($event); })("focus", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_Template_input_focus_2_listener($event) { i0.ɵɵrestoreView(_r44); const ctx_r48 = i0.ɵɵnextContext(3); ctx_r48.onMatrixMouseEnter($event); return ctx_r48.onFocus($event); })("mouseenter", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_Template_input_mouseenter_2_listener($event) { i0.ɵɵrestoreView(_r44); const ctx_r49 = i0.ɵɵnextContext(3); return ctx_r49.onMatrixMouseEnter($event); }); i0.ɵɵpipe(4, "quantitySelectorNumber"); i0.ɵɵelementEnd(); i0.ɵɵtemplate(5, PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_mat_error_5_Template, 2, 1, "mat-error", 2); i0.ɵɵelementEnd(); i0.ɵɵtemplate(6, PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_span_6_Template, 1, 2, "span", 26); } if (rf & 2) { const ctx_r36 = i0.ɵɵnextContext(3); i0.ɵɵproperty("ngIf", ctx_r36.xAlignment == "2"); i0.ɵɵadvance(2); i0.ɵɵpropertyInterpolate("name", ctx_r36.key); i0.ɵɵpropertyInterpolate("title", ctx_r36.formattedValue); i0.ɵɵproperty("id", ctx_r36.key)("formControlName", ctx_r36.key)("value", ctx_r36.isFocus ? i0.ɵɵpipeBind2(4, 9, ctx_r36.value, ctx_r36.alowDecimal) : ctx_r36.formattedValue)("disabled", ctx_r36.disabled); i0.ɵɵadvance(3); i0.ɵɵproperty("ngIf", (ctx_r36.messages == null ? null : ctx_r36.messages.length) > 0); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r36.xAlignment != "2"); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_container_1_Template, 1, 0, "ng-container", 7); i0.ɵɵtemplate(2, PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_2_Template, 2, 9, "ng-template", null, 8, i0.ɵɵtemplateRefExtractor); i0.ɵɵtemplate(4, PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_ng_template_4_Template, 7, 12, "ng-template", null, 9, i0.ɵɵtemplateRefExtractor); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const _r33 = i0.ɵɵreference(3); const _r35 = i0.ɵɵreference(5); const ctx_r9 = i0.ɵɵnextContext(2); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r9.readonly)("ngIfThen", _r33)("ngIfElse", _r35); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_2_Template(rf, ctx) { if (rf & 1) { const _r56 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "button", 31); i0.ɵɵlistener("click", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_2_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r55 = i0.ɵɵnextContext(3); return ctx_r55.enterChildren($event); }); i0.ɵɵpipe(1, "translate"); i0.ɵɵtext(2); i0.ɵɵpipe(3, "translate"); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r52 = i0.ɵɵnextContext(3); i0.ɵɵclassMapInterpolate1("pepperi-button ", ctx_r52.styleClass, " ellipsis"); i0.ɵɵpropertyInterpolate("name", ctx_r52.key); i0.ɵɵproperty("id", ctx_r52.key)("ngClass", i0.ɵɵpureFunction3(12, _c2, ctx_r52.isCaution, ctx_r52.rowSpan !== 1, ctx_r52.rowSpan === 1))("title", i0.ɵɵpipeBind1(1, 8, "FormBuilder_Order")); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 10, "FormBuilder_Order"), " "); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_ng_container_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_ng_template_1_Template(rf, ctx) { if (rf & 1) { const _r63 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "button", 34); i0.ɵɵlistener("click", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_ng_template_1_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r63); const ctx_r62 = i0.ɵɵnextContext(4); return ctx_r62.enterChildren($event); }); i0.ɵɵpipe(1, "translate"); i0.ɵɵtext(2); i0.ɵɵpipe(3, "translate"); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r59 = i0.ɵɵnextContext(4); i0.ɵɵclassMapInterpolate1("pepperi-button ", ctx_r59.styleClass, " ellipsis right-alignment"); i0.ɵɵpropertyInterpolate("matBadge", ctx_r59.formattedValue); i0.ɵɵpropertyInterpolate("name", ctx_r59.key); i0.ɵɵproperty("matBadgeSize", ctx_r59.layoutType === ctx_r59.LAYOUT_TYPE.PepperiCard && ctx_r59.rowSpan === 1 ? "small" : "medium")("id", ctx_r59.key)("ngClass", i0.ɵɵpureFunction3(14, _c2, ctx_r59.isCaution, ctx_r59.rowSpan !== 1, ctx_r59.rowSpan === 1))("title", i0.ɵɵpipeBind1(1, 10, "FormBuilder_Order")); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 12, "FormBuilder_Order"), " "); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_ng_template_3_Template(rf, ctx) { if (rf & 1) { const _r65 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "button", 35); i0.ɵɵlistener("click", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_ng_template_3_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r65); const ctx_r64 = i0.ɵɵnextContext(4); return ctx_r64.enterChildren($event); }); i0.ɵɵpipe(1, "translate"); i0.ɵɵtext(2); i0.ɵɵpipe(3, "translate"); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r61 = i0.ɵɵnextContext(4); i0.ɵɵclassMapInterpolate1("pepperi-button ", ctx_r61.styleClass, " ellipsis left-alignment"); i0.ɵɵpropertyInterpolate("matBadge", ctx_r61.formattedValue); i0.ɵɵpropertyInterpolate("name", ctx_r61.key); i0.ɵɵproperty("matBadgeSize", ctx_r61.layoutType === ctx_r61.LAYOUT_TYPE.PepperiCard && ctx_r61.rowSpan === 1 ? "small" : "medium")("id", ctx_r61.key)("ngClass", i0.ɵɵpureFunction3(14, _c2, ctx_r61.isCaution, ctx_r61.rowSpan !== 1, ctx_r61.rowSpan === 1))("title", i0.ɵɵpipeBind1(1, 10, "FormBuilder_Order")); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 12, "FormBuilder_Order"), " "); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_ng_container_0_Template, 1, 0, "ng-container", 7); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_ng_template_1_Template, 4, 18, "ng-template", null, 32, i0.ɵɵtemplateRefExtractor); i0.ɵɵtemplate(3, PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_ng_template_3_Template, 4, 18, "ng-template", null, 33, i0.ɵɵtemplateRefExtractor); } if (rf & 2) { const _r58 = i0.ɵɵreference(2); const _r60 = i0.ɵɵreference(4); const ctx_r54 = i0.ɵɵnextContext(3); i0.ɵɵproperty("ngIf", ctx_r54.xAlignment == "2")("ngIfThen", _r58)("ngIfElse", _r60); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 7); i0.ɵɵtemplate(2, PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_2_Template, 4, 16, "ng-template", null, 29, i0.ɵɵtemplateRefExtractor); i0.ɵɵtemplate(4, PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_ng_template_4_Template, 5, 3, "ng-template", null, 30, i0.ɵɵtemplateRefExtractor); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const _r51 = i0.ɵɵreference(3); const _r53 = i0.ɵɵreference(5); const ctx_r10 = i0.ɵɵnextContext(2); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r10.value == "0")("ngIfThen", _r51)("ngIfElse", _r53); } } function PepperiQuantitySelectorComponent_ng_template_1_ng_container_6_Template(rf, ctx) { if (rf & 1) { const _r67 = i0.ɵɵgetCurrentView(); i0.ɵɵelementContainerStart(0); i0.ɵɵelementStart(1, "button", 36); i0.ɵɵlistener("click", function PepperiQuantitySelectorComponent_ng_template_1_ng_container_6_Template_button_click_1_listener($event) { i0.ɵɵrestoreView(_r67); const ctx_r66 = i0.ɵɵnextContext(2); return ctx_r66.enterPackage($event); }); i0.ɵɵpipe(2, "translate"); i0.ɵɵtext(3); i0.ɵɵpipe(4, "translate"); i0.ɵɵelementEnd(); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r11 = i0.ɵɵnextContext(2); i0.ɵɵadvance(1); i0.ɵɵclassMapInterpolate1("pepperi-button ", ctx_r11.styleClass, " ellipsis"); i0.ɵɵpropertyInterpolate("name", ctx_r11.key); i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(2, 9, "FormBuilder_Order")); i0.ɵɵproperty("id", ctx_r11.key)("ngClass", i0.ɵɵpureFunction3(13, _c2, ctx_r11.isCaution, ctx_r11.rowSpan !== 1, ctx_r11.rowSpan === 1)); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind1(4, 11, "FormBuilder_Order"), " (", ctx_r11.formattedValue, ") "); } } const _c4 = function (a0, a1, a2, a3, a4) { return { "pepperi-table-quantity-selector": a0, "one-row": a1, caution: a2, "matrix-qs": a3, "zero-quantity": a4 }; }; function PepperiQuantitySelectorComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "div", 3, 4); i0.ɵɵtemplate(2, PepperiQuantitySelectorComponent_ng_template_1_pep_field_title_2_Template, 1, 5, "pep-field-title", 5); i0.ɵɵtemplate(3, PepperiQuantitySelectorComponent_ng_template_1_ng_container_3_Template, 6, 3, "ng-container", 2); i0.ɵɵtemplate(4, PepperiQuantitySelectorComponent_ng_template_1_ng_container_4_Template, 6, 3, "ng-container", 2); i0.ɵɵtemplate(5, PepperiQuantitySelectorComponent_ng_template_1_ng_container_5_Template, 6, 3, "ng-container", 2); i0.ɵɵtemplate(6, PepperiQuantitySelectorComponent_ng_template_1_ng_container_6_Template, 5, 17, "ng-container", 2); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵclassMapInterpolate1("pepperi-quantity-selector-container ", ctx_r1.styleClass, ""); i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction5(9, _c4, ctx_r1.layoutType === ctx_r1.LAYOUT_TYPE.PepperiTable, ctx_r1.rowSpan === 1, ctx_r1.isCaution, ctx_r1.type === "qsForMatrix", ctx_r1.formattedValue === "0")); i0.ɵɵadvance(2); i0.ɵɵproperty("ngIf", ctx_r1.layoutType !== ctx_r1.LAYOUT_TYPE.PepperiTable && ctx_r1.layoutType !== ctx_r1.LAYOUT_TYPE.PepperiCard); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r1.type == "qs"); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r1.type == "qsForMatrix"); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r1.type == "button"); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx_r1.type == "packageButton"); } } function PepperiQuantitySelectorComponent_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function PepperiQuantitySelectorComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_container_3_ng_container_1_Template, 1, 0, "ng-container", 37); i0.ɵɵelementContainerEnd(); } if (rf & 2) { i0.ɵɵnextContext(); const _r0 = i0.ɵɵreference(2); i0.ɵɵadvance(1); i0.ɵɵproperty("ngTemplateOutlet", _r0); } } function PepperiQuantitySelectorComponent_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function PepperiQuantitySelectorComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_container_4_ng_container_1_Template, 1, 0, "ng-container", 37); i0.ɵɵelementContainerEnd(); } if (rf & 2) { i0.ɵɵnextContext(); const _r0 = i0.ɵɵreference(2); i0.ɵɵadvance(1); i0.ɵɵproperty("ngTemplateOutlet", _r0); } } function PepperiQuantitySelectorComponent_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function PepperiQuantitySelectorComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 37); i0.ɵɵelementContainerEnd(); } if (rf & 2) { i0.ɵɵnextContext(); const _r0 = i0.ɵɵreference(2); i0.ɵɵadvance(1); i0.ɵɵproperty("ngTemplateOutlet", _r0); } } function PepperiQuantitySelectorComponent_ng_container_6_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function PepperiQuantitySelectorComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_container_6_ng_container_1_Template, 1, 0, "ng-container", 37); i0.ɵɵelementContainerEnd(); } if (rf & 2) { i0.ɵɵnextContext(); const _r0 = i0.ɵɵreference(2); i0.ɵɵadvance(1); i0.ɵɵproperty("ngTemplateOutlet", _r0); } } export class PepperiQuantitySelectorComponent { constructor(cd, customizationService, renderer, element) { this.cd = cd; this.customizationService = customizationService; this.renderer = renderer; this.element = element; this.key = ''; this.value = ''; this.formattedValue = ''; this.label = ''; this.type = 'qs'; this.required = false; this.disabled = false; this.readonly = false; this.textColor = ''; this.xAlignment = '0'; this.rowSpan = 1; this.alowDecimal = false; this.additionalValue = ''; this.controlType = 'qs'; this.form = null; this.showTitle = true; this.layoutType = LAYOUT_TYPE.PepperiForm; this.isActive = false; this.valueChanged = new EventEmitter(); this.elementClicked = new EventEmitter(); this.LAYOUT_TYPE = LAYOUT_TYPE; this.standAlone = false; this.isFocus = false; this.isMatrixFocus = false; this.isCaution = false; this.messages = null; this.showQsBtn = false; this.sameElementInTheWantedRow = null; this.STYLE_TYPE = STYLE_TYPE; this.styleClass = STYLE_TYPE.Strong; this.isEmptyKey = false; } ngOnInit() { if (this.form === null) { if (this.key === '') { this.isEmptyKey = true; } this.standAlone = true; this.form = this.customizationService.getDefaultFromGroup(this.key, this.value, this.required, this.readonly, this.disabled); this.formattedValue = this.formattedValue || this.value; this.renderer.addClass(this.element.nativeElement, CustomizationService.STAND_ALONE_FIELD_CLASS_NAME); } this.setQsView(); // TODO: // const self = this; // this.resize = Observable.fromEvent(window, 'resize') // .debounceTime(100) // .subscribe((event) => { // self.setQsView(); // }); } // TODO: ngAfterViewChecked() { setTimeout(() => { this.setQsView(); }, 125); } ngOnChanges(changes) { // Bug fix for addons when the key is '' in the ngOnInit for some reson if (this.isEmptyKey && this.key !== '') { this.form = this.customizationService.getDefaultFromGroup(this.key, this.value, this.required, this.readonly, this.disabled); } this.isCaution = this.textColor === '#FF0000'; this.messages = this.notificationInfo && this.notificationInfo.length > 0 ? JSON.parse(this.notificationInfo).Messages : ''; // this.messages = ["error test"]; // For error check if (this.messages && this.messages.length > 0) { const fieldControl = this.form.controls[this.key]; fieldControl.setErrors({ serverError: 'Error', }); setTimeout(() => { if (this.QSInput && this.QSInput.nativeElement) { this.QSInput.nativeElement.focus(); } }, 150); } else { const self = this; setTimeout(() => { if (self.lastFocusField) { self.lastFocusField.focus(); self.lastFocusField = null; } else { self.focusToTheSameElementInTheWantedRow(); } }, 100); } } ngOnDestroy() { if (this.resize) { this.resize.unsubscribe(); } if (this.valueChanged) { this.valueChanged.unsubscribe(); } if (this.elementClicked) { this.elementClicked.unsubscribe(); } } get getAdditionalValue() { return this.additionalValue.length > 0 ? 'show' : 'hide'; } getSameElementInTheWantedRowByClassName(event, isNext = true) { const eventTarget = event.target || event.srcElement; let sameElementInTheWantedRowByClassName; let parentSelector; if (this.layoutType === LAYOUT_TYPE.PepperiTable) { parentSelector = sameElementInTheWantedRowByClassName = $(eventTarget).parents('.table-row'); } else if (this.layoutType === LAYOUT_TYPE.PepperiCard) { parentSelector = sameElementInTheWantedRowByClassName = $(eventTarget).parents('.card-view'); if (parentSelector.length === 0) { parentSelector = sameElementInTheWantedRowByClassName = $(eventTarget).parents('.line-view'); } } if (isNext) { if (parentSelector.is(':last-child')) { sameElementInTheWantedRowByClassName = parentSelector .parent() .children() .first() .find('[name=' + this.key + ']'); } else { sameElementInTheWantedRowByClassName = parentSelector.next().find('[name=' + this.key + ']'); } } else { if (parentSelector.is(':first-child')) { sameElementInTheWantedRowByClassName = parentSelector .parent() .children() .last() .find('[name=' + this.key + ']'); } else { sameElementInTheWantedRowByClassName = parentSelector.prev().find('[name=' + this.key + ']'); } } return sameElementInTheWantedRowByClassName; } setSameElementInTheWantedRow(event, isNext = true) { // Navigate to the QS in the next row. // const target = event.target || event.srcElement; this.sameElementInTheWantedRow = this.getSameElementInTheWantedRowByClassName(event, isNext); this.QSInput.nativeElement.blur(); } focusToTheSameElementInTheWantedRow() { if (this.sameElementInTheWantedRow) { // If this is regular item (qs and not button) . if (this.sameElementInTheWantedRow.is('input')) { this.sameElementInTheWantedRow.click().select(); } else { this.sameElementInTheWantedRow.parent().click(); this.sameElementInTheWantedRow.focus(); } this.sameElementInTheWantedRow = null; } } cleanError() { const fieldControl = this.form.controls[this.key]; // Clean the error message if (this.messages && this.messages.length > 0) { this.messages = this.notificationInfo = null; fieldControl.setErrors(null); } } onMatrixMouseEnter(event) { this.isMatrixFocus = true; } onMatrixMouseleave(event) { this.isMatrixFocus = false; } onMatrixClick(event) { this.isFocus = true; if (this.QSInput && this.QSInput.nativeElement) { this.QSInput.nativeElement.focus(); } } onMatrixBlur(event) { if (!event.relatedTarget || event.relatedTarget.className.indexOf('qs') < 0) { this.isMatrixFocus = false; } this.onBlur(event); } onFocus(event) { this.isFocus = true; } onBlur(event) { this.isFocus = false; this.cleanError(); const value = event.target ? event.target.value : event; if (parseFloat(this.value) !== parseFloat(value)) { this.value = value; this.formattedValue = value; this.customizationService.updateFormFieldValue(this.form, this.key, value); // this.propagateChange(this.value, event.relatedTarget); this.changeValue(this.value, event.relatedTarget); } else { this.focusToTheSameElementInTheWantedRow(); } } changeValue(value, lastFocusedField = null) { this.valueChanged.emit({ apiName: this.key, value, controlType: this.controlType, lastFocusedField }); } increment(event) { if (this.standAlone) { let tmp = parseFloat(this.value); this.value = this.formattedValue = (++tmp).toString(); this.customizationService.updateFormFieldValue(this.form, this.key, this.value); } // this.propagateChange('+'); this.changeValue('+', null); event.stopPropagation(); } decrement(event) { if (this.standAlone) { let tmp = parseFloat(this.value); this.value = this.formattedValue = (--tmp).toString(); this.customizationService.updateFormFieldValue(this.form, this.key, this.value); } // this.propagateChange('-'); this.changeValue('-', null); event.stopPropagation(); } enterChildren(event) { this.elementClicked.emit({ apiName: PepperiQuantitySelectorComponent.ENTER_CHILDREN, eventWhich: event.which }); } enterPackage(event) { this.elementClicked.emit({ apiName: PepperiQuantitySelectorComponent.ENTER_PACKAGE, eventWhich: event.which, otherData: this.notificationInfo }); } setQsView() { if (this.layoutType === LAYOUT_TYPE.Editmodal || this.layoutType === LAYOUT_TYPE.PepperiCard && this.rowSpan <= 1) { this.showQsBtn = false; } else { if (this.QSCont && this.QSCont.nativeElement) { this.showQsBtn = this.QSCont.nativeElement.clientWidth > 140; } } // Get state class from theme. // this.styleClass = this.customizationService.getThemeVariable(CustomizationService.STYLE_QS_KEY); this.styleClass = document.documentElement.style.getPropertyValue(CustomizationService.STYLE_QS_KEY); if (!this.cd['destroyed']) { this.cd.detectChanges(); } } onKeyPress(event) { let inputChar = String.fromCharCode(event.charCode); const keyboardEvent = event; if (keyboardEvent.keyCode === 13) { this.setSameElementInTheWantedRow(keyboardEvent, !keyboardEvent.shiftKey); return true; } // TODO: Make it one function like in PepperiTextboxComponent if ( /*[8, 9, 27, 13, 190].indexOf(keyboardEvent.keyCode) !== -1 ||*/ // Allow: Ctrl+A (keyboardEvent.keyCode === 65 && keyboardEvent.ctrlKey === true) || // Allow: Ctrl+C (keyboardEvent.keyCode === 67 && keyboardEvent.ctrlKey === true) || // Allow: Ctrl+V (keyboardEvent.keyCode === 86 && keyboardEvent.ctrlKey === true) || // Allow: Ctrl+X (keyboardEvent.keyCode === 88 && keyboardEvent.ctrlKey === true) /*|| // Allow: home, end, left, right (keyboardEvent.keyCode >= 35 && keyboardEvent.keyCode <= 39)*/) { // let it happen, don't do anything return true; } if (this.alowDecimal) { const decPoint = '.'; const thousandSeparator = ','; const pattern = /^\d[\d,]*(\.\d+)?$/; if (keyboardEvent.keyCode === 46) { inputChar = inputChar + '0'; } else if (keyboardEvent.keyCode === 44) { inputChar = inputChar + '000'; } if (!pattern.test(event.target.value + inputChar)) { keyboardEvent.preventDefault(); } } else { const pattern = /[0-9\+\-\ ]/; if (!pattern.test(inputChar)) { keyboardEvent.preventDefault(); } } } } PepperiQuantitySelectorComponent.ENTER_CHILDREN = '[EnterChildren]'; PepperiQuantitySelectorComponent.ENTER_PACKAGE = '[EnterPackage]'; PepperiQuantitySelectorComponent.ɵfac = function PepperiQuantitySelectorComponent_Factory(t) { return new (t || PepperiQuantitySelectorComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.CustomizationService), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef)); }; PepperiQuantitySelectorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: PepperiQuantitySelectorComponent, selectors: [["pep-quantity-selector"]], viewQuery: function PepperiQuantitySelectorComponent_Query(rf, ctx) { if (rf & 1) { i0.ɵɵviewQuery(_c0, true); i0.ɵɵviewQuery(_c1, true); } if (rf & 2) { var _t; i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.QSCont = _t.first); i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.QSInput = _t.first); } }, inputs: { key: "key", value: "value", formattedValue: "formattedValue", label: "label", type: "type", required: "required", disabled: "disabled", readonly: "readonly", textColor: "textColor", xAlignment: "xAlignment", rowSpan: "rowSpan", lastFocusField: "lastFocusField", alowDecimal: "alowDecimal", additionalValue: "additionalValue", notificationInfo: "notificationInfo", form: "form", showTitle: "showTitle", layoutType: "layoutType", isActive: "isActive" }, outputs: { valueChanged: "valueChanged", elementClicked: "elementClicked" }, features: [i0.ɵɵNgOnChangesFeature], decls: 7, vars: 5, consts: [[3, "formGroup"], ["pepperiTemplate", ""], [4, "ngIf"], [3, "ngClass"], ["QSCont", ""], [3, "label", "required", "disabled", "showTitle", "xAlignment", 4, "ngIf"], [3, "label", "required", "disabled", "showTitle", "xAlignment"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["readonlyBlock", ""], ["editableQSBlock", ""], ["mat-button", "", "disabled", "true", 3, "id", "ngClass", "title"], ["appearance", "outline"], ["type", "decimalNumber", "inputmode", "decimal", "matInput", "", "autocomplete", "off", 1, "body-lg", "ellipsis", 3, "name", "title", "id", "formControlName", "value", "disabled", "keypress", "click", "blur", "focus"], ["QSInput", ""], ["mat-button", "", "matPrefix", "", "class", "pepperi-button icon-button sm weak qs-action", 3, "ngClass", "click", 4, "ngIf"], ["mat-button", "", "matSuffix", "", "class", "pepperi-button icon-button sm weak qs-action", 3, "ngClass", "click", 4, "ngIf"], ["mat-button", "", "matPrefix", "", 1, "pepperi-button", "icon-button", "sm", "weak", "qs-action", 3, "ngClass", "click"], ["name", "number_minus"], ["mat-button", "", "matSuffix", "", 1, "pepperi-button", "icon-button", "sm", "weak", "qs-action", 3, "ngClass", "click"], ["name", "number_plus"], ["class", "qs-error body-xs", 4, "ngFor", "ngForOf"], [1, "qs-error", "body-xs"], ["mat-button", "", "disabled", "true", 3, "id", "ngClass"], ["class", "body-sm additional-value prefix", "matBadgePosition", "before", "matBadgeSize", "rowSpan === 1 ? small : medium", 3, "matBadge", 4, "ngIf"], ["appearance", "outline", 3, "mouseleave"], ["type", "decimalNumber", "inputmode", "decimal", "matInput", "", "autocomplete", "off", 1, "body-sm", "ellipsis", 3, "name", "title", "id", "formControlName", "value", "disabled", "keypress", "click", "blur", "focus", "mouseenter"], ["class", "body-sm additional-value suffix", "matBadgePosition", "before", "matBadgeSize", "rowSpan === 1 ? small : medium", 3, "matBadge", 4, "ngIf"], ["matBadgePosition", "before", "matBadgeSize", "rowSpan === 1 ? small : medium", 1, "body-sm", "additional-value", "prefix", 3, "matBadge"], ["matBadgePosition", "before", "matBadgeSize", "rowSpan === 1 ? small : medium", 1, "body-sm", "additional-value", "suffix", 3, "matBadge"], ["regularBlock", ""], ["withBadgeBlock", ""], ["mat-button", "", 3, "name", "id", "ngClass", "title", "click"], ["leftBadgeBlock", ""], ["rightBadgeBlock", ""], ["mat-button", "", "matBadgePosition", "before", 3, "matBadge", "matBadgeSize", "name", "id", "ngClass", "title", "click"], ["mat-button", "", "matBadgePosition", "after", 3, "matBadge", "matBadgeSize", "name", "id", "ngClass", "title", "click"], ["mat-button", "", 3, "name", "title", "id", "ngClass", "click"], [4, "ngTemplateOutlet"]], template: function PepperiQuantitySelectorComponent_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0, 0); i0.ɵɵtemplate(1, PepperiQuantitySelectorComponent_ng_template_1_Template, 7, 15, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor); i0.ɵɵtemplate(3, PepperiQuantitySelectorComponent_ng_container_3_Template, 2, 1, "ng-container", 2); i0.ɵɵtemplate(4, PepperiQuantitySelectorComponent_ng_container_4_Template, 2, 1, "ng-container", 2); i0.ɵɵtemplate(5, PepperiQuantitySelectorComponent_ng_container_5_Template, 2, 1, "ng-container", 2); i0.ɵɵtemplate(6, PepperiQuantitySelectorComponent_ng_container_6_Template, 2, 1, "ng-container", 2); i0.ɵɵelementContainerEnd(); } if (rf & 2) { i0.ɵɵproperty("formGroup", ctx.form); i0.ɵɵadvance(3); i0.ɵɵproperty("ngIf", ctx.layoutType === ctx.LAYOUT_TYPE.PepperiForm); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx.layoutType === ctx.LAYOUT_TYPE.PepperiCard); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx.layoutType === ctx.LAYOUT_TYPE.PepperiTable); i0.ɵɵadvance(1); i0.ɵɵproperty("ngIf", ctx.layoutType === ctx.LAYOUT_TYPE.Editmodal); } }, directives: [i2.NgControlStatusGroup, i2.FormGroupDirective, i3.NgIf, i3.NgClass, i4.PepperiFieldTitleComponent, i5.MatButton, i6.MatFormField, i7.MatInput, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlName, i6.MatPrefix, i8.MatIcon, i9.PepperiIconComponent, i6.MatSuffix, i6.MatError, i3.NgForOf, i10.MatBadge, i3.NgTemplateOutlet], pipes: [i11.QuantitySelectorNumber, i12.TranslatePipe], styles: ["[_nghost-%COMP%]{display:-ms-grid;display:grid;height:inherit}.pepperi-quantity-selector-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-flow:wrap;height:inherit;min-width:2rem;width:100%}.pepperi-quantity-selector-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .pepperi-quantity-selector-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.pepperi-quantity-selector-container[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]{-moz-appearance:textfield}.pepperi-quantity-selector-container[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{font-weight:var(--pep-font-weight-bold,600);padding:0 .25rem;text-align:center;width:100%}.pepperi-quantity-selector-container[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] .mat-form-field-wrapper[_ngcontent-%COMP%] .mat-form-field-subscript-wrapper[_ngcontent-%COMP%]{height:unset}.pepperi-quantity-selector-container[_ngcontent-%COMP%] .pepperi-button[_ngcontent-%COMP%]{width:100%}.pepperi-quantity-selector-container[_ngcontent-%COMP%] .pepperi-button.qs-action[_ngcontent-%COMP%]{height:2rem!important;line-height:2rem;min-width:2rem;width:2rem!important}.pepperi-quantity-selector-container[_ngcontent-%COMP%] .pepperi-button.qs-action[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{height:inherit;width:inherit}.pepperi-quantity-selector-container[_ngcontent-%COMP%] .qs-error[_ngcontent-%COMP%]{display:block}.pepperi-quantity-selector-container.matrix-qs[_ngcontent-%COMP%] .additional-value[_ngcontent-%COMP%]{align-self:flex-start;display:flex;height:1.25rem;justify-content:flex-end;top:calc(var(--pep-spacing-xs, .25rem)*-1);transform:unset!important}.pepperi-quantity-selector-container.matrix-qs[_ngcontent-%COMP%] .additional-value.prefix[_ngcontent-%COMP%]{left:calc(var(--pep-spacing-sm, .5rem)*-1)!important}.pepperi-quantity-selector-container.matrix-qs[_ngcontent-%COMP%] .additional-value.suffix[_ngcontent-%COMP%]{right:calc(var(--pep-spacing-sm, .5rem)*-1)!important}.pepperi-quantity-selector-container.matrix-qs[_ngcontent-%COMP%] .additional-value[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{-ms-text-overflow:ellipsis;border-radius:.625rem;max-width:inherit;min-width:1.5rem;overflow:hidden;padding:0 .5rem;text-overflow:ellipsis;white-space:nowrap;width:-webkit-fit-content!important;width:-moz-fit-content!important;width:fit-content!important;z-index:99}.pepperi-quantity-selector-container.matrix-qs[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{min-width:.5rem;padding:0 .25rem}.pepperi-quantity-selector-container.pepperi-table-quantity-selector[_ngcontent-%COMP%] .pepperi-button[_ngcontent-%COMP%]:not(.qs-action){height:2rem;line-height:2rem}.pepperi-quantity-selector-container.pepperi-table-quantity-selector[_ngcontent-%COMP%] .pepperi-button.qs-action[_ngcontent-%COMP%]{height:1.5rem!important;line-height:1.5rem;min-width:1.5rem;width:1.5rem!important}"], data: { animation: [ trigger('showHide', [ state('show', style({ opacity: 1, transform: 'scale(1)', })), state('hide', style({ opacity: 0, transform: 'scale(0)', })), transition('show => hide', animate('250ms ease-out')), transition('hide => show', animate('250ms ease-in')), ]), ] }, changeDetection: 0 }); /*@__PURE__*/ (function () { i0.ɵsetClassMetadata(PepperiQuantitySelectorComponent, [{ type: Component, args: [{ selector: 'pep-quantity-selector', templateUrl: './quantity-selector.component.html', styleUrls: ['./quantity-selector.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, animations: [ trigger('showHide', [ state('show', style({ opacity: 1, transform: 'scale(1)', })), state('hide', style({ opacity: 0, transform: 'scale(0)', })), transition('show => hide', animate('250ms ease-out')), transition('hide => show', animate('250ms ease-in')), ]), ], }] }], function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.CustomizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, { key: [{ type: Input }], value: [{ type: Input }], formattedValue: [{ type: Input }], label: [{ type: Input }], type: [{ type: Input }], required: [{ type: Input }], disabled: [{ type: Input }], readonly: [{ type: Input }], textColor: [{ type: Input }], xAlignment: [{ type: Input }], rowSpan: [{ type: Input }], lastFocusField: [{ type: Input }], alowDecimal: [{ type: Input }], additionalValue: [{ type: Input }], notificationInfo: [{ type: Input }], form: [{ type: Input }], showTitle: [{ type: Input }], layoutType: [{ type: Input }], isActive: [{ type: Input }], valueChanged: [{ type: Output }], elementClicked: [{ type: Output }], QSCont: [{ type: ViewChild, args: ['QSCont'] }], QSInput: [{ type: ViewChild, args: ['QSInput'] }] }); })(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVhbnRpdHktc2VsZWN0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvcGVwcGVyaS1saWIvcXVhbnRpdHktc2VsZWN0b3IvcXVhbnRpdHktc2VsZWN0b3IuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vcHJvamVjdHMvcGVwcGVyaS1saWIvcXVhbnRpdHktc2VsZWN0b3IvcXVhbnRpdHktc2VsZWN0b3IuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNILFNBQVMsRUFJVCxLQUFLLEVBQ0wsTUFBTSxFQUNOLFlBQVksRUFDWixTQUFTLEVBR1QsdUJBQXVCLEdBRzFCLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxPQUFPLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDakYsT0FBTyxFQUFFLFdBQVcsRUFBRSxVQUFVLEVBQ