@pepperi-addons/ngx-lib 0.4.0-angular14.8 → 0.4.0-angular14.9
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.
- package/esm2020/form/form.module.mjs +8 -3
- package/esm2020/form/internal-carusel.component.mjs +11 -13
- package/esm2020/form/internal-page.component.mjs +15 -18
- package/esm2020/link/link.component.mjs +10 -11
- package/esm2020/ngx-lib.module.mjs +4 -2
- package/esm2020/plugin/plugin-proxy.component.mjs +3 -1
- package/esm2020/query-builder/common/services/query-structure.service.mjs +12 -10
- package/esm2020/query-builder/query-builder.module.mjs +8 -3
- package/esm2020/smart-filters/common/model/base-filter-component.mjs +1 -1
- package/esm2020/smart-filters/smart-filters.module.mjs +8 -3
- package/esm2020/textbox/textbox.component.mjs +9 -10
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs +31 -29
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs +8 -9
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-plugin.mjs +2 -0
- package/fesm2015/pepperi-addons-ngx-lib-plugin.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +15 -8
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +10 -11
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.mjs +3 -1
- package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs +31 -29
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs +8 -9
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-plugin.mjs +2 -0
- package/fesm2020/pepperi-addons-ngx-lib-plugin.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +15 -8
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +7 -2
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +10 -11
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib.mjs +3 -1
- package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/form/internal-carusel.component.d.ts +1 -3
- package/form/internal-page.component.d.ts +2 -4
- package/link/link.component.d.ts +2 -3
- package/package.json +1 -1
- package/query-builder/common/services/query-structure.service.d.ts +3 -4
- package/textbox/textbox.component.d.ts +2 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Pipe, EventEmitter, Component, ChangeDetectionStrategy, HostBinding, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i4 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i5 from '@angular/forms';
|
|
6
6
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import { MatCommonModule } from '@angular/material/core';
|
|
8
8
|
import * as i6 from '@angular/material/button';
|
|
@@ -13,7 +13,7 @@ import * as i8 from '@angular/material/input';
|
|
|
13
13
|
import { MatInputModule } from '@angular/material/input';
|
|
14
14
|
import * as i9 from '@angular/material/icon';
|
|
15
15
|
import { MatIconModule } from '@angular/material/icon';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i1 from '@pepperi-addons/ngx-lib';
|
|
17
17
|
import { DEFAULT_HORIZONTAL_ALIGNMENT, PepTextboxField, PepCustomizationService, PepNgxLibModule } from '@pepperi-addons/ngx-lib';
|
|
18
18
|
import * as i1$1 from '@pepperi-addons/ngx-lib/icon';
|
|
19
19
|
import { pepIconSystemEdit, PepIconModule } from '@pepperi-addons/ngx-lib/icon';
|
|
@@ -21,7 +21,7 @@ import * as i12 from '@pepperi-addons/ngx-lib/textbox-icon';
|
|
|
21
21
|
import { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';
|
|
22
22
|
import * as i11 from '@pepperi-addons/ngx-lib/field-title';
|
|
23
23
|
import { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';
|
|
24
|
-
import * as
|
|
24
|
+
import * as i2 from '@ngx-translate/core';
|
|
25
25
|
|
|
26
26
|
class IsUrlPipe {
|
|
27
27
|
transform(value) {
|
|
@@ -49,8 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
49
49
|
* @implements {OnDestroy}
|
|
50
50
|
*/
|
|
51
51
|
class PepLinkComponent {
|
|
52
|
-
constructor(
|
|
53
|
-
this.fb = fb;
|
|
52
|
+
constructor(customizationService, renderer, element, translate, utilitiesService, isUrlPipe) {
|
|
54
53
|
this.customizationService = customizationService;
|
|
55
54
|
this.renderer = renderer;
|
|
56
55
|
this.element = element;
|
|
@@ -305,12 +304,12 @@ class PepLinkComponent {
|
|
|
305
304
|
}, 0);
|
|
306
305
|
}
|
|
307
306
|
}
|
|
308
|
-
PepLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLinkComponent, deps: [{ token: i1.
|
|
309
|
-
PepLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepLinkComponent, selector: "pep-link", inputs: { key: "key", value: "value", formattedValue: "formattedValue", label: "label", placeholder: "placeholder", mandatory: "mandatory", disabled: "disabled", readonly: "readonly", maxFieldCharacters: "maxFieldCharacters", textColor: "textColor", xAlignment: "xAlignment", rowSpan: "rowSpan", visible: "visible", form: "form", isActive: "isActive", showTitle: "showTitle", renderTitle: "renderTitle", renderError: "renderError", renderSymbol: "renderSymbol", layoutType: "layoutType" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", elementClick: "elementClick" }, host: { properties: { "attr.data-qa": "this.dataQa" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\" let-hasParent=\"hasParent\">\n <pep-field-title *ngIf=\"renderTitle && isFormView && !hasParent\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [maxFieldCharacters]=\"maxFieldCharacters\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\" [inputLength]=\"value.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\">\n <input #input pepTextboxValidation [id]=\"key\" [name]=\"key\" class=\" body-sm \" matInput autocomplete=\"off\"\n maxlength=\"{{ maxFieldCharacters > 0 ? maxFieldCharacters : 99999 }}\"\n [placeholder]=\"hasParent && !disabled ? placeholder : ''\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'center' ? 'center' : xAlignment == 'right' ? 'right' : 'left' }\"\n title=\"{{ formattedValue }}\" [formControlName]=\"key\" [type]=\"type\" [value]=\"displayValue\"\n (keyup.enter)=\"$event?.currentTarget?.blur()\" (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\"\n (change)=\"onChange($event)\" [ngClass]=\"{'disable-hidden': disabled && formattedValue?.length > 0}\" />\n\n <span *ngIf=\"disabled && formattedValue?.length > 0\" class=\"dis-grid\">\n <a href=\"javascript:void(0)\" (click)=\"anchorClicked()\" [id]=\"key\" [name]=\"key\"\n class=\"color-link body-sm \">\n {{formattedValue}}</a>\n </span>\n <mat-error *ngIf=\"renderError\">\n <ng-container *ngIf=\"mandatory && input.value.length == 0 then requiredError else otherError\">\n </ng-container>\n <ng-template #requiredError>\n <span class=\"body-xs\" [title]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\"\n [innerText]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\">\n </span>\n </ng-template>\n <ng-template #otherError>\n <!-- TODO: Show error if it's not a valid link -->\n <!-- <span class=\"body-xs\" [title]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\" [innerText]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\">\n </span> -->\n </ng-template>\n </mat-error>\n\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && xAlignment == 'right'\" matPrefix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && (xAlignment == 'left')\" matSuffix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n </mat-form-field>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true, hasParent: false }\">\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\" [ngStyle]=\"{ color: textColor }\"\n [class]=\"'text-align-' + xAlignment\" [ngClass]=\"{'one-row': rowSpan === 1,\n 'multi-rows': rowSpan > 1,\n 'pep-button weak': isActive && !disabled}\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }} </span>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm value\"\n [ngClass]=\"{'multi-rows-text': rowSpan > 1}\" [ngStyle]=\"{ '-webkit-line-clamp': rowSpan }\">{{\n formattedValue }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a *ngIf=\"formattedValue != null && (value ? value : formattedValue) | isUrl\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n target=\"_blank\" href=\"{{ value ? value : formattedValue }}\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n <a *ngIf=\"formattedValue != null && !((value ? value : formattedValue) | isUrl)\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n href=\"javascript:void(0)\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n </ng-template>\n <ng-template #emptyBlock>\n <span [id]=\"key\"> </span>\n </ng-template>\n </ng-template>\n </ng-container>\n\n</ng-container>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center;align-items:baseline}.disable-hidden{display:none}.dis-grid{display:grid}.multi-rows-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal!important}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i7.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1$1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i11.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength"] }, { kind: "component", type: i12.PepTextboxIconComponent, selector: "pep-textbox-icon", inputs: ["value", "label", "type", "disabled"], outputs: ["iconClick"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: IsUrlPipe, name: "isUrl" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
307
|
+
PepLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLinkComponent, deps: [{ token: i1.PepCustomizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i2.TranslateService }, { token: i1.PepUtilitiesService }, { token: IsUrlPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
308
|
+
PepLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepLinkComponent, selector: "pep-link", inputs: { key: "key", value: "value", formattedValue: "formattedValue", label: "label", placeholder: "placeholder", mandatory: "mandatory", disabled: "disabled", readonly: "readonly", maxFieldCharacters: "maxFieldCharacters", textColor: "textColor", xAlignment: "xAlignment", rowSpan: "rowSpan", visible: "visible", form: "form", isActive: "isActive", showTitle: "showTitle", renderTitle: "renderTitle", renderError: "renderError", renderSymbol: "renderSymbol", layoutType: "layoutType" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", elementClick: "elementClick" }, host: { properties: { "attr.data-qa": "this.dataQa" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\" let-hasParent=\"hasParent\">\n <pep-field-title *ngIf=\"renderTitle && isFormView && !hasParent\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [maxFieldCharacters]=\"maxFieldCharacters\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\" [inputLength]=\"value.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\">\n <input #input pepTextboxValidation [id]=\"key\" [name]=\"key\" class=\" body-sm \" matInput autocomplete=\"off\"\n maxlength=\"{{ maxFieldCharacters > 0 ? maxFieldCharacters : 99999 }}\"\n [placeholder]=\"hasParent && !disabled ? placeholder : ''\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'center' ? 'center' : xAlignment == 'right' ? 'right' : 'left' }\"\n title=\"{{ formattedValue }}\" [formControlName]=\"key\" [type]=\"type\" [value]=\"displayValue\"\n (keyup.enter)=\"$event?.currentTarget?.blur()\" (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\"\n (change)=\"onChange($event)\" [ngClass]=\"{'disable-hidden': disabled && formattedValue?.length > 0}\" />\n\n <span *ngIf=\"disabled && formattedValue?.length > 0\" class=\"dis-grid\">\n <a href=\"javascript:void(0)\" (click)=\"anchorClicked()\" [id]=\"key\" [name]=\"key\"\n class=\"color-link body-sm \">\n {{formattedValue}}</a>\n </span>\n <mat-error *ngIf=\"renderError\">\n <ng-container *ngIf=\"mandatory && input.value.length == 0 then requiredError else otherError\">\n </ng-container>\n <ng-template #requiredError>\n <span class=\"body-xs\" [title]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\"\n [innerText]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\">\n </span>\n </ng-template>\n <ng-template #otherError>\n <!-- TODO: Show error if it's not a valid link -->\n <!-- <span class=\"body-xs\" [title]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\" [innerText]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\">\n </span> -->\n </ng-template>\n </mat-error>\n\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && xAlignment == 'right'\" matPrefix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && (xAlignment == 'left')\" matSuffix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n </mat-form-field>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true, hasParent: false }\">\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\" [ngStyle]=\"{ color: textColor }\"\n [class]=\"'text-align-' + xAlignment\" [ngClass]=\"{'one-row': rowSpan === 1,\n 'multi-rows': rowSpan > 1,\n 'pep-button weak': isActive && !disabled}\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }} </span>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm value\"\n [ngClass]=\"{'multi-rows-text': rowSpan > 1}\" [ngStyle]=\"{ '-webkit-line-clamp': rowSpan }\">{{\n formattedValue }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a *ngIf=\"formattedValue != null && (value ? value : formattedValue) | isUrl\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n target=\"_blank\" href=\"{{ value ? value : formattedValue }}\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n <a *ngIf=\"formattedValue != null && !((value ? value : formattedValue) | isUrl)\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n href=\"javascript:void(0)\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n </ng-template>\n <ng-template #emptyBlock>\n <span [id]=\"key\"> </span>\n </ng-template>\n </ng-template>\n </ng-container>\n\n</ng-container>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center;align-items:baseline}.disable-hidden{display:none}.dis-grid{display:grid}.multi-rows-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal!important}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i7.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1$1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i11.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength"] }, { kind: "component", type: i12.PepTextboxIconComponent, selector: "pep-textbox-icon", inputs: ["value", "label", "type", "disabled"], outputs: ["iconClick"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "pipe", type: IsUrlPipe, name: "isUrl" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
310
309
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLinkComponent, decorators: [{
|
|
311
310
|
type: Component,
|
|
312
311
|
args: [{ selector: 'pep-link', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\" let-hasParent=\"hasParent\">\n <pep-field-title *ngIf=\"renderTitle && isFormView && !hasParent\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [maxFieldCharacters]=\"maxFieldCharacters\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\" [inputLength]=\"value.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\">\n <input #input pepTextboxValidation [id]=\"key\" [name]=\"key\" class=\" body-sm \" matInput autocomplete=\"off\"\n maxlength=\"{{ maxFieldCharacters > 0 ? maxFieldCharacters : 99999 }}\"\n [placeholder]=\"hasParent && !disabled ? placeholder : ''\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'center' ? 'center' : xAlignment == 'right' ? 'right' : 'left' }\"\n title=\"{{ formattedValue }}\" [formControlName]=\"key\" [type]=\"type\" [value]=\"displayValue\"\n (keyup.enter)=\"$event?.currentTarget?.blur()\" (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\"\n (change)=\"onChange($event)\" [ngClass]=\"{'disable-hidden': disabled && formattedValue?.length > 0}\" />\n\n <span *ngIf=\"disabled && formattedValue?.length > 0\" class=\"dis-grid\">\n <a href=\"javascript:void(0)\" (click)=\"anchorClicked()\" [id]=\"key\" [name]=\"key\"\n class=\"color-link body-sm \">\n {{formattedValue}}</a>\n </span>\n <mat-error *ngIf=\"renderError\">\n <ng-container *ngIf=\"mandatory && input.value.length == 0 then requiredError else otherError\">\n </ng-container>\n <ng-template #requiredError>\n <span class=\"body-xs\" [title]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\"\n [innerText]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\">\n </span>\n </ng-template>\n <ng-template #otherError>\n <!-- TODO: Show error if it's not a valid link -->\n <!-- <span class=\"body-xs\" [title]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\" [innerText]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\">\n </span> -->\n </ng-template>\n </mat-error>\n\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && xAlignment == 'right'\" matPrefix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && (xAlignment == 'left')\" matSuffix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n </mat-form-field>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true, hasParent: false }\">\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\" [ngStyle]=\"{ color: textColor }\"\n [class]=\"'text-align-' + xAlignment\" [ngClass]=\"{'one-row': rowSpan === 1,\n 'multi-rows': rowSpan > 1,\n 'pep-button weak': isActive && !disabled}\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }} </span>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm value\"\n [ngClass]=\"{'multi-rows-text': rowSpan > 1}\" [ngStyle]=\"{ '-webkit-line-clamp': rowSpan }\">{{\n formattedValue }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a *ngIf=\"formattedValue != null && (value ? value : formattedValue) | isUrl\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n target=\"_blank\" href=\"{{ value ? value : formattedValue }}\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n <a *ngIf=\"formattedValue != null && !((value ? value : formattedValue) | isUrl)\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n href=\"javascript:void(0)\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n </ng-template>\n <ng-template #emptyBlock>\n <span [id]=\"key\"> </span>\n </ng-template>\n </ng-template>\n </ng-container>\n\n</ng-container>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center;align-items:baseline}.disable-hidden{display:none}.dis-grid{display:grid}.multi-rows-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal!important}\n"] }]
|
|
313
|
-
}], ctorParameters: function () { return [{ type: i1.
|
|
312
|
+
}], ctorParameters: function () { return [{ type: i1.PepCustomizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i2.TranslateService }, { type: i1.PepUtilitiesService }, { type: IsUrlPipe }]; }, propDecorators: { dataQa: [{
|
|
314
313
|
type: HostBinding,
|
|
315
314
|
args: ['attr.data-qa']
|
|
316
315
|
}], key: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-link.mjs","sources":["../../../projects/ngx-lib/link/link.pipes.ts","../../../projects/ngx-lib/link/link.component.ts","../../../projects/ngx-lib/link/link.component.html","../../../projects/ngx-lib/link/link.module.ts","../../../projects/ngx-lib/link/public-api.ts","../../../projects/ngx-lib/link/pepperi-addons-ngx-lib-link.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'isUrl'\n})\nexport class IsUrlPipe implements PipeTransform {\n transform(value: string): boolean {\n //const regex = /^(((http(s?)|ftp)\\:\\/\\/)|(www\\.))[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)(.*)/;\n const regex = /^(((http(s?)|ftp)\\:\\/\\/)|(www\\.))/;\n return regex.test(value);\n }\n}","import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n ViewChild,\n Renderer2,\n OnDestroy,\n ChangeDetectorRef,\n HostBinding,\n} from '@angular/core';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepTextboxFieldType,\n PepTextboxField,\n PepFieldBase,\n PepUtilitiesService,\n IPepFieldClickEvent,\n} from '@pepperi-addons/ngx-lib';\nimport { IsUrlPipe } from './link.pipes';\n\n/**\n * This is a text box input component that can be use to\n *\n * @export\n * @class PepTextboxComponent\n * @implements {OnChanges}\n * @implements {OnInit}\n * @implements {OnDestroy}\n */\n@Component({\n selector: 'pep-link',\n templateUrl: './link.component.html',\n styleUrls: ['./link.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepLinkComponent implements OnChanges, OnInit, OnDestroy {\n\n @HostBinding('attr.data-qa') dataQa = '';\n\n private _key = '';\n /**\n * The text box key\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set key(value) {\n this._key = value;\n this.dataQa = value;\n }\n get key(): string {\n return this._key;\n }\n\n private _value = '';\n /**\n * The value of the text box.\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set value(value: string) {\n if (!value) {\n value = '';\n }\n\n this._value = value;\n\n if (this._calculateFormattedValue) {\n this.setFormattedValue(value);\n }\n }\n get value(): string {\n return this._value;\n }\n\n private _formattedValue = null;\n /**\n * The formatted value.\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set formattedValue(value: string) {\n // Do nothing.\n // if (!value) {\n // value = '';\n // }\n\n // if (this._calculateFormattedValue) {\n // this._calculateFormattedValue = false;\n // }\n\n // this.setFormattedValue(value);\n }\n get formattedValue(): string {\n return this._formattedValue;\n }\n\n /**\n * The title of the textbox.\n *\n * @memberof PepTextboxComponent\n */\n @Input() label = '';\n\n /**\n * The placeholder (relevant only for children - if parent isn't null).\n *\n * @memberof PepTextboxComponent\n */\n @Input() placeholder = '';\n\n /**\n * The type of the textbox.\n *\n * @type {PepTextboxFieldType}\n * @memberof PepTextboxComponent\n */\n type: PepTextboxFieldType = 'link';\n\n /**\n * If the textbox is mandatory\n *\n * @memberof PepTextboxComponent\n */\n @Input() mandatory = false;\n\n // TODO: Check if should remove disabled and keep only readonly.\n /**\n * If the textbox is disabled.\n *\n * @memberof PepTextboxComponent\n */\n @Input() disabled = false;\n\n /**\n * If the textbox is readonly\n *\n * @memberof PepTextboxComponent\n */\n @Input() readonly = false;\n @Input() maxFieldCharacters: number;\n @Input() textColor = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n // @Input() lastFocusField: any;\n \n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() renderError = true;\n @Input() renderSymbol = true;\n @Input() layoutType: PepLayoutType = 'form';\n \n /**\n * The value change event.\n *\n * @type {EventEmitter<string>}\n * @memberof PepTextboxComponent\n */\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @Output()\n elementClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();\n\n @ViewChild('input') input: ElementRef;\n\n private _calculateFormattedValue = true;\n get calculateFormattedValue(): boolean {\n return this._calculateFormattedValue;\n }\n\n controlType = 'link';\n\n standAlone = false;\n isInEditMode = false;\n isInFocus: boolean;\n isUrl = false;\n\n constructor(\n public fb: FormBuilder,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef,\n private translate: TranslateService,\n private utilitiesService: PepUtilitiesService,\n private isUrlPipe: IsUrlPipe\n ) {\n this.isInFocus = false;\n }\n\n private setFormattedValue(value: string) {\n if (this._calculateFormattedValue) {\n this._formattedValue = value;\n } else {\n this._formattedValue = value;\n }\n\n this.updateFormFieldValue();\n }\n\n private updateFormFieldValue() {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.formattedValue\n );\n }\n\n get displayValue(): string {\n const res = this.formattedValue;\n\n return res;\n }\n\n private setDefaultForm(): void {\n const pepField = new PepTextboxField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n maxFieldCharacters: this.maxFieldCharacters,\n type: this.type,\n });\n this.form = this.customizationService.getDefaultFromGroup(\n pepField,\n this.renderError\n );\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n\n this.updateFormFieldValue();\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n onFocus(event: any): void {\n this.isInFocus = true;\n\n // select the value in focus (DI-18246 improvement)\n setTimeout(() => {\n const eventTarget = event.target || event.srcElement;\n if (eventTarget) {\n eventTarget.select();\n }\n }, 0);\n }\n\n isValueValid(value: string): boolean {\n // TODO: Maybe need to check other types.\n const res = true;\n\n return res;\n }\n\n onChange(e: any): void {\n const value = e.target ? e.target.value : e;\n\n this.valueChange.emit(value);\n }\n\n onBlur(e: any): void {\n this.isInFocus = false;\n const value = e.target ? e.target.value : e;\n if (value !== this.value) {\n // If renderError is false and the new value is not valid.\n if (!this.renderError && !this.isValueValid(value)) {\n this.renderer.setProperty(\n this.input.nativeElement,\n 'value',\n this.value\n );\n } else {\n this.value = value;\n\n // If the user is setting the formatted value then set the value till the user format it and return it back.\n if (!this._calculateFormattedValue) {\n this._formattedValue = value;\n }\n\n this.valueChange.emit(value);\n }\n }\n\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }\n\n onClick() {\n const output: IPepFieldClickEvent = {\n key: this.key,\n value: this.value,\n controlType: this.controlType\n }\n this.elementClick.emit(output);\n }\n\n anchorClicked(): void {\n const currentValue = this.value;\n if (currentValue.trim().length > 0) {\n const output: IPepFieldClickEvent = {\n key: this.key,\n value: this.value,\n controlType: this.controlType\n }\n this.elementClick.emit(output);\n if (this.isUrlPipe.transform(currentValue)) {\n window.open(currentValue);\n }\n }\n }\n\n cardTemplateClicked(event: any): void {\n this.isInEditMode = true;\n\n setTimeout(() => {\n this.input.nativeElement.focus();\n }, 0);\n }\n}\n","<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\" let-hasParent=\"hasParent\">\n <pep-field-title *ngIf=\"renderTitle && isFormView && !hasParent\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [maxFieldCharacters]=\"maxFieldCharacters\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\" [inputLength]=\"value.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\">\n <input #input pepTextboxValidation [id]=\"key\" [name]=\"key\" class=\" body-sm \" matInput autocomplete=\"off\"\n maxlength=\"{{ maxFieldCharacters > 0 ? maxFieldCharacters : 99999 }}\"\n [placeholder]=\"hasParent && !disabled ? placeholder : ''\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'center' ? 'center' : xAlignment == 'right' ? 'right' : 'left' }\"\n title=\"{{ formattedValue }}\" [formControlName]=\"key\" [type]=\"type\" [value]=\"displayValue\"\n (keyup.enter)=\"$event?.currentTarget?.blur()\" (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\"\n (change)=\"onChange($event)\" [ngClass]=\"{'disable-hidden': disabled && formattedValue?.length > 0}\" />\n\n <span *ngIf=\"disabled && formattedValue?.length > 0\" class=\"dis-grid\">\n <a href=\"javascript:void(0)\" (click)=\"anchorClicked()\" [id]=\"key\" [name]=\"key\"\n class=\"color-link body-sm \">\n {{formattedValue}}</a>\n </span>\n <mat-error *ngIf=\"renderError\">\n <ng-container *ngIf=\"mandatory && input.value.length == 0 then requiredError else otherError\">\n </ng-container>\n <ng-template #requiredError>\n <span class=\"body-xs\" [title]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\"\n [innerText]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\">\n </span>\n </ng-template>\n <ng-template #otherError>\n <!-- TODO: Show error if it's not a valid link -->\n <!-- <span class=\"body-xs\" [title]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\" [innerText]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\">\n </span> -->\n </ng-template>\n </mat-error>\n\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && xAlignment == 'right'\" matPrefix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && (xAlignment == 'left')\" matSuffix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n </mat-form-field>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true, hasParent: false }\">\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\" [ngStyle]=\"{ color: textColor }\"\n [class]=\"'text-align-' + xAlignment\" [ngClass]=\"{'one-row': rowSpan === 1,\n 'multi-rows': rowSpan > 1,\n 'pep-button weak': isActive && !disabled}\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }} </span>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm value\"\n [ngClass]=\"{'multi-rows-text': rowSpan > 1}\" [ngStyle]=\"{ '-webkit-line-clamp': rowSpan }\">{{\n formattedValue }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a *ngIf=\"formattedValue != null && (value ? value : formattedValue) | isUrl\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n target=\"_blank\" href=\"{{ value ? value : formattedValue }}\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n <a *ngIf=\"formattedValue != null && !((value ? value : formattedValue) | isUrl)\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n href=\"javascript:void(0)\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n </ng-template>\n <ng-template #emptyBlock>\n <span [id]=\"key\"> </span>\n </ng-template>\n </ng-template>\n </ng-container>\n\n</ng-container>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepLinkComponent } from './link.component';\n//import { PepTextboxValidationDirective } from './textbox-validation.directive';\n\nimport { IsUrlPipe } from './link.pipes';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n ],\n exports: [PepLinkComponent],\n declarations: [\n PepLinkComponent,\n // PepTextboxValidationDirective,\n IsUrlPipe\n ],\n providers: [IsUrlPipe]\n})\nexport class PepLinkModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemEdit]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/link\n */\nexport * from './link.module';\nexport * from './link.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i4.IsUrlPipe","i10","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAKa,SAAS,CAAA;AAClB,IAAA,SAAS,CAAC,KAAa,EAAA;;QAEnB,MAAM,KAAK,GAAG,mCAAmC,CAAC;AAClD,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5B;;sGALQ,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAA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Y;QACZ,mBAAmB;;QAEnB,eAAe;QACf,eAAe;QACf,kBAAkB;QAClB,cAAc;QACd,aAAa;;QAEb,eAAe;QACf,aAAa;QACb,mBAAmB;QACnB,oBAAoB,aAEd,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAQjB,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAFX,SAAA,EAAA,CAAC,SAAS,CAAC,YApBlB,YAAY;QACZ,mBAAmB;;QAEnB,eAAe;QACf,eAAe;QACf,kBAAkB;QAClB,cAAc;QACd,aAAa;;QAEb,eAAe;QACf,aAAa;QACb,mBAAmB;QACnB,oBAAoB,CAAA,EAAA,CAAA,CAAA;2FAUf,aAAa,EAAA,UAAA,EAAA,CAAA;kBAxBzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,mBAAmB;;wBAEnB,eAAe;wBACf,eAAe;wBACf,kBAAkB;wBAClB,cAAc;wBACd,aAAa;;wBAEb,eAAe;wBACf,aAAa;wBACb,mBAAmB;wBACnB,oBAAoB;AACvB,qBAAA;oBACD,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,YAAY,EAAE;wBACV,gBAAgB;;wBAEhB,SAAS;AACZ,qBAAA;oBACD,SAAS,EAAE,CAAC,SAAS,CAAC;iBACzB,CAAA;;;AC/CD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-link.mjs","sources":["../../../projects/ngx-lib/link/link.pipes.ts","../../../projects/ngx-lib/link/link.component.ts","../../../projects/ngx-lib/link/link.component.html","../../../projects/ngx-lib/link/link.module.ts","../../../projects/ngx-lib/link/public-api.ts","../../../projects/ngx-lib/link/pepperi-addons-ngx-lib-link.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'isUrl'\n})\nexport class IsUrlPipe implements PipeTransform {\n transform(value: string): boolean {\n //const regex = /^(((http(s?)|ftp)\\:\\/\\/)|(www\\.))[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)(.*)/;\n const regex = /^(((http(s?)|ftp)\\:\\/\\/)|(www\\.))/;\n return regex.test(value);\n }\n}","import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n ViewChild,\n Renderer2,\n OnDestroy,\n ChangeDetectorRef,\n HostBinding,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepTextboxFieldType,\n PepTextboxField,\n PepFieldBase,\n PepUtilitiesService,\n IPepFieldClickEvent,\n} from '@pepperi-addons/ngx-lib';\nimport { IsUrlPipe } from './link.pipes';\n\n/**\n * This is a text box input component that can be use to\n *\n * @export\n * @class PepTextboxComponent\n * @implements {OnChanges}\n * @implements {OnInit}\n * @implements {OnDestroy}\n */\n@Component({\n selector: 'pep-link',\n templateUrl: './link.component.html',\n styleUrls: ['./link.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepLinkComponent implements OnChanges, OnInit, OnDestroy {\n\n @HostBinding('attr.data-qa') dataQa = '';\n\n private _key = '';\n /**\n * The text box key\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set key(value) {\n this._key = value;\n this.dataQa = value;\n }\n get key(): string {\n return this._key;\n }\n\n private _value = '';\n /**\n * The value of the text box.\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set value(value: string) {\n if (!value) {\n value = '';\n }\n\n this._value = value;\n\n if (this._calculateFormattedValue) {\n this.setFormattedValue(value);\n }\n }\n get value(): string {\n return this._value;\n }\n\n private _formattedValue = null;\n /**\n * The formatted value.\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set formattedValue(value: string) {\n // Do nothing.\n // if (!value) {\n // value = '';\n // }\n\n // if (this._calculateFormattedValue) {\n // this._calculateFormattedValue = false;\n // }\n\n // this.setFormattedValue(value);\n }\n get formattedValue(): string {\n return this._formattedValue;\n }\n\n /**\n * The title of the textbox.\n *\n * @memberof PepTextboxComponent\n */\n @Input() label = '';\n\n /**\n * The placeholder (relevant only for children - if parent isn't null).\n *\n * @memberof PepTextboxComponent\n */\n @Input() placeholder = '';\n\n /**\n * The type of the textbox.\n *\n * @type {PepTextboxFieldType}\n * @memberof PepTextboxComponent\n */\n type: PepTextboxFieldType = 'link';\n\n /**\n * If the textbox is mandatory\n *\n * @memberof PepTextboxComponent\n */\n @Input() mandatory = false;\n\n // TODO: Check if should remove disabled and keep only readonly.\n /**\n * If the textbox is disabled.\n *\n * @memberof PepTextboxComponent\n */\n @Input() disabled = false;\n\n /**\n * If the textbox is readonly\n *\n * @memberof PepTextboxComponent\n */\n @Input() readonly = false;\n @Input() maxFieldCharacters: number;\n @Input() textColor = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n // @Input() lastFocusField: any;\n \n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() renderError = true;\n @Input() renderSymbol = true;\n @Input() layoutType: PepLayoutType = 'form';\n \n /**\n * The value change event.\n *\n * @type {EventEmitter<string>}\n * @memberof PepTextboxComponent\n */\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @Output()\n elementClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();\n\n @ViewChild('input') input: ElementRef;\n\n private _calculateFormattedValue = true;\n get calculateFormattedValue(): boolean {\n return this._calculateFormattedValue;\n }\n\n controlType = 'link';\n\n standAlone = false;\n isInEditMode = false;\n isInFocus: boolean;\n isUrl = false;\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef,\n private translate: TranslateService,\n private utilitiesService: PepUtilitiesService,\n private isUrlPipe: IsUrlPipe\n ) {\n this.isInFocus = false;\n }\n\n private setFormattedValue(value: string) {\n if (this._calculateFormattedValue) {\n this._formattedValue = value;\n } else {\n this._formattedValue = value;\n }\n\n this.updateFormFieldValue();\n }\n\n private updateFormFieldValue() {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.formattedValue\n );\n }\n\n get displayValue(): string {\n const res = this.formattedValue;\n\n return res;\n }\n\n private setDefaultForm(): void {\n const pepField = new PepTextboxField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n maxFieldCharacters: this.maxFieldCharacters,\n type: this.type,\n });\n this.form = this.customizationService.getDefaultFromGroup(\n pepField,\n this.renderError\n );\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n\n this.updateFormFieldValue();\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n onFocus(event: any): void {\n this.isInFocus = true;\n\n // select the value in focus (DI-18246 improvement)\n setTimeout(() => {\n const eventTarget = event.target || event.srcElement;\n if (eventTarget) {\n eventTarget.select();\n }\n }, 0);\n }\n\n isValueValid(value: string): boolean {\n // TODO: Maybe need to check other types.\n const res = true;\n\n return res;\n }\n\n onChange(e: any): void {\n const value = e.target ? e.target.value : e;\n\n this.valueChange.emit(value);\n }\n\n onBlur(e: any): void {\n this.isInFocus = false;\n const value = e.target ? e.target.value : e;\n if (value !== this.value) {\n // If renderError is false and the new value is not valid.\n if (!this.renderError && !this.isValueValid(value)) {\n this.renderer.setProperty(\n this.input.nativeElement,\n 'value',\n this.value\n );\n } else {\n this.value = value;\n\n // If the user is setting the formatted value then set the value till the user format it and return it back.\n if (!this._calculateFormattedValue) {\n this._formattedValue = value;\n }\n\n this.valueChange.emit(value);\n }\n }\n\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }\n\n onClick() {\n const output: IPepFieldClickEvent = {\n key: this.key,\n value: this.value,\n controlType: this.controlType\n }\n this.elementClick.emit(output);\n }\n\n anchorClicked(): void {\n const currentValue = this.value;\n if (currentValue.trim().length > 0) {\n const output: IPepFieldClickEvent = {\n key: this.key,\n value: this.value,\n controlType: this.controlType\n }\n this.elementClick.emit(output);\n if (this.isUrlPipe.transform(currentValue)) {\n window.open(currentValue);\n }\n }\n }\n\n cardTemplateClicked(event: any): void {\n this.isInEditMode = true;\n\n setTimeout(() => {\n this.input.nativeElement.focus();\n }, 0);\n }\n}\n","<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\" let-hasParent=\"hasParent\">\n <pep-field-title *ngIf=\"renderTitle && isFormView && !hasParent\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [maxFieldCharacters]=\"maxFieldCharacters\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\" [inputLength]=\"value.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\">\n <input #input pepTextboxValidation [id]=\"key\" [name]=\"key\" class=\" body-sm \" matInput autocomplete=\"off\"\n maxlength=\"{{ maxFieldCharacters > 0 ? maxFieldCharacters : 99999 }}\"\n [placeholder]=\"hasParent && !disabled ? placeholder : ''\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'center' ? 'center' : xAlignment == 'right' ? 'right' : 'left' }\"\n title=\"{{ formattedValue }}\" [formControlName]=\"key\" [type]=\"type\" [value]=\"displayValue\"\n (keyup.enter)=\"$event?.currentTarget?.blur()\" (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\"\n (change)=\"onChange($event)\" [ngClass]=\"{'disable-hidden': disabled && formattedValue?.length > 0}\" />\n\n <span *ngIf=\"disabled && formattedValue?.length > 0\" class=\"dis-grid\">\n <a href=\"javascript:void(0)\" (click)=\"anchorClicked()\" [id]=\"key\" [name]=\"key\"\n class=\"color-link body-sm \">\n {{formattedValue}}</a>\n </span>\n <mat-error *ngIf=\"renderError\">\n <ng-container *ngIf=\"mandatory && input.value.length == 0 then requiredError else otherError\">\n </ng-container>\n <ng-template #requiredError>\n <span class=\"body-xs\" [title]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\"\n [innerText]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\">\n </span>\n </ng-template>\n <ng-template #otherError>\n <!-- TODO: Show error if it's not a valid link -->\n <!-- <span class=\"body-xs\" [title]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\" [innerText]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\">\n </span> -->\n </ng-template>\n </mat-error>\n\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && xAlignment == 'right'\" matPrefix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && (xAlignment == 'left')\" matSuffix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n </mat-form-field>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true, hasParent: false }\">\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\" [ngStyle]=\"{ color: textColor }\"\n [class]=\"'text-align-' + xAlignment\" [ngClass]=\"{'one-row': rowSpan === 1,\n 'multi-rows': rowSpan > 1,\n 'pep-button weak': isActive && !disabled}\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }} </span>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm value\"\n [ngClass]=\"{'multi-rows-text': rowSpan > 1}\" [ngStyle]=\"{ '-webkit-line-clamp': rowSpan }\">{{\n formattedValue }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a *ngIf=\"formattedValue != null && (value ? value : formattedValue) | isUrl\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n target=\"_blank\" href=\"{{ value ? value : formattedValue }}\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n <a *ngIf=\"formattedValue != null && !((value ? value : formattedValue) | isUrl)\" [id]=\"key\"\n class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" title=\"{{ formattedValue }}\"\n href=\"javascript:void(0)\" (click)=\"onClick()\">{{\n formattedValue }}</a>\n </ng-template>\n <ng-template #emptyBlock>\n <span [id]=\"key\"> </span>\n </ng-template>\n </ng-template>\n </ng-container>\n\n</ng-container>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepLinkComponent } from './link.component';\n//import { PepTextboxValidationDirective } from './textbox-validation.directive';\n\nimport { IsUrlPipe } from './link.pipes';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n ],\n exports: [PepLinkComponent],\n declarations: [\n PepLinkComponent,\n // PepTextboxValidationDirective,\n IsUrlPipe\n ],\n providers: [IsUrlPipe]\n})\nexport class PepLinkModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemEdit]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/link\n */\nexport * from './link.module';\nexport * from './link.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i3.IsUrlPipe","i10","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAKa,SAAS,CAAA;AAClB,IAAA,SAAS,CAAC,KAAa,EAAA;;QAEnB,MAAM,KAAK,GAAG,mCAAmC,CAAC;AAClD,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5B;;sGALQ,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;oGAAT,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,CAAA;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAHrB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,OAAO;iBAChB,CAAA;;;AC0BD;;;;;;;;AAQG;MAOU,gBAAgB,CAAA;IA0KzB,WACY,CAAA,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB,EACnB,SAA2B,EAC3B,gBAAqC,EACrC,SAAoB,EAAA;AALpB,QAAA,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAyB;AAC7C,QAAA,IAAQ,CAAA,QAA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f,aAAa,EAAA,UAAA,EAAA,CAAA;kBAxBzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,mBAAmB;;wBAEnB,eAAe;wBACf,eAAe;wBACf,kBAAkB;wBAClB,cAAc;wBACd,aAAa;;wBAEb,eAAe;wBACf,aAAa;wBACb,mBAAmB;wBACnB,oBAAoB;AACvB,qBAAA;oBACD,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,YAAY,EAAE;wBACV,gBAAgB;;wBAEhB,SAAS;AACZ,qBAAA;oBACD,SAAS,EAAE,CAAC,SAAS,CAAC;iBACzB,CAAA;;;AC/CD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -47,6 +47,8 @@ class PepPluginProxyComponent {
|
|
|
47
47
|
// __webpack_public_path__ = publicPath;
|
|
48
48
|
// this.pepAddonService.setAddonStaticFolder(publicPath, this.options.addonId);
|
|
49
49
|
// }
|
|
50
|
+
debugger;
|
|
51
|
+
this.options.type = 'module';
|
|
50
52
|
const Component = yield loadRemoteModule(this.options)
|
|
51
53
|
.then(m => m[this.options.componentName]);
|
|
52
54
|
this.compRef = this.viewContainer.createComponent(Component);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-plugin.mjs","sources":["../../../projects/ngx-lib/plugin/plugin-proxy.component.ts","../../../projects/ngx-lib/plugin/public-api.ts","../../../projects/ngx-lib/plugin/pepperi-addons-ngx-lib-plugin.ts"],"sourcesContent":["import { Component, ComponentRef, EventEmitter, Input, OnChanges, OnDestroy, Output, ViewChild, ViewContainerRef } from '@angular/core';\nimport { loadRemoteModule } from '@angular-architects/module-federation';\nimport { PepPluginOptions } from './plugin.model';\n\n@Component({\n standalone: true,\n selector: 'pep-plugin-proxy',\n template: `\n <ng-container #placeHolder></ng-container>\n `\n})\nexport class PepPluginProxyComponent implements OnChanges, OnDestroy {\n @ViewChild('placeHolder', { read: ViewContainerRef, static: true })\n viewContainer: ViewContainerRef;\n \n private _options: PepPluginOptions = null;\n @Input()\n set options(value: PepPluginOptions) {\n this._options = value;\n if (value) {\n this.loadModule();\n }\n }\n get options(): PepPluginOptions {\n return this._options;\n }\n\n // This is the data passed by the API Design documentation.\n private _hostObject: any = null;\n @Input()\n set hostObject(value: any) { \n this._hostObject = value;\n this.setHostComponentIntoComponentRef();\n }\n get hostObject(): any {\n return this._hostObject;\n }\n\n @Output() hostEvents: EventEmitter<any> = new EventEmitter();\n @Output() load: EventEmitter<any> = new EventEmitter();\n\n private compRef: ComponentRef<any>;\n\n constructor() { }\n\n private setHostComponentIntoComponentRef() {\n if (this.hostObject && this.compRef?.instance) {\n this.compRef.instance.hostObject = this.hostObject;\n\n // TODO: Check if this is needed?? if not remove this.\n if (this.compRef?.instance?.ngOnChanges) {\n this.compRef.instance.ngOnChanges(this.hostObject);\n }\n }\n }\n\n private async loadModule() {\n this.viewContainer.clear();\n \n // if (this.options.addonId) {\n // const publicPathArr = this.options.remoteEntry.split('/');\n // const publicPath = publicPathArr.slice(0, publicPathArr.length - 1).join('/')+'/';\n // __webpack_public_path__ = publicPath;\n // this.pepAddonService.setAddonStaticFolder(publicPath, this.options.addonId);\n // }\n\n const Component = await loadRemoteModule(this.options)\n .then(m => m[this.options.componentName]);\n \n this.compRef = this.viewContainer.createComponent(Component);\n this.load.emit();\n\n if (this.compRef) {\n this.setHostComponentIntoComponentRef();\n \n this.compRef?.instance['hostEvents']?.subscribe(e => {\n this.hostEvents.emit(e)\n });\n }\n }\n\n ngOnChanges() {\n }\n \n ngOnDestroy(): void {\n this.compRef?.destroy();\n this.viewContainer?.clear();\n }\n}\n\n","/*\r\n * Public API Surface of ngx-lib/plugin\r\n */\r\nexport * from './plugin-proxy.component';\r\nexport * from './plugin.model';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,uBAAuB,CAAA;AAgChC,IAAA,WA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,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACtD,aAAA;AACJ,SAAA;KACJ;IAEa,UAAU,GAAA;;;AACpB,YAAA,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;;;;;;;
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-plugin.mjs","sources":["../../../projects/ngx-lib/plugin/plugin-proxy.component.ts","../../../projects/ngx-lib/plugin/public-api.ts","../../../projects/ngx-lib/plugin/pepperi-addons-ngx-lib-plugin.ts"],"sourcesContent":["import { Component, ComponentRef, EventEmitter, Input, OnChanges, OnDestroy, Output, ViewChild, ViewContainerRef } from '@angular/core';\nimport { loadRemoteModule } from '@angular-architects/module-federation';\nimport { PepPluginOptions } from './plugin.model';\n\n@Component({\n standalone: true,\n selector: 'pep-plugin-proxy',\n template: `\n <ng-container #placeHolder></ng-container>\n `\n})\nexport class PepPluginProxyComponent implements OnChanges, OnDestroy {\n @ViewChild('placeHolder', { read: ViewContainerRef, static: true })\n viewContainer: ViewContainerRef;\n \n private _options: PepPluginOptions = null;\n @Input()\n set options(value: PepPluginOptions) {\n this._options = value;\n if (value) {\n this.loadModule();\n }\n }\n get options(): PepPluginOptions {\n return this._options;\n }\n\n // This is the data passed by the API Design documentation.\n private _hostObject: any = null;\n @Input()\n set hostObject(value: any) { \n this._hostObject = value;\n this.setHostComponentIntoComponentRef();\n }\n get hostObject(): any {\n return this._hostObject;\n }\n\n @Output() hostEvents: EventEmitter<any> = new EventEmitter();\n @Output() load: EventEmitter<any> = new EventEmitter();\n\n private compRef: ComponentRef<any>;\n\n constructor() { }\n\n private setHostComponentIntoComponentRef() {\n if (this.hostObject && this.compRef?.instance) {\n this.compRef.instance.hostObject = this.hostObject;\n\n // TODO: Check if this is needed?? if not remove this.\n if (this.compRef?.instance?.ngOnChanges) {\n this.compRef.instance.ngOnChanges(this.hostObject);\n }\n }\n }\n\n private async loadModule() {\n this.viewContainer.clear();\n \n // if (this.options.addonId) {\n // const publicPathArr = this.options.remoteEntry.split('/');\n // const publicPath = publicPathArr.slice(0, publicPathArr.length - 1).join('/')+'/';\n // __webpack_public_path__ = publicPath;\n // this.pepAddonService.setAddonStaticFolder(publicPath, this.options.addonId);\n // }\n\n debugger;\n this.options.type = 'module';\n const Component = await loadRemoteModule(this.options)\n .then(m => m[this.options.componentName]);\n \n this.compRef = this.viewContainer.createComponent(Component);\n this.load.emit();\n\n if (this.compRef) {\n this.setHostComponentIntoComponentRef();\n \n this.compRef?.instance['hostEvents']?.subscribe(e => {\n this.hostEvents.emit(e)\n });\n }\n }\n\n ngOnChanges() {\n }\n \n ngOnDestroy(): void {\n this.compRef?.destroy();\n this.viewContainer?.clear();\n }\n}\n\n","/*\r\n * Public API Surface of ngx-lib/plugin\r\n */\r\nexport * from './plugin-proxy.component';\r\nexport * from './plugin.model';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,uBAAuB,CAAA;AAgChC,IAAA,WAAA,GAAA;AA5BQ,QAAA,IAAQ,CAAA,QAAA,GAAqB,IAAI,CAAC;;AAalC,QAAA,IAAW,CAAA,WAAA,GAAQ,IAAI,CAAC;AAUtB,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAE,CAAC;AACpD,QAAA,IAAA,CAAA,IAAI,GAAuB,IAAI,YAAY,EAAE,CAAC;KAIvC;IA3BjB,IACI,OAAO,CAAC,KAAuB,EAAA;AAC/B,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;AACtB,QAAA,IAAI,KAAK,EAAE;YACP,IAAI,CAAC,UAAU,EAAE,CAAC;AACrB,SAAA;KACJ;AACD,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;IAID,IACI,UAAU,CAAC,KAAU,EAAA;AACrB,QAAA,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,gCAAgC,EAAE,CAAC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A,QAAA,EAAA,CAAA;;AAET,IAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAEQ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,CAAA;;AAET,IAAA,CAAA;iBACJ,CAAA;0EAGG,aAAa,EAAA,CAAA;sBADZ,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;gBAK9D,OAAO,EAAA,CAAA;sBADV,KAAK;gBAcF,UAAU,EAAA,CAAA;sBADb,KAAK;gBASI,UAAU,EAAA,CAAA;sBAAnB,MAAM;gBACG,IAAI,EAAA,CAAA;sBAAb,MAAM;;;ACvCX;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { Injectable, EventEmitter, ViewContainerRef, Component, Input, Output, V
|
|
|
3
3
|
import * as i3 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import { FormGroup, FormControl, ReactiveFormsModule, FormBuilder } from '@angular/forms';
|
|
7
7
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
8
8
|
import * as i7 from '@pepperi-addons/ngx-lib/smart-filters';
|
|
9
9
|
import { PepSmartFilterOperators, PepSmartFilterVariableOperators, PepSmartFilterAdditionalOperators, PepSmartFilterOperatorUnits, createSmartFilter, createSmartFilterField, PepSmartFiltersModule } from '@pepperi-addons/ngx-lib/smart-filters';
|
|
@@ -786,8 +786,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
786
786
|
|
|
787
787
|
const MAX_STRUCTURE_DEPTH = 3;
|
|
788
788
|
class PepQueryStructureService {
|
|
789
|
-
constructor(
|
|
790
|
-
this._fb = _fb;
|
|
789
|
+
constructor(_resolver, _outputQueryService, _queryBuilderService) {
|
|
791
790
|
this._resolver = _resolver;
|
|
792
791
|
this._outputQueryService = _outputQueryService;
|
|
793
792
|
this._queryBuilderService = _queryBuilderService;
|
|
@@ -888,8 +887,11 @@ class PepQueryStructureService {
|
|
|
888
887
|
createSection(operator, containerRef, parentForm, depth) {
|
|
889
888
|
const factory = this._resolver.resolveComponentFactory(PepQueryBuilderSectionComponent);
|
|
890
889
|
const componentRef = containerRef.createComponent(factory);
|
|
891
|
-
const sectionGroup = this._fb.group({
|
|
892
|
-
|
|
890
|
+
// const sectionGroup = this._fb.group({
|
|
891
|
+
// operator: this._fb.control(operator)
|
|
892
|
+
// });
|
|
893
|
+
const sectionGroup = new FormGroup({
|
|
894
|
+
operator: new FormControl(operator)
|
|
893
895
|
});
|
|
894
896
|
let counter = 1;
|
|
895
897
|
Object.keys(parentForm.controls).forEach(item => {
|
|
@@ -998,11 +1000,11 @@ class PepQueryStructureService {
|
|
|
998
1000
|
}
|
|
999
1001
|
}
|
|
1000
1002
|
}
|
|
1001
|
-
PepQueryStructureService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService, deps: [{ token:
|
|
1003
|
+
PepQueryStructureService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService, deps: [{ token: i0.ComponentFactoryResolver }, { token: PepOutputQueryService }, { token: PepQueryBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1002
1004
|
PepQueryStructureService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService });
|
|
1003
1005
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService, decorators: [{
|
|
1004
1006
|
type: Injectable
|
|
1005
|
-
}], ctorParameters: function () { return [{ type:
|
|
1007
|
+
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: PepOutputQueryService }, { type: PepQueryBuilderService }]; } });
|
|
1006
1008
|
|
|
1007
1009
|
class PepQueryBuilderComponent {
|
|
1008
1010
|
constructor(_fb, queryStructureService) {
|
|
@@ -1118,7 +1120,9 @@ PepQueryBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
|
|
|
1118
1120
|
PepButtonModule,
|
|
1119
1121
|
PepGroupButtonsModule,
|
|
1120
1122
|
PepSmartFiltersModule], exports: [PepQueryBuilderComponent] });
|
|
1121
|
-
PepQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule,
|
|
1123
|
+
PepQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, providers: [
|
|
1124
|
+
FormBuilder
|
|
1125
|
+
], imports: [CommonModule,
|
|
1122
1126
|
ReactiveFormsModule,
|
|
1123
1127
|
FlexLayoutModule,
|
|
1124
1128
|
PepSelectModule,
|
|
@@ -1144,6 +1148,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1144
1148
|
PepQueryBuilderComponent,
|
|
1145
1149
|
PepQueryBuilderSectionComponent,
|
|
1146
1150
|
PepQueryBuilderItemComponent
|
|
1151
|
+
],
|
|
1152
|
+
providers: [
|
|
1153
|
+
FormBuilder
|
|
1147
1154
|
]
|
|
1148
1155
|
}]
|
|
1149
1156
|
}] });
|