@pepperi-addons/ngx-lib 0.3.15-loader.2 → 0.3.15-loader.20
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/bundles/pepperi-addons-ngx-lib-form.umd.js +372 -187
- package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib.umd.js +6 -6
- package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
- package/esm2015/core/http/interceptors/loader.interceptor.js +5 -5
- package/esm2015/core/http/services/loader.service.js +4 -4
- package/esm2015/form/dynamic-field-generator.component.js +189 -0
- package/esm2015/form/field-generator.component.js +5 -5
- package/esm2015/form/form.component.js +4 -2
- package/esm2015/form/form.module.js +3 -1
- package/esm2015/form/pepperi-addons-ngx-lib-form.js +10 -9
- package/fesm2015/pepperi-addons-ngx-lib-form.js +364 -191
- package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.js +7 -7
- package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
- package/form/dynamic-field-generator.component.d.ts +42 -0
- package/form/field-generator.component.d.ts +1 -1
- package/form/form.component.d.ts +1 -0
- package/form/pepperi-addons-ngx-lib-form.d.ts +9 -8
- package/form/pepperi-addons-ngx-lib-form.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -331,6 +331,7 @@
|
|
|
331
331
|
this.canEditObject = true;
|
|
332
332
|
this._data = null;
|
|
333
333
|
this.isActive = false;
|
|
334
|
+
this.isDynamic = false;
|
|
334
335
|
this.layoutType = 'card';
|
|
335
336
|
// @Input() listType = '';
|
|
336
337
|
this.objectId = '0';
|
|
@@ -1611,7 +1612,7 @@
|
|
|
1611
1612
|
PepFormComponent.decorators = [
|
|
1612
1613
|
{ type: core.Component, args: [{
|
|
1613
1614
|
selector: 'pep-form',
|
|
1614
|
-
template: "<fieldset *ngIf=\"form\" [formGroup]=\"form\" [disabled]=\"isLocked\" class=\"pep-form\"\n [ngStyle]=\"{ 'background-color': layoutType == 'card' && data?.BackgroundColor }\">\n <!-- New Form -->\n <mat-grid-list *ngIf=\"layoutType == 'form'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"formGutterSize\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [checkForChanges]=\"checkForChanges\" [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\"\n (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\"\n (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n (formValidationChange)=\"onFormValidationChanged($event)\">\n </pep-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <!-- Thumbnails -->\n <mat-grid-list *ngIf=\"layoutType == 'card'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"cardGutterSize\" class=\"card-spacing\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\"\n [ngStyle]=\"{ overflow: field.type == 'qs' ? 'unset' : 'hidden' }\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [ngClass]=\"{ 'lock-events': lockEvents }\" [isActive]=\"isActive\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\" (valueChange)=\"onValueChanged($event)\"\n (elementClick)=\"onClick($event)\" (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\">\n </pep-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <ng-container *ngIf=\"layoutType == 'table'\">\n <ng-container *ngIf=\"isReport; then reportBlock; else notReportBlock\"></ng-container>\n <ng-template #reportBlock>\n <ng-container *ngTemplateOutlet=\"report\"></ng-container>\n </ng-template>\n <ng-template #notReportBlock>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip table-cell \"\n [ngClass]=\"['text-align-' + field.xAlignment]\" style=\"height: 100%\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString}\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [form]=\"form\" [layoutType]=\"layoutType\" [showTitle]=\"false\"\n (elementClick)=\"onClick($event)\" (valueChange)=\"onValueChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n [isActive]=\"isActive\">\n </pep-field-generator>\n </div>\n </ng-template>\n </ng-container>\n\n <!------- For testing ------------\n {{ form.value | json }}\n {{ form.valid }}\n ---------------------------------->\n</fieldset>\n\n<ng-template #report>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip pep-report-fields\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString }\"\n [ngClass]=\"['text-align-' + field.xAlignment]\">\n <ng-container [ngSwitch]=\"field.controlType\">\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"data?.UID\" [form]=\"form\" [key]=\"field.key\"\n [src]=\"field.formattedValue\" [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-image>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-signature>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [layoutType]=\"layoutType\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [minValue]=\"field.minValue\" [maxValue]=\"field.maxValue\" [layoutType]=\"layoutType\">\n </pep-date>\n\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" (elementClick)=\"onClick($event)\">\n </pep-internal-button>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [maxFieldCharacters]=\"field.maxFieldCharacters\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-textarea>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [id]=\"field.key\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"field.value\" [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\" (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"field.formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\">\n </ng-container>\n <ng-template #notEmptyBlock>\n <ng-container\n *ngIf=\"field.controlType === 'attachment' || field.type === 'link'; then linkBlock; else notLinkBlock\">\n </ng-container>\n <ng-template #linkBlock>\n <a [id]=\"field.key\" class=\"color-link body-sm pep-report-input readonly\"\n *ngIf=\"field.formattedValue != null\" title=\"{{ field.formattedValue }}\" target=\"_blank\"\n href=\"{{ field.value }}\">{{ field.formattedValue }}</a>\n </ng-template>\n <ng-template #notLinkBlock>\n <span [id]=\"field.key\" class=\"body-sm pep-report-input readonly\"\n title=\"{{ field.formattedValue }}\" [ngStyle]=\"{ color: field.textColor }\">{{\n field.formattedValue }}</span>\n </ng-template>\n </ng-template>\n <ng-template #emptyBlock>\n <span> </span>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>",
|
|
1615
|
+
template: "<fieldset *ngIf=\"form\" [formGroup]=\"form\" [disabled]=\"isLocked\" class=\"pep-form\"\n [ngStyle]=\"{ 'background-color': layoutType == 'card' && data?.BackgroundColor }\">\n \n <!-- Dynamic Form -->\n <mat-grid-list *ngIf=\"layoutType == 'form' && isDynamic\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"formGutterSize\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\">\n <pep-dynamic-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [checkForChanges]=\"checkForChanges\" [uid]=\"data?.UID\" [showTitle]=\"showTitle\" [field]=\"field\"\n (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\"\n (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n (formValidationChange)=\"onFormValidationChanged($event)\">\n </pep-dynamic-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <!-- New Form -->\n <mat-grid-list *ngIf=\"layoutType == 'form' && !isDynamic\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"formGutterSize\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [checkForChanges]=\"checkForChanges\" [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\"\n (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\"\n (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n (formValidationChange)=\"onFormValidationChanged($event)\">\n </pep-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <!-- Thumbnails -->\n <mat-grid-list *ngIf=\"layoutType == 'card'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"cardGutterSize\" class=\"card-spacing\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\"\n [ngStyle]=\"{ overflow: field.type == 'qs' ? 'unset' : 'hidden' }\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [ngClass]=\"{ 'lock-events': lockEvents }\" [isActive]=\"isActive\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\" (valueChange)=\"onValueChanged($event)\"\n (elementClick)=\"onClick($event)\" (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\">\n </pep-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <ng-container *ngIf=\"layoutType == 'table'\">\n <ng-container *ngIf=\"isReport; then reportBlock; else notReportBlock\"></ng-container>\n <ng-template #reportBlock>\n <ng-container *ngTemplateOutlet=\"report\"></ng-container>\n </ng-template>\n <ng-template #notReportBlock>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip table-cell \"\n [ngClass]=\"['text-align-' + field.xAlignment]\" style=\"height: 100%\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString}\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [form]=\"form\" [layoutType]=\"layoutType\" [showTitle]=\"false\"\n (elementClick)=\"onClick($event)\" (valueChange)=\"onValueChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n [isActive]=\"isActive\">\n </pep-field-generator>\n </div>\n </ng-template>\n </ng-container>\n\n <!------- For testing ------------\n {{ form.value | json }}\n {{ form.valid }}\n ---------------------------------->\n</fieldset>\n\n<ng-template #report>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip pep-report-fields\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString }\"\n [ngClass]=\"['text-align-' + field.xAlignment]\">\n <ng-container [ngSwitch]=\"field.controlType\">\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"data?.UID\" [form]=\"form\" [key]=\"field.key\"\n [src]=\"field.formattedValue\" [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-image>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-signature>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [layoutType]=\"layoutType\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [minValue]=\"field.minValue\" [maxValue]=\"field.maxValue\" [layoutType]=\"layoutType\">\n </pep-date>\n\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" (elementClick)=\"onClick($event)\">\n </pep-internal-button>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [maxFieldCharacters]=\"field.maxFieldCharacters\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-textarea>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [id]=\"field.key\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"field.value\" [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\" (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"field.formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\">\n </ng-container>\n <ng-template #notEmptyBlock>\n <ng-container\n *ngIf=\"field.controlType === 'attachment' || field.type === 'link'; then linkBlock; else notLinkBlock\">\n </ng-container>\n <ng-template #linkBlock>\n <a [id]=\"field.key\" class=\"color-link body-sm pep-report-input readonly\"\n *ngIf=\"field.formattedValue != null\" title=\"{{ field.formattedValue }}\" target=\"_blank\"\n href=\"{{ field.value }}\">{{ field.formattedValue }}</a>\n </ng-template>\n <ng-template #notLinkBlock>\n <span [id]=\"field.key\" class=\"body-sm pep-report-input readonly\"\n title=\"{{ field.formattedValue }}\" [ngStyle]=\"{ color: field.textColor }\">{{\n field.formattedValue }}</span>\n </ng-template>\n </ng-template>\n <ng-template #emptyBlock>\n <span> </span>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>",
|
|
1615
1616
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1616
1617
|
styles: [":host{display:grid}"]
|
|
1617
1618
|
},] }
|
|
@@ -1633,6 +1634,7 @@
|
|
|
1633
1634
|
data: [{ type: core.Input }],
|
|
1634
1635
|
lockFields: [{ type: core.Input }],
|
|
1635
1636
|
isActive: [{ type: core.Input }],
|
|
1637
|
+
isDynamic: [{ type: core.Input }],
|
|
1636
1638
|
layoutType: [{ type: core.Input }],
|
|
1637
1639
|
objectId: [{ type: core.Input }],
|
|
1638
1640
|
parentId: [{ type: core.Input }],
|
|
@@ -1706,9 +1708,6 @@
|
|
|
1706
1708
|
enumerable: false,
|
|
1707
1709
|
configurable: true
|
|
1708
1710
|
});
|
|
1709
|
-
PepFieldGeneratorComponent.prototype.ngOnDestroy = function () {
|
|
1710
|
-
//
|
|
1711
|
-
};
|
|
1712
1711
|
PepFieldGeneratorComponent.prototype.onFileChanged = function (fileData, field) {
|
|
1713
1712
|
var value = fileData ? JSON.stringify(fileData) : '';
|
|
1714
1713
|
var fieldValueChange = {
|
|
@@ -1757,12 +1756,15 @@
|
|
|
1757
1756
|
// For testing.
|
|
1758
1757
|
// this.field.disabled = this.field.readonly = false;
|
|
1759
1758
|
};
|
|
1759
|
+
PepFieldGeneratorComponent.prototype.ngOnDestroy = function () {
|
|
1760
|
+
//
|
|
1761
|
+
};
|
|
1760
1762
|
return PepFieldGeneratorComponent;
|
|
1761
1763
|
}());
|
|
1762
1764
|
PepFieldGeneratorComponent.decorators = [
|
|
1763
1765
|
{ type: core.Component, args: [{
|
|
1764
1766
|
selector: 'pep-field-generator',
|
|
1765
|
-
template: "<ng-container [ngSwitch]=\"field.controlType\" [formGroup]=\"form\">\n\n <pep-address *ngSwitchCase=\"'address'\" [form]=\"form\" [key]=\"field.key\" [formattedValue]=\"field.formattedValue\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [groupFields]=\"field.groupFields\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (addressValueChange)=\"onAddressValueChanged($event, field)\">\n </pep-address>\n\n <pep-attachment *ngSwitchCase=\"'attachment'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-attachment>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [additionalValue]=\"field.additionalValue\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [minValue]=\"field.minValue\"\n [maxValue]=\"field.maxValue\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-date>\n\n <pep-images-filmstrip *ngSwitchCase=\"'images'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [showTitle]=\"showTitle\" [rowSpan]=\"field.rowSpan\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-images-filmstrip>\n\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.formattedValue\"\n [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [indicatorsField]=\"field.indicatorsField\" [menuField]=\"field.menuField\"\n [hasCampaignField]=\"field.hasCampaignField\" [sizeLimitMB]=\"field.sizeLimitMB\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-image>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [allowDecimal]=\"field.allowDecimal\"\n [additionalValue]=\"field.additionalValue\" [notificationInfo]=\"field.notificationInfo\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [showTitle]=\"showTitle\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" (formValidationChange)=\"onFormValidationChanged($event)\"\n (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n\n <pep-rich-html-textarea *ngSwitchCase=\"'richhtmltextarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-rich-html-textarea>\n\n <pep-select *ngSwitchCase=\"'select'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [options]=\"field.options\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (valueChange)=\"onValueChanged($event, field)\"\n (formValidationChange)=\"onFormValidationChanged($event)\" [isActive]=\"isActive\">\n </pep-select>\n\n <pep-separator *ngSwitchCase=\"'separator'\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [xAlignment]=\"field.xAlignment\" [layoutType]=\"layoutType\" [visible]=\"field.visible\">\n </pep-separator>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [layoutType]=\"layoutType\"\n [visible]=\"field.visible\" (fileChange)=\"onFileChanged($event, field)\">\n </pep-signature>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-textarea>\n\n <pep-textbox *ngSwitchCase=\"'textbox'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [accessory]=\"field.accessory\" [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n (valueChange)=\"onValueChanged($event, field)\" (formValidationChange)=\"onFormValidationChanged($event)\"\n [isActive]=\"isActive\" [visible]=\"field.visible\">\n </pep-textbox>\n\n <pep-link *ngSwitchCase=\"'link'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\" [visible]=\"field.visible\"\n (formValidationChange)=\"onFormValidationChanged($event)\" (elementClick)=\"onClick($event)\">\n </pep-link>\n\n <pep-indicators *ngSwitchCase=\"'indicators'\" [key]=\"field.key\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-indicators>\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\"\n [referenceObjectInternalType]=\"field.referenceObjectInternalType\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (valueChange)=\"onValueChanged($event, field)\">\n </pep-internal-button>\n <pep-internal-menu *ngSwitchCase=\"'menu'\" [key]=\"field.key\" [label]=\"field.label\" [disabled]=\"field.disabled\"\n [xAlignment]=\"field.xAlignment\" [options]=\"field.options\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-internal-menu>\n <pep-internal-page *ngSwitchCase=\"'internalPage'\" [field]=\"field\" [layoutType]=\"layoutType\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-page>\n\n <pep-internal-carusel *ngSwitchCase=\"'internalCarusel'\" [field]=\"field\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-carusel>\n\n <ng-container *ngSwitchCase=\"'placeholder'\">\n </ng-container>\n</ng-container
|
|
1767
|
+
template: "<ng-container [ngSwitch]=\"field.controlType\" [formGroup]=\"form\">\n\n <pep-address *ngSwitchCase=\"'address'\" [form]=\"form\" [key]=\"field.key\" [formattedValue]=\"field.formattedValue\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [groupFields]=\"field.groupFields\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (addressValueChange)=\"onAddressValueChanged($event, field)\">\n </pep-address>\n\n <pep-attachment *ngSwitchCase=\"'attachment'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-attachment>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [additionalValue]=\"field.additionalValue\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [minValue]=\"field.minValue\"\n [maxValue]=\"field.maxValue\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-date>\n\n <pep-images-filmstrip *ngSwitchCase=\"'images'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [showTitle]=\"showTitle\" [rowSpan]=\"field.rowSpan\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-images-filmstrip>\n\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.formattedValue\"\n [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [indicatorsField]=\"field.indicatorsField\" [menuField]=\"field.menuField\"\n [hasCampaignField]=\"field.hasCampaignField\" [sizeLimitMB]=\"field.sizeLimitMB\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-image>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [allowDecimal]=\"field.allowDecimal\"\n [additionalValue]=\"field.additionalValue\" [notificationInfo]=\"field.notificationInfo\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [showTitle]=\"showTitle\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" (formValidationChange)=\"onFormValidationChanged($event)\"\n (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n\n <pep-rich-html-textarea *ngSwitchCase=\"'richhtmltextarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-rich-html-textarea>\n\n <pep-select *ngSwitchCase=\"'select'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [options]=\"field.options\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (valueChange)=\"onValueChanged($event, field)\"\n (formValidationChange)=\"onFormValidationChanged($event)\" [isActive]=\"isActive\">\n </pep-select>\n\n <pep-separator *ngSwitchCase=\"'separator'\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [xAlignment]=\"field.xAlignment\" [layoutType]=\"layoutType\" [visible]=\"field.visible\">\n </pep-separator>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [layoutType]=\"layoutType\"\n [visible]=\"field.visible\" (fileChange)=\"onFileChanged($event, field)\">\n </pep-signature>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-textarea>\n\n <pep-textbox *ngSwitchCase=\"'textbox'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [accessory]=\"field.accessory\" [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n (valueChange)=\"onValueChanged($event, field)\" (formValidationChange)=\"onFormValidationChanged($event)\"\n [isActive]=\"isActive\" [visible]=\"field.visible\">\n </pep-textbox>\n\n <pep-link *ngSwitchCase=\"'link'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\" [visible]=\"field.visible\"\n (formValidationChange)=\"onFormValidationChanged($event)\" (elementClick)=\"onClick($event)\">\n </pep-link>\n\n <pep-indicators *ngSwitchCase=\"'indicators'\" [key]=\"field.key\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-indicators>\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\"\n [referenceObjectInternalType]=\"field.referenceObjectInternalType\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (valueChange)=\"onValueChanged($event, field)\">\n </pep-internal-button>\n <pep-internal-menu *ngSwitchCase=\"'menu'\" [key]=\"field.key\" [label]=\"field.label\" [disabled]=\"field.disabled\"\n [xAlignment]=\"field.xAlignment\" [options]=\"field.options\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-internal-menu>\n <pep-internal-page *ngSwitchCase=\"'internalPage'\" [field]=\"field\" [layoutType]=\"layoutType\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-page>\n\n <pep-internal-carusel *ngSwitchCase=\"'internalCarusel'\" [field]=\"field\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-carusel>\n\n <ng-container *ngSwitchCase=\"'placeholder'\">\n </ng-container>\n</ng-container>\n\n",
|
|
1766
1768
|
encapsulation: core.ViewEncapsulation.Emulated,
|
|
1767
1769
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1768
1770
|
styles: [":host{width:100%;height:100%}"]
|
|
@@ -1975,6 +1977,180 @@
|
|
|
1975
1977
|
valueChange: [{ type: core.Output }]
|
|
1976
1978
|
};
|
|
1977
1979
|
|
|
1980
|
+
var PepInternalMenuComponent = /** @class */ (function () {
|
|
1981
|
+
function PepInternalMenuComponent() {
|
|
1982
|
+
this.key = '';
|
|
1983
|
+
this.label = '';
|
|
1984
|
+
this.disabled = false;
|
|
1985
|
+
this.xAlignment = ngxLib.DEFAULT_HORIZONTAL_ALIGNMENT;
|
|
1986
|
+
// @Input() hasSubMenu = false;
|
|
1987
|
+
this.options = [];
|
|
1988
|
+
this.invertClass = true;
|
|
1989
|
+
this.controlType = 'menu';
|
|
1990
|
+
this.layoutType = 'form';
|
|
1991
|
+
this.elementClick = new core.EventEmitter();
|
|
1992
|
+
}
|
|
1993
|
+
// @Output() menuItemClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();
|
|
1994
|
+
PepInternalMenuComponent.prototype.ngOnDestroy = function () {
|
|
1995
|
+
// if (this.elementClick) {
|
|
1996
|
+
// this.elementClick.unsubscribe();
|
|
1997
|
+
// }
|
|
1998
|
+
// if (this.menuItemClick) {
|
|
1999
|
+
// this.menuItemClick.unsubscribe();
|
|
2000
|
+
// }
|
|
2001
|
+
};
|
|
2002
|
+
PepInternalMenuComponent.prototype.menuClicked = function (event) {
|
|
2003
|
+
this.elementClick.emit({
|
|
2004
|
+
key: this.key,
|
|
2005
|
+
controlType: this.controlType,
|
|
2006
|
+
eventWhich: event.which,
|
|
2007
|
+
});
|
|
2008
|
+
};
|
|
2009
|
+
PepInternalMenuComponent.prototype.menuItemClicked = function (itemKey) {
|
|
2010
|
+
// Not in use comment in version 16.55 for webapp.
|
|
2011
|
+
// this.menuItemClick.emit({ key: itemKey });
|
|
2012
|
+
};
|
|
2013
|
+
return PepInternalMenuComponent;
|
|
2014
|
+
}());
|
|
2015
|
+
PepInternalMenuComponent.decorators = [
|
|
2016
|
+
{ type: core.Component, args: [{
|
|
2017
|
+
selector: 'pep-internal-menu',
|
|
2018
|
+
template: "<ng-container *ngIf=\"options?.length > 0; then subMenuBlock; else noSubMenuBlock\"></ng-container>\n<ng-template #noSubMenuBlock>\n <button (click)=\"menuClicked($event)\" title=\"{{ label }}\" mat-button\n class=\"pep-button icon-button weak {{ layoutType === 'table' ? 'sm' : 'md' }}\" [ngClass]=\"{\n 'lock-events': disabled,\n 'left-alignment': xAlignment == 'left',\n 'right-alignment': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center',\n 'invert': invertClass\n }\">\n <mat-icon>\n <pep-icon name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </button>\n</ng-template>\n\n<ng-template #subMenuBlock>\n <button mat-button [matMenuTriggerFor]=\"menu\" menu-blur\n class=\"pep-button icon-button weak {{ layoutType === 'table' ? 'sm' : 'md' }}\" [ngClass]=\"{\n 'left-alignment': xAlignment == 'left',\n 'right-alignment': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center',\n 'invert': invertClass\n }\" title=\"{{ label }}\">\n <mat-icon>\n <pep-icon name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\" xPosition=\"{{xAlignment == 'right' ? 'after' : 'before'}}\"\n [ngClass]=\"{ rtlMenu: xAlignment == 'right' }\">\n <button *ngFor=\"let option of options\" mat-menu-item (click)=\"menuItemClicked(option.key)\">\n <span>{{ option.value | translate }}</span>\n </button>\n </mat-menu>\n\n</ng-template>",
|
|
2019
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
2020
|
+
styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pep-button,.pepperi-button{cursor:pointer}.pep-button.left-alignment,.pepperi-button.left-alignment{justify-self:flex-start}.pep-button.center-alignment,.pepperi-button.center-alignment{justify-self:center}.pep-button.right-alignment,.pepperi-button.right-alignment{justify-self:flex-end}"]
|
|
2021
|
+
},] }
|
|
2022
|
+
];
|
|
2023
|
+
PepInternalMenuComponent.propDecorators = {
|
|
2024
|
+
key: [{ type: core.Input }],
|
|
2025
|
+
label: [{ type: core.Input }],
|
|
2026
|
+
disabled: [{ type: core.Input }],
|
|
2027
|
+
xAlignment: [{ type: core.Input }],
|
|
2028
|
+
options: [{ type: core.Input }],
|
|
2029
|
+
invertClass: [{ type: core.Input }],
|
|
2030
|
+
layoutType: [{ type: core.Input }],
|
|
2031
|
+
elementClick: [{ type: core.Output }]
|
|
2032
|
+
};
|
|
2033
|
+
|
|
2034
|
+
var PepInternalPageService = /** @class */ (function () {
|
|
2035
|
+
function PepInternalPageService(httpService) {
|
|
2036
|
+
this.httpService = httpService;
|
|
2037
|
+
this.parentId = '0';
|
|
2038
|
+
this.additionalApiName = '';
|
|
2039
|
+
this.transactionUrl = 'Service1.svc/v1/OrderCenter/Transaction/';
|
|
2040
|
+
}
|
|
2041
|
+
PepInternalPageService.prototype.getBaseParentUrl = function () {
|
|
2042
|
+
var url = "" + this.transactionUrl + this.objectId + "/ParentLine/" + this.parentId + "/";
|
|
2043
|
+
return url;
|
|
2044
|
+
};
|
|
2045
|
+
PepInternalPageService.prototype.getChildren = function (callbackFunc) {
|
|
2046
|
+
var _a;
|
|
2047
|
+
var body = JSON.stringify({
|
|
2048
|
+
TransactionUID: this.objectId,
|
|
2049
|
+
SearchCode: this.searchCode,
|
|
2050
|
+
AdditionalApiName: this.additionalApiName,
|
|
2051
|
+
ParentTransactionLineID: this.parentId,
|
|
2052
|
+
ViewType: this.viewType,
|
|
2053
|
+
});
|
|
2054
|
+
// Set the additional api name with view type string.
|
|
2055
|
+
var moreParams = ((_a = this.additionalApiName) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
2056
|
+
? this.additionalApiName + "/" + this.viewType
|
|
2057
|
+
: "''/" + this.viewType;
|
|
2058
|
+
var url = this.getBaseParentUrl() + "Items/" + moreParams;
|
|
2059
|
+
this.httpService.postWapiApiCall(url, body).subscribe(function (res) {
|
|
2060
|
+
callbackFunc(res);
|
|
2061
|
+
}
|
|
2062
|
+
// (error) => {},
|
|
2063
|
+
// () => {}
|
|
2064
|
+
);
|
|
2065
|
+
};
|
|
2066
|
+
PepInternalPageService.prototype.initDetails = function (objectId, parentId, searchCode, callbackFunc) {
|
|
2067
|
+
if (!objectId || !parentId) {
|
|
2068
|
+
return;
|
|
2069
|
+
}
|
|
2070
|
+
this.objectId = objectId;
|
|
2071
|
+
this.parentId = parentId;
|
|
2072
|
+
this.searchCode = searchCode;
|
|
2073
|
+
this.httpService
|
|
2074
|
+
.getWapiApiCall(this.getBaseParentUrl() + "ViewTypes")
|
|
2075
|
+
.subscribe(function (res) {
|
|
2076
|
+
callbackFunc(res);
|
|
2077
|
+
}
|
|
2078
|
+
// (error) => {},
|
|
2079
|
+
// () => {}
|
|
2080
|
+
);
|
|
2081
|
+
};
|
|
2082
|
+
PepInternalPageService.prototype.changeChildrenViewType = function (viewType, callbackFunc) {
|
|
2083
|
+
this.viewType = viewType;
|
|
2084
|
+
this.getChildren(callbackFunc);
|
|
2085
|
+
};
|
|
2086
|
+
PepInternalPageService.prototype.changeAdditionalApiName = function (additionalApiName, callbackFunc) {
|
|
2087
|
+
this.additionalApiName = additionalApiName;
|
|
2088
|
+
this.getChildren(callbackFunc);
|
|
2089
|
+
};
|
|
2090
|
+
PepInternalPageService.prototype.childPlusClick = function (itemId, fieldApiName, callbackFunc) {
|
|
2091
|
+
var body = JSON.stringify({
|
|
2092
|
+
TransactionUID: this.objectId,
|
|
2093
|
+
SearchCode: this.searchCode,
|
|
2094
|
+
ParentTransactionLineID: this.parentId,
|
|
2095
|
+
TransactionLineUID: itemId,
|
|
2096
|
+
FieldApiName: fieldApiName,
|
|
2097
|
+
ViewType: this.viewType,
|
|
2098
|
+
});
|
|
2099
|
+
this.httpService
|
|
2100
|
+
.postWapiApiCall(this.getBaseParentUrl() + "IncrementValue", body)
|
|
2101
|
+
.subscribe(function (res) {
|
|
2102
|
+
callbackFunc(res);
|
|
2103
|
+
}
|
|
2104
|
+
// (error) => {},
|
|
2105
|
+
// () => {}
|
|
2106
|
+
);
|
|
2107
|
+
};
|
|
2108
|
+
PepInternalPageService.prototype.childMinusClick = function (itemId, fieldApiName, callbackFunc) {
|
|
2109
|
+
var body = JSON.stringify({
|
|
2110
|
+
TransactionUID: this.objectId,
|
|
2111
|
+
SearchCode: this.searchCode,
|
|
2112
|
+
ParentTransactionLineID: this.parentId,
|
|
2113
|
+
TransactionLineUID: itemId,
|
|
2114
|
+
FieldApiName: fieldApiName,
|
|
2115
|
+
ViewType: this.viewType,
|
|
2116
|
+
});
|
|
2117
|
+
this.httpService
|
|
2118
|
+
.postWapiApiCall(this.getBaseParentUrl() + "DecrementValue", body)
|
|
2119
|
+
.subscribe(function (res) {
|
|
2120
|
+
callbackFunc(res);
|
|
2121
|
+
}
|
|
2122
|
+
// (error) => {},
|
|
2123
|
+
// () => {}
|
|
2124
|
+
);
|
|
2125
|
+
};
|
|
2126
|
+
PepInternalPageService.prototype.childValueChanged = function (itemId, fieldApiName, value, callbackFunc) {
|
|
2127
|
+
var body = JSON.stringify({
|
|
2128
|
+
TransactionUID: this.objectId,
|
|
2129
|
+
SearchCode: this.searchCode,
|
|
2130
|
+
ParentTransactionLineID: this.parentId,
|
|
2131
|
+
TransactionLineUID: itemId,
|
|
2132
|
+
FieldApiName: fieldApiName,
|
|
2133
|
+
FieldValue: value,
|
|
2134
|
+
ViewType: this.viewType,
|
|
2135
|
+
});
|
|
2136
|
+
this.httpService
|
|
2137
|
+
.postWapiApiCall(this.getBaseParentUrl() + "SetFieldValue", body)
|
|
2138
|
+
.subscribe(function (res) {
|
|
2139
|
+
callbackFunc(res);
|
|
2140
|
+
}
|
|
2141
|
+
// (error) => {},
|
|
2142
|
+
// () => {}
|
|
2143
|
+
);
|
|
2144
|
+
};
|
|
2145
|
+
return PepInternalPageService;
|
|
2146
|
+
}());
|
|
2147
|
+
PepInternalPageService.decorators = [
|
|
2148
|
+
{ type: core.Injectable }
|
|
2149
|
+
];
|
|
2150
|
+
PepInternalPageService.ctorParameters = function () { return [
|
|
2151
|
+
{ type: ngxLib.PepHttpService }
|
|
2152
|
+
]; };
|
|
2153
|
+
|
|
1978
2154
|
var PepInternalListComponent = /** @class */ (function () {
|
|
1979
2155
|
function PepInternalListComponent(element, layoutService, cd, renderer) {
|
|
1980
2156
|
var _this = this;
|
|
@@ -2481,180 +2657,6 @@
|
|
|
2481
2657
|
selectAllCB: [{ type: core.ViewChild, args: ['selectAllCB',] }]
|
|
2482
2658
|
};
|
|
2483
2659
|
|
|
2484
|
-
var PepInternalMenuComponent = /** @class */ (function () {
|
|
2485
|
-
function PepInternalMenuComponent() {
|
|
2486
|
-
this.key = '';
|
|
2487
|
-
this.label = '';
|
|
2488
|
-
this.disabled = false;
|
|
2489
|
-
this.xAlignment = ngxLib.DEFAULT_HORIZONTAL_ALIGNMENT;
|
|
2490
|
-
// @Input() hasSubMenu = false;
|
|
2491
|
-
this.options = [];
|
|
2492
|
-
this.invertClass = true;
|
|
2493
|
-
this.controlType = 'menu';
|
|
2494
|
-
this.layoutType = 'form';
|
|
2495
|
-
this.elementClick = new core.EventEmitter();
|
|
2496
|
-
}
|
|
2497
|
-
// @Output() menuItemClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();
|
|
2498
|
-
PepInternalMenuComponent.prototype.ngOnDestroy = function () {
|
|
2499
|
-
// if (this.elementClick) {
|
|
2500
|
-
// this.elementClick.unsubscribe();
|
|
2501
|
-
// }
|
|
2502
|
-
// if (this.menuItemClick) {
|
|
2503
|
-
// this.menuItemClick.unsubscribe();
|
|
2504
|
-
// }
|
|
2505
|
-
};
|
|
2506
|
-
PepInternalMenuComponent.prototype.menuClicked = function (event) {
|
|
2507
|
-
this.elementClick.emit({
|
|
2508
|
-
key: this.key,
|
|
2509
|
-
controlType: this.controlType,
|
|
2510
|
-
eventWhich: event.which,
|
|
2511
|
-
});
|
|
2512
|
-
};
|
|
2513
|
-
PepInternalMenuComponent.prototype.menuItemClicked = function (itemKey) {
|
|
2514
|
-
// Not in use comment in version 16.55 for webapp.
|
|
2515
|
-
// this.menuItemClick.emit({ key: itemKey });
|
|
2516
|
-
};
|
|
2517
|
-
return PepInternalMenuComponent;
|
|
2518
|
-
}());
|
|
2519
|
-
PepInternalMenuComponent.decorators = [
|
|
2520
|
-
{ type: core.Component, args: [{
|
|
2521
|
-
selector: 'pep-internal-menu',
|
|
2522
|
-
template: "<ng-container *ngIf=\"options?.length > 0; then subMenuBlock; else noSubMenuBlock\"></ng-container>\n<ng-template #noSubMenuBlock>\n <button (click)=\"menuClicked($event)\" title=\"{{ label }}\" mat-button\n class=\"pep-button icon-button weak {{ layoutType === 'table' ? 'sm' : 'md' }}\" [ngClass]=\"{\n 'lock-events': disabled,\n 'left-alignment': xAlignment == 'left',\n 'right-alignment': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center',\n 'invert': invertClass\n }\">\n <mat-icon>\n <pep-icon name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </button>\n</ng-template>\n\n<ng-template #subMenuBlock>\n <button mat-button [matMenuTriggerFor]=\"menu\" menu-blur\n class=\"pep-button icon-button weak {{ layoutType === 'table' ? 'sm' : 'md' }}\" [ngClass]=\"{\n 'left-alignment': xAlignment == 'left',\n 'right-alignment': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center',\n 'invert': invertClass\n }\" title=\"{{ label }}\">\n <mat-icon>\n <pep-icon name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\" xPosition=\"{{xAlignment == 'right' ? 'after' : 'before'}}\"\n [ngClass]=\"{ rtlMenu: xAlignment == 'right' }\">\n <button *ngFor=\"let option of options\" mat-menu-item (click)=\"menuItemClicked(option.key)\">\n <span>{{ option.value | translate }}</span>\n </button>\n </mat-menu>\n\n</ng-template>",
|
|
2523
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
2524
|
-
styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pep-button,.pepperi-button{cursor:pointer}.pep-button.left-alignment,.pepperi-button.left-alignment{justify-self:flex-start}.pep-button.center-alignment,.pepperi-button.center-alignment{justify-self:center}.pep-button.right-alignment,.pepperi-button.right-alignment{justify-self:flex-end}"]
|
|
2525
|
-
},] }
|
|
2526
|
-
];
|
|
2527
|
-
PepInternalMenuComponent.propDecorators = {
|
|
2528
|
-
key: [{ type: core.Input }],
|
|
2529
|
-
label: [{ type: core.Input }],
|
|
2530
|
-
disabled: [{ type: core.Input }],
|
|
2531
|
-
xAlignment: [{ type: core.Input }],
|
|
2532
|
-
options: [{ type: core.Input }],
|
|
2533
|
-
invertClass: [{ type: core.Input }],
|
|
2534
|
-
layoutType: [{ type: core.Input }],
|
|
2535
|
-
elementClick: [{ type: core.Output }]
|
|
2536
|
-
};
|
|
2537
|
-
|
|
2538
|
-
var PepInternalPageService = /** @class */ (function () {
|
|
2539
|
-
function PepInternalPageService(httpService) {
|
|
2540
|
-
this.httpService = httpService;
|
|
2541
|
-
this.parentId = '0';
|
|
2542
|
-
this.additionalApiName = '';
|
|
2543
|
-
this.transactionUrl = 'Service1.svc/v1/OrderCenter/Transaction/';
|
|
2544
|
-
}
|
|
2545
|
-
PepInternalPageService.prototype.getBaseParentUrl = function () {
|
|
2546
|
-
var url = "" + this.transactionUrl + this.objectId + "/ParentLine/" + this.parentId + "/";
|
|
2547
|
-
return url;
|
|
2548
|
-
};
|
|
2549
|
-
PepInternalPageService.prototype.getChildren = function (callbackFunc) {
|
|
2550
|
-
var _a;
|
|
2551
|
-
var body = JSON.stringify({
|
|
2552
|
-
TransactionUID: this.objectId,
|
|
2553
|
-
SearchCode: this.searchCode,
|
|
2554
|
-
AdditionalApiName: this.additionalApiName,
|
|
2555
|
-
ParentTransactionLineID: this.parentId,
|
|
2556
|
-
ViewType: this.viewType,
|
|
2557
|
-
});
|
|
2558
|
-
// Set the additional api name with view type string.
|
|
2559
|
-
var moreParams = ((_a = this.additionalApiName) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
2560
|
-
? this.additionalApiName + "/" + this.viewType
|
|
2561
|
-
: "''/" + this.viewType;
|
|
2562
|
-
var url = this.getBaseParentUrl() + "Items/" + moreParams;
|
|
2563
|
-
this.httpService.postWapiApiCall(url, body).subscribe(function (res) {
|
|
2564
|
-
callbackFunc(res);
|
|
2565
|
-
}
|
|
2566
|
-
// (error) => {},
|
|
2567
|
-
// () => {}
|
|
2568
|
-
);
|
|
2569
|
-
};
|
|
2570
|
-
PepInternalPageService.prototype.initDetails = function (objectId, parentId, searchCode, callbackFunc) {
|
|
2571
|
-
if (!objectId || !parentId) {
|
|
2572
|
-
return;
|
|
2573
|
-
}
|
|
2574
|
-
this.objectId = objectId;
|
|
2575
|
-
this.parentId = parentId;
|
|
2576
|
-
this.searchCode = searchCode;
|
|
2577
|
-
this.httpService
|
|
2578
|
-
.getWapiApiCall(this.getBaseParentUrl() + "ViewTypes")
|
|
2579
|
-
.subscribe(function (res) {
|
|
2580
|
-
callbackFunc(res);
|
|
2581
|
-
}
|
|
2582
|
-
// (error) => {},
|
|
2583
|
-
// () => {}
|
|
2584
|
-
);
|
|
2585
|
-
};
|
|
2586
|
-
PepInternalPageService.prototype.changeChildrenViewType = function (viewType, callbackFunc) {
|
|
2587
|
-
this.viewType = viewType;
|
|
2588
|
-
this.getChildren(callbackFunc);
|
|
2589
|
-
};
|
|
2590
|
-
PepInternalPageService.prototype.changeAdditionalApiName = function (additionalApiName, callbackFunc) {
|
|
2591
|
-
this.additionalApiName = additionalApiName;
|
|
2592
|
-
this.getChildren(callbackFunc);
|
|
2593
|
-
};
|
|
2594
|
-
PepInternalPageService.prototype.childPlusClick = function (itemId, fieldApiName, callbackFunc) {
|
|
2595
|
-
var body = JSON.stringify({
|
|
2596
|
-
TransactionUID: this.objectId,
|
|
2597
|
-
SearchCode: this.searchCode,
|
|
2598
|
-
ParentTransactionLineID: this.parentId,
|
|
2599
|
-
TransactionLineUID: itemId,
|
|
2600
|
-
FieldApiName: fieldApiName,
|
|
2601
|
-
ViewType: this.viewType,
|
|
2602
|
-
});
|
|
2603
|
-
this.httpService
|
|
2604
|
-
.postWapiApiCall(this.getBaseParentUrl() + "IncrementValue", body)
|
|
2605
|
-
.subscribe(function (res) {
|
|
2606
|
-
callbackFunc(res);
|
|
2607
|
-
}
|
|
2608
|
-
// (error) => {},
|
|
2609
|
-
// () => {}
|
|
2610
|
-
);
|
|
2611
|
-
};
|
|
2612
|
-
PepInternalPageService.prototype.childMinusClick = function (itemId, fieldApiName, callbackFunc) {
|
|
2613
|
-
var body = JSON.stringify({
|
|
2614
|
-
TransactionUID: this.objectId,
|
|
2615
|
-
SearchCode: this.searchCode,
|
|
2616
|
-
ParentTransactionLineID: this.parentId,
|
|
2617
|
-
TransactionLineUID: itemId,
|
|
2618
|
-
FieldApiName: fieldApiName,
|
|
2619
|
-
ViewType: this.viewType,
|
|
2620
|
-
});
|
|
2621
|
-
this.httpService
|
|
2622
|
-
.postWapiApiCall(this.getBaseParentUrl() + "DecrementValue", body)
|
|
2623
|
-
.subscribe(function (res) {
|
|
2624
|
-
callbackFunc(res);
|
|
2625
|
-
}
|
|
2626
|
-
// (error) => {},
|
|
2627
|
-
// () => {}
|
|
2628
|
-
);
|
|
2629
|
-
};
|
|
2630
|
-
PepInternalPageService.prototype.childValueChanged = function (itemId, fieldApiName, value, callbackFunc) {
|
|
2631
|
-
var body = JSON.stringify({
|
|
2632
|
-
TransactionUID: this.objectId,
|
|
2633
|
-
SearchCode: this.searchCode,
|
|
2634
|
-
ParentTransactionLineID: this.parentId,
|
|
2635
|
-
TransactionLineUID: itemId,
|
|
2636
|
-
FieldApiName: fieldApiName,
|
|
2637
|
-
FieldValue: value,
|
|
2638
|
-
ViewType: this.viewType,
|
|
2639
|
-
});
|
|
2640
|
-
this.httpService
|
|
2641
|
-
.postWapiApiCall(this.getBaseParentUrl() + "SetFieldValue", body)
|
|
2642
|
-
.subscribe(function (res) {
|
|
2643
|
-
callbackFunc(res);
|
|
2644
|
-
}
|
|
2645
|
-
// (error) => {},
|
|
2646
|
-
// () => {}
|
|
2647
|
-
);
|
|
2648
|
-
};
|
|
2649
|
-
return PepInternalPageService;
|
|
2650
|
-
}());
|
|
2651
|
-
PepInternalPageService.decorators = [
|
|
2652
|
-
{ type: core.Injectable }
|
|
2653
|
-
];
|
|
2654
|
-
PepInternalPageService.ctorParameters = function () { return [
|
|
2655
|
-
{ type: ngxLib.PepHttpService }
|
|
2656
|
-
]; };
|
|
2657
|
-
|
|
2658
2660
|
var PepInternalPageComponent = /** @class */ (function () {
|
|
2659
2661
|
function PepInternalPageComponent(fb, dialogService, internalPageService, customizationService, elementRef, changeDetectorRef) {
|
|
2660
2662
|
this.fb = fb;
|
|
@@ -3203,6 +3205,187 @@
|
|
|
3203
3205
|
internalFormFieldClick: [{ type: core.Output }]
|
|
3204
3206
|
};
|
|
3205
3207
|
|
|
3208
|
+
var PepDynamicFieldGeneratorComponent = /** @class */ (function () {
|
|
3209
|
+
function PepDynamicFieldGeneratorComponent(_resolver) {
|
|
3210
|
+
this._resolver = _resolver;
|
|
3211
|
+
/*get field(): any {
|
|
3212
|
+
return this._field;
|
|
3213
|
+
}*/
|
|
3214
|
+
this.isActive = false;
|
|
3215
|
+
this.uid = null;
|
|
3216
|
+
this.layoutType = 'form';
|
|
3217
|
+
this.showTitle = true;
|
|
3218
|
+
this.checkForChanges = null;
|
|
3219
|
+
this.valueChange = new core.EventEmitter();
|
|
3220
|
+
this.formValidationChange = new core.EventEmitter();
|
|
3221
|
+
this.elementClick = new core.EventEmitter();
|
|
3222
|
+
this.internalFormFieldChange = new core.EventEmitter();
|
|
3223
|
+
this.internalFormFieldClick = new core.EventEmitter();
|
|
3224
|
+
this.formValueChange = new core.EventEmitter();
|
|
3225
|
+
this.formFieldClick = new core.EventEmitter();
|
|
3226
|
+
}
|
|
3227
|
+
Object.defineProperty(PepDynamicFieldGeneratorComponent.prototype, "controlContainer", {
|
|
3228
|
+
set: function (val) {
|
|
3229
|
+
this._controlContainer = val;
|
|
3230
|
+
},
|
|
3231
|
+
enumerable: false,
|
|
3232
|
+
configurable: true
|
|
3233
|
+
});
|
|
3234
|
+
Object.defineProperty(PepDynamicFieldGeneratorComponent.prototype, "field", {
|
|
3235
|
+
set: function (value) {
|
|
3236
|
+
var _this = this;
|
|
3237
|
+
this._field = value;
|
|
3238
|
+
setTimeout(function () {
|
|
3239
|
+
_this.createControlDynamically();
|
|
3240
|
+
}, 0);
|
|
3241
|
+
},
|
|
3242
|
+
enumerable: false,
|
|
3243
|
+
configurable: true
|
|
3244
|
+
});
|
|
3245
|
+
PepDynamicFieldGeneratorComponent.prototype.hasProperty = function (obj, prop) {
|
|
3246
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
3247
|
+
};
|
|
3248
|
+
PepDynamicFieldGeneratorComponent.prototype.createControlDynamically = function () {
|
|
3249
|
+
if (this._controlContainer) {
|
|
3250
|
+
//const factory: ComponentFactory<any> = this.getComponentFactory();
|
|
3251
|
+
var factory = this._resolver.resolveComponentFactory(textbox.PepTextboxComponent);
|
|
3252
|
+
if (factory) {
|
|
3253
|
+
var componentRef = this._controlContainer.createComponent(factory);
|
|
3254
|
+
this._containerRef = componentRef.instance;
|
|
3255
|
+
this.setBaseProperties();
|
|
3256
|
+
this.setControlProperties();
|
|
3257
|
+
this.setAdditionalProperties();
|
|
3258
|
+
}
|
|
3259
|
+
else {
|
|
3260
|
+
console.log('no fctory for comp type - ', this._field.controlType);
|
|
3261
|
+
}
|
|
3262
|
+
//if (this._resolvedComponent) {
|
|
3263
|
+
// }
|
|
3264
|
+
// this.pepList = componentRef.instance;
|
|
3265
|
+
}
|
|
3266
|
+
else {
|
|
3267
|
+
//error
|
|
3268
|
+
}
|
|
3269
|
+
};
|
|
3270
|
+
PepDynamicFieldGeneratorComponent.prototype.getComponentFactory = function () {
|
|
3271
|
+
switch (this._field.controlType) {
|
|
3272
|
+
case 'address':
|
|
3273
|
+
this._resolvedComponent = address.PepAddressComponent;
|
|
3274
|
+
return this._resolver.resolveComponentFactory(address.PepAddressComponent);
|
|
3275
|
+
case 'attachment':
|
|
3276
|
+
this._resolvedComponent = attachment.PepAttachmentComponent;
|
|
3277
|
+
return this._resolver.resolveComponentFactory(attachment.PepAttachmentComponent);
|
|
3278
|
+
case 'checkbox':
|
|
3279
|
+
this._resolvedComponent = checkbox.PepCheckboxComponent;
|
|
3280
|
+
return this._resolver.resolveComponentFactory(checkbox.PepCheckboxComponent);
|
|
3281
|
+
case 'date':
|
|
3282
|
+
this._resolvedComponent = date.PepDateComponent;
|
|
3283
|
+
return this._resolver.resolveComponentFactory(date.PepDateComponent);
|
|
3284
|
+
case 'image':
|
|
3285
|
+
this._resolvedComponent = image.PepImageComponent;
|
|
3286
|
+
return this._resolver.resolveComponentFactory(image.PepImageComponent);
|
|
3287
|
+
case 'images':
|
|
3288
|
+
this._resolvedComponent = imagesFilmstrip.PepImagesFilmstripComponent;
|
|
3289
|
+
return this._resolver.resolveComponentFactory(imagesFilmstrip.PepImagesFilmstripComponent);
|
|
3290
|
+
case 'qs':
|
|
3291
|
+
this._resolvedComponent = quantitySelector.PepQuantitySelectorComponent;
|
|
3292
|
+
return this._resolver.resolveComponentFactory(quantitySelector.PepQuantitySelectorComponent);
|
|
3293
|
+
case 'richhtmltextarea':
|
|
3294
|
+
this._resolvedComponent = richHtmlTextarea.PepRichHtmlTextareaComponent;
|
|
3295
|
+
return this._resolver.resolveComponentFactory(richHtmlTextarea.PepRichHtmlTextareaComponent);
|
|
3296
|
+
case 'select':
|
|
3297
|
+
this._resolvedComponent = select.PepSelectComponent;
|
|
3298
|
+
return this._resolver.resolveComponentFactory(select.PepSelectComponent);
|
|
3299
|
+
case 'separator':
|
|
3300
|
+
this._resolvedComponent = separator.PepSeparatorComponent;
|
|
3301
|
+
return this._resolver.resolveComponentFactory(separator.PepSeparatorComponent);
|
|
3302
|
+
/*case 'signature':
|
|
3303
|
+
this._resolvedComponent = PepSignatureComponent;
|
|
3304
|
+
return this._resolver.resolveComponentFactory(PepSignatureComponent); */
|
|
3305
|
+
case 'textarea':
|
|
3306
|
+
this._resolvedComponent = textarea.PepTextareaComponent;
|
|
3307
|
+
return this._resolver.resolveComponentFactory(textarea.PepTextareaComponent);
|
|
3308
|
+
case 'textbox':
|
|
3309
|
+
this._resolvedComponent = textbox.PepTextboxComponent;
|
|
3310
|
+
return this._resolver.resolveComponentFactory(textbox.PepTextboxComponent);
|
|
3311
|
+
case 'link':
|
|
3312
|
+
this._resolvedComponent = link.PepLinkComponent;
|
|
3313
|
+
return this._resolver.resolveComponentFactory(link.PepLinkComponent);
|
|
3314
|
+
case 'indicators':
|
|
3315
|
+
this._resolvedComponent = PepIndicatorsComponent;
|
|
3316
|
+
return this._resolver.resolveComponentFactory(PepIndicatorsComponent);
|
|
3317
|
+
case 'button':
|
|
3318
|
+
this._resolvedComponent = PepInternalButtonComponent;
|
|
3319
|
+
return this._resolver.resolveComponentFactory(PepInternalButtonComponent);
|
|
3320
|
+
case 'menu':
|
|
3321
|
+
this._resolvedComponent = PepInternalMenuComponent;
|
|
3322
|
+
return this._resolver.resolveComponentFactory(PepInternalMenuComponent);
|
|
3323
|
+
case 'internalPage':
|
|
3324
|
+
this._resolvedComponent = PepInternalPageComponent;
|
|
3325
|
+
return this._resolver.resolveComponentFactory(PepInternalPageComponent);
|
|
3326
|
+
case 'internalCarusel':
|
|
3327
|
+
this._resolvedComponent = PepInternalCaruselComponent;
|
|
3328
|
+
return this._resolver.resolveComponentFactory(PepInternalCaruselComponent);
|
|
3329
|
+
}
|
|
3330
|
+
};
|
|
3331
|
+
PepDynamicFieldGeneratorComponent.prototype.setBaseProperties = function () {
|
|
3332
|
+
switch (this._field.controlType) {
|
|
3333
|
+
case 'textbox':
|
|
3334
|
+
this._containerRef.form = this.form;
|
|
3335
|
+
this._containerRef.showTitle = this.showTitle;
|
|
3336
|
+
this._containerRef.layoutType = this.layoutType;
|
|
3337
|
+
break;
|
|
3338
|
+
}
|
|
3339
|
+
};
|
|
3340
|
+
PepDynamicFieldGeneratorComponent.prototype.setControlProperties = function () {
|
|
3341
|
+
var _this = this;
|
|
3342
|
+
// debugger;
|
|
3343
|
+
/*Object.entries(this._field).forEach((prop: [string, any]) => {
|
|
3344
|
+
console.log('prop', prop);
|
|
3345
|
+
if (prop[1] !== undefined && this.hasProperty(this._resolvedComponent.propDecorators, prop[0])) {
|
|
3346
|
+
this._containerRef[prop[0]] = prop[1];
|
|
3347
|
+
}
|
|
3348
|
+
}) */
|
|
3349
|
+
Object.entries(this._field).forEach(function (prop) {
|
|
3350
|
+
console.log('prop', prop);
|
|
3351
|
+
if (prop[1] !== undefined && _this.hasProperty(_this._containerRef, prop[0])) {
|
|
3352
|
+
_this._containerRef[prop[0]] = prop[1];
|
|
3353
|
+
}
|
|
3354
|
+
});
|
|
3355
|
+
};
|
|
3356
|
+
PepDynamicFieldGeneratorComponent.prototype.setAdditionalProperties = function () {
|
|
3357
|
+
};
|
|
3358
|
+
return PepDynamicFieldGeneratorComponent;
|
|
3359
|
+
}());
|
|
3360
|
+
PepDynamicFieldGeneratorComponent.decorators = [
|
|
3361
|
+
{ type: core.Component, args: [{
|
|
3362
|
+
selector: 'pep-dynamic-field-generator',
|
|
3363
|
+
template: "<ng-container [formGroup]=\"form\">\n <ng-container #controlContainer></ng-container>\n</ng-container>",
|
|
3364
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
3365
|
+
styles: [":host{width:100%;height:100%}"]
|
|
3366
|
+
},] }
|
|
3367
|
+
];
|
|
3368
|
+
PepDynamicFieldGeneratorComponent.ctorParameters = function () { return [
|
|
3369
|
+
{ type: core.ComponentFactoryResolver }
|
|
3370
|
+
]; };
|
|
3371
|
+
PepDynamicFieldGeneratorComponent.propDecorators = {
|
|
3372
|
+
controlContainer: [{ type: core.ViewChild, args: ['controlContainer', { read: core.ViewContainerRef },] }],
|
|
3373
|
+
field: [{ type: core.Input }],
|
|
3374
|
+
isActive: [{ type: core.Input }],
|
|
3375
|
+
uid: [{ type: core.Input }],
|
|
3376
|
+
form: [{ type: core.Input }],
|
|
3377
|
+
layoutType: [{ type: core.Input }],
|
|
3378
|
+
showTitle: [{ type: core.Input }],
|
|
3379
|
+
checkForChanges: [{ type: core.Input }],
|
|
3380
|
+
valueChange: [{ type: core.Output }],
|
|
3381
|
+
formValidationChange: [{ type: core.Output }],
|
|
3382
|
+
elementClick: [{ type: core.Output }],
|
|
3383
|
+
internalFormFieldChange: [{ type: core.Output }],
|
|
3384
|
+
internalFormFieldClick: [{ type: core.Output }],
|
|
3385
|
+
formValueChange: [{ type: core.Output }],
|
|
3386
|
+
formFieldClick: [{ type: core.Output }]
|
|
3387
|
+
};
|
|
3388
|
+
|
|
3206
3389
|
var pepComponentsModules = [
|
|
3207
3390
|
address.PepAddressModule,
|
|
3208
3391
|
attachment.PepAttachmentModule,
|
|
@@ -3260,6 +3443,7 @@
|
|
|
3260
3443
|
declarations: [
|
|
3261
3444
|
PepFormComponent,
|
|
3262
3445
|
PepFieldGeneratorComponent,
|
|
3446
|
+
PepDynamicFieldGeneratorComponent,
|
|
3263
3447
|
PepIndicatorsComponent,
|
|
3264
3448
|
PepInternalButtonComponent,
|
|
3265
3449
|
PepInternalListComponent,
|
|
@@ -3284,14 +3468,15 @@
|
|
|
3284
3468
|
exports.PepFormComponent = PepFormComponent;
|
|
3285
3469
|
exports.PepFormModule = PepFormModule;
|
|
3286
3470
|
exports.ɵa = PepFieldGeneratorComponent;
|
|
3287
|
-
exports.ɵb =
|
|
3288
|
-
exports.ɵc =
|
|
3289
|
-
exports.ɵd =
|
|
3290
|
-
exports.ɵe =
|
|
3291
|
-
exports.ɵf =
|
|
3292
|
-
exports.ɵg =
|
|
3293
|
-
exports.ɵh =
|
|
3294
|
-
exports.ɵi =
|
|
3471
|
+
exports.ɵb = PepDynamicFieldGeneratorComponent;
|
|
3472
|
+
exports.ɵc = PepIndicatorsComponent;
|
|
3473
|
+
exports.ɵd = PepInternalButtonComponent;
|
|
3474
|
+
exports.ɵe = PepInternalListComponent;
|
|
3475
|
+
exports.ɵf = PepInternalMenuComponent;
|
|
3476
|
+
exports.ɵg = PepInternalPageComponent;
|
|
3477
|
+
exports.ɵh = PepInternalPageService;
|
|
3478
|
+
exports.ɵi = PepInternalCaruselComponent;
|
|
3479
|
+
exports.ɵj = PepInternalCaruselService;
|
|
3295
3480
|
|
|
3296
3481
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3297
3482
|
|