@pepperi-addons/ngx-lib 0.2.61 → 0.3.2
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/address/address.component.theme.scss +4 -7
- package/address/pepperi-addons-ngx-lib-address.metadata.json +1 -1
- package/attachment/attachment.component.d.ts +1 -0
- package/attachment/attachment.component.theme.scss +3 -2
- package/attachment/pepperi-addons-ngx-lib-attachment.metadata.json +1 -1
- package/bread-crumbs/bread-crumbs.component.theme.scss +7 -7
- package/bread-crumbs/pepperi-addons-ngx-lib-bread-crumbs.metadata.json +1 -1
- package/bundles/pepperi-addons-ngx-lib-address.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-address.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-attachment.umd.js +7 -2
- package/bundles/pepperi-addons-ngx-lib-attachment.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-bread-crumbs.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-bread-crumbs.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-button.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-button.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js +4 -1
- package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-color.umd.js +8 -3
- package/bundles/pepperi-addons-ngx-lib-color.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-date.umd.js +4 -1
- package/bundles/pepperi-addons-ngx-lib-date.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-dialog.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-dialog.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-field-title.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-field-title.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-files-uploader.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-files-uploader.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-form.umd.js +19 -16
- package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-group-buttons.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-group-buttons.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-image.umd.js +7 -2
- package/bundles/pepperi-addons-ngx-lib-image.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js +7 -2
- package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-list.umd.js +3 -3
- package/bundles/pepperi-addons-ngx-lib-list.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js +7 -2
- package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-query-builder.umd.js +1104 -0
- package/bundles/pepperi-addons-ngx-lib-query-builder.umd.js.map +1 -0
- package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js +7 -2
- package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-select.umd.js +7 -2
- package/bundles/pepperi-addons-ngx-lib-select.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-separator.umd.js +9 -1
- package/bundles/pepperi-addons-ngx-lib-separator.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-side-bar.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-side-bar.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-signature.umd.js +7 -2
- package/bundles/pepperi-addons-ngx-lib-signature.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-slider.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-slider.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js +306 -39
- package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-textarea.umd.js +7 -2
- package/bundles/pepperi-addons-ngx-lib-textarea.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-textbox.umd.js +5 -3
- package/bundles/pepperi-addons-ngx-lib-textbox.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib-top-bar.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-lib-top-bar.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib.umd.js +3 -1
- package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
- package/button/button.component.theme.scss +0 -2
- package/button/pepperi-addons-ngx-lib-button.metadata.json +1 -1
- package/checkbox/checkbox.component.theme.scss +0 -2
- package/checkbox/pepperi-addons-ngx-lib-checkbox.metadata.json +1 -1
- package/color/color-picker.component.theme.scss +122 -128
- package/color/color.component.d.ts +1 -0
- package/color/color.component.theme.scss +0 -7
- package/color/pepperi-addons-ngx-lib-color.metadata.json +1 -1
- package/core/customization/customization.service.d.ts +1 -0
- package/date/date.component.theme.scss +163 -169
- package/date/pepperi-addons-ngx-lib-date.metadata.json +1 -1
- package/dialog/dialog.component.theme.scss +4 -4
- package/dialog/pepperi-addons-ngx-lib-dialog.metadata.json +1 -1
- package/esm2015/address/address.component.js +2 -2
- package/esm2015/attachment/attachment.component.js +8 -3
- package/esm2015/bread-crumbs/bread-crumbs.component.js +2 -2
- package/esm2015/button/button.component.js +2 -2
- package/esm2015/checkbox/checkbox.component.js +5 -2
- package/esm2015/color/color-picker.component.js +2 -2
- package/esm2015/color/color.component.js +8 -3
- package/esm2015/core/customization/customization.service.js +4 -2
- package/esm2015/date/date.component.js +5 -2
- package/esm2015/dialog/dialog.component.js +2 -2
- package/esm2015/field-title/field-title.component.js +2 -2
- package/esm2015/files-uploader/files-uploader.component.js +2 -2
- package/esm2015/form/indicators.component.js +2 -2
- package/esm2015/form/internal-button.component.js +20 -17
- package/esm2015/group-buttons/group-buttons.component.js +2 -2
- package/esm2015/image/image.component.js +8 -3
- package/esm2015/images-filmstrip/images-filmstrip.component.js +8 -3
- package/esm2015/list/list-total.component.js +2 -2
- package/esm2015/list/virtual-scroller.js +3 -3
- package/esm2015/quantity-selector/quantity-selector.component.js +8 -3
- package/esm2015/query-builder/common/model/field.js +2 -0
- package/esm2015/query-builder/common/model/filter.js +2 -0
- package/esm2015/query-builder/common/model/legacy.js +2 -0
- package/esm2015/query-builder/common/model/operator-unit.js +42 -0
- package/esm2015/query-builder/common/model/operator.js +207 -0
- package/esm2015/query-builder/common/model/structure.js +2 -0
- package/esm2015/query-builder/common/model/type-map.js +27 -0
- package/esm2015/query-builder/common/model/type.js +6 -0
- package/esm2015/query-builder/common/services/output-query.service.js +111 -0
- package/esm2015/query-builder/common/services/type-convertor.service.js +40 -0
- package/esm2015/query-builder/pepperi-addons-ngx-lib-query-builder.js +9 -0
- package/esm2015/query-builder/public-api.js +8 -0
- package/esm2015/query-builder/query-builder-item/query-builder-item.component.js +116 -0
- package/esm2015/query-builder/query-builder-section/query-builder-section.component.js +64 -0
- package/esm2015/query-builder/query-builder.component.js +104 -0
- package/esm2015/query-builder/query-builder.module.js +35 -0
- package/esm2015/query-builder/query-builder.service.js +282 -0
- package/esm2015/rich-html-textarea/rich-html-textarea.component.js +8 -3
- package/esm2015/select/select.component.js +8 -3
- package/esm2015/separator/separator.component.js +10 -2
- package/esm2015/side-bar/side-bar.component.js +2 -2
- package/esm2015/signature/signature.component.js +8 -3
- package/esm2015/slider/slider.component.js +2 -2
- package/esm2015/smart-filters/boolean-filter/boolean-filter.component.js +23 -3
- package/esm2015/smart-filters/common/model/base-filter-component.js +35 -8
- package/esm2015/smart-filters/common/model/creator.js +8 -2
- package/esm2015/smart-filters/common/model/field.js +12 -1
- package/esm2015/smart-filters/common/model/operator.js +8 -8
- package/esm2015/smart-filters/common/model/type.js +1 -1
- package/esm2015/smart-filters/date-filter/date-filter.component.js +45 -2
- package/esm2015/smart-filters/multi-select-filter/multi-select-filter.component.js +53 -14
- package/esm2015/smart-filters/number-filter/number-filter.component.js +27 -2
- package/esm2015/smart-filters/public-api.js +2 -1
- package/esm2015/smart-filters/smart-filters.component.js +2 -2
- package/esm2015/smart-filters/smart-filters.module.js +16 -3
- package/esm2015/smart-filters/text-filter/text-filter.component.js +79 -0
- package/esm2015/textarea/textarea.component.js +8 -3
- package/esm2015/textbox/textbox.component.js +6 -4
- package/esm2015/top-bar/top-bar.component.js +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-address.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-address.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-attachment.js +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-attachment.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-button.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-button.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-checkbox.js +4 -1
- package/fesm2015/pepperi-addons-ngx-lib-checkbox.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-color.js +8 -3
- package/fesm2015/pepperi-addons-ngx-lib-color.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-date.js +4 -1
- package/fesm2015/pepperi-addons-ngx-lib-date.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-dialog.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-dialog.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-field-title.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-field-title.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-files-uploader.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-files-uploader.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-form.js +19 -16
- package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-group-buttons.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-group-buttons.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-image.js +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-image.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-list.js +3 -3
- package/fesm2015/pepperi-addons-ngx-lib-list.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.js +1014 -0
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.js.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-select.js +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-select.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-separator.js +9 -1
- package/fesm2015/pepperi-addons-ngx-lib-separator.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-side-bar.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-side-bar.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-signature.js +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-signature.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-slider.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-slider.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js +293 -36
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-textarea.js +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-textarea.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-textbox.js +5 -3
- package/fesm2015/pepperi-addons-ngx-lib-textbox.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-top-bar.js +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-top-bar.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.js +3 -1
- package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
- package/field-title/field-title.component.theme.scss +0 -2
- package/field-title/pepperi-addons-ngx-lib-field-title.metadata.json +1 -1
- package/files-uploader/files-uploader.component.theme.scss +3 -2
- package/files-uploader/pepperi-addons-ngx-lib-files-uploader.metadata.json +1 -1
- package/form/indicators.component.theme.scss +5 -5
- package/form/internal-button.component.d.ts +0 -1
- package/form/pepperi-addons-ngx-lib-form.metadata.json +1 -1
- package/group-buttons/group-buttons.component.theme.scss +11 -11
- package/group-buttons/pepperi-addons-ngx-lib-group-buttons.metadata.json +1 -1
- package/image/image.component.d.ts +1 -0
- package/image/image.component.theme.scss +28 -27
- package/image/pepperi-addons-ngx-lib-image.metadata.json +1 -1
- package/images-filmstrip/images-filmstrip.component.d.ts +1 -0
- package/images-filmstrip/images-filmstrip.component.theme.scss +27 -26
- package/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.metadata.json +1 -1
- package/list/list-total.component.theme.scss +6 -6
- package/list/pepperi-addons-ngx-lib-list.metadata.json +1 -1
- package/package.json +5 -5
- package/page-layout/page-layout.component.theme.scss +6 -6
- package/pepperi-addons-ngx-lib.metadata.json +1 -1
- package/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.metadata.json +1 -1
- package/quantity-selector/quantity-selector.component.d.ts +1 -0
- package/quantity-selector/quantity-selector.component.theme.scss +21 -21
- package/query-builder/common/model/field.d.ts +8 -0
- package/query-builder/common/model/filter.d.ts +6 -0
- package/query-builder/common/model/legacy.d.ts +29 -0
- package/query-builder/common/model/operator-unit.d.ts +13 -0
- package/query-builder/common/model/operator.d.ts +21 -0
- package/query-builder/common/model/structure.d.ts +4 -0
- package/query-builder/common/model/type-map.d.ts +12 -0
- package/query-builder/common/model/type.d.ts +4 -0
- package/query-builder/common/services/output-query.service.d.ts +44 -0
- package/query-builder/common/services/type-convertor.service.d.ts +10 -0
- package/query-builder/package.json +14 -0
- package/query-builder/pepperi-addons-ngx-lib-query-builder.d.ts +8 -0
- package/query-builder/pepperi-addons-ngx-lib-query-builder.metadata.json +1 -0
- package/query-builder/public-api.d.ts +4 -0
- package/query-builder/query-builder-item/query-builder-item.component.d.ts +37 -0
- package/query-builder/query-builder-section/query-builder-section.component.d.ts +27 -0
- package/query-builder/query-builder-section/query-builder-section.component.theme.scss +7 -0
- package/query-builder/query-builder.component.d.ts +35 -0
- package/query-builder/query-builder.module.d.ts +2 -0
- package/query-builder/query-builder.service.d.ts +94 -0
- package/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.metadata.json +1 -1
- package/rich-html-textarea/rich-html-textarea.component.d.ts +1 -0
- package/rich-html-textarea/rich-html-textarea.component.theme.scss +77 -70
- package/select/pepperi-addons-ngx-lib-select.metadata.json +1 -1
- package/select/select.component.d.ts +1 -0
- package/select/select.component.theme.scss +98 -2
- package/separator/pepperi-addons-ngx-lib-separator.metadata.json +1 -1
- package/separator/separator.component.theme.scss +1 -1
- package/side-bar/pepperi-addons-ngx-lib-side-bar.metadata.json +1 -1
- package/side-bar/side-bar.component.theme.scss +17 -16
- package/signature/pepperi-addons-ngx-lib-signature.metadata.json +1 -1
- package/signature/signature.component.d.ts +1 -0
- package/signature/signature.component.theme.scss +5 -21
- package/slider/pepperi-addons-ngx-lib-slider.metadata.json +1 -1
- package/slider/slider.component.theme.scss +54 -53
- package/smart-filters/boolean-filter/boolean-filter.component.d.ts +6 -1
- package/smart-filters/common/model/base-filter-component.d.ts +7 -0
- package/smart-filters/common/model/field.d.ts +4 -0
- package/smart-filters/common/model/operator.d.ts +1 -0
- package/smart-filters/common/model/type.d.ts +2 -2
- package/smart-filters/date-filter/date-filter.component.d.ts +8 -1
- package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +6 -0
- package/smart-filters/number-filter/number-filter.component.d.ts +5 -0
- package/smart-filters/pepperi-addons-ngx-lib-smart-filters.metadata.json +1 -1
- package/smart-filters/public-api.d.ts +1 -0
- package/smart-filters/smart-filters.component.theme.scss +6 -7
- package/smart-filters/text-filter/text-filter.component.d.ts +17 -0
- package/src/assets/i18n/en.ngx-lib.json +2 -1
- package/src/core/style/abstracts/breakpoints.scss +4 -2
- package/src/core/style/abstracts/functions.scss +232 -216
- package/src/core/style/abstracts/mixins.scss +191 -188
- package/src/core/style/base/base.scss +125 -124
- package/src/core/style/base/grids.scss +1 -1
- package/src/core/style/base/typography.scss +66 -62
- package/src/core/style/components/button.scss +57 -60
- package/src/core/style/components/checkbox.scss +41 -38
- package/src/core/style/components/datetime.scss +182 -22
- package/src/core/style/components/file.scss +159 -141
- package/src/core/style/components/general.scss +176 -287
- package/src/core/style/components/input.scss +22 -24
- package/src/core/style/components/quantity-selector.scss +15 -12
- package/src/core/style/components/radio-button.scss +22 -38
- package/src/core/style/components/select.scss +184 -182
- package/src/core/style/components/signature.scss +14 -12
- package/src/core/style/components/splitter.scss +58 -55
- package/src/core/style/components/textarea.scss +90 -78
- package/textarea/pepperi-addons-ngx-lib-textarea.metadata.json +1 -1
- package/textarea/textarea.component.d.ts +1 -0
- package/textarea/textarea.component.theme.scss +3 -2
- package/textbox/pepperi-addons-ngx-lib-textbox.metadata.json +1 -1
- package/textbox/textbox.component.theme.scss +1 -1
- package/theming.scss +50 -144
- package/top-bar/pepperi-addons-ngx-lib-top-bar.metadata.json +1 -1
- package/top-bar/top-bar.component.theme.scss +7 -7
- package/form/form.component.theme.scss +0 -2
- package/form/internal-button.component.theme.scss +0 -2
- package/form/internal-menu.component.theme.scss +0 -3
- package/list/list-actions.component.theme.scss +0 -3
- package/list/list-carousel.component.theme.scss +0 -9
- package/list/list-chooser.component.theme.scss +0 -3
- package/list/list-pager.component.theme.scss +0 -3
- package/list/list-sorting.component.theme.scss +0 -3
- package/list/list-views.component.theme.scss +0 -3
- package/list/list.component.theme.scss +0 -5
- package/list/list_old.component.theme.scss +0 -5
- package/menu/menu.component.theme.scss +0 -2
- package/search/search.component.theme.scss +0 -3
- package/textbox-icon/textbox-icon.component.theme.scss +0 -3
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
this.form = null;
|
|
26
26
|
this.isActive = false;
|
|
27
27
|
this.showTitle = true;
|
|
28
|
+
this.renderTitle = true;
|
|
28
29
|
this._layoutType = 'form';
|
|
29
30
|
this.valueChange = new core.EventEmitter();
|
|
30
31
|
this.fieldHeight = '';
|
|
@@ -89,6 +90,9 @@
|
|
|
89
90
|
this.setFieldHeight();
|
|
90
91
|
this.setDefaultForm();
|
|
91
92
|
this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
|
|
93
|
+
if (!this.renderTitle) {
|
|
94
|
+
this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
|
|
95
|
+
}
|
|
92
96
|
}
|
|
93
97
|
};
|
|
94
98
|
PepTextareaComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -142,9 +146,9 @@
|
|
|
142
146
|
PepTextareaComponent.decorators = [
|
|
143
147
|
{ type: core.Component, args: [{
|
|
144
148
|
selector: 'pep-textarea',
|
|
145
|
-
template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\">\n <div class=\"pep-textarea-container\" [ngClass]=\"{ 'stand-alone': standAlone,\n 'right-alignment': xAlignment == 'right', 'one-row': rowSpan === 1,\n 'pep-textarea-card-container': layoutType === 'card'}\">\n <pep-field-title *ngIf=\"isFormView\" [label]=\"label\" [mandatory]=\"mandatory\"
|
|
149
|
+
template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\">\n <div class=\"pep-textarea-container\" [ngClass]=\"{ 'stand-alone': standAlone,\n 'right-alignment': xAlignment == 'right', 'one-row': rowSpan === 1,\n 'pep-textarea-card-container': layoutType === 'card'}\">\n <pep-field-title *ngIf=\"renderTitle && isFormView\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [maxFieldCharacters]=\"disabled || readonly ? 0 : maxFieldCharacters\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\" [inputLength]=\"input.value?.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\"\n [ngClass]=\"{ 'pep-table-textarea': layoutType === 'table' }\">\n <textarea #input [hidden]=\"readonly\" [id]=\"key\" class=\"body-sm\" matInput (blur)=\"onBlur($event)\"\n title=\"{{ value }}\" [value]=\"value\"\n maxlength=\"{{ maxFieldCharacters > 0 ? maxFieldCharacters : 99999 }}\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'right' ? 'right' : 'left' }\"\n [formControlName]=\"key\" [style.height]=\"fieldHeight\">\n </textarea>\n <div *ngIf=\"readonly\" class=\"body-sm disable-text-div\" title=\"{{ value }}\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'right' ? 'right' : 'left' }\"\n [innerHtml]=\"value | pepSafeHtml\" [style.height]=\"fieldHeight\">\n </div>\n <!-- <pep-textbox-icon *ngIf=\"xAlignment == 'right'\" matPrefix [value]=\"value\" [label]=\"label\" [type]=\"controlType\" [disabled]=\"disabled\"\n [ngClass]=\"{ 'card-one-row-icon': layoutType === 'card' && rowSpan === 1 }\" (iconClick)=\"openDialog()\">\n </pep-textbox-icon> -->\n <pep-textbox-icon matSuffix [value]=\"value\" [label]=\"label\" [type]=\"controlType\"\n [disabled]=\"disabled || readonly\"\n [ngClass]=\"{ 'card-one-row-icon': layoutType === 'card' && rowSpan === 1 }\"\n (iconClick)=\"openDialog()\">\n </pep-textbox-icon>\n <mat-error>\n <span class=\"body-xs\"\n [title]=\"mandatory && value.length == 0 ? ('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label }) : ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\"\n [innerText]=\"mandatory && value.length == 0 ? ('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label }) : ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\"></span>\n </mat-error>\n </mat-form-field>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false }\"></ng-container>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-textarea-card-container card-flex-container\"\n [ngClass]=\"{'one-row': rowSpan === 1, 'pep-button weak': isActive && !disabled}\"\n [ngStyle]=\"{ color: textColor, '-webkit-line-clamp': rowSpan }\" [class]=\"'text-align-' + xAlignment\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\" [style.height]=\"fieldHeight\">\n <span *ngIf=\" showTitle && label !=''\" class=\" body-xs title no-shrink\" title=\"{{ label }}\">{{ label\n }} </span>\n <span [id]=\"key\" title=\"{{ value }}\" class=\"body-sm value wrap\">{{ value }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button self-start\"\n [ngClass]=\"{'self-end' : value && value !== ''}\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false }\"></ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"value?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\"\n class=\"pep-report-textarea\" [ngClass]=\"{ readonly: disabled }\">\n <input matInput [id]=\"key\" class=\"body-sm pep-report-input\" [ngClass]=\"{ readonly: disabled}\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'center' ? 'center' : xAlignment == 'right' ? 'right' : 'left' }\"\n title=\"{{ value }}\" [formControlName]=\"key\" type=\"text\" [value]=\"value\" [disabled]=\"true\" />\n <pep-textbox-icon *ngIf=\"disabled && xAlignment == 'right'\" matPrefix [value]=\"value\"\n [label]=\"label\" [type]=\"controlType\" [disabled]=\"disabled\" (iconClick)=\"openDialog()\">\n </pep-textbox-icon>\n <pep-textbox-icon *ngIf=\"disabled && (xAlignment == 'left')\" matSuffix [value]=\"value\"\n [label]=\"label\" [type]=\"controlType\" [disabled]=\"disabled\" (iconClick)=\"openDialog()\">\n </pep-textbox-icon>\n </mat-form-field>\n </ng-template>\n <ng-template #emptyBlock>\n <span> </span>\n </ng-template>\n </ng-template>\n </ng-container>\n</ng-container>\n\n<ng-template #textAreaDialogTemplate>\n <pep-dialog class=\"dialog-textarea-container\" [title]=\"label\">\n <ng-container pep-dialog-content>\n <textarea #dialogTextarea [readonly]=\"disabled || readonly\">{{ value }}</textarea>\n </ng-container>\n <div pep-dialog-actions class=\"pep-spacing-element-negative\">\n <ng-container *ngIf=\"disabled || readonly; then notEditableBlock; else editableBlock\">\n </ng-container>\n <ng-template #editableBlock>\n <button mat-button (click)=\"closeDialog()\" class=\"pep-spacing-element pep-button md weak\">\n {{ 'ACTIONS.CANCEL' | translate }}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\"\n (click)=\"closeDialog(dialogTextarea.value)\">\n {{ 'ACTIONS.SAVE' | translate }}\n </button>\n </ng-template>\n <ng-template #notEditableBlock>\n <button mat-button (click)=\"closeDialog()\" class=\"pep-spacing-element pep-button md weak\">\n {{ 'ACTIONS.CLOSE' | translate }}\n </button>\n </ng-template>\n </div>\n </pep-dialog>\n</ng-template>",
|
|
146
150
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
147
|
-
styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.disable-text-div{display:inline-block;vertical-align:middle;margin:0;padding:.5rem 1.5rem .5rem 0;overflow-y:hidden}.right-alignment .disable-text-div{padding:.5rem 0 .5rem 1.5rem}.dialog-textarea-container textarea{border:none;resize:none;width:25rem;height:13rem}.dialog-textarea-container textarea:focus{outline:none}"]
|
|
151
|
+
styles: [".pep-textarea-container,.pepperi-textarea-container{height:inherit;display:grid;align-items:center}.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex{display:flex}.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix{line-height:unset;width:100%;height:100%;overflow:hidden;display:grid!important}.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element{margin:0;padding:.5rem 1.5rem .5rem 0;vertical-align:unset;resize:none;width:calc(100% + 3rem);max-width:unset;overflow-y:scroll;box-sizing:border-box}.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-prefix,.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-suffix,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-prefix,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-suffix{align-self:flex-end!important;margin-bottom:.5rem}.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix .mat-input-element,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix .mat-input-element{padding-top:.35rem}.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix,.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix{align-self:center!important;margin-bottom:unset}.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix .card-one-row-icon .pep-button,.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix .card-one-row-icon .pepperi-button,.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix .card-one-row-icon .pep-button,.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix .card-one-row-icon .pepperi-button,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix .card-one-row-icon .pep-button,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix .card-one-row-icon .pepperi-button,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix .card-one-row-icon .pep-button,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix .card-one-row-icon .pepperi-button{width:1rem!important;height:1rem!important}.pep-textarea-container.one-row ::ng-deep .mat-form-field.pep-table-textarea .mat-input-element,.pep-textarea-container.one-row ::ng-deep .mat-form-field.pepperi-table-textarea .mat-input-element,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field.pep-table-textarea .mat-input-element,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field.pepperi-table-textarea .mat-input-element{padding-top:.135rem!important}.pep-textarea-container .rich-text-cont,.pepperi-textarea-container .rich-text-cont{overflow-x:hidden;display:inline-block;vertical-align:unset;margin:0;padding:.5rem 1.5rem .5rem 0;resize:none;width:calc(100% + 3rem);max-width:unset;overflow-y:scroll;box-sizing:border-box}.pep-textarea-container.right-alignment ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element,.pepperi-textarea-container.right-alignment ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element{padding:.5rem 0 .5rem 1.5rem}.pep-textarea-container.right-alignment .rich-text-cont,.pepperi-textarea-container.right-alignment .rich-text-cont{padding:.5rem 0 .5rem 1.5rem}.pep-textarea-card-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex,.pepperi-textarea-card-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex{padding-left:.5rem;padding-right:.5rem}.pep-textarea-card-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-input-element,.pepperi-textarea-card-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-input-element{padding:.25rem 1.5rem .5rem 0}.pep-textarea-card-container.card-flex-container,.pepperi-textarea-card-container.card-flex-container{height:inherit;display:flex;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;white-space:unset;padding:.25rem;max-width:100%}.pep-textarea-card-container.card-flex-container.one-row .title,.pepperi-textarea-card-container.card-flex-container.one-row .title{padding-top:.25rem}.pep-textarea-card-container.card-flex-container span.value,.pepperi-textarea-card-container.card-flex-container span.value{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;white-space:unset}.pep-textarea-card-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix,.pepperi-textarea-card-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix{line-height:0!important}.pep-textarea-card-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix .mat-input-element,.pepperi-textarea-card-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix .mat-input-element{padding-top:0;padding-bottom:0}.pep-textarea-card-container.right-alignment ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element,.pepperi-textarea-card-container.right-alignment ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element{padding:.25rem 0 .5rem 1.5rem}.pep-report-textarea .mat-form-field-suffix,.pepperi-report-textarea .mat-form-field-suffix{right:0!important}.pep-report-textarea.readonly .mat-form-field-wrapper .mat-form-field-flex,.pepperi-report-textarea.readonly .mat-form-field-wrapper .mat-form-field-flex{padding:0}:host{height:inherit;display:grid}:host>*{align-self:center}.disable-text-div{display:inline-block;vertical-align:middle;margin:0;padding:.5rem 1.5rem .5rem 0;overflow-y:hidden}.right-alignment .disable-text-div{padding:.5rem 0 .5rem 1.5rem}.dialog-textarea-container textarea{border:none;resize:none;width:25rem;height:13rem}.dialog-textarea-container textarea:focus{outline:none}", ".pep-textarea-container,.pepperi-textarea-container{height:inherit;display:grid;align-items:center}.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex{display:flex}.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix{line-height:unset;width:100%;height:100%;overflow:hidden;display:grid!important}.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element{margin:0;padding:.5rem 1.5rem .5rem 0;vertical-align:unset;resize:none;width:calc(100% + 3rem);max-width:unset;overflow-y:scroll;box-sizing:border-box}.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-prefix,.pep-textarea-container ::ng-deep .mat-form-field .mat-form-field-suffix,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-prefix,.pepperi-textarea-container ::ng-deep .mat-form-field .mat-form-field-suffix{align-self:flex-end!important;margin-bottom:.5rem}.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix .mat-input-element,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix .mat-input-element{padding-top:.35rem}.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix,.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix{align-self:center!important;margin-bottom:unset}.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix .card-one-row-icon .pep-button,.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix .card-one-row-icon .pepperi-button,.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix .card-one-row-icon .pep-button,.pep-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix .card-one-row-icon .pepperi-button,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix .card-one-row-icon .pep-button,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-prefix .card-one-row-icon .pepperi-button,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix .card-one-row-icon .pep-button,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-suffix .card-one-row-icon .pepperi-button{width:1rem!important;height:1rem!important}.pep-textarea-container.one-row ::ng-deep .mat-form-field.pep-table-textarea .mat-input-element,.pep-textarea-container.one-row ::ng-deep .mat-form-field.pepperi-table-textarea .mat-input-element,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field.pep-table-textarea .mat-input-element,.pepperi-textarea-container.one-row ::ng-deep .mat-form-field.pepperi-table-textarea .mat-input-element{padding-top:.135rem!important}.pep-textarea-container .rich-text-cont,.pepperi-textarea-container .rich-text-cont{overflow-x:hidden;display:inline-block;vertical-align:unset;margin:0;padding:.5rem 1.5rem .5rem 0;resize:none;width:calc(100% + 3rem);max-width:unset;overflow-y:scroll;box-sizing:border-box}.pep-textarea-container.right-alignment ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element,.pepperi-textarea-container.right-alignment ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element{padding:.5rem 0 .5rem 1.5rem}.pep-textarea-container.right-alignment .rich-text-cont,.pepperi-textarea-container.right-alignment .rich-text-cont{padding:.5rem 0 .5rem 1.5rem}.pep-textarea-card-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex,.pepperi-textarea-card-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex{padding-left:.5rem;padding-right:.5rem}.pep-textarea-card-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-input-element,.pepperi-textarea-card-container ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-input-element{padding:.25rem 1.5rem .5rem 0}.pep-textarea-card-container.card-flex-container,.pepperi-textarea-card-container.card-flex-container{height:inherit;display:flex;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;white-space:unset;padding:.25rem;max-width:100%}.pep-textarea-card-container.card-flex-container.one-row .title,.pepperi-textarea-card-container.card-flex-container.one-row .title{padding-top:.25rem}.pep-textarea-card-container.card-flex-container span.value,.pepperi-textarea-card-container.card-flex-container span.value{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;white-space:unset}.pep-textarea-card-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix,.pepperi-textarea-card-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix{line-height:0!important}.pep-textarea-card-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix .mat-input-element,.pepperi-textarea-card-container.one-row ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-form-field-infix .mat-input-element{padding-top:0;padding-bottom:0}.pep-textarea-card-container.right-alignment ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element,.pepperi-textarea-card-container.right-alignment ::ng-deep .mat-form-field .mat-form-field-wrapper .mat-input-element{padding:.25rem 0 .5rem 1.5rem}.pep-report-textarea .mat-form-field-suffix,.pepperi-report-textarea .mat-form-field-suffix{right:0!important}.pep-report-textarea.readonly .mat-form-field-wrapper .mat-form-field-flex,.pepperi-report-textarea.readonly .mat-form-field-wrapper .mat-form-field-flex{padding:0}.pep-report-textarea ::ng-deep.mat-form-field-flex,.pepperi-report-textarea ::ng-deep.mat-form-field-flex{background:transparent!important}"]
|
|
148
152
|
},] }
|
|
149
153
|
];
|
|
150
154
|
PepTextareaComponent.ctorParameters = function () { return [
|
|
@@ -168,6 +172,7 @@
|
|
|
168
172
|
form: [{ type: core.Input }],
|
|
169
173
|
isActive: [{ type: core.Input }],
|
|
170
174
|
showTitle: [{ type: core.Input }],
|
|
175
|
+
renderTitle: [{ type: core.Input }],
|
|
171
176
|
layoutType: [{ type: core.Input }],
|
|
172
177
|
valueChange: [{ type: core.Output }],
|
|
173
178
|
textAreaDialogTemplate: [{ type: core.ViewChild, args: ['textAreaDialogTemplate', { read: core.TemplateRef },] }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-textarea.umd.js","sources":["../../../projects/ngx-lib/textarea/textarea.component.ts","../../../projects/ngx-lib/textarea/textarea.module.ts","../../../projects/ngx-lib/textarea/public-api.ts","../../../projects/ngx-lib/textarea/pepperi-addons-ngx-lib-textarea.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n ViewChild,\n OnDestroy,\n Renderer2,\n TemplateRef,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepTextareaField,\n} from '@pepperi-addons/ngx-lib';\nimport { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';\n\n@Component({\n selector: 'pep-textarea',\n templateUrl: './textarea.component.html',\n styleUrls: ['./textarea.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepTextareaComponent implements OnChanges, OnInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() maxFieldCharacters: number;\n @Input() textColor = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n private _rowSpan = 1;\n @Input()\n set rowSpan(value) {\n this._rowSpan = value;\n this.setFieldHeight();\n }\n get rowSpan(): number {\n return this._rowSpan;\n }\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n // @Input() lastFocusField: any;\n\n controlType = 'textarea';\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n\n private _layoutType: PepLayoutType = 'form';\n @Input()\n set layoutType(value: PepLayoutType) {\n this._layoutType = value;\n this.setFieldHeight();\n }\n get layoutType(): PepLayoutType {\n return this._layoutType;\n }\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n // @ViewChild('input') input: ElementRef;\n @ViewChild('textAreaDialogTemplate', { read: TemplateRef })\n textAreaDialogTemplate: TemplateRef<any>;\n\n fieldHeight = '';\n standAlone = false;\n isInEditMode = false;\n\n dialogRef: MatDialogRef<any>;\n\n constructor(\n private dialogService: PepDialogService,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) {}\n\n private setFieldHeight(): void {\n this.fieldHeight = this.customizationService.calculateFieldHeight(\n this.layoutType,\n this.rowSpan,\n this.standAlone\n );\n }\n\n private setDefaultForm(): void {\n const pepField = new PepTextareaField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n maxFieldCharacters: this.maxFieldCharacters,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n onBlur(event: any): void {\n const value = event.target ? event.target.value : event;\n this.changeValue(value);\n\n setTimeout(() => {\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }, 0);\n }\n\n changeValue(value: any): void {\n if (value !== this.value) {\n this.value = value;\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n value\n );\n this.valueChange.emit(value);\n }\n }\n\n cardTemplateClicked(event: any): void {\n this.openDialog();\n }\n\n openDialog(): void {\n const config = this.dialogService.getDialogConfig(\n {\n // maxWidth: '90vw',\n // maxHeight: '90vh'\n },\n 'regular'\n );\n\n this.dialogRef = this.dialogService.openDialog(\n this.textAreaDialogTemplate,\n {},\n config\n );\n\n this.dialogRef.afterClosed().subscribe((value) => {\n if (value !== undefined && value !== null) {\n this.changeValue(value);\n }\n });\n }\n\n closeDialog(data: any = null): void {\n this.dialogRef?.close(data);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatDialogModule } from '@angular/material/dialog';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemClose,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\n\nimport { PepTextareaComponent } from './textarea.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatIconModule,\n MatDialogModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n PepDialogModule,\n ],\n exports: [PepTextareaComponent],\n declarations: [PepTextareaComponent],\n})\nexport class PepTextareaModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemClose,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/textarea\n */\nexport * from './textarea.module';\nexport * from './textarea.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepTextareaField","PepCustomizationService","Component","ChangeDetectionStrategy","PepDialogService","Renderer2","ElementRef","Input","Output","ViewChild","TemplateRef","pepIconSystemEdit","pepIconSystemClose","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatButtonModule","MatFormFieldModule","MatInputModule","MatIconModule","MatDialogModule","PepNgxLibModule","PepIconModule","PepFieldTitleModule","PepTextboxIconModule","PepDialogModule","PepIconRegistry"],"mappings":";;;;;;;QAuGI,8BACY,aAA+B,EAC/B,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;YAHnB,kBAAa,GAAb,aAAa,CAAkB;YAC/B,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,aAAQ,GAAR,QAAQ,CAAW;YACnB,YAAO,GAAP,OAAO,CAAY;YA3EtB,QAAG,GAAG,EAAE,CAAC;YACT,UAAK,GAAG,EAAE,CAAC;YACX,UAAK,GAAG,EAAE,CAAC;YACX,cAAS,GAAG,KAAK,CAAC;YAClB,aAAQ,GAAG,KAAK,CAAC;YACjB,aAAQ,GAAG,KAAK,CAAC;YAEjB,cAAS,GAAG,EAAE,CAAC;YACf,eAAU,GAA2BA,mCAA4B,CAAC;YAEnE,aAAQ,GAAG,CAAC,CAAC;YAUb,aAAQ,GAAG,IAAI,CAAC;;YAsBxB,gBAAW,GAAG,UAAU,CAAC;YAEhB,SAAI,GAAc,IAAI,CAAC;YACvB,aAAQ,GAAG,KAAK,CAAC;YACjB,cAAS,GAAG,IAAI,CAAC;YAElB,gBAAW,GAAkB,MAAM,CAAC;YAW5C,gBAAW,GAAyB,IAAIC,iBAAY,EAAU,CAAC;YAM/D,gBAAW,GAAG,EAAE,CAAC;YACjB,eAAU,GAAG,KAAK,CAAC;YACnB,iBAAY,GAAG,KAAK,CAAC;SASjB;QAjEJ,sBACI,yCAAO;iBAIX;gBACI,OAAO,IAAI,CAAC,QAAQ,CAAC;aACxB;iBAPD,UACY,KAAK;gBACb,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACtB,IAAI,CAAC,cAAc,EAAE,CAAC;aACzB;;;W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C,oBAAc;wBACdC,oBAAa;wBACbC,wBAAe;;wBAEfC,sBAAe;wBACfC,kBAAa;wBACbC,8BAAmB;wBACnBC,gCAAoB;wBACpBC,sBAAe;qBAClB;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;iBACvC;;;gBA9BGC,oBAAe;;;ICdnB;;;;ICAA;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-textarea.umd.js","sources":["../../../projects/ngx-lib/textarea/textarea.component.ts","../../../projects/ngx-lib/textarea/textarea.module.ts","../../../projects/ngx-lib/textarea/public-api.ts","../../../projects/ngx-lib/textarea/pepperi-addons-ngx-lib-textarea.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n ViewChild,\n OnDestroy,\n Renderer2,\n TemplateRef,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepTextareaField,\n} from '@pepperi-addons/ngx-lib';\nimport { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';\n\n@Component({\n selector: 'pep-textarea',\n templateUrl: './textarea.component.html',\n styleUrls: ['./textarea.component.scss', './textarea.component.theme.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepTextareaComponent implements OnChanges, OnInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() maxFieldCharacters: number;\n @Input() textColor = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n private _rowSpan = 1;\n @Input()\n set rowSpan(value) {\n this._rowSpan = value;\n this.setFieldHeight();\n }\n get rowSpan(): number {\n return this._rowSpan;\n }\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n // @Input() lastFocusField: any;\n\n controlType = 'textarea';\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n\n private _layoutType: PepLayoutType = 'form';\n @Input()\n set layoutType(value: PepLayoutType) {\n this._layoutType = value;\n this.setFieldHeight();\n }\n get layoutType(): PepLayoutType {\n return this._layoutType;\n }\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n // @ViewChild('input') input: ElementRef;\n @ViewChild('textAreaDialogTemplate', { read: TemplateRef })\n textAreaDialogTemplate: TemplateRef<any>;\n\n fieldHeight = '';\n standAlone = false;\n isInEditMode = false;\n\n dialogRef: MatDialogRef<any>;\n\n constructor(\n private dialogService: PepDialogService,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) { }\n\n private setFieldHeight(): void {\n this.fieldHeight = this.customizationService.calculateFieldHeight(\n this.layoutType,\n this.rowSpan,\n this.standAlone\n );\n }\n\n private setDefaultForm(): void {\n const pepField = new PepTextareaField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n maxFieldCharacters: this.maxFieldCharacters,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n onBlur(event: any): void {\n const value = event.target ? event.target.value : event;\n this.changeValue(value);\n\n setTimeout(() => {\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }, 0);\n }\n\n changeValue(value: any): void {\n if (value !== this.value) {\n this.value = value;\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n value\n );\n this.valueChange.emit(value);\n }\n }\n\n cardTemplateClicked(event: any): void {\n this.openDialog();\n }\n\n openDialog(): void {\n const config = this.dialogService.getDialogConfig(\n {\n // maxWidth: '90vw',\n // maxHeight: '90vh'\n },\n 'regular'\n );\n\n this.dialogRef = this.dialogService.openDialog(\n this.textAreaDialogTemplate,\n {},\n config\n );\n\n this.dialogRef.afterClosed().subscribe((value) => {\n if (value !== undefined && value !== null) {\n this.changeValue(value);\n }\n });\n }\n\n closeDialog(data: any = null): void {\n this.dialogRef?.close(data);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatDialogModule } from '@angular/material/dialog';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemClose,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\n\nimport { PepTextareaComponent } from './textarea.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatIconModule,\n MatDialogModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n PepDialogModule,\n ],\n exports: [PepTextareaComponent],\n declarations: [PepTextareaComponent],\n})\nexport class PepTextareaModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemClose,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/textarea\n */\nexport * from './textarea.module';\nexport * from './textarea.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepTextareaField","PepCustomizationService","Component","ChangeDetectionStrategy","PepDialogService","Renderer2","ElementRef","Input","Output","ViewChild","TemplateRef","pepIconSystemEdit","pepIconSystemClose","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatButtonModule","MatFormFieldModule","MatInputModule","MatIconModule","MatDialogModule","PepNgxLibModule","PepIconModule","PepFieldTitleModule","PepTextboxIconModule","PepDialogModule","PepIconRegistry"],"mappings":";;;;;;;QAwGI,8BACY,aAA+B,EAC/B,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;YAHnB,kBAAa,GAAb,aAAa,CAAkB;YAC/B,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,aAAQ,GAAR,QAAQ,CAAW;YACnB,YAAO,GAAP,OAAO,CAAY;YA5EtB,QAAG,GAAG,EAAE,CAAC;YACT,UAAK,GAAG,EAAE,CAAC;YACX,UAAK,GAAG,EAAE,CAAC;YACX,cAAS,GAAG,KAAK,CAAC;YAClB,aAAQ,GAAG,KAAK,CAAC;YACjB,aAAQ,GAAG,KAAK,CAAC;YAEjB,cAAS,GAAG,EAAE,CAAC;YACf,eAAU,GAA2BA,mCAA4B,CAAC;YAEnE,a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AAS,SAAC;oBACP,QAAQ,EAAE,cAAc;oBACxB,spPAAwC;oBAExC,eAAe,EAAEC,4BAAuB,CAAC,MAAM;;iBAClD;;;gBAPQC,uBAAgB;gBALrBH,8BAAuB;gBAPvBI,cAAS;gBAHTC,eAAU;;;sBAwBTC,UAAK;wBACLA,UAAK;wBACLA,UAAK;4BACLA,UAAK;2BACLA,UAAK;2BACLA,UAAK;qCACLA,UAAK;4BACLA,UAAK;6BACLA,UAAK;0BAGLA,UAAK;0BAULA,UAAK;uBAuBLA,UAAK;2BACLA,UAAK;4BACLA,UAAK;8BACLA,UAAK;6BAGLA,UAAK;8BASLC,WAAM;yCAINC,cAAS,SAAC,wBAAwB,EAAE,EAAE,IAAI,EAAEC,gBAAW,EAAE;;;;QCjD1D,2BAAoB,eAAgC;YAAhC,oBAAe,GAAf,eAAe,CAAiB;YAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC;gBAC/BC,sBAAiB;gBACjBC,uBAAkB;aACrB,CAAC,CAAC;SACN;;;;gBA3BJC,aAAQ,SAAC;oBACN,OAAO,EAAE;wBACLC,mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,sBAAe;wBACfC,4BAAkB;wBAClBC,oBAAc;wBACdC,oBAAa;wBACbC,wBAAe;;wBAEfC,sBAAe;wBACfC,kBAAa;wBACbC,8BAAmB;wBACnBC,gCAAoB;wBACpBC,sBAAe;qBAClB;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;iBACvC;;;gBA9BGC,oBAAe;;;ICdnB;;;;ICAA;;;;;;;;;;;;;"}
|
|
@@ -228,6 +228,9 @@
|
|
|
228
228
|
: this.maxValue;
|
|
229
229
|
this.setDefaultForm();
|
|
230
230
|
this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
|
|
231
|
+
if (!this.renderTitle) {
|
|
232
|
+
this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
|
|
233
|
+
}
|
|
231
234
|
}
|
|
232
235
|
this.readonly = this.type === 'duration' ? true : this.readonly; // Hack until we develop Timer UI for editing Duration field
|
|
233
236
|
this.updateFormFieldValue();
|
|
@@ -295,8 +298,7 @@
|
|
|
295
298
|
};
|
|
296
299
|
PepTextboxComponent.prototype.onChange = function (e) {
|
|
297
300
|
var value = e.target ? e.target.value : e;
|
|
298
|
-
|
|
299
|
-
// this.valueChange.emit(value);
|
|
301
|
+
this.valueChange.emit(value);
|
|
300
302
|
};
|
|
301
303
|
PepTextboxComponent.prototype.onBlur = function (e) {
|
|
302
304
|
this.isInFocus = false;
|
|
@@ -351,7 +353,7 @@
|
|
|
351
353
|
selector: 'pep-textbox',
|
|
352
354
|
template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\" let-hasParent=\"hasParent\">\n <pep-field-title *ngIf=\"renderTitle && isFormView && !hasParent\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [maxFieldCharacters]=\"maxFieldCharacters\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\" [inputLength]=\"input.value?.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\">\n <input #input pepTextboxValidation [id]=\"key\" [name]=\"key\" class=\" body-sm \" matInput autocomplete=\"off\"\n maxlength=\"{{ maxFieldCharacters > 0 ? maxFieldCharacters : 99999 }}\"\n [placeholder]=\"hasParent && !disabled ? placeholder : ''\"\n [ngStyle]=\"{ color: textColor, 'text-align': xAlignment == 'center' ? 'center' : xAlignment == 'right' ? 'right' : 'left' }\"\n title=\"{{ formattedValue }}\" [formControlName]=\"key\" [type]=\"type\" [value]=\"displayValue\"\n (keyup.enter)=\"$event?.currentTarget?.blur()\" (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\"\n (change)=\"onChange($event)\"\n [ngClass]=\"{'disable-hidden': disabled && formattedValue?.length > 0 && (type === 'phone' || type === 'email' || type === 'link')}\" />\n\n <span\n *ngIf=\"disabled && formattedValue?.length > 0 && (type === 'phone' || type === 'email' || type === 'link')\"\n class=\"dis-grid\">\n <a href=\"javascript:void(0)\" (click)=\"anchorClicked()\" [id]=\"key\" [name]=\"key\"\n class=\"color-link body-sm \"> {{formattedValue}}</a>\n </span>\n <mat-error *ngIf=\"renderError\">\n <ng-container *ngIf=\"mandatory && input.value.length == 0 then requiredError else otherError\">\n </ng-container>\n <ng-template #requiredError>\n <span class=\"body-xs\" [title]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\"\n [innerText]=\"('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label })\">\n </span>\n </ng-template>\n <ng-template #otherError>\n <span class=\"body-xs\" [title]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\" [innerText]=\"(input.value | pepToNumber) > this.maxValue || (input.value | pepToNumber) < this.minValue ?\n ('MESSAGES.ERROR_RANGE_IS_NOT_VALID' | translate: { min: minValue, max: maxValue }) :\n ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\">\n </span>\n </ng-template>\n </mat-error>\n\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && xAlignment == 'right'\" matPrefix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n <pep-textbox-icon *ngIf=\"renderSymbol && isFormView && (xAlignment == 'left')\" matSuffix [value]=\"value\"\n [label]=\"label\" [type]=\"type\" [disabled]=\"disabled\">\n </pep-textbox-icon>\n </mat-form-field>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngIf=\"parentFieldKey; then groupedBlock; else regularBlock\"></ng-container>\n <ng-template #regularBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true, hasParent: false }\">\n </ng-container>\n </ng-template>\n <ng-template #groupedBlock>\n <ng-container [formGroupName]=\"parentFieldKey\">\n <mat-form-field appearance=\"outline\">\n <!-- (keyup)=\"onKeyUp($event)\" -->\n <input pepTextboxValidation [id]=\"key\" [name]=\"key\" class=\" body-sm \" matInput autocomplete=\"off\"\n [placeholder]=\"!disabled ? placeholder : ''\" title=\"{{ formattedValue }}\"\n [formControlName]=\"key\" [value]=\"value\" (blur)=\"onBlur($event)\" (change)=\"onChange($event)\"\n (keyup.enter)=\"$event?.currentTarget?.blur()\" (focus)=\"onFocus($event)\" />\n </mat-form-field>\n <!-- <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true, hasParent: true }\"></ng-container> -->\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\" [ngStyle]=\"{ color: textColor }\"\n [class]=\"'text-align-' + xAlignment\" [ngClass]=\"{'one-row': rowSpan === 1,\n 'multi-rows': rowSpan > 1,\n 'pep-button weak': isActive && !disabled}\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }} </span>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm value\"\n [ngClass]=\"{'multi-rows-text': rowSpan > 1}\" [ngStyle]=\"{ '-webkit-line-clamp': rowSpan }\">{{\n formattedValue }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false, hasParent: false }\">\n </ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'link'\">\n <a [id]=\"key\" class=\"color-link body-sm pep-report-input\"\n [ngClass]=\"{'disable': (disabled && value === '')}\" *ngIf=\"formattedValue != null\"\n title=\"{{ formattedValue }}\" target=\"_blank\" href=\"{{ value ? value : formattedValue }}\">{{\n formattedValue }}</a>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <span [id]=\"key\" class=\"body-sm pep-report-input\" [ngClass]=\"{'readonly': disabled}\"\n title=\"{{ formattedValue }}\" [ngStyle]=\"{ color: textColor }\">{{ formattedValue }}</span>\n </ng-container>\n </ng-container>\n </ng-template>\n <ng-template #emptyBlock>\n <span [id]=\"key\"> </span>\n </ng-template>\n </ng-template>\n </ng-container>\n\n</ng-container>",
|
|
353
355
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
354
|
-
styles: [":host{height:inherit;display:grid}:host>*{align-self:center;align-items:baseline}.disable-hidden{display:none}.dis-grid{display:grid}.multi-rows-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal!important}"]
|
|
356
|
+
styles: [":host{height:inherit;display:grid}:host>*{align-self:center;align-items:baseline}.disable-hidden{display:none}.dis-grid{display:grid}.multi-rows-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal!important}", ""]
|
|
355
357
|
},] }
|
|
356
358
|
];
|
|
357
359
|
PepTextboxComponent.ctorParameters = function () { return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-textbox.umd.js","sources":["../../../projects/ngx-lib/textbox/textbox.component.ts","../../../projects/ngx-lib/textbox/textbox-validation.directive.ts","../../../projects/ngx-lib/textbox/textbox.module.ts","../../../projects/ngx-lib/textbox/public-api.ts","../../../projects/ngx-lib/textbox/pepperi-addons-ngx-lib-textbox.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n ViewChild,\n Renderer2,\n OnDestroy,\n ChangeDetectorRef,\n HostBinding,\n} from '@angular/core';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepTextboxFieldType,\n PepTextboxField,\n PepFieldBase,\n PepUtilitiesService,\n} from '@pepperi-addons/ngx-lib';\n\n/**\n * This is a text box input component that can be use to\n *\n * @export\n * @class PepTextboxComponent\n * @implements {OnChanges}\n * @implements {OnInit}\n * @implements {OnDestroy}\n */\n@Component({\n selector: 'pep-textbox',\n templateUrl: './textbox.component.html',\n styleUrls: ['./textbox.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepTextboxComponent implements OnChanges, OnInit, OnDestroy {\n\n @HostBinding('attr.data-qa') dataQa = '';\n\n private _key = '';\n /**\n * The text box key\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set key(value) {\n this._key = value;\n this.dataQa = value;\n }\n get key(): string {\n return this._key;\n }\n\n private _value = '';\n /**\n * The value of the text box.\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set value(value: string) {\n if (!value) {\n value = '';\n }\n\n this._value = value;\n\n if (this._calculateFormattedValue) {\n this.setFormattedValue(value);\n }\n }\n get value(): string {\n return this._value;\n }\n\n private _formattedValue = null;\n /**\n * The formatted value.\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set formattedValue(value: string) {\n if (!value) {\n value = '';\n }\n\n if (this._calculateFormattedValue) {\n this._calculateFormattedValue = false;\n }\n\n this.setFormattedValue(value);\n }\n get formattedValue(): string {\n return this._formattedValue;\n }\n\n /**\n * The title of the textbox.\n *\n * @memberof PepTextboxComponent\n */\n @Input() label = '';\n\n /**\n * The placeholder (relevant only for children - if parent isn't null).\n *\n * @memberof PepTextboxComponent\n */\n @Input() placeholder = '';\n\n /**\n * The type of the textbox.\n *\n * @type {PepTextboxFieldType}\n * @memberof PepTextboxComponent\n */\n @Input() type: PepTextboxFieldType = 'text';\n\n /**\n * If the textbox is mandatory\n *\n * @memberof PepTextboxComponent\n */\n @Input() mandatory = false;\n\n // TODO: Check if should remove disabled and keep only readonly.\n /**\n * If the textbox is disabled.\n *\n * @memberof PepTextboxComponent\n */\n @Input() disabled = false;\n\n /**\n * If the textbox is readonly\n *\n * @memberof PepTextboxComponent\n */\n @Input() readonly = false;\n @Input() maxFieldCharacters: number;\n @Input() textColor = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n // @Input() lastFocusField: any;\n @Input() minValue = NaN;\n @Input() maxValue = NaN;\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() renderError = true;\n @Input() renderSymbol = true;\n @Input() layoutType: PepLayoutType = 'form';\n @Input() parentFieldKey: string = null;\n\n /**\n * The value change event.\n *\n * @type {EventEmitter<string>}\n * @memberof PepTextboxComponent\n */\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ViewChild('input') input: ElementRef;\n\n private _calculateFormattedValue = true;\n get calculateFormattedValue(): boolean {\n return this._calculateFormattedValue;\n }\n\n controlType = 'textbox';\n\n standAlone = false;\n isInEditMode = false;\n isInFocus: boolean;\n\n constructor(\n public fb: FormBuilder,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef,\n private translate: TranslateService,\n private utilitiesService: PepUtilitiesService\n ) {\n this.isInFocus = false;\n }\n\n private setFormattedValue(value: string) {\n if (this._calculateFormattedValue) {\n this._formattedValue = this.isNumberType()\n ? this.utilitiesService.formatNumber(value)\n : value;\n } else {\n this._formattedValue = value;\n }\n\n this.updateFormFieldValue();\n }\n\n private updateFormFieldValue() {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.formattedValue,\n this.parentFieldKey\n );\n }\n\n get displayValue(): string {\n let res = '';\n\n if (this.type == 'link') {\n res = this.formattedValue;\n } else {\n res = this.isInFocus ? this.value : this.formattedValue;\n }\n\n return res;\n }\n\n private setDefaultForm(): void {\n const pepField = new PepTextboxField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n maxFieldCharacters: this.maxFieldCharacters,\n type: this.type,\n minValue: this.minValue,\n maxValue: this.maxValue,\n });\n this.form = this.customizationService.getDefaultFromGroup(\n pepField,\n this.renderError\n );\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n\n this.minValue =\n isNaN(this.minValue) && !isNaN(this.maxValue)\n ? 0\n : this.minValue;\n this.maxValue =\n isNaN(this.maxValue) && !isNaN(this.minValue)\n ? 99999\n : this.maxValue;\n\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n }\n\n this.readonly = this.type === 'duration' ? true : this.readonly; // Hack until we develop Timer UI for editing Duration field\n\n this.updateFormFieldValue();\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n\n this.readonly = this.type === 'duration' ? true : this.readonly; // Hack until we develop Timer UI for editing Duration field\n }\n\n ngOnDestroy(): void {\n //\n }\n\n onFocus(event: any): void {\n this.isInFocus = true;\n\n // select the value in focus (DI-18246 improvement)\n setTimeout(() => {\n const eventTarget = event.target || event.srcElement;\n if (eventTarget) {\n eventTarget.select();\n }\n }, 0);\n }\n\n isNumberType(): boolean {\n return (\n this.type === 'percentage' ||\n this.type === 'currency' ||\n this.type === 'int' ||\n this.type === 'real'\n );\n }\n\n isValueValid(value: string): boolean {\n let res = false;\n\n if (this.isNumberType()) {\n if (value === '') {\n res = this.mandatory ? false : true;\n } else {\n const numberValue = this.utilitiesService.coerceNumberProperty(\n value\n );\n res =\n numberValue >= this.minValue &&\n numberValue <= this.maxValue;\n }\n } else {\n // TODO: Maybe need to check other types.\n res = true;\n }\n\n return res;\n }\n\n isDifferentValue(value: string): boolean {\n let res = false;\n\n if (this.isNumberType()) {\n if (this.value === '' || value === '') {\n res = true;\n } else {\n const currentValue = this.utilitiesService.coerceNumberProperty(\n this.value\n );\n const newValue = this.utilitiesService.coerceNumberProperty(\n value\n );\n\n res = currentValue !== newValue;\n }\n } else {\n res = true;\n }\n\n return res;\n }\n\n onChange(e: any): void {\n const value = e.target ? e.target.value : e;\n\n // TODO: uncomment\n // this.valueChange.emit(value);\n }\n\n onBlur(e: any): void {\n this.isInFocus = false;\n const value = e.target ? e.target.value : e;\n if (value !== this.value && this.isDifferentValue(value)) {\n // If renderError is false and the new value is not valid.\n if (!this.renderError && !this.isValueValid(value)) {\n this.renderer.setProperty(\n this.input.nativeElement,\n 'value',\n this.value\n );\n } else {\n this.value = value;\n\n // If the user is setting the formatted value then set the value till the user format it and return it back.\n if (!this._calculateFormattedValue) {\n this._formattedValue = value;\n }\n\n this.valueChange.emit(value);\n }\n }\n\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }\n\n anchorClicked(): void {\n const currentValue = this.value;\n if (currentValue.trim().length > 0) {\n switch (this.type) {\n case 'email':\n window.open('mailto:' + currentValue, 'email');\n break;\n case 'phone':\n window.open('tel:' + currentValue, 'tel');\n break;\n case 'link':\n window.open(currentValue);\n break;\n default:\n break;\n }\n }\n }\n\n cardTemplateClicked(event: any): void {\n this.isInEditMode = true;\n\n setTimeout(() => {\n this.input.nativeElement.focus();\n }, 0);\n }\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnInit,\n} from '@angular/core';\nimport {\n PepTextboxFieldType,\n PepValidatorService,\n} from '@pepperi-addons/ngx-lib';\n\n@Directive({\n selector: '[pepTextboxValidation]',\n})\nexport class PepTextboxValidationDirective implements OnInit {\n @Input() type: PepTextboxFieldType = 'text';\n\n previousValue = '';\n\n constructor(\n private hostElement: ElementRef,\n private validatorService: PepValidatorService\n ) {}\n\n ngOnInit() {\n //\n }\n\n private isNumber(): boolean {\n return this.isInteger() || this.isDecimal();\n }\n\n private isInteger(): boolean {\n return this.type === 'int';\n }\n\n private isDecimal(): boolean {\n return (\n this.type === 'currency' ||\n this.type === 'percentage' ||\n this.type === 'real'\n );\n }\n\n private isPhone(): boolean {\n return this.type === 'phone';\n }\n\n private isText(): boolean {\n return (\n this.type === 'email' ||\n this.type === 'link' ||\n this.type === 'text'\n );\n }\n\n @HostListener('change', ['$event'])\n onChange(e) {\n this.validateValue(this.hostElement.nativeElement.value);\n }\n\n @HostListener('keydown', ['$event'])\n onKeyDown(e: KeyboardEvent) {\n const originalValue: string = e.target['value'];\n\n if (this.isNumber()) {\n // save value before keydown event\n this.previousValue = originalValue;\n const isNumber = this.validatorService.isNumber(\n e,\n this.isDecimal()\n );\n\n if (isNumber) return;\n else e.preventDefault();\n } else if (this.isPhone()) {\n const isPhone = this.validatorService.isPhone(e);\n if (isPhone) return;\n else e.preventDefault();\n }\n }\n\n validateValue(value: string): void {\n if (this.isNumber()) {\n const newValue = this.validatorService.validateNumber(\n value,\n this.isDecimal()\n );\n this.hostElement.nativeElement['value'] = newValue ? newValue : 0;\n } else if (this.isPhone()) {\n // test phone with regular expression, when\n // phone is invalid, replace it with the previousValue\n const valid = this.validatorService.validatePhone(value);\n this.hostElement.nativeElement['value'] = valid\n ? value\n : this.previousValue;\n } else if (this.isText()) {\n this.hostElement.nativeElement['value'] = value;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepTextboxComponent } from './textbox.component';\nimport { PepTextboxValidationDirective } from './textbox-validation.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n ],\n exports: [PepTextboxComponent],\n declarations: [PepTextboxComponent, PepTextboxValidationDirective],\n})\nexport class PepTextboxModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemEdit]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/textbox\n */\nexport * from './textbox.module';\nexport * from './textbox.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {PepTextboxValidationDirective as ɵa} from './textbox-validation.directive';"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepTextboxField","PepCustomizationService","Component","ChangeDetectionStrategy","FormBuilder","Renderer2","ElementRef","TranslateService","PepUtilitiesService","HostBinding","Input","Output","ViewChild","Directive","PepValidatorService","HostListener","pepIconSystemEdit","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatButtonModule","MatFormFieldModule","MatInputModule","MatIconModule","PepNgxLibModule","PepIconModule","PepFieldTitleModule","PepTextboxIconModule","PepIconRegistry"],"mappings":";;;;;;IA4BA;;;;;;;;;;QAuLI,6BACW,EAAe,EACd,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB,EACnB,SAA2B,EAC3B,gBAAqC;YALtC,OAAE,GAAF,EAAE,CAAa;YACd,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,aAAQ,GAAR,QAAQ,CAAW;YACnB,YAAO,GAAP,OAAO,CAAY;YACnB,cAAS,GAAT,SAAS,CAAkB;YAC3B,qBAAgB,GAAhB,gBAAgB,CAAqB;YA5KpB,WAAM,GAAG,EAAE,CAAC;YAEjC,SAAI,GAAG,EAAE,CAAC;YAeV,WAAM,GAAG,EAAE,CAAC;YAsBZ,oBAAe,GAAG,IAAI,CAAC;;;;;;YA2BtB,UAAK,GAAG,EAAE,CAAC;;;;;;YAOX,gBAAW,GAAG,EAAE,CAAC;;;;;;;YAQjB,SAAI,GAAwB,MAAM,CAAC;;;;;;YAOnC,cAAS,GAAG,KAAK,CAAC;;;;;;;YAQlB,aAAQ,GAAG,KAAK,CAAC;;;;;;YAOjB,aAAQ,GAAG,KAAK,CAAC;YAEjB,cAAS,GAAG,EAAE,CAAC;YACf,eAAU,GAA2BA,mCAA4B,CAAC;YAClE,YAAO,GAAG,CAAC,CAAC;;YAEZ,aAAQ,GAAG,GAAG,CAAC;YACf,aAAQ,GAAG,GAAG,CAAC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AI,CAAC,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,KAAK;sBACzC,KAAK;sBACL,IAAI,CAAC,aAAa,CAAC;aAC5B;iBAAM,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;gBACtB,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;aACnD;SACJ;;;;gBAxFJC,cAAS,SAAC;oBACP,QAAQ,EAAE,wBAAwB;iBACrC;;;gBAZGP,eAAU;gBAOVQ,0BAAmB;;;uBAOlBJ,UAAK;2BAyCLK,iBAAY,SAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;4BAKjCA,iBAAY,SAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;;QCpBnC,0BAAoB,eAAgC;YAAhC,oBAAe,GAAf,eAAe,CAAiB;YAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAACC,sBAAiB,CAAC,CAAC,CAAC;SAC3D;;;;gBAtBJC,aAAQ,SAAC;oBACN,OAAO,EAAE;wBACLC,mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,sBAAe;wBACfC,4BAAkB;wBAClBC,oBAAc;wBACdC,oBAAa;;wBAEbC,sBAAe;wBACfC,kBAAa;wBACbC,8BAAmB;wBACnBC,gCAAoB;qBACvB;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;oBAC9B,YAAY,EAAE,CAAC,mBAAmB,EAAE,6BAA6B,CAAC;iBACrE;;;gBA3BGC,oBAAe;;;ICbnB;;;;ICAA;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-textbox.umd.js","sources":["../../../projects/ngx-lib/textbox/textbox.component.ts","../../../projects/ngx-lib/textbox/textbox-validation.directive.ts","../../../projects/ngx-lib/textbox/textbox.module.ts","../../../projects/ngx-lib/textbox/public-api.ts","../../../projects/ngx-lib/textbox/pepperi-addons-ngx-lib-textbox.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n ViewChild,\n Renderer2,\n OnDestroy,\n ChangeDetectorRef,\n HostBinding,\n} from '@angular/core';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepTextboxFieldType,\n PepTextboxField,\n PepFieldBase,\n PepUtilitiesService,\n} from '@pepperi-addons/ngx-lib';\n\n/**\n * This is a text box input component that can be use to\n *\n * @export\n * @class PepTextboxComponent\n * @implements {OnChanges}\n * @implements {OnInit}\n * @implements {OnDestroy}\n */\n@Component({\n selector: 'pep-textbox',\n templateUrl: './textbox.component.html',\n styleUrls: ['./textbox.component.scss', './textbox.component.theme.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepTextboxComponent implements OnChanges, OnInit, OnDestroy {\n\n @HostBinding('attr.data-qa') dataQa = '';\n\n private _key = '';\n /**\n * The text box key\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set key(value) {\n this._key = value;\n this.dataQa = value;\n }\n get key(): string {\n return this._key;\n }\n\n private _value = '';\n /**\n * The value of the text box.\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set value(value: string) {\n if (!value) {\n value = '';\n }\n\n this._value = value;\n\n if (this._calculateFormattedValue) {\n this.setFormattedValue(value);\n }\n }\n get value(): string {\n return this._value;\n }\n\n private _formattedValue = null;\n /**\n * The formatted value.\n *\n * @memberof PepTextboxComponent\n */\n @Input()\n set formattedValue(value: string) {\n if (!value) {\n value = '';\n }\n\n if (this._calculateFormattedValue) {\n this._calculateFormattedValue = false;\n }\n\n this.setFormattedValue(value);\n }\n get formattedValue(): string {\n return this._formattedValue;\n }\n\n /**\n * The title of the textbox.\n *\n * @memberof PepTextboxComponent\n */\n @Input() label = '';\n\n /**\n * The placeholder (relevant only for children - if parent isn't null).\n *\n * @memberof PepTextboxComponent\n */\n @Input() placeholder = '';\n\n /**\n * The type of the textbox.\n *\n * @type {PepTextboxFieldType}\n * @memberof PepTextboxComponent\n */\n @Input() type: PepTextboxFieldType = 'text';\n\n /**\n * If the textbox is mandatory\n *\n * @memberof PepTextboxComponent\n */\n @Input() mandatory = false;\n\n // TODO: Check if should remove disabled and keep only readonly.\n /**\n * If the textbox is disabled.\n *\n * @memberof PepTextboxComponent\n */\n @Input() disabled = false;\n\n /**\n * If the textbox is readonly\n *\n * @memberof PepTextboxComponent\n */\n @Input() readonly = false;\n @Input() maxFieldCharacters: number;\n @Input() textColor = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n // @Input() lastFocusField: any;\n @Input() minValue = NaN;\n @Input() maxValue = NaN;\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() renderError = true;\n @Input() renderSymbol = true;\n @Input() layoutType: PepLayoutType = 'form';\n @Input() parentFieldKey: string = null;\n\n /**\n * The value change event.\n *\n * @type {EventEmitter<string>}\n * @memberof PepTextboxComponent\n */\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ViewChild('input') input: ElementRef;\n\n private _calculateFormattedValue = true;\n get calculateFormattedValue(): boolean {\n return this._calculateFormattedValue;\n }\n\n controlType = 'textbox';\n\n standAlone = false;\n isInEditMode = false;\n isInFocus: boolean;\n\n constructor(\n public fb: FormBuilder,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef,\n private translate: TranslateService,\n private utilitiesService: PepUtilitiesService\n ) {\n this.isInFocus = false;\n }\n\n private setFormattedValue(value: string) {\n if (this._calculateFormattedValue) {\n this._formattedValue = this.isNumberType()\n ? this.utilitiesService.formatNumber(value)\n : value;\n } else {\n this._formattedValue = value;\n }\n\n this.updateFormFieldValue();\n }\n\n private updateFormFieldValue() {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.formattedValue,\n this.parentFieldKey\n );\n }\n\n get displayValue(): string {\n let res = '';\n\n if (this.type == 'link') {\n res = this.formattedValue;\n } else {\n res = this.isInFocus ? this.value : this.formattedValue;\n }\n\n return res;\n }\n\n private setDefaultForm(): void {\n const pepField = new PepTextboxField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n maxFieldCharacters: this.maxFieldCharacters,\n type: this.type,\n minValue: this.minValue,\n maxValue: this.maxValue,\n });\n this.form = this.customizationService.getDefaultFromGroup(\n pepField,\n this.renderError\n );\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n\n this.minValue =\n isNaN(this.minValue) && !isNaN(this.maxValue)\n ? 0\n : this.minValue;\n this.maxValue =\n isNaN(this.maxValue) && !isNaN(this.minValue)\n ? 99999\n : this.maxValue;\n\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n\n this.readonly = this.type === 'duration' ? true : this.readonly; // Hack until we develop Timer UI for editing Duration field\n\n this.updateFormFieldValue();\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n\n this.readonly = this.type === 'duration' ? true : this.readonly; // Hack until we develop Timer UI for editing Duration field\n }\n\n ngOnDestroy(): void {\n //\n }\n\n onFocus(event: any): void {\n this.isInFocus = true;\n\n // select the value in focus (DI-18246 improvement)\n setTimeout(() => {\n const eventTarget = event.target || event.srcElement;\n if (eventTarget) {\n eventTarget.select();\n }\n }, 0);\n }\n\n isNumberType(): boolean {\n return (\n this.type === 'percentage' ||\n this.type === 'currency' ||\n this.type === 'int' ||\n this.type === 'real'\n );\n }\n\n isValueValid(value: string): boolean {\n let res = false;\n\n if (this.isNumberType()) {\n if (value === '') {\n res = this.mandatory ? false : true;\n } else {\n const numberValue = this.utilitiesService.coerceNumberProperty(\n value\n );\n res =\n numberValue >= this.minValue &&\n numberValue <= this.maxValue;\n }\n } else {\n // TODO: Maybe need to check other types.\n res = true;\n }\n\n return res;\n }\n\n isDifferentValue(value: string): boolean {\n let res = false;\n\n if (this.isNumberType()) {\n if (this.value === '' || value === '') {\n res = true;\n } else {\n const currentValue = this.utilitiesService.coerceNumberProperty(\n this.value\n );\n const newValue = this.utilitiesService.coerceNumberProperty(\n value\n );\n\n res = currentValue !== newValue;\n }\n } else {\n res = true;\n }\n\n return res;\n }\n\n onChange(e: any): void {\n const value = e.target ? e.target.value : e;\n\n this.valueChange.emit(value);\n }\n\n onBlur(e: any): void {\n this.isInFocus = false;\n const value = e.target ? e.target.value : e;\n if (value !== this.value && this.isDifferentValue(value)) {\n // If renderError is false and the new value is not valid.\n if (!this.renderError && !this.isValueValid(value)) {\n this.renderer.setProperty(\n this.input.nativeElement,\n 'value',\n this.value\n );\n } else {\n this.value = value;\n\n // If the user is setting the formatted value then set the value till the user format it and return it back.\n if (!this._calculateFormattedValue) {\n this._formattedValue = value;\n }\n\n this.valueChange.emit(value);\n }\n }\n\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }\n\n anchorClicked(): void {\n const currentValue = this.value;\n if (currentValue.trim().length > 0) {\n switch (this.type) {\n case 'email':\n window.open('mailto:' + currentValue, 'email');\n break;\n case 'phone':\n window.open('tel:' + currentValue, 'tel');\n break;\n case 'link':\n window.open(currentValue);\n break;\n default:\n break;\n }\n }\n }\n\n cardTemplateClicked(event: any): void {\n this.isInEditMode = true;\n\n setTimeout(() => {\n this.input.nativeElement.focus();\n }, 0);\n }\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnInit,\n} from '@angular/core';\nimport {\n PepTextboxFieldType,\n PepValidatorService,\n} from '@pepperi-addons/ngx-lib';\n\n@Directive({\n selector: '[pepTextboxValidation]',\n})\nexport class PepTextboxValidationDirective implements OnInit {\n @Input() type: PepTextboxFieldType = 'text';\n\n previousValue = '';\n\n constructor(\n private hostElement: ElementRef,\n private validatorService: PepValidatorService\n ) {}\n\n ngOnInit() {\n //\n }\n\n private isNumber(): boolean {\n return this.isInteger() || this.isDecimal();\n }\n\n private isInteger(): boolean {\n return this.type === 'int';\n }\n\n private isDecimal(): boolean {\n return (\n this.type === 'currency' ||\n this.type === 'percentage' ||\n this.type === 'real'\n );\n }\n\n private isPhone(): boolean {\n return this.type === 'phone';\n }\n\n private isText(): boolean {\n return (\n this.type === 'email' ||\n this.type === 'link' ||\n this.type === 'text'\n );\n }\n\n @HostListener('change', ['$event'])\n onChange(e) {\n this.validateValue(this.hostElement.nativeElement.value);\n }\n\n @HostListener('keydown', ['$event'])\n onKeyDown(e: KeyboardEvent) {\n const originalValue: string = e.target['value'];\n\n if (this.isNumber()) {\n // save value before keydown event\n this.previousValue = originalValue;\n const isNumber = this.validatorService.isNumber(\n e,\n this.isDecimal()\n );\n\n if (isNumber) return;\n else e.preventDefault();\n } else if (this.isPhone()) {\n const isPhone = this.validatorService.isPhone(e);\n if (isPhone) return;\n else e.preventDefault();\n }\n }\n\n validateValue(value: string): void {\n if (this.isNumber()) {\n const newValue = this.validatorService.validateNumber(\n value,\n this.isDecimal()\n );\n this.hostElement.nativeElement['value'] = newValue ? newValue : 0;\n } else if (this.isPhone()) {\n // test phone with regular expression, when\n // phone is invalid, replace it with the previousValue\n const valid = this.validatorService.validatePhone(value);\n this.hostElement.nativeElement['value'] = valid\n ? value\n : this.previousValue;\n } else if (this.isText()) {\n this.hostElement.nativeElement['value'] = value;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepTextboxComponent } from './textbox.component';\nimport { PepTextboxValidationDirective } from './textbox-validation.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n ],\n exports: [PepTextboxComponent],\n declarations: [PepTextboxComponent, PepTextboxValidationDirective],\n})\nexport class PepTextboxModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemEdit]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/textbox\n */\nexport * from './textbox.module';\nexport * from './textbox.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {PepTextboxValidationDirective as ɵa} from './textbox-validation.directive';"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepTextboxField","PepCustomizationService","Component","ChangeDetectionStrategy","FormBuilder","Renderer2","ElementRef","TranslateService","PepUtilitiesService","HostBinding","Input","Output","ViewChild","Directive","PepValidatorService","HostListener","pepIconSystemEdit","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatButtonModule","MatFormFieldModule","MatInputModule","MatIconModule","PepNgxLibModule","PepIconModule","PepFieldTitleModule","PepTextboxIconModule","PepIconRegistry"],"mappings":";;;;;;IA4BA;;;;;;;;;;QAuLI,6BACW,EAAe,EACd,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB,EACnB,SAA2B,EAC3B,gBAAqC;YALtC,OAAE,GAAF,EAAE,CAAa;YACd,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,aAAQ,GAAR,QAAQ,CAAW;YACnB,YAAO,GAAP,OAAO,CAAY;YACnB,cAAS,GAAT,SAAS,CAAkB;YAC3B,qBAAgB,GAAhB,gBAAgB,CAAqB;YA5KpB,WAAM,GAAG,EAAE,CAAC;YAEjC,SAAI,GAAG,EAAE,CAAC;YAeV,WAAM,GAAG,EAAE,CAAC;YAsBZ,oBAAe,GAAG,IAAI,CAAC;;;;;;YA2BtB,UAAK,GAAG,EAAE,CAAC;;;;;;YAOX,gBAAW,GAAG,EAAE,CAAC;;;;;;;YAQjB,SAAI,GAAwB,MAAM,CAAC;;;;;;YAOnC,cAAS,GAAG,KAAK,CAAC;;;;;;;YAQlB,aAAQ,GAAG,KAAK,CAAC;;;;;;YAOjB,aAAQ,GAAG,KAAK,CAAC;YAEjB,cAAS,GAAG,EAAE,CAAC;YACf,eAAU,GAA2BA,mCAA4B,CAAC;YAClE,YAAO,GAAG,CAAC,CAAC;;YAEZ,aAAQ,GAAG,GAAG,CAAC;YACf,aAAQ,GAAG,GAAG,CAAC;YAEhB,aAAQ,GAAG,IAAI,CAAC;YAoBf,SAAI,GAAc,IAAI,CAAC;YACvB,aAAQ,GAAG,KAAK,CAAC;YACjB,cAAS,GAAG,IAAI,CAAC;YACjB,gBAAW,GAAG,IAAI,CAAC;YACnB,gBAAW,GAAG,IAAI,CAAC;YACnB,iBAAY,GAAG,IAAI,CAAC;YACpB,eAAU,GAAkB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AAW,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,KAAK;sBACzC,KAAK;sBACL,IAAI,CAAC,aAAa,CAAC;aAC5B;iBAAM,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;gBACtB,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;aACnD;SACJ;;;;gBAxFJC,cAAS,SAAC;oBACP,QAAQ,EAAE,wBAAwB;iBACrC;;;gBAZGP,eAAU;gBAOVQ,0BAAmB;;;uBAOlBJ,UAAK;2BAyCLK,iBAAY,SAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;4BAKjCA,iBAAY,SAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;;QCpBnC,0BAAoB,eAAgC;YAAhC,oBAAe,GAAf,eAAe,CAAiB;YAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAACC,sBAAiB,CAAC,CAAC,CAAC;SAC3D;;;;gBAtBJC,aAAQ,SAAC;oBACN,OAAO,EAAE;wBACLC,mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,sBAAe;wBACfC,4BAAkB;wBAClBC,oBAAc;wBACdC,oBAAa;;wBAEbC,sBAAe;wBACfC,kBAAa;wBACbC,8BAAmB;wBACnBC,gCAAoB;qBACvB;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;oBAC9B,YAAY,EAAE,CAAC,mBAAmB,EAAE,6BAA6B,CAAC;iBACrE;;;gBA3BGC,oBAAe;;;ICbnB;;;;ICAA;;;;;;;;;;;;;;"}
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
{ type: core.Component, args: [{
|
|
80
80
|
selector: 'pep-top-bar',
|
|
81
81
|
template: "<div pepRtlDirection [hidden]=\"isHidden\" class=\"pep-top-bar-container\" [ngClass]=\"{ inline: inline }\">\n <div class=\"header-content\">\n <div class=\"main-layout\">\n <div class=\"content pep-border-bottom\">\n <div class=\"left-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"listActionsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listChooserTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"leftContentTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listTotalTemplate\"></ng-container>\n </div>\n <div class=\"pep-spacing-element\"></div>\n <div class=\"right-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"searchTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"sortingTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"viewsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"rightContentTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <!-- hasFooterContent === null is for the first load to see if there is data in the (footer-start-content || footer-end-content). -->\n <div *ngIf=\"hasFooterContent === null || (hasFooterContent && footerState === 'visible')\" class=\"footer\"\n [style.height.rem]=\"customizationService.footerHeight\">\n <div class=\"content pep-border-top\">\n <div #footerStartContent class=\"left-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-start-content]\"></ng-content>\n </div>\n <div #footerEndContent class=\"right-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-end-content]\"></ng-content>\n </div>\n </div>\n <!-- <ng-container *ngIf=\"showFooter && screenSize >= PepScreenSizeType.MD; then footerBlock; else noFooterBlock\">\n </ng-container>\n <ng-template #footerBlock>\n {{ customizationService.showFooter() }}\n </ng-template>\n <ng-template #noFooterBlock>\n {{ customizationService.hideFooter() }}\n </ng-template> -->\n </div>\n\n</div>\n\n<!-- Left side templates -->\n<ng-template #listActionsTemplate>\n <div class=\"list-actions-wrapper\">\n <ng-content *ngIf=\"!searchIsOpenAndSmallDevice\" select=\"pep-list-actions\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #titleTemplate>\n <div *ngIf=\"title?.length > 0\" class=\"pep-spacing-element title {{ inline ? 'title-md' : 'title-lg' }}\">\n <span [title]=\"title\">{{ title }}</span>\n </div>\n</ng-template>\n\n<ng-template #listChooserTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listChooserComp }\">\n <ng-content select=\"pep-list-chooser\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #leftContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-start-content]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #listTotalTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listTotalComp }\">\n <ng-content select=\"pep-list-total\"></ng-content>\n </div>\n</ng-template>\n\n<!-- Right side templates -->\n<ng-template #searchTemplate>\n <div [ngClass]=\"{ 'pep-spacing-element': searchComp }\">\n <ng-content select=\"pep-search\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortingTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listSortingComp }\">\n <ng-content select=\"pep-list-sorting\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #viewsTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listViewsComp }\" class=\"flex-wrapper\">\n <ng-content select=\"pep-list-views\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #rightContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n</ng-template>",
|
|
82
|
-
styles: [".pep-top-bar-container{display:grid;height:calc(1.5rem + .5rem + 2.5rem);height:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:101}.pep-top-bar-container .title{display:inline-flex!important;align-items:center;justify-content:center}.pep-top-bar-container .header-content{height:calc(.5rem + 2.5rem);height:calc(var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));margin-top:1.5rem;margin-top:var(--pep-top-bar-spacing-top,1.5rem)}.pep-top-bar-container .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container .header-content .main-layout .content{display:flex;justify-content:space-between;height:inherit}.pep-top-bar-container .header-content .main-layout .content .left-container,.pep-top-bar-container .header-content .main-layout .content .right-container{height:inherit}.pep-top-bar-container .footer{position:fixed;bottom:0;left:0;right:0;height:4.5rem;height:var(--pep-footer-bar-height,4.5rem)}.pep-top-bar-container .footer .content{display:flex;justify-content:space-between;margin-inline:calc(1rem * 2);margin-inline:calc(var(--pep-spacing-lg, 1rem) * 2);padding-top:.75rem;padding-top:var(--pep-footer-bar-spacing-top,.75rem)}@media (max-width:599px){.pep-top-bar-container .footer .content{margin-inline:1rem;margin-inline:var(--pep-spacing-lg,1rem)}}.pep-top-bar-container .left-container{display:flex;align-items:center}.pep-top-bar-container .right-container{display:flex;justify-content:flex-end;align-items:center}.pep-top-bar-container .flex-wrapper ::ng-deep>*{display:flex}.pep-top-bar-container .list-actions-wrapper ::ng-deep.pep-button{margin-right:.25rem;margin-right:var(--pep-spacing-xs,.25rem);margin-left:.25rem;margin-left:var(--pep-spacing-xs,.25rem)}.pep-top-bar-container:not(.inline) .pep-button,.pep-top-bar-container:not(.inline) .pepperi-button,.pep-top-bar-container:not(.inline) ::ng-deep .pep-button,.pep-top-bar-container:not(.inline) ::ng-deep .pepperi-button{height:2.5rem;height:var(--pep-top-bar-field-height,2.5rem);line-height:2.5rem;line-height:var(--pep-top-bar-field-height,2.5rem)}.pep-top-bar-container.inline{position:inherit;height:calc(.5rem + 2.5rem);height:calc(var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));width:100%}.pep-top-bar-container.inline .header-content{margin-top:0;height:2.5rem;height:var(--pep-top-bar-field-height,2.5rem);padding:0;position:inherit;width:inherit}.pep-top-bar-container.inline .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container.inline .header-content .main-layout .content{height:inherit;margin:0}"]
|
|
82
|
+
styles: [".pep-top-bar-container{display:grid;height:calc(1.5rem + .5rem + 2.5rem);height:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:101}.pep-top-bar-container .title{display:inline-flex!important;align-items:center;justify-content:center}.pep-top-bar-container .header-content{height:calc(.5rem + 2.5rem);height:calc(var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));margin-top:1.5rem;margin-top:var(--pep-top-bar-spacing-top,1.5rem)}.pep-top-bar-container .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container .header-content .main-layout .content{display:flex;justify-content:space-between;height:inherit}.pep-top-bar-container .header-content .main-layout .content .left-container,.pep-top-bar-container .header-content .main-layout .content .right-container{height:inherit}.pep-top-bar-container .footer{position:fixed;bottom:0;left:0;right:0;height:4.5rem;height:var(--pep-footer-bar-height,4.5rem)}.pep-top-bar-container .footer .content{display:flex;justify-content:space-between;margin-inline:calc(1rem * 2);margin-inline:calc(var(--pep-spacing-lg, 1rem) * 2);padding-top:.75rem;padding-top:var(--pep-footer-bar-spacing-top,.75rem)}@media (max-width:599px){.pep-top-bar-container .footer .content{margin-inline:1rem;margin-inline:var(--pep-spacing-lg,1rem)}}.pep-top-bar-container .left-container{display:flex;align-items:center}.pep-top-bar-container .right-container{display:flex;justify-content:flex-end;align-items:center}.pep-top-bar-container .flex-wrapper ::ng-deep>*{display:flex}.pep-top-bar-container .list-actions-wrapper ::ng-deep.pep-button{margin-right:.25rem;margin-right:var(--pep-spacing-xs,.25rem);margin-left:.25rem;margin-left:var(--pep-spacing-xs,.25rem)}.pep-top-bar-container:not(.inline) .pep-button,.pep-top-bar-container:not(.inline) .pepperi-button,.pep-top-bar-container:not(.inline) ::ng-deep .pep-button,.pep-top-bar-container:not(.inline) ::ng-deep .pepperi-button{height:2.5rem;height:var(--pep-top-bar-field-height,2.5rem);line-height:2.5rem;line-height:var(--pep-top-bar-field-height,2.5rem)}.pep-top-bar-container.inline{position:inherit;height:calc(.5rem + 2.5rem);height:calc(var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));width:100%}.pep-top-bar-container.inline .header-content{margin-top:0;height:2.5rem;height:var(--pep-top-bar-field-height,2.5rem);padding:0;position:inherit;width:inherit}.pep-top-bar-container.inline .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container.inline .header-content .main-layout .content{height:inherit;margin:0}", ".pep-top-bar-container{background:#fff;background:hsl(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%))}.pep-top-bar-container .footer{background-color:#fff;background-color:hsl(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%))}"]
|
|
83
83
|
},] }
|
|
84
84
|
];
|
|
85
85
|
PepTopBarComponent.ctorParameters = function () { return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-top-bar.umd.js","sources":["../../../projects/ngx-lib/top-bar/top-bar.component.ts","../../../projects/ngx-lib/top-bar/top-bar.module.ts","../../../projects/ngx-lib/top-bar/public-api.ts","../../../projects/ngx-lib/top-bar/pepperi-addons-ngx-lib-top-bar.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectorRef,\n ContentChild,\n ElementRef,\n OnDestroy,\n ViewChild,\n} from '@angular/core';\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport {\n PepCustomizationService,\n PepLayoutService,\n PepScreenSizeType,\n} from '@pepperi-addons/ngx-lib';\nimport { PepSearchComponent } from '@pepperi-addons/ngx-lib/search';\nimport {\n PepListActionsComponent,\n PepListChooserComponent,\n PepListSortingComponent,\n PepListTotalComponent,\n PepListViewsComponent,\n} from '@pepperi-addons/ngx-lib/list';\nimport { PepMenuStateType } from '@pepperi-addons/ngx-lib/menu';\nimport {\n IPepSearchStateChangeEvent,\n PepSearchStateType,\n} from '@pepperi-addons/ngx-lib/search';\nimport {\n IPepFooterStateChangeEvent,\n PepFooterStateType,\n} from './top-bar.model';\n\n@Component({\n selector: 'pep-top-bar',\n templateUrl: './top-bar.component.html',\n styleUrls: ['./top-bar.component.scss'],\n})\nexport class PepTopBarComponent implements AfterViewInit, AfterContentInit, OnDestroy {\n @Input() inline = false;\n @Input() title: string = null;\n\n @Output()\n footerStateChange: EventEmitter<IPepFooterStateChangeEvent> = new EventEmitter<IPepFooterStateChangeEvent>();\n\n @ViewChild('footerStartContent') footerStartContent: ElementRef;\n @ViewChild('footerEndContent') footerEndContent: ElementRef;\n\n @ContentChild(PepSearchComponent) searchComp: PepSearchComponent;\n @ContentChild(PepListActionsComponent)\n listActionsComp: PepListActionsComponent;\n @ContentChild(PepListChooserComponent)\n listChooserComp: PepListChooserComponent;\n @ContentChild(PepListTotalComponent) listTotalComp: PepListTotalComponent;\n @ContentChild(PepListSortingComponent)\n listSortingComp: PepListSortingComponent;\n @ContentChild(PepListViewsComponent) listViewsComp: PepListViewsComponent;\n\n hasFooterContent = null;\n isHidden = true;\n screenSize: PepScreenSizeType;\n // listActionsIsVisible = false;\n searchState: PepSearchStateType;\n searchIsOpenAndSmallDevice = false;\n footerState: PepFooterStateType;\n PepScreenSizeType = PepScreenSizeType;\n\n constructor(\n public customizationService: PepCustomizationService,\n public layoutService: PepLayoutService,\n private cdRef: ChangeDetectorRef\n ) { }\n\n ngAfterViewInit(): void {\n if (!this.inline) {\n this.hasFooterContent =\n this.footerStartContent?.nativeElement?.children?.length > 0 ||\n this.footerEndContent?.nativeElement?.children?.length > 0;\n }\n\n this.layoutService.onResize$.subscribe((size: PepScreenSizeType) => {\n this.screenSize = size;\n this.setSearchIsOpenAndSmallDevice();\n\n if (!this.inline) {\n this.setFooterState();\n }\n });\n\n this.isHidden = false;\n this.cdRef.detectChanges();\n }\n\n ngAfterContentInit() {\n if (this.searchComp) {\n this.searchComp.stateChange\n .subscribe(\n (searchStateChangeEvent: IPepSearchStateChangeEvent) => {\n this.searchState = searchStateChangeEvent.state;\n this.setSearchIsOpenAndSmallDevice();\n }\n )\n .unsubscribe();\n }\n }\n\n ngOnDestroy(): void {\n if (this.customizationService) {\n this.customizationService.hideFooter();\n }\n }\n\n private setSearchIsOpenAndSmallDevice(): void {\n // check if search is open and the device size is small or extra small\n this.searchIsOpenAndSmallDevice =\n this.screenSize > PepScreenSizeType.SM &&\n this.searchState === 'open';\n }\n\n private setFooterState() {\n const newFooterState: PepFooterStateType =\n this.hasFooterContent && this.screenSize >= PepScreenSizeType.MD\n ? 'visible'\n : 'hidden';\n\n if (this.footerState !== newFooterState) {\n this.footerState = newFooterState;\n this.cdRef.detectChanges();\n this.footerStateChange.emit({ state: this.footerState });\n\n if (this.footerState === 'visible') {\n this.customizationService.showFooter()\n } else {\n this.customizationService.hideFooter()\n }\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemMenu,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepSearchModule } from '@pepperi-addons/ngx-lib/search';\n\nimport { PepTopBarComponent } from './top-bar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n // Material modules,\n MatCommonModule,\n MatMenuModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepMenuModule,\n PepIconModule,\n PepSearchModule,\n ],\n exports: [PepTopBarComponent],\n declarations: [PepTopBarComponent],\n})\nexport class PepTopBarModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemMenu,\n pepIconSystemEdit,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/top-bar\n */\nexport * from './top-bar.module';\nexport * from './top-bar.component';\nexport * from './top-bar.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EventEmitter","PepScreenSizeType","Component","PepCustomizationService","PepLayoutService","ChangeDetectorRef","Input","Output","ViewChild","ContentChild","PepSearchComponent","PepListActionsComponent","PepListChooserComponent","PepListTotalComponent","PepListSortingComponent","PepListViewsComponent","pepIconSystemMenu","pepIconSystemEdit","NgModule","CommonModule","MatCommonModule","MatMenuModule","MatIconModule","PepNgxLibModule","PepMenuModule","PepIconModule","PepSearchModule","PepIconRegistry"],"mappings":";;;;;;;QAwEI,4BACW,oBAA6C,EAC7C,aAA+B,EAC9B,KAAwB;YAFzB,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,kBAAa,GAAb,aAAa,CAAkB;YAC9B,UAAK,GAAL,KAAK,CAAmB;YA/B3B,WAAM,GAAG,KAAK,CAAC;YACf,UAAK,GAAW,IAAI,CAAC;YAG9B,sBAAiB,GAA6C,IAAIA,iBAAY,EAA8B,CAAC;YAe7G,qBAAgB,GAAG,IAAI,CAAC;YACxB,aAAQ,GAAG,IAAI,CAAC;YAIhB,+BAA0B,GAAG,KAAK,CAAC;YAEnC,sBAAiB,GAAGC,wBAAiB,CAAC;SAMjC;QAEL,4CAAe,GAAf;YAAA,iBAkBC;;YAjBG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;gBACd,IAAI,CAAC,gBAAgB;oBACjB,CAAA,MAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,aAAa,0CAAE,QAAQ,0CAAE,MAAM,IAAG,CAAC;wBAC5D,CAAA,MAAA,MAAA,MAAA,IAAI,CAAC,gBAAg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|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-top-bar.umd.js","sources":["../../../projects/ngx-lib/top-bar/top-bar.component.ts","../../../projects/ngx-lib/top-bar/top-bar.module.ts","../../../projects/ngx-lib/top-bar/public-api.ts","../../../projects/ngx-lib/top-bar/pepperi-addons-ngx-lib-top-bar.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectorRef,\n ContentChild,\n ElementRef,\n OnDestroy,\n ViewChild,\n} from '@angular/core';\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport {\n PepCustomizationService,\n PepLayoutService,\n PepScreenSizeType,\n} from '@pepperi-addons/ngx-lib';\nimport { PepSearchComponent } from '@pepperi-addons/ngx-lib/search';\nimport {\n PepListActionsComponent,\n PepListChooserComponent,\n PepListSortingComponent,\n PepListTotalComponent,\n PepListViewsComponent,\n} from '@pepperi-addons/ngx-lib/list';\nimport { PepMenuStateType } from '@pepperi-addons/ngx-lib/menu';\nimport {\n IPepSearchStateChangeEvent,\n PepSearchStateType,\n} from '@pepperi-addons/ngx-lib/search';\nimport {\n IPepFooterStateChangeEvent,\n PepFooterStateType,\n} from './top-bar.model';\n\n@Component({\n selector: 'pep-top-bar',\n templateUrl: './top-bar.component.html',\n styleUrls: ['./top-bar.component.scss', './top-bar.component.theme.scss'],\n})\nexport class PepTopBarComponent implements AfterViewInit, AfterContentInit, OnDestroy {\n @Input() inline = false;\n @Input() title: string = null;\n\n @Output()\n footerStateChange: EventEmitter<IPepFooterStateChangeEvent> = new EventEmitter<IPepFooterStateChangeEvent>();\n\n @ViewChild('footerStartContent') footerStartContent: ElementRef;\n @ViewChild('footerEndContent') footerEndContent: ElementRef;\n\n @ContentChild(PepSearchComponent) searchComp: PepSearchComponent;\n @ContentChild(PepListActionsComponent)\n listActionsComp: PepListActionsComponent;\n @ContentChild(PepListChooserComponent)\n listChooserComp: PepListChooserComponent;\n @ContentChild(PepListTotalComponent) listTotalComp: PepListTotalComponent;\n @ContentChild(PepListSortingComponent)\n listSortingComp: PepListSortingComponent;\n @ContentChild(PepListViewsComponent) listViewsComp: PepListViewsComponent;\n\n hasFooterContent = null;\n isHidden = true;\n screenSize: PepScreenSizeType;\n // listActionsIsVisible = false;\n searchState: PepSearchStateType;\n searchIsOpenAndSmallDevice = false;\n footerState: PepFooterStateType;\n PepScreenSizeType = PepScreenSizeType;\n\n constructor(\n public customizationService: PepCustomizationService,\n public layoutService: PepLayoutService,\n private cdRef: ChangeDetectorRef\n ) { }\n\n ngAfterViewInit(): void {\n if (!this.inline) {\n this.hasFooterContent =\n this.footerStartContent?.nativeElement?.children?.length > 0 ||\n this.footerEndContent?.nativeElement?.children?.length > 0;\n }\n\n this.layoutService.onResize$.subscribe((size: PepScreenSizeType) => {\n this.screenSize = size;\n this.setSearchIsOpenAndSmallDevice();\n\n if (!this.inline) {\n this.setFooterState();\n }\n });\n\n this.isHidden = false;\n this.cdRef.detectChanges();\n }\n\n ngAfterContentInit() {\n if (this.searchComp) {\n this.searchComp.stateChange\n .subscribe(\n (searchStateChangeEvent: IPepSearchStateChangeEvent) => {\n this.searchState = searchStateChangeEvent.state;\n this.setSearchIsOpenAndSmallDevice();\n }\n )\n .unsubscribe();\n }\n }\n\n ngOnDestroy(): void {\n if (this.customizationService) {\n this.customizationService.hideFooter();\n }\n }\n\n private setSearchIsOpenAndSmallDevice(): void {\n // check if search is open and the device size is small or extra small\n this.searchIsOpenAndSmallDevice =\n this.screenSize > PepScreenSizeType.SM &&\n this.searchState === 'open';\n }\n\n private setFooterState() {\n const newFooterState: PepFooterStateType =\n this.hasFooterContent && this.screenSize >= PepScreenSizeType.MD\n ? 'visible'\n : 'hidden';\n\n if (this.footerState !== newFooterState) {\n this.footerState = newFooterState;\n this.cdRef.detectChanges();\n this.footerStateChange.emit({ state: this.footerState });\n\n if (this.footerState === 'visible') {\n this.customizationService.showFooter()\n } else {\n this.customizationService.hideFooter()\n }\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemMenu,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepSearchModule } from '@pepperi-addons/ngx-lib/search';\n\nimport { PepTopBarComponent } from './top-bar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n // Material modules,\n MatCommonModule,\n MatMenuModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepMenuModule,\n PepIconModule,\n PepSearchModule,\n ],\n exports: [PepTopBarComponent],\n declarations: [PepTopBarComponent],\n})\nexport class PepTopBarModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemMenu,\n pepIconSystemEdit,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/top-bar\n */\nexport * from './top-bar.module';\nexport * from './top-bar.component';\nexport * from './top-bar.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EventEmitter","PepScreenSizeType","Component","PepCustomizationService","PepLayoutService","ChangeDetectorRef","Input","Output","ViewChild","ContentChild","PepSearchComponent","PepListActionsComponent","PepListChooserComponent","PepListTotalComponent","PepListSortingComponent","PepListViewsComponent","pepIconSystemMenu","pepIconSystemEdit","NgModule","CommonModule","MatCommonModule","MatMenuModule","MatIconModule","PepNgxLibModule","PepMenuModule","PepIconModule","PepSearchModule","PepIconRegistry"],"mappings":";;;;;;;QAwEI,4BACW,oBAA6C,EAC7C,aAA+B,EAC9B,KAAwB;YAFzB,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,kBAAa,GAAb,aAAa,CAAkB;YAC9B,UAAK,GAAL,KAAK,CAA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K,4BAAuB;gCAEpCL,iBAAY,SAACM,0BAAqB;;;;QCzBnC,yBAAoB,eAAgC;YAAhC,oBAAe,GAAf,eAAe,CAAiB;YAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC;gBAC/BC,sBAAiB;gBACjBC,sBAAiB;aACpB,CAAC,CAAC;SACN;;;;gBAtBJC,aAAQ,SAAC;oBACN,OAAO,EAAE;wBACLC,mBAAY;;wBAEZC,sBAAe;wBACfC,kBAAa;wBACbC,oBAAa;;wBAEbC,sBAAe;wBACfC,oBAAa;wBACbC,kBAAa;wBACbC,sBAAe;qBAClB;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,YAAY,EAAE,CAAC,kBAAkB,CAAC;iBACrC;;;gBAvBGC,oBAAe;;;ICXnB;;;;ICAA;;;;;;;;;;;;;"}
|
|
@@ -3899,13 +3899,14 @@
|
|
|
3899
3899
|
};
|
|
3900
3900
|
PepCustomizationService.prototype.getFormControl = function (form, fieldKey, parentFieldKey) {
|
|
3901
3901
|
if (parentFieldKey === void 0) { parentFieldKey = null; }
|
|
3902
|
+
var _a;
|
|
3902
3903
|
var formControl = null;
|
|
3903
3904
|
if (form && form.controls) {
|
|
3904
3905
|
if (parentFieldKey === null) {
|
|
3905
3906
|
formControl = form.controls[fieldKey];
|
|
3906
3907
|
}
|
|
3907
3908
|
else {
|
|
3908
|
-
formControl = form.controls[parentFieldKey].get(fieldKey);
|
|
3909
|
+
formControl = (_a = form.controls[parentFieldKey]) === null || _a === void 0 ? void 0 : _a.get(fieldKey);
|
|
3909
3910
|
}
|
|
3910
3911
|
}
|
|
3911
3912
|
return formControl;
|
|
@@ -4538,6 +4539,7 @@
|
|
|
4538
4539
|
return PepCustomizationService;
|
|
4539
4540
|
}());
|
|
4540
4541
|
PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME = 'pep-field';
|
|
4542
|
+
PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME = 'pep-field-no-spacing';
|
|
4541
4543
|
PepCustomizationService.REM_STRING = 'rem';
|
|
4542
4544
|
PepCustomizationService.PX_STRING = 'px';
|
|
4543
4545
|
PepCustomizationService.USER_THEME = 'user_theme';
|