@pepperi-addons/ngx-lib 0.4.0-angular14.1 → 0.4.0-angular14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/address/address.component.mjs +3 -3
- package/esm2020/address/address.module.mjs +4 -4
- package/esm2020/attachment/attachment.component.mjs +3 -3
- package/esm2020/attachment/attachment.module.mjs +4 -4
- package/esm2020/bread-crumbs/bread-crumbs.component.mjs +4 -4
- package/esm2020/bread-crumbs/bread-crumbs.module.mjs +4 -4
- package/esm2020/button/button.component.mjs +3 -3
- package/esm2020/button/button.module.mjs +4 -4
- package/esm2020/carousel/carousel-item.directive.mjs +3 -3
- package/esm2020/carousel/carousel.component.mjs +3 -3
- package/esm2020/carousel/carousel.module.mjs +4 -4
- package/esm2020/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/checkbox/checkbox.module.mjs +4 -4
- package/esm2020/color/color-picker.component.mjs +3 -3
- package/esm2020/color/color.component.mjs +3 -3
- package/esm2020/color/color.module.mjs +4 -4
- package/esm2020/core/clipboard/clipboard.directive.mjs +3 -3
- package/esm2020/core/clipboard/clipboard.service.mjs +3 -3
- package/esm2020/core/common/directives/auto-width.directive.mjs +3 -3
- package/esm2020/core/common/directives/button-blur.directive.mjs +3 -3
- package/esm2020/core/common/directives/button-loader.directive.mjs +3 -3
- package/esm2020/core/common/directives/data-qa.directive.mjs +3 -3
- package/esm2020/core/common/directives/menu-blur.directive.mjs +3 -3
- package/esm2020/core/common/directives/prevent-multi-click.directive.mjs +3 -3
- package/esm2020/core/common/directives/print.directive.mjs +3 -3
- package/esm2020/core/common/pipes/common-pipes.mjs +30 -30
- package/esm2020/core/common/pipes/date-ago.pipe.mjs +3 -3
- package/esm2020/core/common/services/addon.service.mjs +3 -3
- package/esm2020/core/common/services/color.service.mjs +3 -3
- package/esm2020/core/common/services/cookie.service.mjs +3 -3
- package/esm2020/core/common/services/data-convertor.service.mjs +3 -3
- package/esm2020/core/common/services/file.service.mjs +3 -3
- package/esm2020/core/common/services/jwt-helper.service.mjs +3 -3
- package/esm2020/core/common/services/session.service.mjs +3 -3
- package/esm2020/core/common/services/translate.service.mjs +3 -3
- package/esm2020/core/common/services/utilities.service.mjs +3 -3
- package/esm2020/core/common/services/validator.service.mjs +3 -3
- package/esm2020/core/common/services/window-scrolling.service.mjs +3 -3
- package/esm2020/core/customization/customization.service.mjs +3 -3
- package/esm2020/core/http/interceptors/error.interceptor.mjs +3 -3
- package/esm2020/core/http/interceptors/loader.interceptor.mjs +3 -3
- package/esm2020/core/http/interceptors/profiler.interceptor.mjs +3 -3
- package/esm2020/core/http/services/http.service.mjs +3 -3
- package/esm2020/core/http/services/loader.service.mjs +3 -3
- package/esm2020/core/layout/layout.service.mjs +3 -3
- package/esm2020/core/layout/rtl.directive.mjs +6 -6
- package/esm2020/core/portal/attach.directive.mjs +3 -3
- package/esm2020/core/portal/portal.service.mjs +3 -3
- package/esm2020/core/portal/target.directive.mjs +3 -3
- package/esm2020/core/scroll-to/scroll-to.service.mjs +3 -3
- package/esm2020/date/date.component.mjs +3 -3
- package/esm2020/date/date.model.mjs +6 -6
- package/esm2020/date/date.module.mjs +4 -4
- package/esm2020/dialog/default-dialog.component.mjs +3 -3
- package/esm2020/dialog/dialog.component.mjs +3 -3
- package/esm2020/dialog/dialog.module.mjs +4 -4
- package/esm2020/dialog/dialog.service.mjs +3 -3
- package/esm2020/draggable-items/draggable-item/draggable-item.component.mjs +3 -3
- package/esm2020/draggable-items/draggable-items.component.mjs +3 -3
- package/esm2020/draggable-items/draggable-items.module.mjs +4 -4
- package/esm2020/field-title/field-title.component.mjs +3 -3
- package/esm2020/field-title/field-title.module.mjs +4 -4
- package/esm2020/files-uploader/files-uploader.component.mjs +4 -4
- package/esm2020/files-uploader/files-uploader.module.mjs +4 -4
- package/esm2020/form/field-generator.component.mjs +7 -5
- package/esm2020/form/form.component.mjs +3 -3
- package/esm2020/form/form.module.mjs +11 -5
- package/esm2020/form/indicators.component.mjs +3 -3
- package/esm2020/form/internal-button.component.mjs +3 -3
- package/esm2020/form/internal-carusel.component.mjs +6 -6
- package/esm2020/form/internal-carusel.service.mjs +3 -3
- package/esm2020/form/internal-field-generator.component.mjs +147 -0
- package/esm2020/form/internal-form.component.mjs +1214 -0
- package/esm2020/form/internal-list.component.mjs +6 -6
- package/esm2020/form/internal-menu.component.mjs +3 -3
- package/esm2020/form/internal-page.component.mjs +3 -3
- package/esm2020/form/internal-page.service.mjs +3 -3
- package/esm2020/group-buttons/group-buttons.component.mjs +3 -3
- package/esm2020/group-buttons/group-buttons.module.mjs +4 -4
- package/esm2020/icon/icon-registry.service.mjs +3 -3
- package/esm2020/icon/icon.component.mjs +3 -3
- package/esm2020/icon/icon.module.mjs +4 -4
- package/esm2020/icon/icon.service.mjs +3 -3
- package/esm2020/image/image.component.mjs +3 -3
- package/esm2020/image/image.module.mjs +4 -4
- package/esm2020/image/image.service.mjs +3 -3
- package/esm2020/images-filmstrip/images-filmstrip.component.mjs +3 -3
- package/esm2020/images-filmstrip/images-filmstrip.module.mjs +4 -4
- package/esm2020/link/link.component.mjs +3 -3
- package/esm2020/link/link.module.mjs +4 -4
- package/esm2020/link/link.pipes.mjs +3 -3
- package/esm2020/list/list-actions.component.mjs +4 -4
- package/esm2020/list/list-carousel.component.mjs +4 -4
- package/esm2020/list/list-chooser.component.mjs +4 -4
- package/esm2020/list/list-pager.component.mjs +4 -4
- package/esm2020/list/list-sorting.component.mjs +4 -4
- package/esm2020/list/list-total.component.mjs +4 -4
- package/esm2020/list/list-views.component.mjs +4 -4
- package/esm2020/list/list.component.mjs +3 -3
- package/esm2020/list/list.module.mjs +4 -4
- package/esm2020/list/list.pipes.mjs +6 -6
- package/esm2020/list/virtual-scroller.mjs +7 -7
- package/esm2020/menu/menu-item.component.mjs +3 -3
- package/esm2020/menu/menu.component.mjs +3 -3
- package/esm2020/menu/menu.module.mjs +4 -4
- package/esm2020/ngx-lib.module.mjs +4 -4
- package/esm2020/page-layout/page-layout.component.mjs +3 -3
- package/esm2020/page-layout/page-layout.module.mjs +4 -4
- package/esm2020/profile-data-views-list/profile-data-view/profile-data-view.component.mjs +3 -3
- package/esm2020/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.mjs +3 -3
- package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +3 -3
- package/esm2020/profile-data-views-list/profile-data-views-list.module.mjs +4 -4
- package/esm2020/quantity-selector/quantity-selector-validation.directive.mjs +3 -3
- package/esm2020/quantity-selector/quantity-selector.component.mjs +3 -3
- package/esm2020/quantity-selector/quantity-selector.module.mjs +4 -4
- package/esm2020/quantity-selector/quantity-selector.pipes.mjs +3 -3
- package/esm2020/query-builder/common/services/output-query.service.mjs +3 -3
- package/esm2020/query-builder/common/services/query-structure.service.mjs +3 -3
- package/esm2020/query-builder/common/services/type-convertor.service.mjs +3 -3
- package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +3 -3
- package/esm2020/query-builder/query-builder-section/query-builder-section.component.mjs +3 -3
- package/esm2020/query-builder/query-builder.component.mjs +3 -3
- package/esm2020/query-builder/query-builder.module.mjs +4 -4
- package/esm2020/query-builder/query-builder.service.mjs +3 -3
- package/esm2020/remote-loader/addon-block-loader.component.mjs +3 -3
- package/esm2020/remote-loader/addon-block-loader.service.mjs +3 -3
- package/esm2020/remote-loader/remote-loader.component.mjs +39 -40
- package/esm2020/remote-loader/remote-loader.module.mjs +4 -4
- package/esm2020/remote-loader/remote-loader.service.mjs +3 -3
- package/esm2020/rich-html-textarea/rich-html-textarea.component.mjs +3 -3
- package/esm2020/rich-html-textarea/rich-html-textarea.module.mjs +4 -4
- package/esm2020/search/search.component.mjs +4 -4
- package/esm2020/search/search.module.mjs +4 -4
- package/esm2020/select/select.component.mjs +3 -3
- package/esm2020/select/select.module.mjs +4 -4
- package/esm2020/separator/separator.component.mjs +3 -3
- package/esm2020/separator/separator.module.mjs +4 -4
- package/esm2020/side-bar/side-bar.component.mjs +4 -4
- package/esm2020/side-bar/side-bar.module.mjs +4 -4
- package/esm2020/signature/signature.component.mjs +3 -3
- package/esm2020/signature/signature.module.mjs +4 -4
- package/esm2020/size-detector/size-detector.component.mjs +3 -3
- package/esm2020/size-detector/size-detector.module.mjs +4 -4
- package/esm2020/slider/slider.component.mjs +3 -3
- package/esm2020/slider/slider.module.mjs +4 -4
- package/esm2020/smart-filters/boolean-filter/boolean-filter.component.mjs +3 -3
- package/esm2020/smart-filters/common/filter-actions.component.mjs +3 -3
- package/esm2020/smart-filters/common/model/base-filter-component.mjs +3 -3
- package/esm2020/smart-filters/date-filter/date-filter.component.mjs +3 -3
- package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +3 -3
- package/esm2020/smart-filters/number-filter/number-filter.component.mjs +3 -3
- package/esm2020/smart-filters/smart-filters.component.mjs +3 -3
- package/esm2020/smart-filters/smart-filters.module.mjs +4 -4
- package/esm2020/smart-filters/text-filter/text-filter.component.mjs +3 -3
- package/esm2020/snack-bar/default-snack-bar.component.mjs +3 -3
- package/esm2020/snack-bar/snack-bar.component.mjs +3 -3
- package/esm2020/snack-bar/snack-bar.module.mjs +4 -4
- package/esm2020/snack-bar/snack-bar.service.mjs +3 -3
- package/esm2020/textarea/textarea.component.mjs +3 -3
- package/esm2020/textarea/textarea.module.mjs +4 -4
- package/esm2020/textbox/textbox-validation.directive.mjs +3 -3
- package/esm2020/textbox/textbox.component.mjs +3 -3
- package/esm2020/textbox/textbox.module.mjs +4 -4
- package/esm2020/textbox-icon/textbox-icon.component.mjs +3 -3
- package/esm2020/textbox-icon/textbox-icon.module.mjs +4 -4
- package/esm2020/top-bar/top-bar.component.mjs +3 -3
- package/esm2020/top-bar/top-bar.module.mjs +4 -4
- package/fesm2015/pepperi-addons-ngx-lib-address.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.mjs +8 -8
- package/fesm2015/pepperi-addons-ngx-lib-button.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-carousel.mjs +10 -10
- package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-color.mjs +10 -10
- package/fesm2015/pepperi-addons-ngx-lib-date.mjs +13 -13
- package/fesm2015/pepperi-addons-ngx-lib-dialog.mjs +13 -13
- package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs +10 -10
- package/fesm2015/pepperi-addons-ngx-lib-field-title.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-files-uploader.mjs +8 -8
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs +1555 -230
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-icon.mjs +13 -13
- package/fesm2015/pepperi-addons-ngx-lib-image.mjs +10 -10
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs +10 -10
- package/fesm2015/pepperi-addons-ngx-lib-list.mjs +48 -48
- package/fesm2015/pepperi-addons-ngx-lib-menu.mjs +10 -10
- package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +13 -13
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +13 -13
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +25 -25
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +53 -53
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-search.mjs +8 -8
- package/fesm2015/pepperi-addons-ngx-lib-select.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-separator.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs +8 -8
- package/fesm2015/pepperi-addons-ngx-lib-signature.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-slider.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +28 -28
- package/fesm2015/pepperi-addons-ngx-lib-snack-bar.mjs +13 -13
- package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-textbox-icon.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +10 -10
- package/fesm2015/pepperi-addons-ngx-lib-top-bar.mjs +7 -7
- package/fesm2015/pepperi-addons-ngx-lib.mjs +136 -136
- package/fesm2020/pepperi-addons-ngx-lib-address.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-attachment.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-bread-crumbs.mjs +8 -8
- package/fesm2020/pepperi-addons-ngx-lib-button.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-carousel.mjs +10 -10
- package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-color.mjs +10 -10
- package/fesm2020/pepperi-addons-ngx-lib-date.mjs +13 -13
- package/fesm2020/pepperi-addons-ngx-lib-dialog.mjs +13 -13
- package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs +10 -10
- package/fesm2020/pepperi-addons-ngx-lib-field-title.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-files-uploader.mjs +8 -8
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs +1552 -228
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-icon.mjs +13 -13
- package/fesm2020/pepperi-addons-ngx-lib-image.mjs +10 -10
- package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs +10 -10
- package/fesm2020/pepperi-addons-ngx-lib-list.mjs +48 -48
- package/fesm2020/pepperi-addons-ngx-lib-menu.mjs +10 -10
- package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs +13 -13
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +13 -13
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +25 -25
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +51 -51
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-search.mjs +8 -8
- package/fesm2020/pepperi-addons-ngx-lib-select.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-separator.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs +8 -8
- package/fesm2020/pepperi-addons-ngx-lib-signature.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-slider.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +28 -28
- package/fesm2020/pepperi-addons-ngx-lib-snack-bar.mjs +13 -13
- package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-textbox-icon.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +10 -10
- package/fesm2020/pepperi-addons-ngx-lib-top-bar.mjs +7 -7
- package/fesm2020/pepperi-addons-ngx-lib.mjs +136 -136
- package/form/form.module.d.ts +40 -38
- package/form/internal-field-generator.component.d.ts +35 -0
- package/form/internal-form.component.d.ts +89 -0
- package/package.json +8 -8
- package/remote-loader/remote-loader.component.d.ts +2 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, ViewEncapsulation, ViewChild,
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, Injectable, ViewEncapsulation, ViewChild, ViewContainerRef, TemplateRef, NgModule } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i3$1 from '@angular/forms';
|
|
@@ -15,11 +15,11 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
15
15
|
import * as i4$2 from '@angular/material/menu';
|
|
16
16
|
import { MatMenuModule } from '@angular/material/menu';
|
|
17
17
|
import { SignaturePadModule } from 'ngx-signaturepad';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i2 from '@pepperi-addons/ngx-lib';
|
|
19
19
|
import { DEFAULT_HORIZONTAL_ALIGNMENT, X_ALIGNMENT_TYPE, DEFAULT_VERTICAL_ALIGNMENT, Y_ALIGNMENT_TYPE, PepTextboxField, PepSelectField, PepInternalMenuField, FIELD_TYPE, PepQuantitySelectorField, PepSeparatorField, PepInternalButtonField, PepCheckboxField, PepDateField, PepRichHtmlTextareaField, PepTextareaField, PepLinkField, PepImagesField, PepImageField, PepSignatureField, PepAttachmentField, PepInternalCaruselField, PepInternalPageField, PepIndicatorsField, PepAddressField, PepCustomizationService, PepPlaceholderField, PepScreenSizeType, PepNgxLibModule } from '@pepperi-addons/ngx-lib';
|
|
20
20
|
import * as i1 from '@pepperi-addons/ngx-lib/icon';
|
|
21
21
|
import { pepIconSystemBin, pepIconSystemEdit, pepIconSystemMenu, pepIconNumberPlus, pepIconIndicatorDotPlaceholder, PepIconModule } from '@pepperi-addons/ngx-lib/icon';
|
|
22
|
-
import * as i1$
|
|
22
|
+
import * as i1$1 from '@pepperi-addons/ngx-lib/dialog';
|
|
23
23
|
import { PepDialogData, PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';
|
|
24
24
|
import * as i3$2 from '@pepperi-addons/ngx-lib/address';
|
|
25
25
|
import { PepAddressModule } from '@pepperi-addons/ngx-lib/address';
|
|
@@ -68,9 +68,9 @@ class PepIndicatorsComponent {
|
|
|
68
68
|
this.layoutType = 'table';
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
PepIndicatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
72
|
-
PepIndicatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
71
|
+
PepIndicatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepIndicatorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
+
PepIndicatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepIndicatorsComponent, selector: "pep-indicators", inputs: { key: "key", value: "value", layoutType: "layoutType" }, ngImport: i0, template: "<div class=\"indicators-container\" [ngClass]=\"{ 'is-inside-table': layoutType === 'table' }\">\n <ng-container *ngFor=\"let value of value?.split(';')\">\n <pep-icon name=\"indicator_dot_placeholder\" class=\"pull-left flip\" [fill]=\"value\"></pep-icon>\n </ng-container>\n <ng-container *ngIf=\"key != 'ItemIndicatorsWithoutCampaign' && value?.split(';').length < 4\">\n <pep-icon name=\"indicator_dot_placeholder\" class=\"pull-left flip\"></pep-icon>\n </ng-container>\n</div>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.indicators-container{height:2.5rem}.indicators-container pep-icon{height:1rem;width:1rem;margin:.05rem}.indicators-container.is-inside-table{height:1rem;display:flex;justify-content:center;align-items:center}\n", ".indicators-container .svg-icon{fill:hsla(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%),.5)}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepIndicatorsComponent, decorators: [{
|
|
74
74
|
type: Component,
|
|
75
75
|
args: [{ selector: 'pep-indicators', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"indicators-container\" [ngClass]=\"{ 'is-inside-table': layoutType === 'table' }\">\n <ng-container *ngFor=\"let value of value?.split(';')\">\n <pep-icon name=\"indicator_dot_placeholder\" class=\"pull-left flip\" [fill]=\"value\"></pep-icon>\n </ng-container>\n <ng-container *ngIf=\"key != 'ItemIndicatorsWithoutCampaign' && value?.split(';').length < 4\">\n <pep-icon name=\"indicator_dot_placeholder\" class=\"pull-left flip\"></pep-icon>\n </ng-container>\n</div>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.indicators-container{height:2.5rem}.indicators-container pep-icon{height:1rem;width:1rem;margin:.05rem}.indicators-container.is-inside-table{height:1rem;display:flex;justify-content:center;align-items:center}\n", ".indicators-container .svg-icon{fill:hsla(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%),.5)}\n"] }]
|
|
76
76
|
}], propDecorators: { key: [{
|
|
@@ -211,12 +211,12 @@ class PepInternalButtonComponent {
|
|
|
211
211
|
this.valueChange.emit(this.value);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
PepInternalButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
215
|
-
PepInternalButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: { key: "key", value: "value", formattedValue: "formattedValue", label: "label", referenceObjectInternalType: "referenceObjectInternalType", type: "type", mandatory: "mandatory", disabled: "disabled", readonly: "readonly", xAlignment: "xAlignment", rowSpan: "rowSpan", visible: "visible", form: "form", showTitle: "showTitle", layoutType: "layoutType" }, outputs: { elementClick: "elementClick", valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'reference'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <div class=\"pep-button-container reference-button\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngIf=\"createNewReference; then newBlock; else existingBlock\"></ng-container>\n <ng-template #newBlock>\n <button mat-button [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-button md regular\"\n (click)=\"onButtonClicked($event)\" [ngClass]=\"{\n disabled: disabled,\n 'pull-left': xAlignment == 'left',\n 'pull-right': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\">\n <span class=\"ellipsis pull-left flip button-title-with-icon\">{{ 'ACTIONS.CREATE_NEW' | translate\n }}</span>\n <mat-icon class=\"pull-right flip\" pepRtlClass>\n <pep-icon name=\"number_plus\" (click)=\"onButtonClicked($event)\">\n </pep-icon>\n </mat-icon>\n </button>\n </ng-template>\n <ng-template #existingBlock>\n <pep-group-buttons [buttons]=\"referenceButtons\" styleType=\"regular\" viewType=\"split\">\n </pep-group-buttons>\n </ng-template>\n </div>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'listofobjects'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <ng-container [ngSwitch]=\"key\">\n <ng-container *ngSwitchCase=\"'ObjectMenu'\">\n <span (click)=\"onButtonClicked($event)\" title=\"{{ key }}\">\n <mat-icon>\n <pep-icon *ngIf=\"key == 'ObjectMenu'\" name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Agents' || 'ContactPersons' || 'Buyers'\">\n <ng-container *ngIf=\"layoutType === 'table'; then tableBlock; else nonTableBlock\">\n </ng-container>\n <ng-template #nonTableBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #tableBlock>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-report-input readonly body-sm\">{{\n formattedValue }}</span>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"layoutType === 'form'; then buttonBlock; else linkBlock\">\n </ng-container>\n\n <ng-template #buttonBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: false}\"></ng-container>\n </ng-template>\n <ng-template #linkBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #buttonTemplate let-internal=\"internal\">\n <div class=\"pep-button-container\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n\n <ng-container *ngIf=\"internal; then internalButtonTemplate; else regularButtonTemplate\"></ng-container>\n <ng-template #regularButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"onButtonClicked($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n {{ formattedValue }}\n </button>\n </ng-template>\n\n <ng-template #internalButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"openReferenceObjectInternal($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n <ng-container *ngIf=\"formattedValue == '0' || formattedValue == ''; then newBlock; else existingBlock\">\n </ng-container>\n <ng-template #newBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ 'LIST.SELECT' | translate }} </span>\n <mat-icon>\n <pep-icon name=\"number_plus\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #existingBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ formattedValue }} {{ 'LIST.SELECTED' |\n translate\n }} </span>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n </button>\n </ng-template>\n </div>\n</ng-template>\n\n<ng-template #linkTemplate>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a href=\"{{ value }}\" (mousedown)=\"hrefFunction($event)\" class=\"color-link\">\n <span *ngIf=\"layoutType === 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\"\n class=\"body-sm pep-report-input readonly\">\n {{ formattedValue }}\n </span>\n <span *ngIf=\"layoutType !== 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm pep-card-input\"\n style=\"display: block;\">\n {{ formattedValue }}\n </span>\n </a>\n </ng-template>\n <ng-template #emptyBlock>\n <span> </span>\n </ng-template>\n</ng-template>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button-container,.pep-button-container{height:-moz-fit-content;height:fit-content}.pepperi-button-container .center-alignment,.pep-button-container .center-alignment{position:absolute;left:50%;transform:translate(-50%)}.pepperi-button-container.reference-button ::ng-deep .split-buttons,.pepperi-button-container.reference-button .split-buttons,.pep-button-container.reference-button ::ng-deep .split-buttons,.pep-button-container.reference-button .split-buttons{float:left}.pepperi-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pepperi-button-container.reference-button .split-buttons button:last-of-type,.pep-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pep-button-container.reference-button .split-buttons button:last-of-type{width:1.5rem;padding:0}\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.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: i4.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: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$1.PepRtlClassDirective, selector: "[pepRtlClass]" }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i7.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength"] }, { kind: "component", type: i8.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
214
|
+
PepInternalButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalButtonComponent, deps: [{ token: i2.PepCustomizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
215
|
+
PepInternalButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: { key: "key", value: "value", formattedValue: "formattedValue", label: "label", referenceObjectInternalType: "referenceObjectInternalType", type: "type", mandatory: "mandatory", disabled: "disabled", readonly: "readonly", xAlignment: "xAlignment", rowSpan: "rowSpan", visible: "visible", form: "form", showTitle: "showTitle", layoutType: "layoutType" }, outputs: { elementClick: "elementClick", valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'reference'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <div class=\"pep-button-container reference-button\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngIf=\"createNewReference; then newBlock; else existingBlock\"></ng-container>\n <ng-template #newBlock>\n <button mat-button [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-button md regular\"\n (click)=\"onButtonClicked($event)\" [ngClass]=\"{\n disabled: disabled,\n 'pull-left': xAlignment == 'left',\n 'pull-right': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\">\n <span class=\"ellipsis pull-left flip button-title-with-icon\">{{ 'ACTIONS.CREATE_NEW' | translate\n }}</span>\n <mat-icon class=\"pull-right flip\" pepRtlClass>\n <pep-icon name=\"number_plus\" (click)=\"onButtonClicked($event)\">\n </pep-icon>\n </mat-icon>\n </button>\n </ng-template>\n <ng-template #existingBlock>\n <pep-group-buttons [buttons]=\"referenceButtons\" styleType=\"regular\" viewType=\"split\">\n </pep-group-buttons>\n </ng-template>\n </div>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'listofobjects'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <ng-container [ngSwitch]=\"key\">\n <ng-container *ngSwitchCase=\"'ObjectMenu'\">\n <span (click)=\"onButtonClicked($event)\" title=\"{{ key }}\">\n <mat-icon>\n <pep-icon *ngIf=\"key == 'ObjectMenu'\" name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Agents' || 'ContactPersons' || 'Buyers'\">\n <ng-container *ngIf=\"layoutType === 'table'; then tableBlock; else nonTableBlock\">\n </ng-container>\n <ng-template #nonTableBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #tableBlock>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-report-input readonly body-sm\">{{\n formattedValue }}</span>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"layoutType === 'form'; then buttonBlock; else linkBlock\">\n </ng-container>\n\n <ng-template #buttonBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: false}\"></ng-container>\n </ng-template>\n <ng-template #linkBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #buttonTemplate let-internal=\"internal\">\n <div class=\"pep-button-container\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n\n <ng-container *ngIf=\"internal; then internalButtonTemplate; else regularButtonTemplate\"></ng-container>\n <ng-template #regularButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"onButtonClicked($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n {{ formattedValue }}\n </button>\n </ng-template>\n\n <ng-template #internalButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"openReferenceObjectInternal($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n <ng-container *ngIf=\"formattedValue == '0' || formattedValue == ''; then newBlock; else existingBlock\">\n </ng-container>\n <ng-template #newBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ 'LIST.SELECT' | translate }} </span>\n <mat-icon>\n <pep-icon name=\"number_plus\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #existingBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ formattedValue }} {{ 'LIST.SELECTED' |\n translate\n }} </span>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n </button>\n </ng-template>\n </div>\n</ng-template>\n\n<ng-template #linkTemplate>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a href=\"{{ value }}\" (mousedown)=\"hrefFunction($event)\" class=\"color-link\">\n <span *ngIf=\"layoutType === 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\"\n class=\"body-sm pep-report-input readonly\">\n {{ formattedValue }}\n </span>\n <span *ngIf=\"layoutType !== 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm pep-card-input\"\n style=\"display: block;\">\n {{ formattedValue }}\n </span>\n </a>\n </ng-template>\n <ng-template #emptyBlock>\n <span> </span>\n </ng-template>\n</ng-template>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button-container,.pep-button-container{height:-moz-fit-content;height:fit-content}.pepperi-button-container .center-alignment,.pep-button-container .center-alignment{position:absolute;left:50%;transform:translate(-50%)}.pepperi-button-container.reference-button ::ng-deep .split-buttons,.pepperi-button-container.reference-button .split-buttons,.pep-button-container.reference-button ::ng-deep .split-buttons,.pep-button-container.reference-button .split-buttons{float:left}.pepperi-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pepperi-button-container.reference-button .split-buttons button:last-of-type,.pep-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pep-button-container.reference-button .split-buttons button:last-of-type{width:1.5rem;padding:0}\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.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: i4.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: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2.PepRtlClassDirective, selector: "[pepRtlClass]" }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i7.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength"] }, { kind: "component", type: i8.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalButtonComponent, decorators: [{
|
|
217
217
|
type: Component,
|
|
218
218
|
args: [{ selector: 'pep-internal-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'reference'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <div class=\"pep-button-container reference-button\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngIf=\"createNewReference; then newBlock; else existingBlock\"></ng-container>\n <ng-template #newBlock>\n <button mat-button [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-button md regular\"\n (click)=\"onButtonClicked($event)\" [ngClass]=\"{\n disabled: disabled,\n 'pull-left': xAlignment == 'left',\n 'pull-right': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\">\n <span class=\"ellipsis pull-left flip button-title-with-icon\">{{ 'ACTIONS.CREATE_NEW' | translate\n }}</span>\n <mat-icon class=\"pull-right flip\" pepRtlClass>\n <pep-icon name=\"number_plus\" (click)=\"onButtonClicked($event)\">\n </pep-icon>\n </mat-icon>\n </button>\n </ng-template>\n <ng-template #existingBlock>\n <pep-group-buttons [buttons]=\"referenceButtons\" styleType=\"regular\" viewType=\"split\">\n </pep-group-buttons>\n </ng-template>\n </div>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'listofobjects'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <ng-container [ngSwitch]=\"key\">\n <ng-container *ngSwitchCase=\"'ObjectMenu'\">\n <span (click)=\"onButtonClicked($event)\" title=\"{{ key }}\">\n <mat-icon>\n <pep-icon *ngIf=\"key == 'ObjectMenu'\" name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Agents' || 'ContactPersons' || 'Buyers'\">\n <ng-container *ngIf=\"layoutType === 'table'; then tableBlock; else nonTableBlock\">\n </ng-container>\n <ng-template #nonTableBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #tableBlock>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-report-input readonly body-sm\">{{\n formattedValue }}</span>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"layoutType === 'form'; then buttonBlock; else linkBlock\">\n </ng-container>\n\n <ng-template #buttonBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: false}\"></ng-container>\n </ng-template>\n <ng-template #linkBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #buttonTemplate let-internal=\"internal\">\n <div class=\"pep-button-container\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n\n <ng-container *ngIf=\"internal; then internalButtonTemplate; else regularButtonTemplate\"></ng-container>\n <ng-template #regularButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"onButtonClicked($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n {{ formattedValue }}\n </button>\n </ng-template>\n\n <ng-template #internalButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"openReferenceObjectInternal($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n <ng-container *ngIf=\"formattedValue == '0' || formattedValue == ''; then newBlock; else existingBlock\">\n </ng-container>\n <ng-template #newBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ 'LIST.SELECT' | translate }} </span>\n <mat-icon>\n <pep-icon name=\"number_plus\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #existingBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ formattedValue }} {{ 'LIST.SELECTED' |\n translate\n }} </span>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n </button>\n </ng-template>\n </div>\n</ng-template>\n\n<ng-template #linkTemplate>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a href=\"{{ value }}\" (mousedown)=\"hrefFunction($event)\" class=\"color-link\">\n <span *ngIf=\"layoutType === 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\"\n class=\"body-sm pep-report-input readonly\">\n {{ formattedValue }}\n </span>\n <span *ngIf=\"layoutType !== 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm pep-card-input\"\n style=\"display: block;\">\n {{ formattedValue }}\n </span>\n </a>\n </ng-template>\n <ng-template #emptyBlock>\n <span> </span>\n </ng-template>\n</ng-template>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button-container,.pep-button-container{height:-moz-fit-content;height:fit-content}.pepperi-button-container .center-alignment,.pep-button-container .center-alignment{position:absolute;left:50%;transform:translate(-50%)}.pepperi-button-container.reference-button ::ng-deep .split-buttons,.pepperi-button-container.reference-button .split-buttons,.pep-button-container.reference-button ::ng-deep .split-buttons,.pep-button-container.reference-button .split-buttons{float:left}.pepperi-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pepperi-button-container.reference-button .split-buttons button:last-of-type,.pep-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pep-button-container.reference-button .split-buttons button:last-of-type{width:1.5rem;padding:0}\n"] }]
|
|
219
|
-
}], ctorParameters: function () { return [{ type:
|
|
219
|
+
}], ctorParameters: function () { return [{ type: i2.PepCustomizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { key: [{
|
|
220
220
|
type: Input
|
|
221
221
|
}], value: [{
|
|
222
222
|
type: Input
|
|
@@ -286,9 +286,9 @@ class PepInternalMenuComponent {
|
|
|
286
286
|
// this.menuItemClick.emit({ key: itemKey });
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
PepInternalMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
290
|
-
PepInternalMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
289
|
+
PepInternalMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
290
|
+
PepInternalMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepInternalMenuComponent, selector: "pep-internal-menu", inputs: { key: "key", label: "label", disabled: "disabled", xAlignment: "xAlignment", options: "options", invertClass: "invertClass", layoutType: "layoutType" }, outputs: { elementClick: "elementClick" }, ngImport: i0, 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>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button,.pep-button{cursor:pointer}.pepperi-button.left-alignment,.pep-button.left-alignment{justify-self:flex-start}.pepperi-button.center-alignment,.pep-button.center-alignment{justify-self:center}.pepperi-button.right-alignment,.pep-button.right-alignment{justify-self:flex-end}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.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: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalMenuComponent, decorators: [{
|
|
292
292
|
type: Component,
|
|
293
293
|
args: [{ selector: 'pep-internal-menu', changeDetection: ChangeDetectionStrategy.OnPush, 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>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button,.pep-button{cursor:pointer}.pepperi-button.left-alignment,.pep-button.left-alignment{justify-self:flex-start}.pepperi-button.center-alignment,.pep-button.center-alignment{justify-self:center}.pepperi-button.right-alignment,.pep-button.right-alignment{justify-self:flex-end}\n"] }]
|
|
294
294
|
}], propDecorators: { key: [{
|
|
@@ -309,7 +309,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImpor
|
|
|
309
309
|
type: Output
|
|
310
310
|
}] } });
|
|
311
311
|
|
|
312
|
-
class
|
|
312
|
+
class PepInternalPageService {
|
|
313
|
+
constructor(httpService) {
|
|
314
|
+
this.httpService = httpService;
|
|
315
|
+
this.parentId = '0';
|
|
316
|
+
this.additionalApiName = '';
|
|
317
|
+
this.transactionUrl = 'Service1.svc/v1/OrderCenter/Transaction/';
|
|
318
|
+
}
|
|
319
|
+
getBaseParentUrl() {
|
|
320
|
+
const url = `${this.transactionUrl}${this.objectId}/ParentLine/${this.parentId}/`;
|
|
321
|
+
return url;
|
|
322
|
+
}
|
|
323
|
+
getChildren(callbackFunc) {
|
|
324
|
+
const body = JSON.stringify({
|
|
325
|
+
TransactionUID: this.objectId,
|
|
326
|
+
SearchCode: this.searchCode,
|
|
327
|
+
AdditionalApiName: this.additionalApiName,
|
|
328
|
+
ParentTransactionLineID: this.parentId,
|
|
329
|
+
ViewType: this.viewType,
|
|
330
|
+
});
|
|
331
|
+
// Set the additional api name with view type string.
|
|
332
|
+
const moreParams = this.additionalApiName?.length > 0
|
|
333
|
+
? `${this.additionalApiName}/${this.viewType}`
|
|
334
|
+
: `''/${this.viewType}`;
|
|
335
|
+
const url = `${this.getBaseParentUrl()}Items/${moreParams}`;
|
|
336
|
+
this.httpService.postWapiApiCall(url, body).subscribe((res) => {
|
|
337
|
+
callbackFunc(res);
|
|
338
|
+
}
|
|
339
|
+
// (error) => {},
|
|
340
|
+
// () => {}
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
initDetails(objectId, parentId, searchCode, callbackFunc) {
|
|
344
|
+
if (!objectId || !parentId) {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
this.objectId = objectId;
|
|
348
|
+
this.parentId = parentId;
|
|
349
|
+
this.searchCode = searchCode;
|
|
350
|
+
this.httpService
|
|
351
|
+
.getWapiApiCall(`${this.getBaseParentUrl()}ViewTypes`)
|
|
352
|
+
.subscribe((res) => {
|
|
353
|
+
callbackFunc(res);
|
|
354
|
+
}
|
|
355
|
+
// (error) => {},
|
|
356
|
+
// () => {}
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
changeChildrenViewType(viewType, callbackFunc) {
|
|
360
|
+
this.viewType = viewType;
|
|
361
|
+
this.getChildren(callbackFunc);
|
|
362
|
+
}
|
|
363
|
+
changeAdditionalApiName(additionalApiName, callbackFunc) {
|
|
364
|
+
this.additionalApiName = additionalApiName;
|
|
365
|
+
this.getChildren(callbackFunc);
|
|
366
|
+
}
|
|
367
|
+
childPlusClick(itemId, fieldApiName, callbackFunc) {
|
|
368
|
+
const body = JSON.stringify({
|
|
369
|
+
TransactionUID: this.objectId,
|
|
370
|
+
SearchCode: this.searchCode,
|
|
371
|
+
ParentTransactionLineID: this.parentId,
|
|
372
|
+
TransactionLineUID: itemId,
|
|
373
|
+
FieldApiName: fieldApiName,
|
|
374
|
+
ViewType: this.viewType,
|
|
375
|
+
});
|
|
376
|
+
this.httpService
|
|
377
|
+
.postWapiApiCall(`${this.getBaseParentUrl()}IncrementValue`, body)
|
|
378
|
+
.subscribe((res) => {
|
|
379
|
+
callbackFunc(res);
|
|
380
|
+
}
|
|
381
|
+
// (error) => {},
|
|
382
|
+
// () => {}
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
childMinusClick(itemId, fieldApiName, callbackFunc) {
|
|
386
|
+
const body = JSON.stringify({
|
|
387
|
+
TransactionUID: this.objectId,
|
|
388
|
+
SearchCode: this.searchCode,
|
|
389
|
+
ParentTransactionLineID: this.parentId,
|
|
390
|
+
TransactionLineUID: itemId,
|
|
391
|
+
FieldApiName: fieldApiName,
|
|
392
|
+
ViewType: this.viewType,
|
|
393
|
+
});
|
|
394
|
+
this.httpService
|
|
395
|
+
.postWapiApiCall(`${this.getBaseParentUrl()}DecrementValue`, body)
|
|
396
|
+
.subscribe((res) => {
|
|
397
|
+
callbackFunc(res);
|
|
398
|
+
}
|
|
399
|
+
// (error) => {},
|
|
400
|
+
// () => {}
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
childValueChanged(itemId, fieldApiName, value, callbackFunc) {
|
|
404
|
+
const body = JSON.stringify({
|
|
405
|
+
TransactionUID: this.objectId,
|
|
406
|
+
SearchCode: this.searchCode,
|
|
407
|
+
ParentTransactionLineID: this.parentId,
|
|
408
|
+
TransactionLineUID: itemId,
|
|
409
|
+
FieldApiName: fieldApiName,
|
|
410
|
+
FieldValue: value,
|
|
411
|
+
ViewType: this.viewType,
|
|
412
|
+
});
|
|
413
|
+
this.httpService
|
|
414
|
+
.postWapiApiCall(`${this.getBaseParentUrl()}SetFieldValue`, body)
|
|
415
|
+
.subscribe((res) => {
|
|
416
|
+
callbackFunc(res);
|
|
417
|
+
}
|
|
418
|
+
// (error) => {},
|
|
419
|
+
// () => {}
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
PepInternalPageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalPageService, deps: [{ token: i2.PepHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
424
|
+
PepInternalPageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalPageService });
|
|
425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalPageService, decorators: [{
|
|
426
|
+
type: Injectable
|
|
427
|
+
}], ctorParameters: function () { return [{ type: i2.PepHttpService }]; } });
|
|
428
|
+
|
|
429
|
+
class PepInternalFieldGeneratorComponent {
|
|
313
430
|
constructor() {
|
|
314
431
|
this.isActive = false;
|
|
315
432
|
this.uid = null;
|
|
@@ -319,8 +436,8 @@ class PepFieldGeneratorComponent {
|
|
|
319
436
|
this.valueChange = new EventEmitter();
|
|
320
437
|
this.formValidationChange = new EventEmitter();
|
|
321
438
|
this.elementClick = new EventEmitter();
|
|
322
|
-
|
|
323
|
-
|
|
439
|
+
// @Output() internalFormFieldChange: EventEmitter<any> = new EventEmitter<any>();
|
|
440
|
+
// @Output() internalFormFieldClick: EventEmitter<any> = new EventEmitter<any>();
|
|
324
441
|
this.formValueChange = new EventEmitter();
|
|
325
442
|
this.formFieldClick = new EventEmitter();
|
|
326
443
|
}
|
|
@@ -380,18 +497,18 @@ class PepFieldGeneratorComponent {
|
|
|
380
497
|
};
|
|
381
498
|
this.valueChange.emit(fieldValueChange);
|
|
382
499
|
}
|
|
383
|
-
onInternalFormFieldChanged(internalFormFieldChange) {
|
|
384
|
-
|
|
385
|
-
}
|
|
500
|
+
// onInternalFormFieldChanged(internalFormFieldChange: any): void {
|
|
501
|
+
// this.internalFormFieldChange.emit(internalFormFieldChange);
|
|
502
|
+
// }
|
|
386
503
|
onFormValidationChanged(formValidationChange) {
|
|
387
504
|
this.formValidationChange.emit(formValidationChange);
|
|
388
505
|
}
|
|
389
506
|
onClick(fieldClicked) {
|
|
390
507
|
this.elementClick.emit(fieldClicked);
|
|
391
508
|
}
|
|
392
|
-
onInternalFormFieldClick(internalFormFieldClick) {
|
|
393
|
-
|
|
394
|
-
}
|
|
509
|
+
// onInternalFormFieldClick(internalFormFieldClick: any): void {
|
|
510
|
+
// this.internalFormFieldClick.emit(internalFormFieldClick);
|
|
511
|
+
// }
|
|
395
512
|
onFormValueChanged(event) {
|
|
396
513
|
this.formValueChange.emit(event);
|
|
397
514
|
}
|
|
@@ -404,11 +521,11 @@ class PepFieldGeneratorComponent {
|
|
|
404
521
|
// this.field.disabled = this.field.readonly = false;
|
|
405
522
|
}
|
|
406
523
|
}
|
|
407
|
-
|
|
408
|
-
PepFieldGeneratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", type: PepFieldGeneratorComponent, selector: "pep-field-generator", inputs: { field: "field", isActive: "isActive", uid: "uid", form: "form", layoutType: "layoutType", showTitle: "showTitle", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", elementClick: "elementClick", internalFormFieldChange: "internalFormFieldChange", internalFormFieldClick: "internalFormFieldClick", formValueChange: "formValueChange", formFieldClick: "formFieldClick" }, usesOnChanges: true, ngImport: i0, 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>", styles: [":host{width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.PepAddressComponent, selector: "pep-address", inputs: ["key", "formattedValue", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "groupFields", "form", "layoutType", "visible"], outputs: ["addressValueChange"] }, { kind: "component", type: i4$3.PepAttachmentComponent, selector: "pep-attachment", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i8$1.PepImagesFilmstripComponent, selector: "pep-images-filmstrip", inputs: ["key", "value", "label", "xAlignment", "rowSpan", "form", "uid", "showTitle", "renderTitle", "layoutType", "currIndex", "showThumbnails"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType"], outputs: ["valueChange", "elementClick"] }, { kind: "component", type: i10.PepRichHtmlTextareaComponent, selector: "pep-rich-html-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType", "inlineMode", "toolbarOptions"], outputs: ["valueChange"] }, { kind: "component", type: i11.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "options", "visible", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "emptyOption", "renderTitle"], outputs: ["valueChange", "formValidationChange"] }, { kind: "component", type: i12.PepSeparatorComponent, selector: "pep-separator", inputs: ["key", "label", "xAlignment", "form", "layoutType", "visible"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i15.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "formattedValue", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey"], outputs: ["valueChange", "formValidationChange"] }, { kind: "component", type: i16.PepLinkComponent, selector: "pep-link", inputs: ["key", "value", "formattedValue", "label", "placeholder", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "formValidationChange", "elementClick"] }, { kind: "component", type: PepIndicatorsComponent, selector: "pep-indicators", inputs: ["key", "value", "layoutType"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "component", type: PepInternalMenuComponent, selector: "pep-internal-menu", inputs: ["key", "label", "disabled", "xAlignment", "options", "invertClass", "layoutType"], outputs: ["elementClick"] }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
524
|
+
PepInternalFieldGeneratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalFieldGeneratorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
525
|
+
PepInternalFieldGeneratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepInternalFieldGeneratorComponent, selector: "pep-internal-field-generator", inputs: { field: "field", isActive: "isActive", uid: "uid", form: "form", layoutType: "layoutType", showTitle: "showTitle", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", elementClick: "elementClick", formValueChange: "formValueChange", formFieldClick: "formFieldClick" }, usesOnChanges: true, ngImport: i0, 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 <!-- \n comment for not cause a circular reference.\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\n <ng-container *ngSwitchCase=\"'placeholder'\">\n </ng-container>\n</ng-container>", styles: [":host{width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.PepAddressComponent, selector: "pep-address", inputs: ["key", "formattedValue", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "groupFields", "form", "layoutType", "visible"], outputs: ["addressValueChange"] }, { kind: "component", type: i4$3.PepAttachmentComponent, selector: "pep-attachment", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i8$1.PepImagesFilmstripComponent, selector: "pep-images-filmstrip", inputs: ["key", "value", "label", "xAlignment", "rowSpan", "form", "uid", "showTitle", "renderTitle", "layoutType", "currIndex", "showThumbnails"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType"], outputs: ["valueChange", "elementClick"] }, { kind: "component", type: i10.PepRichHtmlTextareaComponent, selector: "pep-rich-html-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType", "inlineMode", "toolbarOptions"], outputs: ["valueChange"] }, { kind: "component", type: i11.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "options", "visible", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "emptyOption", "renderTitle"], outputs: ["valueChange", "formValidationChange"] }, { kind: "component", type: i12.PepSeparatorComponent, selector: "pep-separator", inputs: ["key", "label", "xAlignment", "form", "layoutType", "visible"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i15.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "formattedValue", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey"], outputs: ["valueChange", "formValidationChange"] }, { kind: "component", type: i16.PepLinkComponent, selector: "pep-link", inputs: ["key", "value", "formattedValue", "label", "placeholder", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "formValidationChange", "elementClick"] }, { kind: "component", type: PepIndicatorsComponent, selector: "pep-indicators", inputs: ["key", "value", "layoutType"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "component", type: PepInternalMenuComponent, selector: "pep-internal-menu", inputs: ["key", "label", "disabled", "xAlignment", "options", "invertClass", "layoutType"], outputs: ["elementClick"] }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalFieldGeneratorComponent, decorators: [{
|
|
410
527
|
type: Component,
|
|
411
|
-
args: [{ selector: 'pep-field-generator', encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, 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>", styles: [":host{width:100%;height:100%}\n"] }]
|
|
528
|
+
args: [{ selector: 'pep-internal-field-generator', encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, 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 <!-- \n comment for not cause a circular reference.\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\n <ng-container *ngSwitchCase=\"'placeholder'\">\n </ng-container>\n</ng-container>", styles: [":host{width:100%;height:100%}\n"] }]
|
|
412
529
|
}], propDecorators: { field: [{
|
|
413
530
|
type: Input
|
|
414
531
|
}], isActive: [{
|
|
@@ -429,17 +546,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImpor
|
|
|
429
546
|
type: Output
|
|
430
547
|
}], elementClick: [{
|
|
431
548
|
type: Output
|
|
432
|
-
}], internalFormFieldChange: [{
|
|
433
|
-
type: Output
|
|
434
|
-
}], internalFormFieldClick: [{
|
|
435
|
-
type: Output
|
|
436
549
|
}], formValueChange: [{
|
|
437
550
|
type: Output
|
|
438
551
|
}], formFieldClick: [{
|
|
439
552
|
type: Output
|
|
440
553
|
}] } });
|
|
441
554
|
|
|
442
|
-
class
|
|
555
|
+
class PepInternalFormComponent {
|
|
443
556
|
// eventServiceSub: Subscription;
|
|
444
557
|
// public jsonLib = JSON;
|
|
445
558
|
constructor(dialogService, customizationService, layoutService, fb, differs, translate) {
|
|
@@ -465,8 +578,8 @@ class PepFormComponent {
|
|
|
465
578
|
this.valueChange = new EventEmitter();
|
|
466
579
|
this.formValidationChange = new EventEmitter();
|
|
467
580
|
this.fieldClick = new EventEmitter();
|
|
468
|
-
|
|
469
|
-
|
|
581
|
+
// @Output() internalFormFieldClick: EventEmitter<any> = new EventEmitter<any>();
|
|
582
|
+
// @Output() internalFormFieldChange: EventEmitter<any> = new EventEmitter<any>();
|
|
470
583
|
this.isLocked = false;
|
|
471
584
|
// payLoad = '';
|
|
472
585
|
this.rows = [];
|
|
@@ -1573,14 +1686,14 @@ class PepFormComponent {
|
|
|
1573
1686
|
});
|
|
1574
1687
|
}
|
|
1575
1688
|
}
|
|
1576
|
-
// This event is for handle the internal page events.
|
|
1577
|
-
onInternalFormFieldClicked(internalFormFieldClick) {
|
|
1578
|
-
|
|
1579
|
-
}
|
|
1580
|
-
// This event is for handle the internal page events.
|
|
1581
|
-
onInternalFormFieldChanged(internalFormFieldChange) {
|
|
1582
|
-
|
|
1583
|
-
}
|
|
1689
|
+
// // This event is for handle the internal page events.
|
|
1690
|
+
// onInternalFormFieldClicked(internalFormFieldClick: any): void {
|
|
1691
|
+
// this.internalFormFieldClick.emit(internalFormFieldClick);
|
|
1692
|
+
// }
|
|
1693
|
+
// // This event is for handle the internal page events.
|
|
1694
|
+
// onInternalFormFieldChanged(internalFormFieldChange: any): void {
|
|
1695
|
+
// this.internalFormFieldChange.emit(internalFormFieldChange);
|
|
1696
|
+
// }
|
|
1584
1697
|
// This event is for handle the related items change events.
|
|
1585
1698
|
onFormValueChanged(event) {
|
|
1586
1699
|
// this.valueChange.emit(event);
|
|
@@ -1590,12 +1703,12 @@ class PepFormComponent {
|
|
|
1590
1703
|
this.fieldClick.emit(event);
|
|
1591
1704
|
}
|
|
1592
1705
|
}
|
|
1593
|
-
|
|
1594
|
-
PepFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", type: PepFormComponent, selector: "pep-form", inputs: { isInternal: "isInternal", isReport: "isReport", layout: "layout", lockEvents: "lockEvents", canEditObject: "canEditObject", data: "data", lockFields: "lockFields", isActive: "isActive", layoutType: "layoutType", objectId: "objectId", parentId: "parentId", searchCode: "searchCode", showTitle: "showTitle", firstFieldAsLink: "firstFieldAsLink", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", fieldClick: "fieldClick", internalFormFieldClick: "internalFormFieldClick", internalFormFieldChange: "internalFormFieldChange" }, usesOnChanges: true, ngImport: i0, 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>", styles: [":host{display:grid}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i6$1.MatGridList, selector: "mat-grid-list", inputs: ["cols", "gutterSize", "rowHeight"], exportAs: ["matGridList"] }, { kind: "component", type: i6$1.MatGridTile, selector: "mat-grid-tile", inputs: ["rowspan", "colspan"], exportAs: ["matGridTile"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType"], outputs: ["valueChange", "elementClick"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: PepFieldGeneratorComponent, selector: "pep-field-generator", inputs: ["field", "isActive", "uid", "form", "layoutType", "showTitle", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "elementClick", "internalFormFieldChange", "internalFormFieldClick", "formValueChange", "formFieldClick"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
1706
|
+
PepInternalFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalFormComponent, deps: [{ token: i1$1.PepDialogService }, { token: i2.PepCustomizationService }, { token: i2.PepLayoutService }, { token: i3$1.FormBuilder }, { token: i0.KeyValueDiffers }, { token: i4$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1707
|
+
PepInternalFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepInternalFormComponent, selector: "pep-internal-form", inputs: { isInternal: "isInternal", isReport: "isReport", layout: "layout", lockEvents: "lockEvents", canEditObject: "canEditObject", data: "data", lockFields: "lockFields", isActive: "isActive", layoutType: "layoutType", objectId: "objectId", parentId: "parentId", searchCode: "searchCode", showTitle: "showTitle", firstFieldAsLink: "firstFieldAsLink", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", fieldClick: "fieldClick" }, usesOnChanges: true, ngImport: i0, 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-internal-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 (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n (formValidationChange)=\"onFormValidationChanged($event)\">\n </pep-internal-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-internal-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)\" (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\">\n </pep-internal-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-internal-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-internal-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>", styles: [":host{display:grid}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i6$1.MatGridList, selector: "mat-grid-list", inputs: ["cols", "gutterSize", "rowHeight"], exportAs: ["matGridList"] }, { kind: "component", type: i6$1.MatGridTile, selector: "mat-grid-tile", inputs: ["rowspan", "colspan"], exportAs: ["matGridTile"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType"], outputs: ["valueChange", "elementClick"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: PepInternalFieldGeneratorComponent, selector: "pep-internal-field-generator", inputs: ["field", "isActive", "uid", "form", "layoutType", "showTitle", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "elementClick", "formValueChange", "formFieldClick"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalFormComponent, decorators: [{
|
|
1596
1709
|
type: Component,
|
|
1597
|
-
args: [{ selector: 'pep-form', changeDetection: ChangeDetectionStrategy.OnPush, 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 (
|
|
1598
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1710
|
+
args: [{ selector: 'pep-internal-form', changeDetection: ChangeDetectionStrategy.OnPush, 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-internal-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 (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n (formValidationChange)=\"onFormValidationChanged($event)\">\n </pep-internal-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-internal-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)\" (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\">\n </pep-internal-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-internal-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-internal-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>", styles: [":host{display:grid}\n"] }]
|
|
1711
|
+
}], ctorParameters: function () { return [{ type: i1$1.PepDialogService }, { type: i2.PepCustomizationService }, { type: i2.PepLayoutService }, { type: i3$1.FormBuilder }, { type: i0.KeyValueDiffers }, { type: i4$1.TranslateService }]; }, propDecorators: { isInternal: [{
|
|
1599
1712
|
type: Input
|
|
1600
1713
|
}], isReport: [{
|
|
1601
1714
|
type: Input
|
|
@@ -1631,10 +1744,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImpor
|
|
|
1631
1744
|
type: Output
|
|
1632
1745
|
}], fieldClick: [{
|
|
1633
1746
|
type: Output
|
|
1634
|
-
}], internalFormFieldClick: [{
|
|
1635
|
-
type: Output
|
|
1636
|
-
}], internalFormFieldChange: [{
|
|
1637
|
-
type: Output
|
|
1638
1747
|
}] } });
|
|
1639
1748
|
|
|
1640
1749
|
class PepInternalListComponent {
|
|
@@ -2094,14 +2203,14 @@ class PepInternalListComponent {
|
|
|
2094
2203
|
return this.items.find((item) => item.UID.toString() === uid);
|
|
2095
2204
|
}
|
|
2096
2205
|
}
|
|
2097
|
-
PepInternalListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
2098
|
-
PepInternalListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.
|
|
2099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
2206
|
+
PepInternalListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalListComponent, deps: [{ token: i0.ElementRef }, { token: i2.PepLayoutService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2207
|
+
PepInternalListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepInternalListComponent, selector: "pep-internal-list", inputs: { noDataFoundMsg: "noDataFoundMsg", hideAllSelectionInMulti: "hideAllSelectionInMulti", top: "top", objectId: "objectId", parentId: "parentId", searchCode: "searchCode", supportResizing: "supportResizing", parentScroll: "parentScroll", disabled: "disabled", disableEvents: "disableEvents", disableSelectionItems: "disableSelectionItems", totalsRow: "totalsRow" }, outputs: { fieldClick: "fieldClick", valueChange: "valueChange" }, host: { listeners: { "window:resize": "winResize($event)" } }, viewQueries: [{ propertyName: "noVirtualScrollCont", first: true, predicate: ["noVirtualScrollCont"], descendants: true }, { propertyName: "tableHeader", first: true, predicate: ["tableHeader"], descendants: true }, { propertyName: "selectAllCB", first: true, predicate: ["selectAllCB"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"totalRows == 0\">\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ (noDataFoundMsg ? noDataFoundMsg : 'LIST.NO_DATA_FOUND') | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <div *ngIf=\"isTable\" #tableHeader class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <fieldset>\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0,\n 'is-last': j === uiControl?.ControlFields?.length - 1\n }\">\n <label *ngIf=\"field.Title != ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n {{ field.Title }}\n </label>\n <label *ngIf=\"field.Title == ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip\"> </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n\n <div #noVirtualScrollCont [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\">\n <ng-container *ngTemplateOutlet=\"listData\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"listTotals\"></ng-container>\n</ng-container>\n\n<ng-template #listData>\n <ng-container *ngFor=\"let item of scrollItems; let i = index; let isFirst = first; trackBy: trackByFunc\">\n <ng-container *ngIf=\"isTable\">\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId\n }\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-internal-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\"objectId\" [parentId]=\"parentId\"\n [searchCode]=\"searchCode\" [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'table'\"\n [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-internal-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div [class]=\"itemClass\" (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'card-view': viewType === 'cards',\n 'line-view': viewType === 'lines'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-internal-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\" objectId\" [parentId]=\"parentId\" [searchCode]=\"searchCode\"\n [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'card'\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-internal-form>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #listTotals>\n <div *ngIf=\"totalsRow?.length > 0 && totalsRow.length <= uiControl?.ControlFields.length\" class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:grid}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.table-header{top:0}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "component", type: PepInternalFormComponent, selector: "pep-internal-form", inputs: ["isInternal", "isReport", "layout", "lockEvents", "canEditObject", "data", "lockFields", "isActive", "layoutType", "objectId", "parentId", "searchCode", "showTitle", "firstFieldAsLink", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "fieldClick"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] });
|
|
2208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalListComponent, decorators: [{
|
|
2100
2209
|
type: Component,
|
|
2101
2210
|
args: [{ selector: 'pep-internal-list', host: {
|
|
2102
2211
|
'(window:resize)': 'winResize($event)',
|
|
2103
|
-
}, template: "<ng-container *ngIf=\"totalRows == 0\">\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ (noDataFoundMsg ? noDataFoundMsg : 'LIST.NO_DATA_FOUND') | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <div *ngIf=\"isTable\" #tableHeader class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <fieldset>\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0,\n 'is-last': j === uiControl?.ControlFields?.length - 1\n }\">\n <label *ngIf=\"field.Title != ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n {{ field.Title }}\n </label>\n <label *ngIf=\"field.Title == ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip\"> </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n\n <div #noVirtualScrollCont [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\">\n <ng-container *ngTemplateOutlet=\"listData\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"listTotals\"></ng-container>\n</ng-container>\n\n<ng-template #listData>\n <ng-container *ngFor=\"let item of scrollItems; let i = index; let isFirst = first; trackBy: trackByFunc\">\n <ng-container *ngIf=\"isTable\">\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId\n }\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\"objectId\" [parentId]=\"parentId\"\n [searchCode]=\"searchCode\" [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'table'\"\n [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div [class]=\"itemClass\" (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'card-view': viewType === 'cards',\n 'line-view': viewType === 'lines'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\" objectId\" [parentId]=\"parentId\" [searchCode]=\"searchCode\"\n [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'card'\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #listTotals>\n <div *ngIf=\"totalsRow?.length > 0 && totalsRow.length <= uiControl?.ControlFields.length\" class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:grid}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.table-header{top:0}\n"] }]
|
|
2104
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type:
|
|
2212
|
+
}, template: "<ng-container *ngIf=\"totalRows == 0\">\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ (noDataFoundMsg ? noDataFoundMsg : 'LIST.NO_DATA_FOUND') | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <div *ngIf=\"isTable\" #tableHeader class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <fieldset>\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0,\n 'is-last': j === uiControl?.ControlFields?.length - 1\n }\">\n <label *ngIf=\"field.Title != ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n {{ field.Title }}\n </label>\n <label *ngIf=\"field.Title == ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip\"> </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n\n <div #noVirtualScrollCont [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\">\n <ng-container *ngTemplateOutlet=\"listData\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"listTotals\"></ng-container>\n</ng-container>\n\n<ng-template #listData>\n <ng-container *ngFor=\"let item of scrollItems; let i = index; let isFirst = first; trackBy: trackByFunc\">\n <ng-container *ngIf=\"isTable\">\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId\n }\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-internal-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\"objectId\" [parentId]=\"parentId\"\n [searchCode]=\"searchCode\" [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'table'\"\n [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-internal-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div [class]=\"itemClass\" (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'card-view': viewType === 'cards',\n 'line-view': viewType === 'lines'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-internal-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\" objectId\" [parentId]=\"parentId\" [searchCode]=\"searchCode\"\n [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'card'\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-internal-form>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #listTotals>\n <div *ngIf=\"totalsRow?.length > 0 && totalsRow.length <= uiControl?.ControlFields.length\" class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:grid}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.table-header{top:0}\n"] }]
|
|
2213
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2.PepLayoutService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { noDataFoundMsg: [{
|
|
2105
2214
|
type: Input
|
|
2106
2215
|
}], hideAllSelectionInMulti: [{
|
|
2107
2216
|
type: Input
|
|
@@ -2140,164 +2249,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImpor
|
|
|
2140
2249
|
args: ['selectAllCB']
|
|
2141
2250
|
}] } });
|
|
2142
2251
|
|
|
2143
|
-
class
|
|
2144
|
-
constructor(
|
|
2145
|
-
this.
|
|
2146
|
-
this.
|
|
2147
|
-
this.
|
|
2148
|
-
this.
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
this.
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2252
|
+
class PepInternalPageComponent {
|
|
2253
|
+
constructor(fb, dialogService, internalPageService, customizationService, elementRef, changeDetectorRef) {
|
|
2254
|
+
this.fb = fb;
|
|
2255
|
+
this.dialogService = dialogService;
|
|
2256
|
+
this.internalPageService = internalPageService;
|
|
2257
|
+
this.customizationService = customizationService;
|
|
2258
|
+
this.elementRef = elementRef;
|
|
2259
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
2260
|
+
this.controlType = 'internalPage';
|
|
2261
|
+
this.layoutType = 'form';
|
|
2262
|
+
this.internalFormFieldChange = new EventEmitter();
|
|
2263
|
+
this.internalFormFieldClick = new EventEmitter();
|
|
2264
|
+
this.checkForChanges = null;
|
|
2265
|
+
this.childData = null;
|
|
2266
|
+
this.totalsRow = [];
|
|
2267
|
+
this.additionalApiNames = null;
|
|
2268
|
+
this.currentAdditionalApiName = null;
|
|
2269
|
+
this.focusedQS = false;
|
|
2270
|
+
this.fieldIdWithFocus = '';
|
|
2271
|
+
this.columnWidth = 100;
|
|
2272
|
+
this.coverChildTable = false;
|
|
2273
|
+
this.currentViewType = null;
|
|
2274
|
+
this.sumOfMinColWidth = 0;
|
|
2275
|
+
this.totalRowsWidth = 0;
|
|
2276
|
+
this.viewWidth = '100%';
|
|
2277
|
+
this.viewHeight = 'auto';
|
|
2278
|
+
this.displayQSbtns = true;
|
|
2279
|
+
this.selectedApiName = '';
|
|
2280
|
+
this.showSort = false;
|
|
2281
|
+
this.defaultRowSpan = -1;
|
|
2173
2282
|
}
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
this.httpService
|
|
2182
|
-
.getWapiApiCall(`${this.getBaseParentUrl()}ViewTypes`)
|
|
2183
|
-
.subscribe((res) => {
|
|
2184
|
-
callbackFunc(res);
|
|
2283
|
+
fillData(isInDialog = false) {
|
|
2284
|
+
const view = this.matrixTemplate.createEmbeddedView(null);
|
|
2285
|
+
this.customList?.clear();
|
|
2286
|
+
this.orgCont?.clear();
|
|
2287
|
+
if (isInDialog) {
|
|
2288
|
+
this.dialogCont?.clear();
|
|
2289
|
+
this.dialogCont?.insert(view);
|
|
2185
2290
|
}
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
);
|
|
2189
|
-
}
|
|
2190
|
-
changeChildrenViewType(viewType, callbackFunc) {
|
|
2191
|
-
this.viewType = viewType;
|
|
2192
|
-
this.getChildren(callbackFunc);
|
|
2193
|
-
}
|
|
2194
|
-
changeAdditionalApiName(additionalApiName, callbackFunc) {
|
|
2195
|
-
this.additionalApiName = additionalApiName;
|
|
2196
|
-
this.getChildren(callbackFunc);
|
|
2197
|
-
}
|
|
2198
|
-
childPlusClick(itemId, fieldApiName, callbackFunc) {
|
|
2199
|
-
const body = JSON.stringify({
|
|
2200
|
-
TransactionUID: this.objectId,
|
|
2201
|
-
SearchCode: this.searchCode,
|
|
2202
|
-
ParentTransactionLineID: this.parentId,
|
|
2203
|
-
TransactionLineUID: itemId,
|
|
2204
|
-
FieldApiName: fieldApiName,
|
|
2205
|
-
ViewType: this.viewType,
|
|
2206
|
-
});
|
|
2207
|
-
this.httpService
|
|
2208
|
-
.postWapiApiCall(`${this.getBaseParentUrl()}IncrementValue`, body)
|
|
2209
|
-
.subscribe((res) => {
|
|
2210
|
-
callbackFunc(res);
|
|
2211
|
-
}
|
|
2212
|
-
// (error) => {},
|
|
2213
|
-
// () => {}
|
|
2214
|
-
);
|
|
2215
|
-
}
|
|
2216
|
-
childMinusClick(itemId, fieldApiName, callbackFunc) {
|
|
2217
|
-
const body = JSON.stringify({
|
|
2218
|
-
TransactionUID: this.objectId,
|
|
2219
|
-
SearchCode: this.searchCode,
|
|
2220
|
-
ParentTransactionLineID: this.parentId,
|
|
2221
|
-
TransactionLineUID: itemId,
|
|
2222
|
-
FieldApiName: fieldApiName,
|
|
2223
|
-
ViewType: this.viewType,
|
|
2224
|
-
});
|
|
2225
|
-
this.httpService
|
|
2226
|
-
.postWapiApiCall(`${this.getBaseParentUrl()}DecrementValue`, body)
|
|
2227
|
-
.subscribe((res) => {
|
|
2228
|
-
callbackFunc(res);
|
|
2229
|
-
}
|
|
2230
|
-
// (error) => {},
|
|
2231
|
-
// () => {}
|
|
2232
|
-
);
|
|
2233
|
-
}
|
|
2234
|
-
childValueChanged(itemId, fieldApiName, value, callbackFunc) {
|
|
2235
|
-
const body = JSON.stringify({
|
|
2236
|
-
TransactionUID: this.objectId,
|
|
2237
|
-
SearchCode: this.searchCode,
|
|
2238
|
-
ParentTransactionLineID: this.parentId,
|
|
2239
|
-
TransactionLineUID: itemId,
|
|
2240
|
-
FieldApiName: fieldApiName,
|
|
2241
|
-
FieldValue: value,
|
|
2242
|
-
ViewType: this.viewType,
|
|
2243
|
-
});
|
|
2244
|
-
this.httpService
|
|
2245
|
-
.postWapiApiCall(`${this.getBaseParentUrl()}SetFieldValue`, body)
|
|
2246
|
-
.subscribe((res) => {
|
|
2247
|
-
callbackFunc(res);
|
|
2248
|
-
}
|
|
2249
|
-
// (error) => {},
|
|
2250
|
-
// () => {}
|
|
2251
|
-
);
|
|
2252
|
-
}
|
|
2253
|
-
}
|
|
2254
|
-
PepInternalPageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: PepInternalPageService, deps: [{ token: i1$1.PepHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2255
|
-
PepInternalPageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: PepInternalPageService });
|
|
2256
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: PepInternalPageService, decorators: [{
|
|
2257
|
-
type: Injectable
|
|
2258
|
-
}], ctorParameters: function () { return [{ type: i1$1.PepHttpService }]; } });
|
|
2259
|
-
|
|
2260
|
-
class PepInternalPageComponent {
|
|
2261
|
-
constructor(fb, dialogService, internalPageService, customizationService, elementRef, changeDetectorRef) {
|
|
2262
|
-
this.fb = fb;
|
|
2263
|
-
this.dialogService = dialogService;
|
|
2264
|
-
this.internalPageService = internalPageService;
|
|
2265
|
-
this.customizationService = customizationService;
|
|
2266
|
-
this.elementRef = elementRef;
|
|
2267
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
2268
|
-
this.controlType = 'internalPage';
|
|
2269
|
-
this.layoutType = 'form';
|
|
2270
|
-
this.internalFormFieldChange = new EventEmitter();
|
|
2271
|
-
this.internalFormFieldClick = new EventEmitter();
|
|
2272
|
-
this.checkForChanges = null;
|
|
2273
|
-
this.childData = null;
|
|
2274
|
-
this.totalsRow = [];
|
|
2275
|
-
this.additionalApiNames = null;
|
|
2276
|
-
this.currentAdditionalApiName = null;
|
|
2277
|
-
this.focusedQS = false;
|
|
2278
|
-
this.fieldIdWithFocus = '';
|
|
2279
|
-
this.columnWidth = 100;
|
|
2280
|
-
this.coverChildTable = false;
|
|
2281
|
-
this.currentViewType = null;
|
|
2282
|
-
this.sumOfMinColWidth = 0;
|
|
2283
|
-
this.totalRowsWidth = 0;
|
|
2284
|
-
this.viewWidth = '100%';
|
|
2285
|
-
this.viewHeight = 'auto';
|
|
2286
|
-
this.displayQSbtns = true;
|
|
2287
|
-
this.selectedApiName = '';
|
|
2288
|
-
this.showSort = false;
|
|
2289
|
-
this.defaultRowSpan = -1;
|
|
2290
|
-
}
|
|
2291
|
-
fillData(isInDialog = false) {
|
|
2292
|
-
const view = this.matrixTemplate.createEmbeddedView(null);
|
|
2293
|
-
this.customList?.clear();
|
|
2294
|
-
this.orgCont?.clear();
|
|
2295
|
-
if (isInDialog) {
|
|
2296
|
-
this.dialogCont?.clear();
|
|
2297
|
-
this.dialogCont?.insert(view);
|
|
2298
|
-
}
|
|
2299
|
-
else {
|
|
2300
|
-
this.orgCont?.insert(view);
|
|
2291
|
+
else {
|
|
2292
|
+
this.orgCont?.insert(view);
|
|
2301
2293
|
}
|
|
2302
2294
|
setTimeout(() => {
|
|
2303
2295
|
const viewType = this.isTableView()
|
|
@@ -2567,12 +2559,12 @@ class PepInternalPageComponent {
|
|
|
2567
2559
|
}
|
|
2568
2560
|
}
|
|
2569
2561
|
PepInternalPageComponent.CURRENT_ADDITIONAL_API_NAME = 'item_details_currentAdditionalApiName';
|
|
2570
|
-
PepInternalPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
2571
|
-
PepInternalPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.
|
|
2572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
2562
|
+
PepInternalPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalPageComponent, deps: [{ token: i3$1.FormBuilder }, { token: i1$1.PepDialogService }, { token: PepInternalPageService }, { token: i2.PepCustomizationService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2563
|
+
PepInternalPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepInternalPageComponent, selector: "pep-internal-page", inputs: { field: "field", layoutType: "layoutType" }, outputs: { internalFormFieldChange: "internalFormFieldChange", internalFormFieldClick: "internalFormFieldClick" }, providers: [PepInternalPageService], viewQueries: [{ propertyName: "my1mm", first: true, predicate: ["my1mm"], descendants: true }, { propertyName: "mainViewCont", first: true, predicate: ["mainViewCont"], descendants: true }, { propertyName: "orgCont", first: true, predicate: ["orgCont"], descendants: true, read: ViewContainerRef }, { propertyName: "dialogCont", first: true, predicate: ["dialogCont"], descendants: true, read: ViewContainerRef }, { propertyName: "matrixTemplate", first: true, predicate: ["matrixTemplate"], descendants: true }, { propertyName: "matrixDialogTemplate", first: true, predicate: ["matrixDialogTemplate"], descendants: true, read: TemplateRef }, { propertyName: "customList", first: true, predicate: PepInternalListComponent, descendants: true }], ngImport: i0, template: "<ng-template #matrixHeaderTemplate>\n <div class=\"matrix-title-container pep-border-bottom align-{{\n field.xAlignment\n }}\" title=\"{{ field.label }}\">\n <span class=\"block-with-text body-md\">{{ field.label }}</span>\n\n <div class=\"buttons-container pep-spacing-element-negative pull-right flip\">\n <ng-container *ngIf=\"\n currentViewType?.Key == 'OrderCenterMatrix' &&\n additionalApiNames &&\n additionalApiNames.length > 0\n \">\n <button class=\"pep-spacing-element pep-button icon-button sm weak\" mat-button [matMenuTriggerFor]=\"menu\"\n menu-blur>\n <span class=\"pull-left flip\" *ngIf=\"currentAdditionalApiName\"> {{\n currentAdditionalApiName?.Value }} </span>\n\n <mat-icon [ngClass]=\"{'pull-left flip': currentAdditionalApiName}\">\n <pep-icon name=\"system_info\"></pep-icon>\n </mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item [ngClass]=\"{\n selected: currentAdditionalApiName === null\n }\" (click)=\"changeAdditionalApiName(null)\">\n <span>{{ \"LIST.NONE\" | translate }}</span>\n </button>\n <button mat-menu-item [ngClass]=\"{\n selected:\n currentAdditionalApiName?.Key ==\n additionalApiName?.Key\n }\" *ngFor=\"let additionalApiName of additionalApiNames\"\n (click)=\"changeAdditionalApiName(additionalApiName)\">\n <span>{{ additionalApiName.Value }}</span>\n </button>\n </mat-menu>\n </ng-container>\n <ng-container *ngIf=\"childViewTypes && childViewTypes.length > 1\">\n <button class=\"pep-spacing-element pep-button icon-button sm weak\" mat-button\n [matMenuTriggerFor]=\"viewsMenu\" menu-blur>\n <mat-icon>\n <pep-icon name=\"view_card_md\"></pep-icon>\n </mat-icon>\n </button>\n\n <mat-menu #viewsMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item [ngClass]=\"{\n selected: currentViewType?.Key == viewType?.Key\n }\" *ngFor=\"let viewType of childViewTypes\" (click)=\"changeChildrenViewType(viewType?.Key)\">\n <mat-icon [ngSwitch]=\"viewType?.Key\">\n <pep-icon *ngSwitchCase=\"'OrderCenterMatrix'\" name=\"view_matrix\"></pep-icon>\n <pep-icon *ngSwitchCase=\"'OrderCenterFlatMatrixGrid'\" name=\"view_table\"></pep-icon>\n <pep-icon *ngSwitchCase=\"'OrderCenterFlatMatrixLine'\" name=\"view_line\"></pep-icon>\n </mat-icon>\n <span>{{ viewType?.Value }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n </div>\n\n</ng-template>\n\n<ng-template #matrixTemplate>\n <div #matrixContainer class=\"matrix-container\">\n <pep-internal-list (valueChange)=\"onCustomizeObjectChanged($event)\" [parentScroll]=\"matrixContainer\"\n (fieldClick)=\"onCustomizeFieldClick($event)\" [totalsRow]=\"totalsRow\"></pep-internal-list>\n </div>\n</ng-template>\n\n<div #mainViewCont id=\"mainViewCont\" [ngStyle]=\"{ 'max-width': viewWidth, 'max-height': viewHeight }\">\n <div #my1mm id=\"my1_mm\" style=\"height:1mm;width:1mm;visibility: hidden;\"></div>\n <ng-container *ngIf=\"coverChildTable && uiControl != null\">\n <div class=\"table-cover\"></div>\n <button (click)=\"showMatrixDialog()\" class=\"pep-button strong sm table-cover-button\"\n [ngClass]=\"{ 'lineview-btn': currentViewType?.Key == 'OrderCenterFlatMatrixLine'}\">\n {{ \"INTERNAL_PAGE.CLICK_TO_ORDER\" | translate }}\n </button>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"matrixHeaderTemplate\"></ng-container>\n <ng-container #orgCont></ng-container>\n</div>\n\n<ng-template #matrixDialogTemplate>\n\n <div mat-dialog-title>\n <ng-container *ngTemplateOutlet=\"matrixHeaderTemplate\"></ng-container>\n </div>\n\n <div mat-dialog-content>\n <ng-container #dialogCont></ng-container>\n </div>\n</ng-template>\n\n<!-- <div id=\"childGridModal\" bsModal (onShown)=\"onShown()\" (onHidden)=\"onHidden()\" #childModal=\"bs-modal\" class=\"modal\"\n tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"gridModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-body matrix-dialog-body\">\n <ng-container #modalCont></ng-container>\n </div>\n </div>\n </div>\n</div> -->", styles: [":host{display:grid;width:inherit;height:inherit}.matrix-title-container{padding:0;height:var(--pep-form-field-height, 2.5rem);display:flex;align-items:flex-end}.matrix-title-container .block-with-text{width:100%;max-height:inherit;font-weight:var(--pep-font-weight-bold, 600);display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.matrix-title-container .buttons-container{display:flex;align-self:center}.matrix-title-container .buttons-container .pepperi-button,.matrix-title-container .buttons-container .pep-button{width:max-content}#mainViewCont{width:100%;height:inherit;overflow:hidden;padding:0 var(--pep-spacing-xs, .25rem)}#mainViewCont .table-cover{background-color:#fff;z-index:98;position:absolute;top:0;width:100%;height:inherit;opacity:.5}#mainViewCont .table-cover-button{position:absolute;left:50%;transform:translate(-50%,-50%);top:calc(50% + var(--pep-form-field-height, 2.5rem));z-index:99}#mainViewCont .table-cover-button.lineview-btn{top:calc(2 * var(--pep-form-field-height, 2.5rem));transform:translate(-50%)}#mainViewCont .underCover{max-height:inherit;overflow:hidden}#mainViewCont ::ng-deep .table-header{top:unset!important}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4.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: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: PepInternalListComponent, selector: "pep-internal-list", inputs: ["noDataFoundMsg", "hideAllSelectionInMulti", "top", "objectId", "parentId", "searchCode", "supportResizing", "parentScroll", "disabled", "disableEvents", "disableSelectionItems", "totalsRow"], outputs: ["fieldClick", "valueChange"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalPageComponent, decorators: [{
|
|
2573
2565
|
type: Component,
|
|
2574
2566
|
args: [{ selector: 'pep-internal-page', providers: [PepInternalPageService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #matrixHeaderTemplate>\n <div class=\"matrix-title-container pep-border-bottom align-{{\n field.xAlignment\n }}\" title=\"{{ field.label }}\">\n <span class=\"block-with-text body-md\">{{ field.label }}</span>\n\n <div class=\"buttons-container pep-spacing-element-negative pull-right flip\">\n <ng-container *ngIf=\"\n currentViewType?.Key == 'OrderCenterMatrix' &&\n additionalApiNames &&\n additionalApiNames.length > 0\n \">\n <button class=\"pep-spacing-element pep-button icon-button sm weak\" mat-button [matMenuTriggerFor]=\"menu\"\n menu-blur>\n <span class=\"pull-left flip\" *ngIf=\"currentAdditionalApiName\"> {{\n currentAdditionalApiName?.Value }} </span>\n\n <mat-icon [ngClass]=\"{'pull-left flip': currentAdditionalApiName}\">\n <pep-icon name=\"system_info\"></pep-icon>\n </mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item [ngClass]=\"{\n selected: currentAdditionalApiName === null\n }\" (click)=\"changeAdditionalApiName(null)\">\n <span>{{ \"LIST.NONE\" | translate }}</span>\n </button>\n <button mat-menu-item [ngClass]=\"{\n selected:\n currentAdditionalApiName?.Key ==\n additionalApiName?.Key\n }\" *ngFor=\"let additionalApiName of additionalApiNames\"\n (click)=\"changeAdditionalApiName(additionalApiName)\">\n <span>{{ additionalApiName.Value }}</span>\n </button>\n </mat-menu>\n </ng-container>\n <ng-container *ngIf=\"childViewTypes && childViewTypes.length > 1\">\n <button class=\"pep-spacing-element pep-button icon-button sm weak\" mat-button\n [matMenuTriggerFor]=\"viewsMenu\" menu-blur>\n <mat-icon>\n <pep-icon name=\"view_card_md\"></pep-icon>\n </mat-icon>\n </button>\n\n <mat-menu #viewsMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item [ngClass]=\"{\n selected: currentViewType?.Key == viewType?.Key\n }\" *ngFor=\"let viewType of childViewTypes\" (click)=\"changeChildrenViewType(viewType?.Key)\">\n <mat-icon [ngSwitch]=\"viewType?.Key\">\n <pep-icon *ngSwitchCase=\"'OrderCenterMatrix'\" name=\"view_matrix\"></pep-icon>\n <pep-icon *ngSwitchCase=\"'OrderCenterFlatMatrixGrid'\" name=\"view_table\"></pep-icon>\n <pep-icon *ngSwitchCase=\"'OrderCenterFlatMatrixLine'\" name=\"view_line\"></pep-icon>\n </mat-icon>\n <span>{{ viewType?.Value }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n </div>\n\n</ng-template>\n\n<ng-template #matrixTemplate>\n <div #matrixContainer class=\"matrix-container\">\n <pep-internal-list (valueChange)=\"onCustomizeObjectChanged($event)\" [parentScroll]=\"matrixContainer\"\n (fieldClick)=\"onCustomizeFieldClick($event)\" [totalsRow]=\"totalsRow\"></pep-internal-list>\n </div>\n</ng-template>\n\n<div #mainViewCont id=\"mainViewCont\" [ngStyle]=\"{ 'max-width': viewWidth, 'max-height': viewHeight }\">\n <div #my1mm id=\"my1_mm\" style=\"height:1mm;width:1mm;visibility: hidden;\"></div>\n <ng-container *ngIf=\"coverChildTable && uiControl != null\">\n <div class=\"table-cover\"></div>\n <button (click)=\"showMatrixDialog()\" class=\"pep-button strong sm table-cover-button\"\n [ngClass]=\"{ 'lineview-btn': currentViewType?.Key == 'OrderCenterFlatMatrixLine'}\">\n {{ \"INTERNAL_PAGE.CLICK_TO_ORDER\" | translate }}\n </button>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"matrixHeaderTemplate\"></ng-container>\n <ng-container #orgCont></ng-container>\n</div>\n\n<ng-template #matrixDialogTemplate>\n\n <div mat-dialog-title>\n <ng-container *ngTemplateOutlet=\"matrixHeaderTemplate\"></ng-container>\n </div>\n\n <div mat-dialog-content>\n <ng-container #dialogCont></ng-container>\n </div>\n</ng-template>\n\n<!-- <div id=\"childGridModal\" bsModal (onShown)=\"onShown()\" (onHidden)=\"onHidden()\" #childModal=\"bs-modal\" class=\"modal\"\n tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"gridModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-body matrix-dialog-body\">\n <ng-container #modalCont></ng-container>\n </div>\n </div>\n </div>\n</div> -->", styles: [":host{display:grid;width:inherit;height:inherit}.matrix-title-container{padding:0;height:var(--pep-form-field-height, 2.5rem);display:flex;align-items:flex-end}.matrix-title-container .block-with-text{width:100%;max-height:inherit;font-weight:var(--pep-font-weight-bold, 600);display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.matrix-title-container .buttons-container{display:flex;align-self:center}.matrix-title-container .buttons-container .pepperi-button,.matrix-title-container .buttons-container .pep-button{width:max-content}#mainViewCont{width:100%;height:inherit;overflow:hidden;padding:0 var(--pep-spacing-xs, .25rem)}#mainViewCont .table-cover{background-color:#fff;z-index:98;position:absolute;top:0;width:100%;height:inherit;opacity:.5}#mainViewCont .table-cover-button{position:absolute;left:50%;transform:translate(-50%,-50%);top:calc(50% + var(--pep-form-field-height, 2.5rem));z-index:99}#mainViewCont .table-cover-button.lineview-btn{top:calc(2 * var(--pep-form-field-height, 2.5rem));transform:translate(-50%)}#mainViewCont .underCover{max-height:inherit;overflow:hidden}#mainViewCont ::ng-deep .table-header{top:unset!important}\n"] }]
|
|
2575
|
-
}], ctorParameters: function () { return [{ type: i3$1.FormBuilder }, { type: i1$
|
|
2567
|
+
}], ctorParameters: function () { return [{ type: i3$1.FormBuilder }, { type: i1$1.PepDialogService }, { type: PepInternalPageService }, { type: i2.PepCustomizationService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { field: [{
|
|
2576
2568
|
type: Input
|
|
2577
2569
|
}], layoutType: [{
|
|
2578
2570
|
type: Input
|
|
@@ -2626,11 +2618,11 @@ class PepInternalCaruselService {
|
|
|
2626
2618
|
);
|
|
2627
2619
|
}
|
|
2628
2620
|
}
|
|
2629
|
-
PepInternalCaruselService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
2630
|
-
PepInternalCaruselService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.
|
|
2631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
2621
|
+
PepInternalCaruselService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalCaruselService, deps: [{ token: i2.PepHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2622
|
+
PepInternalCaruselService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalCaruselService });
|
|
2623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalCaruselService, decorators: [{
|
|
2632
2624
|
type: Injectable
|
|
2633
|
-
}], ctorParameters: function () { return [{ type:
|
|
2625
|
+
}], ctorParameters: function () { return [{ type: i2.PepHttpService }]; } });
|
|
2634
2626
|
|
|
2635
2627
|
class PepInternalCaruselComponent {
|
|
2636
2628
|
constructor(fb, layoutService, internalCaruselService) {
|
|
@@ -2720,12 +2712,12 @@ class PepInternalCaruselComponent {
|
|
|
2720
2712
|
this.nextDisabled = event;
|
|
2721
2713
|
}
|
|
2722
2714
|
}
|
|
2723
|
-
PepInternalCaruselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
2724
|
-
PepInternalCaruselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.
|
|
2725
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
2715
|
+
PepInternalCaruselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalCaruselComponent, deps: [{ token: i3$1.FormBuilder }, { token: i2.PepLayoutService }, { token: PepInternalCaruselService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2716
|
+
PepInternalCaruselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepInternalCaruselComponent, selector: "pep-internal-carusel", inputs: { field: "field", layoutType: "layoutType" }, outputs: { internalFormFieldChange: "internalFormFieldChange", internalFormFieldClick: "internalFormFieldClick" }, providers: [PepInternalCaruselService], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true, read: PepCarouselComponent }], ngImport: i0, template: "<div class=\"carousel-container\">\n <ng-container *ngIf=\"items?.length > 0; then carouselBlock; else emptyBlock\"></ng-container>\n <ng-template #emptyBlock>\n <!-- No items -->\n </ng-template>\n <ng-template #carouselBlock>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_left_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"prevDisabled\" (click)=\"moveLeft()\" class=\"carousel-arrow start-arrow\">\n </pep-button>\n <pep-carousel #carousel [xWheelEnabled]=\"false\" [snapDuration]=\"duration\"\n (reachesLeftBound)=\"onReachesLeftBound($event)\" (reachesRightBound)=\"onReachesRightBound($event)\">\n <ng-container *ngFor=\"let item of items\">\n <pep-internal-form pepCarouselItem [layout]=\"layout\" [data]=\"item\" [layoutType]=\"'card'\" class=\"card-view \"\n (valueChange)=\"onCustomizeObjectChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\">\n </pep-internal-form>\n </ng-container>\n </pep-carousel>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_right_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"nextDisabled\" (click)=\"moveRight()\" class=\"carousel-arrow end-arrow\">\n </pep-button>\n </ng-template>\n</div>", styles: [".carousel-container{position:relative;margin:0;display:grid}.carousel-container .carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:1}.carousel-container .carousel-arrow.start-arrow{left:0}.carousel-container .carousel-arrow.end-arrow{right:0}.carousel-container ::ng-deep .carousel-content .card-view{padding:var(--pep-spacing-sm, .5rem) 0!important}.carousel-container ::ng-deep .carousel-content .card-view:first-child{padding-inline-start:var(--pep-spacing-sm, .5rem)!important}.carousel-container ::ng-deep .carousel-content .card-view:last-child{padding-inline-end:var(--pep-spacing-sm, .5rem)!important}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$3.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i6$2.PepCarouselComponent, selector: "pep-carousel", inputs: ["scrollbarHidden", "disabled", "xDisabled", "yDisabled", "xWheelEnabled", "dragDisabled", "snapDisabled", "snapOffset", "snapDuration"], outputs: ["dsInitialized", "indexChanged", "reachesLeftBound", "reachesRightBound", "snapAnimationFinished", "dragStart", "dragEnd"] }, { kind: "directive", type: i6$2.PepCarouselItemDirective, selector: "[pepCarouselItem]", inputs: ["dragDisabled"] }, { kind: "component", type: PepInternalFormComponent, selector: "pep-internal-form", inputs: ["isInternal", "isReport", "layout", "lockEvents", "canEditObject", "data", "lockFields", "isActive", "layoutType", "objectId", "parentId", "searchCode", "showTitle", "firstFieldAsLink", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "fieldClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepInternalCaruselComponent, decorators: [{
|
|
2726
2718
|
type: Component,
|
|
2727
|
-
args: [{ selector: 'pep-internal-carusel', providers: [PepInternalCaruselService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"carousel-container\">\n <ng-container *ngIf=\"items?.length > 0; then carouselBlock; else emptyBlock\"></ng-container>\n <ng-template #emptyBlock>\n <!-- No items -->\n </ng-template>\n <ng-template #carouselBlock>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_left_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"prevDisabled\" (click)=\"moveLeft()\" class=\"carousel-arrow start-arrow\">\n </pep-button>\n <pep-carousel #carousel [xWheelEnabled]=\"false\" [snapDuration]=\"duration\"\n (reachesLeftBound)=\"onReachesLeftBound($event)\" (reachesRightBound)=\"onReachesRightBound($event)\">\n <ng-container *ngFor=\"let item of items\">\n <pep-form pepCarouselItem [layout]=\"layout\" [data]=\"item\" [layoutType]=\"'card'\" class=\"card-view \"\n (valueChange)=\"onCustomizeObjectChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\">\n </pep-form>\n </ng-container>\n </pep-carousel>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_right_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"nextDisabled\" (click)=\"moveRight()\" class=\"carousel-arrow end-arrow\">\n </pep-button>\n </ng-template>\n</div>", styles: [".carousel-container{position:relative;margin:0;display:grid}.carousel-container .carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:1}.carousel-container .carousel-arrow.start-arrow{left:0}.carousel-container .carousel-arrow.end-arrow{right:0}.carousel-container ::ng-deep .carousel-content .card-view{padding:var(--pep-spacing-sm, .5rem) 0!important}.carousel-container ::ng-deep .carousel-content .card-view:first-child{padding-inline-start:var(--pep-spacing-sm, .5rem)!important}.carousel-container ::ng-deep .carousel-content .card-view:last-child{padding-inline-end:var(--pep-spacing-sm, .5rem)!important}\n"] }]
|
|
2728
|
-
}], ctorParameters: function () { return [{ type: i3$1.FormBuilder }, { type:
|
|
2719
|
+
args: [{ selector: 'pep-internal-carusel', providers: [PepInternalCaruselService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"carousel-container\">\n <ng-container *ngIf=\"items?.length > 0; then carouselBlock; else emptyBlock\"></ng-container>\n <ng-template #emptyBlock>\n <!-- No items -->\n </ng-template>\n <ng-template #carouselBlock>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_left_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"prevDisabled\" (click)=\"moveLeft()\" class=\"carousel-arrow start-arrow\">\n </pep-button>\n <pep-carousel #carousel [xWheelEnabled]=\"false\" [snapDuration]=\"duration\"\n (reachesLeftBound)=\"onReachesLeftBound($event)\" (reachesRightBound)=\"onReachesRightBound($event)\">\n <ng-container *ngFor=\"let item of items\">\n <pep-internal-form pepCarouselItem [layout]=\"layout\" [data]=\"item\" [layoutType]=\"'card'\" class=\"card-view \"\n (valueChange)=\"onCustomizeObjectChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\">\n </pep-internal-form>\n </ng-container>\n </pep-carousel>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_right_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"nextDisabled\" (click)=\"moveRight()\" class=\"carousel-arrow end-arrow\">\n </pep-button>\n </ng-template>\n</div>", styles: [".carousel-container{position:relative;margin:0;display:grid}.carousel-container .carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:1}.carousel-container .carousel-arrow.start-arrow{left:0}.carousel-container .carousel-arrow.end-arrow{right:0}.carousel-container ::ng-deep .carousel-content .card-view{padding:var(--pep-spacing-sm, .5rem) 0!important}.carousel-container ::ng-deep .carousel-content .card-view:first-child{padding-inline-start:var(--pep-spacing-sm, .5rem)!important}.carousel-container ::ng-deep .carousel-content .card-view:last-child{padding-inline-end:var(--pep-spacing-sm, .5rem)!important}\n"] }]
|
|
2720
|
+
}], ctorParameters: function () { return [{ type: i3$1.FormBuilder }, { type: i2.PepLayoutService }, { type: PepInternalCaruselService }]; }, propDecorators: { carousel: [{
|
|
2729
2721
|
type: ViewChild,
|
|
2730
2722
|
args: ['carousel', { read: PepCarouselComponent }]
|
|
2731
2723
|
}], field: [{
|
|
@@ -2738,6 +2730,1334 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImpor
|
|
|
2738
2730
|
type: Output
|
|
2739
2731
|
}] } });
|
|
2740
2732
|
|
|
2733
|
+
class PepFieldGeneratorComponent {
|
|
2734
|
+
constructor() {
|
|
2735
|
+
this.isActive = false;
|
|
2736
|
+
this.uid = null;
|
|
2737
|
+
this.layoutType = 'form';
|
|
2738
|
+
this.showTitle = true;
|
|
2739
|
+
this.checkForChanges = null;
|
|
2740
|
+
this.valueChange = new EventEmitter();
|
|
2741
|
+
this.formValidationChange = new EventEmitter();
|
|
2742
|
+
this.elementClick = new EventEmitter();
|
|
2743
|
+
this.internalFormFieldChange = new EventEmitter();
|
|
2744
|
+
this.internalFormFieldClick = new EventEmitter();
|
|
2745
|
+
this.formValueChange = new EventEmitter();
|
|
2746
|
+
this.formFieldClick = new EventEmitter();
|
|
2747
|
+
}
|
|
2748
|
+
set field(value) {
|
|
2749
|
+
this._field = value;
|
|
2750
|
+
}
|
|
2751
|
+
get field() {
|
|
2752
|
+
return this._field;
|
|
2753
|
+
}
|
|
2754
|
+
get isValid() {
|
|
2755
|
+
if (this.field.readonly || this.field.disabled) {
|
|
2756
|
+
return true;
|
|
2757
|
+
}
|
|
2758
|
+
else {
|
|
2759
|
+
const formControl = this.form && this.form.get(this.field.key);
|
|
2760
|
+
if (formControl) {
|
|
2761
|
+
return formControl.valid;
|
|
2762
|
+
}
|
|
2763
|
+
else {
|
|
2764
|
+
return false;
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
get isTouched() {
|
|
2769
|
+
const formControl = this.form && this.form.get(this.field.key);
|
|
2770
|
+
return formControl ? formControl.touched : false;
|
|
2771
|
+
}
|
|
2772
|
+
get isDirty() {
|
|
2773
|
+
const formControl = this.form && this.form.get(this.field.key);
|
|
2774
|
+
return formControl ? formControl.dirty : false;
|
|
2775
|
+
}
|
|
2776
|
+
ngOnDestroy() {
|
|
2777
|
+
//
|
|
2778
|
+
}
|
|
2779
|
+
onFileChanged(fileData, field) {
|
|
2780
|
+
const value = fileData ? JSON.stringify(fileData) : '';
|
|
2781
|
+
const fieldValueChange = {
|
|
2782
|
+
key: field.key,
|
|
2783
|
+
value: value,
|
|
2784
|
+
controlType: field.controlType,
|
|
2785
|
+
};
|
|
2786
|
+
this.valueChange.emit(fieldValueChange);
|
|
2787
|
+
}
|
|
2788
|
+
onAddressValueChanged(valueChange, field) {
|
|
2789
|
+
const fieldValueChange = {
|
|
2790
|
+
key: valueChange.key,
|
|
2791
|
+
value: valueChange.value,
|
|
2792
|
+
controlType: field.controlType,
|
|
2793
|
+
};
|
|
2794
|
+
this.valueChange.emit(fieldValueChange);
|
|
2795
|
+
}
|
|
2796
|
+
onValueChanged(value, field) {
|
|
2797
|
+
const fieldValueChange = {
|
|
2798
|
+
key: field.key,
|
|
2799
|
+
value: value.toString(),
|
|
2800
|
+
controlType: field.controlType,
|
|
2801
|
+
};
|
|
2802
|
+
this.valueChange.emit(fieldValueChange);
|
|
2803
|
+
}
|
|
2804
|
+
onInternalFormFieldChanged(internalFormFieldChange) {
|
|
2805
|
+
this.internalFormFieldChange.emit(internalFormFieldChange);
|
|
2806
|
+
}
|
|
2807
|
+
onFormValidationChanged(formValidationChange) {
|
|
2808
|
+
this.formValidationChange.emit(formValidationChange);
|
|
2809
|
+
}
|
|
2810
|
+
onClick(fieldClicked) {
|
|
2811
|
+
this.elementClick.emit(fieldClicked);
|
|
2812
|
+
}
|
|
2813
|
+
onInternalFormFieldClick(internalFormFieldClick) {
|
|
2814
|
+
this.internalFormFieldClick.emit(internalFormFieldClick);
|
|
2815
|
+
}
|
|
2816
|
+
onFormValueChanged(event) {
|
|
2817
|
+
this.formValueChange.emit(event);
|
|
2818
|
+
}
|
|
2819
|
+
onFormFieldClick(event) {
|
|
2820
|
+
this.formFieldClick.emit(event);
|
|
2821
|
+
}
|
|
2822
|
+
ngOnChanges(changes) {
|
|
2823
|
+
// debugger;
|
|
2824
|
+
// For testing.
|
|
2825
|
+
// this.field.disabled = this.field.readonly = false;
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
PepFieldGeneratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepFieldGeneratorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2829
|
+
PepFieldGeneratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepFieldGeneratorComponent, selector: "pep-field-generator", inputs: { field: "field", isActive: "isActive", uid: "uid", form: "form", layoutType: "layoutType", showTitle: "showTitle", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", elementClick: "elementClick", internalFormFieldChange: "internalFormFieldChange", internalFormFieldClick: "internalFormFieldClick", formValueChange: "formValueChange", formFieldClick: "formFieldClick" }, usesOnChanges: true, ngImport: i0, 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>", styles: [":host{width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.PepAddressComponent, selector: "pep-address", inputs: ["key", "formattedValue", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "groupFields", "form", "layoutType", "visible"], outputs: ["addressValueChange"] }, { kind: "component", type: i4$3.PepAttachmentComponent, selector: "pep-attachment", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i8$1.PepImagesFilmstripComponent, selector: "pep-images-filmstrip", inputs: ["key", "value", "label", "xAlignment", "rowSpan", "form", "uid", "showTitle", "renderTitle", "layoutType", "currIndex", "showThumbnails"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType"], outputs: ["valueChange", "elementClick"] }, { kind: "component", type: i10.PepRichHtmlTextareaComponent, selector: "pep-rich-html-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType", "inlineMode", "toolbarOptions"], outputs: ["valueChange"] }, { kind: "component", type: i11.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "options", "visible", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "emptyOption", "renderTitle"], outputs: ["valueChange", "formValidationChange"] }, { kind: "component", type: i12.PepSeparatorComponent, selector: "pep-separator", inputs: ["key", "label", "xAlignment", "form", "layoutType", "visible"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i15.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "formattedValue", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey"], outputs: ["valueChange", "formValidationChange"] }, { kind: "component", type: i16.PepLinkComponent, selector: "pep-link", inputs: ["key", "value", "formattedValue", "label", "placeholder", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "formValidationChange", "elementClick"] }, { kind: "component", type: PepIndicatorsComponent, selector: "pep-indicators", inputs: ["key", "value", "layoutType"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "component", type: PepInternalMenuComponent, selector: "pep-internal-menu", inputs: ["key", "label", "disabled", "xAlignment", "options", "invertClass", "layoutType"], outputs: ["elementClick"] }, { kind: "component", type: PepInternalPageComponent, selector: "pep-internal-page", inputs: ["field", "layoutType"], outputs: ["internalFormFieldChange", "internalFormFieldClick"] }, { kind: "component", type: PepInternalCaruselComponent, selector: "pep-internal-carusel", inputs: ["field", "layoutType"], outputs: ["internalFormFieldChange", "internalFormFieldClick"] }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepFieldGeneratorComponent, decorators: [{
|
|
2831
|
+
type: Component,
|
|
2832
|
+
args: [{ selector: 'pep-field-generator', encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, 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>", styles: [":host{width:100%;height:100%}\n"] }]
|
|
2833
|
+
}], propDecorators: { field: [{
|
|
2834
|
+
type: Input
|
|
2835
|
+
}], isActive: [{
|
|
2836
|
+
type: Input
|
|
2837
|
+
}], uid: [{
|
|
2838
|
+
type: Input
|
|
2839
|
+
}], form: [{
|
|
2840
|
+
type: Input
|
|
2841
|
+
}], layoutType: [{
|
|
2842
|
+
type: Input
|
|
2843
|
+
}], showTitle: [{
|
|
2844
|
+
type: Input
|
|
2845
|
+
}], checkForChanges: [{
|
|
2846
|
+
type: Input
|
|
2847
|
+
}], valueChange: [{
|
|
2848
|
+
type: Output
|
|
2849
|
+
}], formValidationChange: [{
|
|
2850
|
+
type: Output
|
|
2851
|
+
}], elementClick: [{
|
|
2852
|
+
type: Output
|
|
2853
|
+
}], internalFormFieldChange: [{
|
|
2854
|
+
type: Output
|
|
2855
|
+
}], internalFormFieldClick: [{
|
|
2856
|
+
type: Output
|
|
2857
|
+
}], formValueChange: [{
|
|
2858
|
+
type: Output
|
|
2859
|
+
}], formFieldClick: [{
|
|
2860
|
+
type: Output
|
|
2861
|
+
}] } });
|
|
2862
|
+
|
|
2863
|
+
class PepFormComponent {
|
|
2864
|
+
// eventServiceSub: Subscription;
|
|
2865
|
+
// public jsonLib = JSON;
|
|
2866
|
+
constructor(dialogService, customizationService, layoutService, fb, differs, translate) {
|
|
2867
|
+
this.dialogService = dialogService;
|
|
2868
|
+
this.customizationService = customizationService;
|
|
2869
|
+
this.layoutService = layoutService;
|
|
2870
|
+
this.fb = fb;
|
|
2871
|
+
this.translate = translate;
|
|
2872
|
+
this.isInternal = true;
|
|
2873
|
+
this.isReport = false;
|
|
2874
|
+
this.lockEvents = false;
|
|
2875
|
+
this.canEditObject = true;
|
|
2876
|
+
this._data = null;
|
|
2877
|
+
this.isActive = false;
|
|
2878
|
+
this.layoutType = 'card';
|
|
2879
|
+
// @Input() listType = '';
|
|
2880
|
+
this.objectId = '0';
|
|
2881
|
+
this.parentId = '0';
|
|
2882
|
+
this.searchCode = '0';
|
|
2883
|
+
this.showTitle = true;
|
|
2884
|
+
this.firstFieldAsLink = false;
|
|
2885
|
+
this.checkForChanges = null;
|
|
2886
|
+
this.valueChange = new EventEmitter();
|
|
2887
|
+
this.formValidationChange = new EventEmitter();
|
|
2888
|
+
this.fieldClick = new EventEmitter();
|
|
2889
|
+
this.internalFormFieldClick = new EventEmitter();
|
|
2890
|
+
this.internalFormFieldChange = new EventEmitter();
|
|
2891
|
+
this.isLocked = false;
|
|
2892
|
+
// payLoad = '';
|
|
2893
|
+
this.rows = [];
|
|
2894
|
+
this.fields = [];
|
|
2895
|
+
this._fieldsSubject = new BehaviorSubject([]);
|
|
2896
|
+
this.columns = 1;
|
|
2897
|
+
this.hasMenuFloatingOnOtherField = false;
|
|
2898
|
+
this.indicatorsDataField = null;
|
|
2899
|
+
this._shouldReloadForm = false;
|
|
2900
|
+
// store the initial value to compare with
|
|
2901
|
+
this.differ = differs.find({}).create();
|
|
2902
|
+
}
|
|
2903
|
+
set data(value) {
|
|
2904
|
+
const shouldReload = this.shouldReloadForm || !this._data;
|
|
2905
|
+
this._data = value;
|
|
2906
|
+
if (shouldReload) {
|
|
2907
|
+
this._shouldReloadForm = false;
|
|
2908
|
+
this.initForm();
|
|
2909
|
+
}
|
|
2910
|
+
else {
|
|
2911
|
+
this.updateForm();
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
get data() {
|
|
2915
|
+
return this._data;
|
|
2916
|
+
}
|
|
2917
|
+
set lockFields(value) {
|
|
2918
|
+
this.isLocked = value;
|
|
2919
|
+
}
|
|
2920
|
+
get fields$() {
|
|
2921
|
+
return this._fieldsSubject.asObservable();
|
|
2922
|
+
}
|
|
2923
|
+
get shouldReloadForm() {
|
|
2924
|
+
return this._shouldReloadForm;
|
|
2925
|
+
}
|
|
2926
|
+
convertXAlignToHorizontalAlign(xAlign) {
|
|
2927
|
+
let res = DEFAULT_HORIZONTAL_ALIGNMENT;
|
|
2928
|
+
if (xAlign === X_ALIGNMENT_TYPE.None ||
|
|
2929
|
+
xAlign === X_ALIGNMENT_TYPE.Left) {
|
|
2930
|
+
res = 'left';
|
|
2931
|
+
}
|
|
2932
|
+
else if (xAlign === X_ALIGNMENT_TYPE.Right) {
|
|
2933
|
+
res = 'right';
|
|
2934
|
+
}
|
|
2935
|
+
else {
|
|
2936
|
+
res = 'center';
|
|
2937
|
+
}
|
|
2938
|
+
return res;
|
|
2939
|
+
}
|
|
2940
|
+
convertYAlignToVerticalAlign(yAlign) {
|
|
2941
|
+
let res = DEFAULT_VERTICAL_ALIGNMENT;
|
|
2942
|
+
if (yAlign === Y_ALIGNMENT_TYPE.None ||
|
|
2943
|
+
yAlign === Y_ALIGNMENT_TYPE.Top) {
|
|
2944
|
+
res = 'top';
|
|
2945
|
+
}
|
|
2946
|
+
else if (yAlign === Y_ALIGNMENT_TYPE.Bottom) {
|
|
2947
|
+
res = 'bottom';
|
|
2948
|
+
}
|
|
2949
|
+
else {
|
|
2950
|
+
res = 'middle';
|
|
2951
|
+
}
|
|
2952
|
+
return res;
|
|
2953
|
+
}
|
|
2954
|
+
convertOptionalValues(optionalValues) {
|
|
2955
|
+
if (optionalValues && optionalValues.length > 0) {
|
|
2956
|
+
return optionalValues.map((ov) => {
|
|
2957
|
+
return { key: ov.Key, value: ov.Value };
|
|
2958
|
+
});
|
|
2959
|
+
}
|
|
2960
|
+
else {
|
|
2961
|
+
return [];
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
convertAddressFields(controlField, addressFields, canEditObject) {
|
|
2965
|
+
const fields = [];
|
|
2966
|
+
addressFields.forEach((field) => {
|
|
2967
|
+
let customField;
|
|
2968
|
+
const placeholder = field.ApiName;
|
|
2969
|
+
if (field.ApiName.toLowerCase().indexOf('street') >= 0) {
|
|
2970
|
+
customField = new PepTextboxField({
|
|
2971
|
+
key: field.ApiName,
|
|
2972
|
+
label: field.ApiName,
|
|
2973
|
+
type: 'text',
|
|
2974
|
+
placeholder,
|
|
2975
|
+
readonly: !canEditObject,
|
|
2976
|
+
disabled: !field.Enabled || !canEditObject,
|
|
2977
|
+
hidden: false,
|
|
2978
|
+
mandatory: false,
|
|
2979
|
+
value: field.Value,
|
|
2980
|
+
formattedValue: field.FormattedValue,
|
|
2981
|
+
row: 0,
|
|
2982
|
+
rowSpan: 1,
|
|
2983
|
+
col: 0,
|
|
2984
|
+
colSpan: 2,
|
|
2985
|
+
xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
|
|
2986
|
+
yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
|
|
2987
|
+
order: 0,
|
|
2988
|
+
});
|
|
2989
|
+
}
|
|
2990
|
+
else if (field.ApiName.toLowerCase().indexOf('city') >= 0) {
|
|
2991
|
+
customField = new PepTextboxField({
|
|
2992
|
+
key: field.ApiName,
|
|
2993
|
+
label: field.ApiName,
|
|
2994
|
+
type: 'text',
|
|
2995
|
+
placeholder,
|
|
2996
|
+
readonly: !canEditObject,
|
|
2997
|
+
disabled: !field.Enabled || !canEditObject,
|
|
2998
|
+
hidden: false,
|
|
2999
|
+
mandatory: false,
|
|
3000
|
+
value: field.Value,
|
|
3001
|
+
formattedValue: field.FormattedValue,
|
|
3002
|
+
row: 0,
|
|
3003
|
+
rowSpan: 1,
|
|
3004
|
+
col: 2,
|
|
3005
|
+
colSpan: 1,
|
|
3006
|
+
xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
|
|
3007
|
+
yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
|
|
3008
|
+
order: 1,
|
|
3009
|
+
});
|
|
3010
|
+
}
|
|
3011
|
+
else if (field.ApiName.toLowerCase().indexOf('state') >= 0) {
|
|
3012
|
+
customField = new PepSelectField({
|
|
3013
|
+
key: field.ApiName,
|
|
3014
|
+
label: field.ApiName,
|
|
3015
|
+
placeholder,
|
|
3016
|
+
options: this.convertOptionalValues(field.OptionalValues),
|
|
3017
|
+
readonly: !canEditObject,
|
|
3018
|
+
disabled: !field.Enabled || !canEditObject,
|
|
3019
|
+
hidden: false,
|
|
3020
|
+
mandatory: false,
|
|
3021
|
+
value: field.Value,
|
|
3022
|
+
formattedValue: field.FormattedValue,
|
|
3023
|
+
row: 1,
|
|
3024
|
+
rowSpan: 1,
|
|
3025
|
+
col: 0,
|
|
3026
|
+
colSpan: 1,
|
|
3027
|
+
xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
|
|
3028
|
+
yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
|
|
3029
|
+
order: 2,
|
|
3030
|
+
});
|
|
3031
|
+
}
|
|
3032
|
+
else if (field.ApiName.toLowerCase().indexOf('zipcode') >= 0) {
|
|
3033
|
+
customField = new PepTextboxField({
|
|
3034
|
+
key: field.ApiName,
|
|
3035
|
+
label: field.ApiName,
|
|
3036
|
+
type: 'text',
|
|
3037
|
+
placeholder,
|
|
3038
|
+
readonly: !canEditObject,
|
|
3039
|
+
disabled: !field.Enabled || !canEditObject,
|
|
3040
|
+
hidden: false,
|
|
3041
|
+
mandatory: false,
|
|
3042
|
+
value: field.Value,
|
|
3043
|
+
formattedValue: field.FormattedValue,
|
|
3044
|
+
row: 1,
|
|
3045
|
+
rowSpan: 1,
|
|
3046
|
+
col: 1,
|
|
3047
|
+
colSpan: 1,
|
|
3048
|
+
xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
|
|
3049
|
+
yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
|
|
3050
|
+
order: 3,
|
|
3051
|
+
});
|
|
3052
|
+
}
|
|
3053
|
+
else if (field.ApiName.toLowerCase().indexOf('country') >= 0) {
|
|
3054
|
+
customField = new PepSelectField({
|
|
3055
|
+
key: field.ApiName,
|
|
3056
|
+
label: field.ApiName,
|
|
3057
|
+
placeholder,
|
|
3058
|
+
options: this.convertOptionalValues(field.OptionalValues),
|
|
3059
|
+
readonly: !canEditObject,
|
|
3060
|
+
disabled: !field.Enabled || !canEditObject,
|
|
3061
|
+
hidden: false,
|
|
3062
|
+
mandatory: false,
|
|
3063
|
+
value: field.Value,
|
|
3064
|
+
formattedValue: field.FormattedValue,
|
|
3065
|
+
row: 2,
|
|
3066
|
+
rowSpan: 1,
|
|
3067
|
+
col: 2,
|
|
3068
|
+
colSpan: 1,
|
|
3069
|
+
xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
|
|
3070
|
+
yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
|
|
3071
|
+
order: 4,
|
|
3072
|
+
});
|
|
3073
|
+
}
|
|
3074
|
+
fields.push(customField);
|
|
3075
|
+
});
|
|
3076
|
+
return fields.sort((n1, n2) => n1.order > n2.order ? 1 : n1.order < n2.order ? -1 : 0);
|
|
3077
|
+
}
|
|
3078
|
+
isMatrixField(apiNameToCheck) {
|
|
3079
|
+
return apiNameToCheck.indexOf('Matrix') >= 0;
|
|
3080
|
+
}
|
|
3081
|
+
doesFieldHavaFloatingField(controlField, floatingField) {
|
|
3082
|
+
let hasFloatingField = false;
|
|
3083
|
+
if (floatingField.Layout.Y >= controlField.Layout.Y &&
|
|
3084
|
+
floatingField.Layout.Y <
|
|
3085
|
+
controlField.Layout.Y + controlField.Layout.Height &&
|
|
3086
|
+
floatingField.Layout.X >= controlField.Layout.X &&
|
|
3087
|
+
floatingField.Layout.X <
|
|
3088
|
+
controlField.Layout.X + controlField.Layout.Width) {
|
|
3089
|
+
hasFloatingField = true;
|
|
3090
|
+
}
|
|
3091
|
+
return hasFloatingField;
|
|
3092
|
+
}
|
|
3093
|
+
getOptionsForCustomField(controlField, dataField, canEditObject) {
|
|
3094
|
+
if (!controlField || !dataField) {
|
|
3095
|
+
return;
|
|
3096
|
+
}
|
|
3097
|
+
const placeholder = controlField.ReadOnly || !canEditObject ? '' : controlField.Title;
|
|
3098
|
+
return {
|
|
3099
|
+
key: controlField.ApiName,
|
|
3100
|
+
label: controlField.Title,
|
|
3101
|
+
accessory: dataField.Accessory,
|
|
3102
|
+
placeholder,
|
|
3103
|
+
readonly: controlField.ReadOnly || !canEditObject,
|
|
3104
|
+
disabled: !dataField.Enabled || !canEditObject,
|
|
3105
|
+
hidden: controlField.Hidden,
|
|
3106
|
+
mandatory: controlField.Mandatory,
|
|
3107
|
+
value: dataField.Value,
|
|
3108
|
+
formattedValue: dataField.FormattedValue,
|
|
3109
|
+
additionalValue: dataField.AdditionalValue,
|
|
3110
|
+
row: controlField.Layout.Y,
|
|
3111
|
+
rowSpan: controlField.Layout.Height,
|
|
3112
|
+
col: controlField.Layout.X,
|
|
3113
|
+
colSpan: controlField.Layout.Width,
|
|
3114
|
+
xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
|
|
3115
|
+
yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
|
|
3116
|
+
options: this.convertOptionalValues(dataField.OptionalValues),
|
|
3117
|
+
groupFields: undefined,
|
|
3118
|
+
maxFieldCharacters: controlField.MaxFieldCharacters,
|
|
3119
|
+
minValue: controlField.MinValue,
|
|
3120
|
+
maxValue: controlField.MaxValue,
|
|
3121
|
+
// hasMenu: hasMenu,
|
|
3122
|
+
// hasCampaign: hasCampaign,
|
|
3123
|
+
// hasIndicators: hasIndicators,
|
|
3124
|
+
textColor: dataField.TextColor,
|
|
3125
|
+
visible: dataField.Visible,
|
|
3126
|
+
};
|
|
3127
|
+
}
|
|
3128
|
+
convertToCustomField(controlField, dataField, canEditObject, menuField, hasCampaignField, indicatorsField, objectId, parentId, searchCode) {
|
|
3129
|
+
let customField;
|
|
3130
|
+
const options = this.getOptionsForCustomField(controlField, dataField, canEditObject);
|
|
3131
|
+
if (controlField.ApiName === 'ObjectMenu') {
|
|
3132
|
+
options.type = 'menu';
|
|
3133
|
+
customField = new PepInternalMenuField(options);
|
|
3134
|
+
}
|
|
3135
|
+
else if (controlField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
|
|
3136
|
+
controlField.FieldType ===
|
|
3137
|
+
FIELD_TYPE.NumberIntegerQuantitySelector ||
|
|
3138
|
+
controlField.ApiName === 'QuantitySelector' ||
|
|
3139
|
+
controlField.ApiName === 'UnitsQuantity' ||
|
|
3140
|
+
controlField.ApiName.indexOf('size_') === 0) {
|
|
3141
|
+
if (dataField.FieldType === FIELD_TYPE.InternalLink) {
|
|
3142
|
+
options.type = 'button';
|
|
3143
|
+
}
|
|
3144
|
+
else if (dataField.FieldType === FIELD_TYPE.Package) {
|
|
3145
|
+
options.type = 'packageButton';
|
|
3146
|
+
}
|
|
3147
|
+
else if (dataField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
|
|
3148
|
+
dataField.FieldType === FIELD_TYPE.NumberReal) {
|
|
3149
|
+
options.type = 'qs';
|
|
3150
|
+
options.allowDecimal = true;
|
|
3151
|
+
}
|
|
3152
|
+
else if (dataField.FieldType ===
|
|
3153
|
+
FIELD_TYPE.NumberIntegerQuantitySelector ||
|
|
3154
|
+
dataField.FieldType === FIELD_TYPE.NumberInteger) {
|
|
3155
|
+
options.type = 'qs';
|
|
3156
|
+
options.allowDecimal = false;
|
|
3157
|
+
}
|
|
3158
|
+
else if (dataField.FieldType === FIELD_TYPE.NumberIntegerForMatrix) {
|
|
3159
|
+
options.type = 'qsForMatrix';
|
|
3160
|
+
options.allowDecimal = false;
|
|
3161
|
+
}
|
|
3162
|
+
else if (dataField.FieldType === FIELD_TYPE.NumberRealForMatrix) {
|
|
3163
|
+
options.type = 'qsForMatrix';
|
|
3164
|
+
options.allowDecimal = true;
|
|
3165
|
+
}
|
|
3166
|
+
options.notificationInfo = dataField.NotificationInfo;
|
|
3167
|
+
customField = new PepQuantitySelectorField(options);
|
|
3168
|
+
}
|
|
3169
|
+
else {
|
|
3170
|
+
// HACK: need to remove this..
|
|
3171
|
+
if (dataField.FieldType === FIELD_TYPE.Indicators &&
|
|
3172
|
+
this.isMatrixField(dataField.ApiName)) {
|
|
3173
|
+
dataField.FieldType = FIELD_TYPE.InternalPage;
|
|
3174
|
+
}
|
|
3175
|
+
switch (dataField.FieldType) {
|
|
3176
|
+
case FIELD_TYPE.Address: {
|
|
3177
|
+
const canEditGroupObject = controlField.ReadOnly
|
|
3178
|
+
? false
|
|
3179
|
+
: canEditObject;
|
|
3180
|
+
options.groupFields = this.convertAddressFields(controlField, dataField.GroupFields, canEditGroupObject);
|
|
3181
|
+
customField = new PepAddressField(options);
|
|
3182
|
+
break;
|
|
3183
|
+
}
|
|
3184
|
+
case FIELD_TYPE.Indicators: {
|
|
3185
|
+
// options['type'] = 'indicators'; // Not needed this is PepIndicatorsField.
|
|
3186
|
+
customField = new PepIndicatorsField(options);
|
|
3187
|
+
break;
|
|
3188
|
+
}
|
|
3189
|
+
case FIELD_TYPE.InternalPage: {
|
|
3190
|
+
if (this.isMatrixField(controlField.ApiName)) {
|
|
3191
|
+
options.rowSpan = controlField.Layout.Height;
|
|
3192
|
+
options.objectId = objectId;
|
|
3193
|
+
options.parentId = parentId;
|
|
3194
|
+
options.searchCode = searchCode;
|
|
3195
|
+
customField = new PepInternalPageField(options);
|
|
3196
|
+
}
|
|
3197
|
+
else {
|
|
3198
|
+
// Not supported
|
|
3199
|
+
}
|
|
3200
|
+
break;
|
|
3201
|
+
}
|
|
3202
|
+
case FIELD_TYPE.RelatedObjectsCards: {
|
|
3203
|
+
options.rowSpan = controlField.Layout.Height;
|
|
3204
|
+
options.searchCode = searchCode;
|
|
3205
|
+
options.pageInfo = dataField.UIPageInfo;
|
|
3206
|
+
customField = new PepInternalCaruselField(options);
|
|
3207
|
+
break;
|
|
3208
|
+
}
|
|
3209
|
+
case FIELD_TYPE.Link: {
|
|
3210
|
+
options.type = 'link';
|
|
3211
|
+
customField = new PepLinkField(options);
|
|
3212
|
+
break;
|
|
3213
|
+
}
|
|
3214
|
+
case FIELD_TYPE.InternalLink:
|
|
3215
|
+
case FIELD_TYPE.Button: {
|
|
3216
|
+
options.type = 'button';
|
|
3217
|
+
customField = new PepInternalButtonField(options);
|
|
3218
|
+
break;
|
|
3219
|
+
}
|
|
3220
|
+
case FIELD_TYPE.Attachment: {
|
|
3221
|
+
// options.type = 'attachment';
|
|
3222
|
+
customField = new PepAttachmentField(options);
|
|
3223
|
+
break;
|
|
3224
|
+
}
|
|
3225
|
+
case FIELD_TYPE.Signature: {
|
|
3226
|
+
// options.type = 'signature';
|
|
3227
|
+
customField = new PepSignatureField(options);
|
|
3228
|
+
break;
|
|
3229
|
+
}
|
|
3230
|
+
case FIELD_TYPE.Image:
|
|
3231
|
+
case FIELD_TYPE.ImageURL: {
|
|
3232
|
+
// options.type = 'image';
|
|
3233
|
+
options.menuField =
|
|
3234
|
+
menuField &&
|
|
3235
|
+
this.doesFieldHavaFloatingField(controlField, menuField)
|
|
3236
|
+
? menuField
|
|
3237
|
+
: null;
|
|
3238
|
+
options.hasCampaignField =
|
|
3239
|
+
hasCampaignField &&
|
|
3240
|
+
this.doesFieldHavaFloatingField(controlField, hasCampaignField)
|
|
3241
|
+
? hasCampaignField
|
|
3242
|
+
: null;
|
|
3243
|
+
options.indicatorsField =
|
|
3244
|
+
indicatorsField &&
|
|
3245
|
+
this.doesFieldHavaFloatingField(controlField, indicatorsField)
|
|
3246
|
+
? indicatorsField
|
|
3247
|
+
: null;
|
|
3248
|
+
customField = new PepImageField(options);
|
|
3249
|
+
break;
|
|
3250
|
+
}
|
|
3251
|
+
case FIELD_TYPE.Images: {
|
|
3252
|
+
// options.type = 'images';
|
|
3253
|
+
customField = new PepImagesField(options);
|
|
3254
|
+
break;
|
|
3255
|
+
}
|
|
3256
|
+
case FIELD_TYPE.Email: {
|
|
3257
|
+
options.type = 'email';
|
|
3258
|
+
customField = new PepLinkField(options);
|
|
3259
|
+
break;
|
|
3260
|
+
}
|
|
3261
|
+
case FIELD_TYPE.Phone: {
|
|
3262
|
+
options.type = 'phone';
|
|
3263
|
+
customField = new PepLinkField(options);
|
|
3264
|
+
break;
|
|
3265
|
+
}
|
|
3266
|
+
case FIELD_TYPE.Duration: {
|
|
3267
|
+
options.type = 'duration';
|
|
3268
|
+
customField = new PepTextboxField(options);
|
|
3269
|
+
break;
|
|
3270
|
+
}
|
|
3271
|
+
case FIELD_TYPE.Default:
|
|
3272
|
+
case FIELD_TYPE.TextBox:
|
|
3273
|
+
case FIELD_TYPE.LimitedLengthTextBox:
|
|
3274
|
+
case FIELD_TYPE.TextHeader:
|
|
3275
|
+
case FIELD_TYPE.CalculatedString:
|
|
3276
|
+
case FIELD_TYPE.MapDataString: {
|
|
3277
|
+
customField = new PepTextboxField(options);
|
|
3278
|
+
break;
|
|
3279
|
+
}
|
|
3280
|
+
case FIELD_TYPE.TextArea: {
|
|
3281
|
+
customField = new PepTextareaField(options);
|
|
3282
|
+
break;
|
|
3283
|
+
}
|
|
3284
|
+
case FIELD_TYPE.RichTextHTML: {
|
|
3285
|
+
customField = new PepRichHtmlTextareaField(options);
|
|
3286
|
+
break;
|
|
3287
|
+
}
|
|
3288
|
+
case FIELD_TYPE.Date:
|
|
3289
|
+
case FIELD_TYPE.LimitedDate:
|
|
3290
|
+
case FIELD_TYPE.CalculatedDate:
|
|
3291
|
+
case FIELD_TYPE.DateAndTime: {
|
|
3292
|
+
options.type =
|
|
3293
|
+
dataField.FieldType === FIELD_TYPE.DateAndTime
|
|
3294
|
+
? 'datetime'
|
|
3295
|
+
: 'date';
|
|
3296
|
+
customField = new PepDateField(options);
|
|
3297
|
+
break;
|
|
3298
|
+
}
|
|
3299
|
+
case FIELD_TYPE.NumberInteger:
|
|
3300
|
+
case FIELD_TYPE.CalculatedInt:
|
|
3301
|
+
case FIELD_TYPE.MapDataInt: {
|
|
3302
|
+
options.type = 'int';
|
|
3303
|
+
customField = new PepTextboxField(options);
|
|
3304
|
+
break;
|
|
3305
|
+
}
|
|
3306
|
+
case FIELD_TYPE.Percentage: {
|
|
3307
|
+
options.type = 'percentage';
|
|
3308
|
+
customField = new PepTextboxField(options);
|
|
3309
|
+
break;
|
|
3310
|
+
}
|
|
3311
|
+
case FIELD_TYPE.Currency: {
|
|
3312
|
+
options.type = 'currency';
|
|
3313
|
+
customField = new PepTextboxField(options);
|
|
3314
|
+
break;
|
|
3315
|
+
}
|
|
3316
|
+
case FIELD_TYPE.NumberReal:
|
|
3317
|
+
case FIELD_TYPE.CalculatedReal:
|
|
3318
|
+
case FIELD_TYPE.MapDataReal:
|
|
3319
|
+
case FIELD_TYPE.Sum:
|
|
3320
|
+
case FIELD_TYPE.Totals: {
|
|
3321
|
+
options.type = 'real';
|
|
3322
|
+
customField = new PepTextboxField(options);
|
|
3323
|
+
break;
|
|
3324
|
+
}
|
|
3325
|
+
case FIELD_TYPE.Boolean:
|
|
3326
|
+
case FIELD_TYPE.CalculatedBool: {
|
|
3327
|
+
customField = new PepCheckboxField(options);
|
|
3328
|
+
break;
|
|
3329
|
+
}
|
|
3330
|
+
case FIELD_TYPE.BooleanText: {
|
|
3331
|
+
options.type = 'booleanText';
|
|
3332
|
+
customField = new PepCheckboxField(options);
|
|
3333
|
+
break;
|
|
3334
|
+
}
|
|
3335
|
+
case FIELD_TYPE.ComboBox:
|
|
3336
|
+
case FIELD_TYPE.EmptyComboBox:
|
|
3337
|
+
case FIELD_TYPE.MapDataDropDown: {
|
|
3338
|
+
// options.type = 'select';
|
|
3339
|
+
customField = new PepSelectField(options);
|
|
3340
|
+
break;
|
|
3341
|
+
}
|
|
3342
|
+
case FIELD_TYPE.MultiTickBox:
|
|
3343
|
+
case FIELD_TYPE.MultiTickBoxToComboBox:
|
|
3344
|
+
case FIELD_TYPE.EmptyMultiTickBox: {
|
|
3345
|
+
options.type = 'multi';
|
|
3346
|
+
customField = new PepSelectField(options);
|
|
3347
|
+
break;
|
|
3348
|
+
}
|
|
3349
|
+
case FIELD_TYPE.GuidReferenceType: {
|
|
3350
|
+
options.type = 'reference';
|
|
3351
|
+
options.referenceObjectType = dataField.ReferenceObjectType;
|
|
3352
|
+
options.referenceObjectSubType =
|
|
3353
|
+
dataField.ReferenceObjectSubType;
|
|
3354
|
+
options.referenceObjectInternalType =
|
|
3355
|
+
dataField.ReferenceObjectInternalType;
|
|
3356
|
+
customField = new PepInternalButtonField(options);
|
|
3357
|
+
break;
|
|
3358
|
+
}
|
|
3359
|
+
case FIELD_TYPE.ListOfObjects: {
|
|
3360
|
+
options.type = 'listofobjects';
|
|
3361
|
+
customField = new PepInternalButtonField(options);
|
|
3362
|
+
break;
|
|
3363
|
+
}
|
|
3364
|
+
case FIELD_TYPE.Separator: {
|
|
3365
|
+
customField = new PepSeparatorField(options);
|
|
3366
|
+
break;
|
|
3367
|
+
}
|
|
3368
|
+
/*
|
|
3369
|
+
case FIELD_TYPE.Images: return that.field(value);
|
|
3370
|
+
*/
|
|
3371
|
+
case FIELD_TYPE.NumberRealQuantitySelector:
|
|
3372
|
+
case FIELD_TYPE.NumberIntegerQuantitySelector: {
|
|
3373
|
+
options.type = 'qs';
|
|
3374
|
+
options.allowDecimal =
|
|
3375
|
+
dataField.FieldType ===
|
|
3376
|
+
FIELD_TYPE.NumberRealQuantitySelector;
|
|
3377
|
+
options.notificationInfo = dataField.NotificationInfo;
|
|
3378
|
+
customField = new PepQuantitySelectorField(options);
|
|
3379
|
+
break;
|
|
3380
|
+
}
|
|
3381
|
+
case FIELD_TYPE.Package: {
|
|
3382
|
+
options.type = 'packageButton';
|
|
3383
|
+
options.notificationInfo = dataField.NotificationInfo;
|
|
3384
|
+
customField = new PepQuantitySelectorField(options);
|
|
3385
|
+
break;
|
|
3386
|
+
}
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
if (!customField) {
|
|
3390
|
+
options.label = controlField.ApiName + ' is not supported!!!';
|
|
3391
|
+
customField = new PepSeparatorField(options);
|
|
3392
|
+
}
|
|
3393
|
+
return customField;
|
|
3394
|
+
}
|
|
3395
|
+
getFieldFormattedValue(field) {
|
|
3396
|
+
let fieldFormattedValue = field.formattedValue;
|
|
3397
|
+
// Fix for the custom check box component.
|
|
3398
|
+
if (field.controlType === 'checkbox') {
|
|
3399
|
+
fieldFormattedValue = fieldFormattedValue === 'true';
|
|
3400
|
+
}
|
|
3401
|
+
// Fix for the custom button component.
|
|
3402
|
+
if (field.controlType === 'button') {
|
|
3403
|
+
fieldFormattedValue =
|
|
3404
|
+
fieldFormattedValue === '0' ? '' : fieldFormattedValue;
|
|
3405
|
+
}
|
|
3406
|
+
return fieldFormattedValue;
|
|
3407
|
+
}
|
|
3408
|
+
toControlGroup(fields) {
|
|
3409
|
+
const group = {};
|
|
3410
|
+
if (fields && fields.length > 0) {
|
|
3411
|
+
fields.forEach((field) => {
|
|
3412
|
+
if (field.groupFields && field.groupFields.length > 0) {
|
|
3413
|
+
const subGroup = {};
|
|
3414
|
+
field.groupFields.forEach((groupField) => {
|
|
3415
|
+
if (groupField.mandatory &&
|
|
3416
|
+
!field.readonly &&
|
|
3417
|
+
!field.disabled) {
|
|
3418
|
+
subGroup[groupField.key] = [
|
|
3419
|
+
{
|
|
3420
|
+
value: groupField.formattedValue || '',
|
|
3421
|
+
disabled: field.readonly ||
|
|
3422
|
+
field.disabled ||
|
|
3423
|
+
groupField.disabled,
|
|
3424
|
+
},
|
|
3425
|
+
[Validators.required],
|
|
3426
|
+
];
|
|
3427
|
+
}
|
|
3428
|
+
else {
|
|
3429
|
+
subGroup[groupField.key] = [
|
|
3430
|
+
{
|
|
3431
|
+
value: groupField.formattedValue || '',
|
|
3432
|
+
disabled: field.readonly ||
|
|
3433
|
+
field.disabled ||
|
|
3434
|
+
groupField.disabled,
|
|
3435
|
+
},
|
|
3436
|
+
[Validators.nullValidator],
|
|
3437
|
+
];
|
|
3438
|
+
}
|
|
3439
|
+
});
|
|
3440
|
+
group[field.key] = this.fb.group(subGroup);
|
|
3441
|
+
}
|
|
3442
|
+
else {
|
|
3443
|
+
const validators = field.getValidators();
|
|
3444
|
+
const fieldFormattedValue = this.getFieldFormattedValue(field);
|
|
3445
|
+
group[field.key] = [
|
|
3446
|
+
{
|
|
3447
|
+
value: fieldFormattedValue || '',
|
|
3448
|
+
disabled: field.disabled,
|
|
3449
|
+
},
|
|
3450
|
+
validators,
|
|
3451
|
+
];
|
|
3452
|
+
}
|
|
3453
|
+
});
|
|
3454
|
+
}
|
|
3455
|
+
return this.fb.group(group);
|
|
3456
|
+
}
|
|
3457
|
+
createBaseField(uiControlField, dataField) {
|
|
3458
|
+
const customField = this.convertToCustomField(uiControlField, dataField, this.canEditObject, this.menuDataField, this.hasCampaignDataField, this.indicatorsDataField, this.objectId, this.parentId, this.searchCode);
|
|
3459
|
+
return customField;
|
|
3460
|
+
}
|
|
3461
|
+
showFormValidationMessage() {
|
|
3462
|
+
const fields = this.fields;
|
|
3463
|
+
let emptyMandatoryFieldsMsg = '';
|
|
3464
|
+
let notValidFieldsMsg = '';
|
|
3465
|
+
// for (let i: number = 0; i < fields.length; i++) {
|
|
3466
|
+
// let field = fields[i];
|
|
3467
|
+
for (const field of fields) {
|
|
3468
|
+
const formControl = this.form && this.form.get(field.key);
|
|
3469
|
+
if (formControl) {
|
|
3470
|
+
// Mandatory is empty.
|
|
3471
|
+
if (field.mandatory &&
|
|
3472
|
+
formControl.value.toString().trim().length === 0) {
|
|
3473
|
+
emptyMandatoryFieldsMsg +=
|
|
3474
|
+
'<li><small>' + field.label + '</small></li>';
|
|
3475
|
+
}
|
|
3476
|
+
else if (!field.disabled && !formControl.valid) {
|
|
3477
|
+
notValidFieldsMsg +=
|
|
3478
|
+
'<li><small>' + field.label + '</small></li>';
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
// Add the header message of the empty mandatory fields
|
|
3483
|
+
if (emptyMandatoryFieldsMsg.length > 0) {
|
|
3484
|
+
emptyMandatoryFieldsMsg =
|
|
3485
|
+
'<div>' +
|
|
3486
|
+
this.translate.instant('MESSAGES.ERROR_MANDATORY_FIELDS') +
|
|
3487
|
+
"</div><ul style='padding: 0 20px;'>" +
|
|
3488
|
+
emptyMandatoryFieldsMsg +
|
|
3489
|
+
'</ul><br/>';
|
|
3490
|
+
}
|
|
3491
|
+
// Add the header message of the empty mandatory fields
|
|
3492
|
+
if (notValidFieldsMsg.length > 0) {
|
|
3493
|
+
notValidFieldsMsg =
|
|
3494
|
+
'<div>' +
|
|
3495
|
+
this.translate.instant('MESSAGES.ERROR_INVALID_FIELDS') +
|
|
3496
|
+
"</div><ul style='padding: 0 20px;'>" +
|
|
3497
|
+
notValidFieldsMsg +
|
|
3498
|
+
'</ul>';
|
|
3499
|
+
}
|
|
3500
|
+
const title = this.translate.instant('MESSAGES.TITLE_NOTICE');
|
|
3501
|
+
const data = new PepDialogData({
|
|
3502
|
+
title,
|
|
3503
|
+
content: emptyMandatoryFieldsMsg + notValidFieldsMsg,
|
|
3504
|
+
});
|
|
3505
|
+
this.dialogService.openDefaultDialog(data);
|
|
3506
|
+
}
|
|
3507
|
+
ngOnInit() {
|
|
3508
|
+
const themeVars = this.customizationService.getThemeVariables();
|
|
3509
|
+
// convert rem to pixel
|
|
3510
|
+
const RemToPixel = 16;
|
|
3511
|
+
this.formGutterSize =
|
|
3512
|
+
this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_SPACEING_KEY) * RemToPixel;
|
|
3513
|
+
this.cardGutterSize =
|
|
3514
|
+
this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.CARD_SPACEING_KEY) * RemToPixel;
|
|
3515
|
+
}
|
|
3516
|
+
ngDoCheck() {
|
|
3517
|
+
const changes = this.differ.diff(this.data); // check for changes
|
|
3518
|
+
if (changes) {
|
|
3519
|
+
this.updateForm();
|
|
3520
|
+
this.checkForChanges = new Date();
|
|
3521
|
+
}
|
|
3522
|
+
}
|
|
3523
|
+
ngOnChanges(changes) {
|
|
3524
|
+
// if (changes.data && changes.data.currentValue) {
|
|
3525
|
+
// // Load changes
|
|
3526
|
+
// if (!this.shouldReloadForm && changes.data.previousValue) {
|
|
3527
|
+
// this.data = changes.data.currentValue;
|
|
3528
|
+
// this.updateForm();
|
|
3529
|
+
// } else {
|
|
3530
|
+
// this._shouldReloadForm = false;
|
|
3531
|
+
// this.initForm();
|
|
3532
|
+
// }
|
|
3533
|
+
// }
|
|
3534
|
+
// if (this.shouldReloadForm || !changes?.data?.previousValue) {
|
|
3535
|
+
// this._shouldReloadForm = false;
|
|
3536
|
+
// this.initForm();
|
|
3537
|
+
// this.checkForChanges = new Date();
|
|
3538
|
+
// }
|
|
3539
|
+
}
|
|
3540
|
+
ngOnDestroy() {
|
|
3541
|
+
//
|
|
3542
|
+
}
|
|
3543
|
+
getUiControlFields() {
|
|
3544
|
+
return this.layout ? this.layout.ControlFields : [];
|
|
3545
|
+
}
|
|
3546
|
+
initFieldsStructure(fields, maxRow) {
|
|
3547
|
+
const themeVars = this.customizationService.getThemeVariables();
|
|
3548
|
+
// Set form row height.
|
|
3549
|
+
if (this.layoutType === 'card') {
|
|
3550
|
+
const cardFieldHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.CARD_FIELD_HEIGHT_KEY);
|
|
3551
|
+
this.rowHeight = cardFieldHeight;
|
|
3552
|
+
}
|
|
3553
|
+
else {
|
|
3554
|
+
const rowFieldHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_FIELD_HEIGHT_KEY);
|
|
3555
|
+
const rowFieldTitleHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_FIELD_TITLE_HEIGHT_KEY);
|
|
3556
|
+
this.rowHeight = rowFieldHeight + rowFieldTitleHeight;
|
|
3557
|
+
}
|
|
3558
|
+
// Create the fields structure (the fields must be sorted!!!).
|
|
3559
|
+
if (fields.length > 0) {
|
|
3560
|
+
// Init the layout.
|
|
3561
|
+
if (
|
|
3562
|
+
// this.layoutType === 'form' ||
|
|
3563
|
+
this.layoutType === 'table') {
|
|
3564
|
+
this.fields = fields;
|
|
3565
|
+
this._fieldsSubject.next(fields);
|
|
3566
|
+
this.rows = [];
|
|
3567
|
+
for (let i = 0; i <= maxRow; i++) {
|
|
3568
|
+
this.rows[i] = [];
|
|
3569
|
+
}
|
|
3570
|
+
// for (let i = 0; i < fields.length; i++) {
|
|
3571
|
+
// const field = fields[i]
|
|
3572
|
+
for (const field of fields) {
|
|
3573
|
+
this.rows[field.row].push(field);
|
|
3574
|
+
}
|
|
3575
|
+
}
|
|
3576
|
+
else {
|
|
3577
|
+
const doesfieldExistIn = new Array(maxRow);
|
|
3578
|
+
for (let i = 0; i < doesfieldExistIn.length; i++) {
|
|
3579
|
+
doesfieldExistIn[i] = new Array(this.columns);
|
|
3580
|
+
for (let j = 0; j < doesfieldExistIn[i].length; j++) {
|
|
3581
|
+
doesfieldExistIn[i][j] = false;
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
// Run in squere (row - colspan, col - rowspan) and put true where it should.
|
|
3585
|
+
// for (let index = 0; index < fields.length; index++) {
|
|
3586
|
+
// const currentField = fields[index];
|
|
3587
|
+
for (const currentField of fields) {
|
|
3588
|
+
if (currentField.rowSpan > 1) {
|
|
3589
|
+
for (let row = currentField.row; row < currentField.row + currentField.rowSpan; row++) {
|
|
3590
|
+
if (currentField.colSpan > 1) {
|
|
3591
|
+
for (let col = currentField.col; col <
|
|
3592
|
+
currentField.col + currentField.colSpan; col++) {
|
|
3593
|
+
if (doesfieldExistIn.length > row &&
|
|
3594
|
+
doesfieldExistIn[0].length > col) {
|
|
3595
|
+
doesfieldExistIn[row][col] = true;
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
else {
|
|
3600
|
+
if (doesfieldExistIn.length > row &&
|
|
3601
|
+
doesfieldExistIn[0].length >
|
|
3602
|
+
currentField.col) {
|
|
3603
|
+
doesfieldExistIn[row][currentField.col] = true;
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
}
|
|
3608
|
+
else if (currentField.colSpan > 1) {
|
|
3609
|
+
for (let col = currentField.col; col < currentField.col + currentField.colSpan; col++) {
|
|
3610
|
+
if (doesfieldExistIn.length > currentField.row &&
|
|
3611
|
+
doesfieldExistIn[0].length > col) {
|
|
3612
|
+
doesfieldExistIn[currentField.row][col] = true;
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
else {
|
|
3617
|
+
if (doesfieldExistIn.length > currentField.row &&
|
|
3618
|
+
doesfieldExistIn[0].length > currentField.col) {
|
|
3619
|
+
doesfieldExistIn[currentField.row][currentField.col] = true;
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
// Create empty fields where doesfieldExistIn is false (For the md-grid-list UI Component).
|
|
3624
|
+
for (let i = 0; i < doesfieldExistIn.length; i++) {
|
|
3625
|
+
for (let j = 0; j < doesfieldExistIn[i].length; j++) {
|
|
3626
|
+
if (!doesfieldExistIn[i][j]) {
|
|
3627
|
+
// Create empty field and add it to the fields list.
|
|
3628
|
+
fields.push(new PepPlaceholderField({
|
|
3629
|
+
key: i + '_' + j,
|
|
3630
|
+
label: '',
|
|
3631
|
+
placeholder: '',
|
|
3632
|
+
readonly: false,
|
|
3633
|
+
disabled: false,
|
|
3634
|
+
hidden: false,
|
|
3635
|
+
mandatory: false,
|
|
3636
|
+
value: '',
|
|
3637
|
+
formattedValue: '',
|
|
3638
|
+
row: i,
|
|
3639
|
+
rowSpan: 1,
|
|
3640
|
+
col: j,
|
|
3641
|
+
colSpan: 1,
|
|
3642
|
+
order: 1,
|
|
3643
|
+
}));
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3646
|
+
}
|
|
3647
|
+
// Sort the fields again.
|
|
3648
|
+
this.fields = fields.sort((f1, f2) => f1.row > f2.row
|
|
3649
|
+
? 1
|
|
3650
|
+
: f1.row < f2.row
|
|
3651
|
+
? -1
|
|
3652
|
+
: f1.col > f2.col
|
|
3653
|
+
? 1
|
|
3654
|
+
: f1.col < f2.col
|
|
3655
|
+
? -1
|
|
3656
|
+
: 0);
|
|
3657
|
+
this._fieldsSubject.next(fields);
|
|
3658
|
+
}
|
|
3659
|
+
}
|
|
3660
|
+
}
|
|
3661
|
+
setForm(isForUpdate = false) {
|
|
3662
|
+
let allFieldsAreReadOnly = true;
|
|
3663
|
+
if (!isForUpdate) {
|
|
3664
|
+
const fields = [];
|
|
3665
|
+
for (const currentField of this.fields) {
|
|
3666
|
+
// Add all fields except 'internalPage' (for children).
|
|
3667
|
+
if (currentField.controlType !== 'internalPage') {
|
|
3668
|
+
fields.push(currentField);
|
|
3669
|
+
}
|
|
3670
|
+
if (!currentField.readonly) {
|
|
3671
|
+
allFieldsAreReadOnly = false;
|
|
3672
|
+
}
|
|
3673
|
+
}
|
|
3674
|
+
this.form = this.toControlGroup(fields);
|
|
3675
|
+
}
|
|
3676
|
+
else {
|
|
3677
|
+
// Update form values if changed by calculated fields.
|
|
3678
|
+
for (let i = 0; i < this.fields.length; i++) {
|
|
3679
|
+
let currentField = this.fields[i];
|
|
3680
|
+
if (currentField.controlType === 'internalCarusel') {
|
|
3681
|
+
// Hack to override (update) the field.
|
|
3682
|
+
const uiControlField = this.getUiControlFields().find(cf => cf.ApiName === currentField.key);
|
|
3683
|
+
const dataField = this.data.Fields.find(df => df.ApiName === currentField.key);
|
|
3684
|
+
currentField = this.createBaseField(uiControlField, dataField);
|
|
3685
|
+
this._fieldsSubject.value[i] = currentField;
|
|
3686
|
+
}
|
|
3687
|
+
else if (currentField.controlType !== 'internalPage') {
|
|
3688
|
+
if (currentField.groupFields &&
|
|
3689
|
+
currentField.groupFields.length > 0) {
|
|
3690
|
+
// for (let j = 0; j < currentField.groupFields.length; j++) {
|
|
3691
|
+
// let currentGroupField = currentField.groupFields[j];
|
|
3692
|
+
for (const currentGroupField of currentField.groupFields) {
|
|
3693
|
+
const fieldFormattedValue = this.getFieldFormattedValue(currentGroupField);
|
|
3694
|
+
this.customizationService.updateFormField(this.form, currentGroupField, fieldFormattedValue, currentField);
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3697
|
+
else {
|
|
3698
|
+
const fieldFormattedValue = this.getFieldFormattedValue(currentField);
|
|
3699
|
+
// this.form.controls[currentField.key].setValue(fieldFormattedValue);
|
|
3700
|
+
this.customizationService.updateFormField(this.form, currentField, fieldFormattedValue);
|
|
3701
|
+
}
|
|
3702
|
+
}
|
|
3703
|
+
if (!currentField.readonly) {
|
|
3704
|
+
allFieldsAreReadOnly = false;
|
|
3705
|
+
}
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
let isFormValid = this.form?.valid;
|
|
3709
|
+
// Change validation to true if all fields are read only.
|
|
3710
|
+
if (!isFormValid && allFieldsAreReadOnly) {
|
|
3711
|
+
isFormValid = true;
|
|
3712
|
+
}
|
|
3713
|
+
this.onFormValidationChanged(isFormValid);
|
|
3714
|
+
// Set it to false to enable all fields.
|
|
3715
|
+
if (this.isInternal && this.isLocked) {
|
|
3716
|
+
this.isLocked = false;
|
|
3717
|
+
}
|
|
3718
|
+
}
|
|
3719
|
+
initForm() {
|
|
3720
|
+
if (this.data && this.data.Fields) {
|
|
3721
|
+
const fields = this.convertCustomFields(this.getUiControlFields(), this.data.Fields);
|
|
3722
|
+
const maxRow = Math.max(...fields.map((f) => {
|
|
3723
|
+
return f.row + f.rowSpan;
|
|
3724
|
+
}));
|
|
3725
|
+
this.columns = Math.max(...fields.map((f) => {
|
|
3726
|
+
return f.col + f.colSpan;
|
|
3727
|
+
}));
|
|
3728
|
+
this.initFieldsStructure(fields, maxRow);
|
|
3729
|
+
this.setForm();
|
|
3730
|
+
}
|
|
3731
|
+
}
|
|
3732
|
+
updateField(customField, updatedField) {
|
|
3733
|
+
const options = {
|
|
3734
|
+
disabled: !updatedField.Enabled || !this.canEditObject,
|
|
3735
|
+
readonly: !updatedField.Enabled || !this.canEditObject,
|
|
3736
|
+
visible: updatedField.Visible,
|
|
3737
|
+
value: updatedField.Value,
|
|
3738
|
+
additionalValue: updatedField.AdditionalValue,
|
|
3739
|
+
formattedValue: updatedField.FormattedValue,
|
|
3740
|
+
textColor: updatedField.TextColor,
|
|
3741
|
+
};
|
|
3742
|
+
if (customField instanceof PepQuantitySelectorField) {
|
|
3743
|
+
const notificationInfo = updatedField.NotificationInfo;
|
|
3744
|
+
options.notificationInfo = notificationInfo;
|
|
3745
|
+
// Change type if it's change (only for allowDecimal).
|
|
3746
|
+
let allowDecimal = false;
|
|
3747
|
+
if (updatedField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
|
|
3748
|
+
updatedField.FieldType === FIELD_TYPE.NumberReal ||
|
|
3749
|
+
updatedField.FieldType === FIELD_TYPE.NumberRealForMatrix) {
|
|
3750
|
+
allowDecimal = true;
|
|
3751
|
+
}
|
|
3752
|
+
options.allowDecimal = allowDecimal;
|
|
3753
|
+
}
|
|
3754
|
+
else if (customField instanceof PepSelectField) {
|
|
3755
|
+
options.options = this.convertOptionalValues(updatedField.OptionalValues);
|
|
3756
|
+
if (!options.options || options.options.length === 0) {
|
|
3757
|
+
options.options.push({
|
|
3758
|
+
key: options.value,
|
|
3759
|
+
value: options.formattedValue,
|
|
3760
|
+
});
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
3763
|
+
else if (customField instanceof PepInternalCaruselField) {
|
|
3764
|
+
options.pageInfo = updatedField.UIPageInfo;
|
|
3765
|
+
}
|
|
3766
|
+
customField.update(options);
|
|
3767
|
+
}
|
|
3768
|
+
updateForm() {
|
|
3769
|
+
if (this.data && this.data.Fields) {
|
|
3770
|
+
for (const currentField of this.data.Fields) {
|
|
3771
|
+
const customField = this.fields.filter((f) => f.key === currentField.ApiName)[0];
|
|
3772
|
+
// Update all fields except 'internalPage' type (for children).
|
|
3773
|
+
if (customField && customField.controlType !== 'internalPage') {
|
|
3774
|
+
this.updateField(customField, currentField);
|
|
3775
|
+
// Update the group fields.
|
|
3776
|
+
if (customField.controlType === 'address' &&
|
|
3777
|
+
currentField.GroupFields) {
|
|
3778
|
+
// for (let j = 0; j < currentField.GroupFields.length; j++) {
|
|
3779
|
+
// let currentGroupField = currentField.GroupFields[j];
|
|
3780
|
+
for (const currentGroupField of currentField.GroupFields) {
|
|
3781
|
+
currentGroupField.Enabled = !currentField.Enabled
|
|
3782
|
+
? false
|
|
3783
|
+
: currentGroupField.Enabled;
|
|
3784
|
+
const customGroupField = customField.groupFields.filter((f) => f.key === currentGroupField.ApiName)[0];
|
|
3785
|
+
this.updateField(customGroupField, currentGroupField);
|
|
3786
|
+
}
|
|
3787
|
+
}
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3790
|
+
this.setForm(true);
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
ReloadForm() {
|
|
3794
|
+
this._shouldReloadForm = true;
|
|
3795
|
+
}
|
|
3796
|
+
// onSubmit() {
|
|
3797
|
+
// if (this.form.valid) {
|
|
3798
|
+
// this.payLoad = JSON.stringify(this.form.value);
|
|
3799
|
+
// //this.submitted.emit(this.form.value);
|
|
3800
|
+
// }
|
|
3801
|
+
// }
|
|
3802
|
+
getFormControlById(key) {
|
|
3803
|
+
let formControl = null;
|
|
3804
|
+
this.fields.forEach((field) => {
|
|
3805
|
+
if (field.key === key) {
|
|
3806
|
+
formControl = this.form.get(field.key);
|
|
3807
|
+
return;
|
|
3808
|
+
}
|
|
3809
|
+
else if (field.groupFields && field.groupFields.length > 0) {
|
|
3810
|
+
field.groupFields.forEach((groupField) => {
|
|
3811
|
+
if (groupField.key === key) {
|
|
3812
|
+
formControl = this.form.get(field.key + '.' + groupField.key);
|
|
3813
|
+
return;
|
|
3814
|
+
}
|
|
3815
|
+
});
|
|
3816
|
+
}
|
|
3817
|
+
});
|
|
3818
|
+
return formControl;
|
|
3819
|
+
}
|
|
3820
|
+
setSpecialFields(controlFields, dataFields) {
|
|
3821
|
+
// let cf;
|
|
3822
|
+
// for (let index = 0; index < controlFields.length; index++) {
|
|
3823
|
+
// cf = controlFields[index];
|
|
3824
|
+
for (const cf of controlFields) {
|
|
3825
|
+
if (cf.ApiName === 'ObjectMenu') {
|
|
3826
|
+
this.menuField = cf;
|
|
3827
|
+
}
|
|
3828
|
+
else if (cf.ApiName === 'ItemHasActiveCampaign') {
|
|
3829
|
+
this.hasCampaignField = cf;
|
|
3830
|
+
}
|
|
3831
|
+
else if (cf.ApiName === 'ItemIndicatorsWithoutCampaign') {
|
|
3832
|
+
this.indicatorsField = cf;
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
// let df;
|
|
3836
|
+
// for (let index = 0; index < dataFields.length; index++) {
|
|
3837
|
+
// df = dataFields[index];
|
|
3838
|
+
for (const df of dataFields) {
|
|
3839
|
+
if (df.ApiName === 'ObjectMenu') {
|
|
3840
|
+
this.menuDataField = df;
|
|
3841
|
+
}
|
|
3842
|
+
else if (df.ApiName === 'ItemHasActiveCampaign') {
|
|
3843
|
+
this.hasCampaignDataField = df;
|
|
3844
|
+
}
|
|
3845
|
+
else if (df.ApiName === 'ItemIndicatorsWithoutCampaign') {
|
|
3846
|
+
this.indicatorsDataField = df;
|
|
3847
|
+
}
|
|
3848
|
+
}
|
|
3849
|
+
if (this.menuField && this.menuDataField) {
|
|
3850
|
+
this.menuDataField.Layout = this.menuField.Layout;
|
|
3851
|
+
}
|
|
3852
|
+
if (this.hasCampaignField && this.hasCampaignDataField) {
|
|
3853
|
+
this.hasCampaignDataField.Layout = this.hasCampaignField.Layout;
|
|
3854
|
+
}
|
|
3855
|
+
if (this.indicatorsField && this.indicatorsDataField) {
|
|
3856
|
+
this.indicatorsDataField.Layout = this.indicatorsField.Layout;
|
|
3857
|
+
}
|
|
3858
|
+
// Check if menu is floating on other field.
|
|
3859
|
+
// for (let index = 0; index < controlFields.length; index++) {
|
|
3860
|
+
// cf = controlFields[index];
|
|
3861
|
+
for (const cf of controlFields) {
|
|
3862
|
+
if (this.menuField && cf.ApiName !== 'ObjectMenu') {
|
|
3863
|
+
this.hasMenuFloatingOnOtherField = this.doesFieldHavaFloatingField(cf, this.menuField);
|
|
3864
|
+
if (this.hasMenuFloatingOnOtherField) {
|
|
3865
|
+
break;
|
|
3866
|
+
}
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
}
|
|
3870
|
+
convertCustomFields(controlFields, dataFields) {
|
|
3871
|
+
if (this.layoutType !== 'table') {
|
|
3872
|
+
this.setSpecialFields(controlFields, dataFields);
|
|
3873
|
+
}
|
|
3874
|
+
else {
|
|
3875
|
+
// HACK: convert to center alignment if table view & special fields)
|
|
3876
|
+
controlFields.forEach((field, index) => {
|
|
3877
|
+
if (field.ApiName === 'UnitsQuantity' ||
|
|
3878
|
+
field.ApiName === 'QuantitySelector' ||
|
|
3879
|
+
field.ApiName === 'ObjectMenu' ||
|
|
3880
|
+
field.FieldType === FIELD_TYPE.Image ||
|
|
3881
|
+
field.FieldType === FIELD_TYPE.ImageURL ||
|
|
3882
|
+
field.FieldType === FIELD_TYPE.Indicators ||
|
|
3883
|
+
field.FieldType === FIELD_TYPE.Boolean ||
|
|
3884
|
+
field.FieldType === FIELD_TYPE.CalculatedBool ||
|
|
3885
|
+
field.FieldType === FIELD_TYPE.Signature ||
|
|
3886
|
+
field.FieldType ===
|
|
3887
|
+
FIELD_TYPE.NumberIntegerQuantitySelector ||
|
|
3888
|
+
field.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
|
|
3889
|
+
field.FieldType === FIELD_TYPE.Package ||
|
|
3890
|
+
field.FieldType === FIELD_TYPE.NumberIntegerForMatrix ||
|
|
3891
|
+
field.FieldType === FIELD_TYPE.NumberRealForMatrix) {
|
|
3892
|
+
field.Layout.XAlignment = X_ALIGNMENT_TYPE.Center;
|
|
3893
|
+
}
|
|
3894
|
+
else {
|
|
3895
|
+
// HACK: align the rest of the fields by the culture.
|
|
3896
|
+
// field.Layout.XAlignment = this.layoutService.isRtl() ? X_ALIGNMENT_TYPE.Right : X_ALIGNMENT_TYPE.Left;
|
|
3897
|
+
}
|
|
3898
|
+
});
|
|
3899
|
+
}
|
|
3900
|
+
const fields = [];
|
|
3901
|
+
controlFields.forEach((field, index) => {
|
|
3902
|
+
const dataField = dataFields.filter((df) => df.ApiName === field.ApiName)[0];
|
|
3903
|
+
if (!dataField) {
|
|
3904
|
+
return;
|
|
3905
|
+
}
|
|
3906
|
+
// If current view is not table view and those fields are special.
|
|
3907
|
+
if (this.layoutType !== 'table' &&
|
|
3908
|
+
((this.hasMenuFloatingOnOtherField &&
|
|
3909
|
+
this.menuField &&
|
|
3910
|
+
this.menuField.ApiName === field.ApiName) ||
|
|
3911
|
+
(this.indicatorsField &&
|
|
3912
|
+
this.indicatorsField.ApiName === field.ApiName) ||
|
|
3913
|
+
(this.hasCampaignField &&
|
|
3914
|
+
this.hasCampaignField.ApiName === field.ApiName))) {
|
|
3915
|
+
return;
|
|
3916
|
+
}
|
|
3917
|
+
// Set type to link
|
|
3918
|
+
if (index === 0 && this.firstFieldAsLink) {
|
|
3919
|
+
dataField.FieldType = FIELD_TYPE.InternalLink;
|
|
3920
|
+
// dataField.Value = this.getInternalLinkHref();
|
|
3921
|
+
}
|
|
3922
|
+
if (field.ApiName === 'ObjectMenu') {
|
|
3923
|
+
dataField.Enabled = true;
|
|
3924
|
+
// HACK : Until "Enabled" returns from the server, we set PepMenu to be
|
|
3925
|
+
// Disabled in cart on regular items and not campign items.
|
|
3926
|
+
}
|
|
3927
|
+
const customField = this.createBaseField(field, dataField);
|
|
3928
|
+
fields.push(customField);
|
|
3929
|
+
});
|
|
3930
|
+
return fields.sort((f1, f2) => f1.row > f2.row
|
|
3931
|
+
? 1
|
|
3932
|
+
: f1.row < f2.row
|
|
3933
|
+
? -1
|
|
3934
|
+
: f1.col > f2.col
|
|
3935
|
+
? 1
|
|
3936
|
+
: f1.col < f2.col
|
|
3937
|
+
? -1
|
|
3938
|
+
: 0);
|
|
3939
|
+
}
|
|
3940
|
+
onFormValidationChanged(formValidationChange) {
|
|
3941
|
+
this.formValidationChange.emit(formValidationChange);
|
|
3942
|
+
}
|
|
3943
|
+
onValueChanged(event) {
|
|
3944
|
+
this.onFormValidationChanged(this.form.valid);
|
|
3945
|
+
const formControl = this.getFormControlById(event.key);
|
|
3946
|
+
const isValid = formControl ? formControl.valid : true;
|
|
3947
|
+
// const isValid = true;
|
|
3948
|
+
if (isValid) {
|
|
3949
|
+
// Set it to false to disable all fields.
|
|
3950
|
+
if (this.isInternal && this.layoutType === 'form') {
|
|
3951
|
+
this.isLocked = true;
|
|
3952
|
+
}
|
|
3953
|
+
// Update the current field value.
|
|
3954
|
+
const currentField = this.fields.find((f) => f.key === event.key);
|
|
3955
|
+
if (currentField) {
|
|
3956
|
+
currentField.formattedValue = currentField.value = event.value;
|
|
3957
|
+
}
|
|
3958
|
+
this.valueChange.emit({
|
|
3959
|
+
id: this.data.UID.toString(),
|
|
3960
|
+
uiObjectKey: this.data.Key,
|
|
3961
|
+
key: event.key,
|
|
3962
|
+
value: event.value,
|
|
3963
|
+
controlType: event.controlType,
|
|
3964
|
+
});
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
onClick(fieldClickEvent) {
|
|
3968
|
+
const clickedUiControlField = this.data.Fields.filter((f) => f.ApiName === fieldClickEvent.key)[0];
|
|
3969
|
+
const idType = this.data.Type ? this.data.Type.toString() : '';
|
|
3970
|
+
if (clickedUiControlField) {
|
|
3971
|
+
this.fieldClick.emit({
|
|
3972
|
+
id: this.data.UID.toString(),
|
|
3973
|
+
uiObjectKey: this.data.Key,
|
|
3974
|
+
key: fieldClickEvent.key,
|
|
3975
|
+
idType,
|
|
3976
|
+
which: fieldClickEvent.eventWhich,
|
|
3977
|
+
value: fieldClickEvent.value,
|
|
3978
|
+
controlType: fieldClickEvent.controlType,
|
|
3979
|
+
fieldType: clickedUiControlField.FieldType,
|
|
3980
|
+
otherData: fieldClickEvent.otherData,
|
|
3981
|
+
});
|
|
3982
|
+
}
|
|
3983
|
+
else {
|
|
3984
|
+
// For other api names (like enter children etc).
|
|
3985
|
+
this.fieldClick.emit({
|
|
3986
|
+
id: this.data.UID.toString(),
|
|
3987
|
+
uiObjectKey: this.data.Key,
|
|
3988
|
+
key: fieldClickEvent.key,
|
|
3989
|
+
idType,
|
|
3990
|
+
which: fieldClickEvent.eventWhich,
|
|
3991
|
+
value: fieldClickEvent.value,
|
|
3992
|
+
controlType: fieldClickEvent.controlType,
|
|
3993
|
+
otherData: fieldClickEvent.otherData,
|
|
3994
|
+
});
|
|
3995
|
+
}
|
|
3996
|
+
}
|
|
3997
|
+
// This event is for handle the internal page events.
|
|
3998
|
+
onInternalFormFieldClicked(internalFormFieldClick) {
|
|
3999
|
+
this.internalFormFieldClick.emit(internalFormFieldClick);
|
|
4000
|
+
}
|
|
4001
|
+
// This event is for handle the internal page events.
|
|
4002
|
+
onInternalFormFieldChanged(internalFormFieldChange) {
|
|
4003
|
+
this.internalFormFieldChange.emit(internalFormFieldChange);
|
|
4004
|
+
}
|
|
4005
|
+
// This event is for handle the related items change events.
|
|
4006
|
+
onFormValueChanged(event) {
|
|
4007
|
+
// this.valueChange.emit(event);
|
|
4008
|
+
}
|
|
4009
|
+
// This event is for handle the related items change events.
|
|
4010
|
+
onFormFieldClick(event) {
|
|
4011
|
+
this.fieldClick.emit(event);
|
|
4012
|
+
}
|
|
4013
|
+
}
|
|
4014
|
+
PepFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepFormComponent, deps: [{ token: i1$1.PepDialogService }, { token: i2.PepCustomizationService }, { token: i2.PepLayoutService }, { token: i3$1.FormBuilder }, { token: i0.KeyValueDiffers }, { token: i4$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4015
|
+
PepFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepFormComponent, selector: "pep-form", inputs: { isInternal: "isInternal", isReport: "isReport", layout: "layout", lockEvents: "lockEvents", canEditObject: "canEditObject", data: "data", lockFields: "lockFields", isActive: "isActive", layoutType: "layoutType", objectId: "objectId", parentId: "parentId", searchCode: "searchCode", showTitle: "showTitle", firstFieldAsLink: "firstFieldAsLink", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", fieldClick: "fieldClick", internalFormFieldClick: "internalFormFieldClick", internalFormFieldChange: "internalFormFieldChange" }, usesOnChanges: true, ngImport: i0, 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>", styles: [":host{display:grid}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i6$1.MatGridList, selector: "mat-grid-list", inputs: ["cols", "gutterSize", "rowHeight"], exportAs: ["matGridList"] }, { kind: "component", type: i6$1.MatGridTile, selector: "mat-grid-tile", inputs: ["rowspan", "colspan"], exportAs: ["matGridTile"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType"], outputs: ["fileChange", "elementClick"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "formattedValue", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType"], outputs: ["valueChange", "elementClick"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive"], outputs: ["fileChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange"] }, { kind: "component", type: PepFieldGeneratorComponent, selector: "pep-field-generator", inputs: ["field", "isActive", "uid", "form", "layoutType", "showTitle", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "elementClick", "internalFormFieldChange", "internalFormFieldClick", "formValueChange", "formFieldClick"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepFormComponent, decorators: [{
|
|
4017
|
+
type: Component,
|
|
4018
|
+
args: [{ selector: 'pep-form', changeDetection: ChangeDetectionStrategy.OnPush, 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>", styles: [":host{display:grid}\n"] }]
|
|
4019
|
+
}], ctorParameters: function () { return [{ type: i1$1.PepDialogService }, { type: i2.PepCustomizationService }, { type: i2.PepLayoutService }, { type: i3$1.FormBuilder }, { type: i0.KeyValueDiffers }, { type: i4$1.TranslateService }]; }, propDecorators: { isInternal: [{
|
|
4020
|
+
type: Input
|
|
4021
|
+
}], isReport: [{
|
|
4022
|
+
type: Input
|
|
4023
|
+
}], layout: [{
|
|
4024
|
+
type: Input
|
|
4025
|
+
}], lockEvents: [{
|
|
4026
|
+
type: Input
|
|
4027
|
+
}], canEditObject: [{
|
|
4028
|
+
type: Input
|
|
4029
|
+
}], data: [{
|
|
4030
|
+
type: Input
|
|
4031
|
+
}], lockFields: [{
|
|
4032
|
+
type: Input
|
|
4033
|
+
}], isActive: [{
|
|
4034
|
+
type: Input
|
|
4035
|
+
}], layoutType: [{
|
|
4036
|
+
type: Input
|
|
4037
|
+
}], objectId: [{
|
|
4038
|
+
type: Input
|
|
4039
|
+
}], parentId: [{
|
|
4040
|
+
type: Input
|
|
4041
|
+
}], searchCode: [{
|
|
4042
|
+
type: Input
|
|
4043
|
+
}], showTitle: [{
|
|
4044
|
+
type: Input
|
|
4045
|
+
}], firstFieldAsLink: [{
|
|
4046
|
+
type: Input
|
|
4047
|
+
}], checkForChanges: [{
|
|
4048
|
+
type: Input
|
|
4049
|
+
}], valueChange: [{
|
|
4050
|
+
type: Output
|
|
4051
|
+
}], formValidationChange: [{
|
|
4052
|
+
type: Output
|
|
4053
|
+
}], fieldClick: [{
|
|
4054
|
+
type: Output
|
|
4055
|
+
}], internalFormFieldClick: [{
|
|
4056
|
+
type: Output
|
|
4057
|
+
}], internalFormFieldChange: [{
|
|
4058
|
+
type: Output
|
|
4059
|
+
}] } });
|
|
4060
|
+
|
|
2741
4061
|
const pepComponentsModules = [
|
|
2742
4062
|
PepAddressModule,
|
|
2743
4063
|
PepAttachmentModule,
|
|
@@ -2768,9 +4088,11 @@ class PepFormModule {
|
|
|
2768
4088
|
]);
|
|
2769
4089
|
}
|
|
2770
4090
|
}
|
|
2771
|
-
PepFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
2772
|
-
PepFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.
|
|
4091
|
+
PepFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepFormModule, deps: [{ token: i1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4092
|
+
PepFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepFormModule, declarations: [PepFormComponent,
|
|
4093
|
+
PepInternalFormComponent,
|
|
2773
4094
|
PepFieldGeneratorComponent,
|
|
4095
|
+
PepInternalFieldGeneratorComponent,
|
|
2774
4096
|
PepIndicatorsComponent,
|
|
2775
4097
|
PepInternalButtonComponent,
|
|
2776
4098
|
PepInternalListComponent,
|
|
@@ -2807,7 +4129,7 @@ PepFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
2807
4129
|
PepTextboxModule,
|
|
2808
4130
|
PepLinkModule, PepFieldTitleModule,
|
|
2809
4131
|
PepGroupButtonsModule], exports: [PepFormComponent] });
|
|
2810
|
-
PepFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.
|
|
4132
|
+
PepFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepFormModule, imports: [CommonModule,
|
|
2811
4133
|
ReactiveFormsModule,
|
|
2812
4134
|
// Material modules,
|
|
2813
4135
|
MatCommonModule,
|
|
@@ -2825,7 +4147,7 @@ PepFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
2825
4147
|
pepComponentsModules,
|
|
2826
4148
|
PepFieldTitleModule,
|
|
2827
4149
|
PepGroupButtonsModule] });
|
|
2828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
4150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepFormModule, decorators: [{
|
|
2829
4151
|
type: NgModule,
|
|
2830
4152
|
args: [{
|
|
2831
4153
|
imports: [
|
|
@@ -2851,7 +4173,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImpor
|
|
|
2851
4173
|
exports: [PepFormComponent],
|
|
2852
4174
|
declarations: [
|
|
2853
4175
|
PepFormComponent,
|
|
4176
|
+
PepInternalFormComponent,
|
|
2854
4177
|
PepFieldGeneratorComponent,
|
|
4178
|
+
PepInternalFieldGeneratorComponent,
|
|
2855
4179
|
PepIndicatorsComponent,
|
|
2856
4180
|
PepInternalButtonComponent,
|
|
2857
4181
|
PepInternalListComponent,
|