@pepperi-addons/ngx-lib 0.2.59 → 0.2.61-beta.3
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 +1 -1
- 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 +123 -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/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 +1 -1
- 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 +55 -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 +233 -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 +180 -278
- package/src/core/style/components/input.scss +21 -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 +89 -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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-query-builder.js","sources":["../../../projects/ngx-lib/query-builder/common/model/operator.ts","../../../projects/ngx-lib/query-builder/common/services/type-convertor.service.ts","../../../projects/ngx-lib/query-builder/query-builder-section/query-builder-section.component.ts","../../../projects/ngx-lib/query-builder/query-builder-item/query-builder-item.component.ts","../../../projects/ngx-lib/query-builder/common/model/type-map.ts","../../../projects/ngx-lib/query-builder/common/model/operator-unit.ts","../../../projects/ngx-lib/query-builder/common/services/output-query.service.ts","../../../projects/ngx-lib/query-builder/common/model/type.ts","../../../projects/ngx-lib/query-builder/query-builder.service.ts","../../../projects/ngx-lib/query-builder/query-builder.component.ts","../../../projects/ngx-lib/query-builder/query-builder.module.ts","../../../projects/ngx-lib/query-builder/public-api.ts","../../../projects/ngx-lib/query-builder/pepperi-addons-ngx-lib-query-builder.ts"],"sourcesContent":["import { PepSmartFilterOperators, IPepSmartFilterOperator } from '@pepperi-addons/ngx-lib/smart-filters';\nimport { PepSmartFilterType } from '@pepperi-addons/ngx-lib/smart-filters';\n\nexport interface IPepQueryBuilderOperator {\n legacy: string, //legacy Operator \n smartFilter: IPepSmartFilterOperator, //smart filter operator \n type: PepSmartFilterType[] | null //smart filter type\n}\n\nconst Equals: IPepQueryBuilderOperator = {\n legacy: 'IsEqual',\n smartFilter: PepSmartFilterOperators.Equals,\n type: ['boolean', 'int', 'text']\n};\n\nconst NotEqual: IPepQueryBuilderOperator = {\n legacy: 'IsNotEqual',\n smartFilter: PepSmartFilterOperators.NotEqual,\n type: null\n};\n\nconst LessThan: IPepQueryBuilderOperator = {\n legacy: '<',\n smartFilter: PepSmartFilterOperators.LessThan,\n type: null\n};\n\nconst GreaterThan: IPepQueryBuilderOperator = {\n legacy: '>',\n smartFilter: PepSmartFilterOperators.GreaterThan,\n type: null\n};\n\n/*\nconst GreaterThanOrEquals: IPepQueryBuilderOperator = {\n legacy: {\n operator: '>=',\n type: 'Integer'\n },\n smartFilter: {\n item: PepSmartFilterOperators.GreaterThanOrEquals,\n type: 'int'\n }\n};\n\nconst LessThanOrEquals: IPepQueryBuilderOperator = {\n legacy: {\n operator: '<=',\n type: 'Integer'\n },\n smartFilter: {\n item: PepSmartFilterOperators.LessThanOrEquals,\n type: 'int',\n type: 'Integer'\n }\n}; */\n\nconst NumberRange: IPepQueryBuilderOperator = {\n legacy: 'Between',\n smartFilter: PepSmartFilterOperators.NumberRange,\n type: ['int']\n};\n\nconst Contains: IPepQueryBuilderOperator = {\n legacy: 'Contains',\n smartFilter: PepSmartFilterOperators.Contains,\n type: null\n};\n\n/*\nconst BeginsWith: IPepQueryBuilderOperator = {\n legacy: {\n operator: 'BeginsWith',\n type: 'String'\n },\n smartFilter: {\n item: PepSmartFilterOperators.BeginsWith,\n type: 'text'\n }\n};\n\nconst EndsWith: IPepQueryBuilderOperator = {\n legacy: {\n operator: 'EndsWith',\n type: 'String'\n },\n smartFilter: {\n item: PepSmartFilterOperators.EndsWith,\n type: 'text'\n }\n};\n\nconst Before: IPepQueryBuilderOperator = {\n legacy: {\n operator: 'Before',\n type: 'Date'\n },\n smartFilter: {\n item: PepSmartFilterOperators.Before,\n type: 'date'\n }\n};\n\nconst After: IPepQueryBuilderOperator = {\n legacy: {\n operator: 'After',\n type: 'Date'\n },\n smartFilter: {\n item: PepSmartFilterOperators.After,\n type: 'date'\n }\n}; */\n\nconst InTheLast: IPepQueryBuilderOperator = {\n legacy: 'InTheLast',\n smartFilter: PepSmartFilterOperators.InTheLast,\n type: null\n};\n\nconst NotInTheLast: IPepQueryBuilderOperator = {\n legacy: 'NotInTheLast',\n smartFilter: PepSmartFilterOperators.NotInTheLast,\n type: null\n};\n\nconst Today: IPepQueryBuilderOperator = {\n legacy: 'Today',\n smartFilter: PepSmartFilterOperators.Today,\n type: null\n};\n\nconst ThisWeek: IPepQueryBuilderOperator = {\n legacy: 'ThisWeek',\n smartFilter: PepSmartFilterOperators.ThisWeek,\n type: null\n};\n\nconst ThisMonth: IPepQueryBuilderOperator = {\n legacy: 'ThisMonth',\n smartFilter: PepSmartFilterOperators.ThisMonth,\n type: null\n};\n\nconst DateRange: IPepQueryBuilderOperator = {\n legacy: 'Between',\n smartFilter: PepSmartFilterOperators.DateRange,\n type: ['date-time']\n};\n\nconst DueIn: IPepQueryBuilderOperator = {\n legacy: 'DueIn',\n smartFilter: PepSmartFilterOperators.DueIn,\n type: null\n};\n\nconst NotDueIn: IPepQueryBuilderOperator = {\n legacy: 'NotDueIn',\n smartFilter: PepSmartFilterOperators.NotDueIn,\n type: null\n};\n\nconst On: IPepQueryBuilderOperator = {\n legacy: 'On',\n smartFilter: PepSmartFilterOperators.On,\n type: null\n};\n\nconst IsEmpty: IPepQueryBuilderOperator = {\n legacy: 'IsEmpty',\n smartFilter: PepSmartFilterOperators.IsEmpty,\n type: null\n};\n\nconst IsNotEmpty: IPepQueryBuilderOperator = {\n legacy: 'IsNotEmpty',\n smartFilter: PepSmartFilterOperators.IsNotEmpty,\n type: null\n};\n\nconst In: IPepQueryBuilderOperator = {\n legacy: 'IsEqual',\n smartFilter: PepSmartFilterOperators.In,\n type: ['multi-select']\n};\n\n\nconst PepQueryBuilderOperators = [\n Equals,\n NotEqual,\n LessThan,\n // LessThanOrEquals,\n GreaterThan,\n // GreaterThanOrEquals,\n NumberRange,\n Contains,\n // BeginsWith,\n // EndsWith,\n // After,\n // Before,\n InTheLast,\n NotInTheLast,\n Today,\n ThisWeek,\n ThisMonth,\n DateRange,\n DueIn,\n NotDueIn,\n On,\n IsEmpty,\n IsNotEmpty,\n In\n]\n\n/**\n * gets a smart filter operator item\n * @param operator legacy operator\n * @param type smart filter's type\n * @returns smart filter operator item\n */\nexport function getSmartBuilderOperator(operator: string, type: PepSmartFilterType): IPepSmartFilterOperator | null {\n const smartFilterOperator = PepQueryBuilderOperators.find(item =>\n item.legacy === operator &&\n (item.type === null || item.type.includes(type))\n );\n return smartFilterOperator ? smartFilterOperator.smartFilter : null;\n}\n\n/**\n * gets a legacy operator value\n * @param operator smart filter operator item\n * @param type smart filter's type\n * @returns legacy operator value\n */\nexport function getLegacyOperator(operator: IPepSmartFilterOperator, type: PepSmartFilterType): string | null {\n const legacyOperator = PepQueryBuilderOperators.find(item =>\n item.smartFilter === operator &&\n (item.type === null || item.type.includes(type))\n );\n return legacyOperator ? legacyOperator.legacy : null;\n}\n","import { Injectable } from '@angular/core';\nimport { IPepOption } from '@pepperi-addons/ngx-lib';\n\n@Injectable()\nexport class PepTypeConvertorService {\n private readonly _operators: IPepOption[] = [];\n private readonly _booleans: IPepOption[] = [];\n\n public get operators(): IPepOption[] {\n return this._operators;\n }\n\n public get booleans(): IPepOption[] {\n return this._booleans;\n }\n\n constructor() {\n this.initOperators();\n this.initBooleans();\n }\n\n private initOperators() {\n this._operators.push({\n key: 'AND',\n value: 'And'\n });\n this._operators.push({\n key: 'OR',\n value: 'Or'\n });\n }\n\n private initBooleans() {\n this._booleans.push({\n key: 'True',\n value: 'True'\n });\n this._booleans.push({\n key: 'False',\n value: 'False'\n });\n }\n\n}","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n IPepButtonClickEvent,\n PepButton,\n} from '@pepperi-addons/ngx-lib/button';\nimport { IPepOption } from '@pepperi-addons/ngx-lib';\nimport { PepTypeConvertorService } from '../common/services/type-convertor.service';\nimport { IPepQueryDepth } from '../common/model/structure';\n\n@Component({\n selector: 'pep-query-builder-section',\n templateUrl: './query-builder-section.component.html',\n styleUrls: ['./query-builder-section.component.scss', './query-builder-section.component.theme.scss'],\n})\nexport class PepQueryBuilderSectionComponent {\n @Input() form: FormGroup;\n @Input() depth: IPepQueryDepth;\n @Input() hasFields = true;\n\n @Output()\n createSection = new EventEmitter();\n @Output()\n createItem = new EventEmitter();\n @Output()\n remove = new EventEmitter();\n @Output()\n operatorChange = new EventEmitter();\n\n @ViewChild('sectionContainer', { read: ViewContainerRef, static: true }) sectionContainer: ViewContainerRef;\n\n toggleButtons: Array<PepButton>;\n\n constructor(private _typeConvertorService: PepTypeConvertorService) {\n }\n\n ngOnInit() {\n this.initOperators();\n }\n\n get f() {\n return this.form.controls;\n }\n\n initOperators() {\n this.toggleButtons = this._typeConvertorService.operators.map((operator: IPepOption) => {\n return {\n key: operator.key,\n value: operator.value,\n callback: (event: IPepButtonClickEvent) =>\n this.onOperatorChanged(event)\n } as PepButton\n });\n }\n\n onOperatorChanged(event) {\n if (event?.source?.key) {\n this.f.operator.setValue(event.source.key);\n this.operatorChange.emit();\n }\n }\n\n onAddRuleClicked() {\n this.createItem.emit();\n }\n\n onAddRuleSetClicked() {\n this.createSection.emit();\n }\n\n onDeleteSectionClicked() {\n this.remove.emit();\n }\n\n\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { PepSmartFilterBaseField, IPepSmartFilterField } from '@pepperi-addons/ngx-lib/smart-filters';\nimport { IPepSmartFilterData } from '@pepperi-addons/ngx-lib/smart-filters';\nimport { IPepOption } from '@pepperi-addons/ngx-lib';\nimport { PepTypeConvertorService } from '../common/services/type-convertor.service';\nimport { IPepQueryBuilderFieldContainer } from '../common/model/field';\n\n@Component({\n selector: 'pep-query-builder-item',\n templateUrl: './query-builder-item.component.html',\n styleUrls: ['./query-builder-item.component.scss'],\n})\nexport class PepQueryBuilderItemComponent {\n @Input() formKey: string;\n _fields: Array<IPepQueryBuilderFieldContainer> = [];\n _options: IPepOption[] = [];\n @Input()\n set fields(list: Array<IPepQueryBuilderFieldContainer>) {\n if (list?.length > 0) {\n this._fields = list;\n this._options = list.map(field => {\n return {\n key: field.smart.id,\n value: field.smart.name\n }\n })\n }\n }\n _selectedField: PepSmartFilterBaseField = null;\n @Input()\n set selected(value: IPepQueryBuilderFieldContainer) {\n if (value) {\n this._selectedField = value.smart;\n this.queryForm.fieldType.setValue(value.query.fieldType);\n }\n }\n _filter: IPepSmartFilterData;\n @Input()\n set filter(value: IPepSmartFilterData) {\n if (value) {\n this._filter = value;\n }\n }\n _parentForm: FormGroup;\n @Input()\n set parentForm(value: FormGroup) {\n if (value) {\n this._parentForm = value;\n this.addToParentForm();\n }\n }\n\n @Output()\n filterChange = new EventEmitter();\n @Output()\n remove = new EventEmitter();\n\n form: FormGroup;\n\n constructor(\n private _fb: FormBuilder,\n public typeConvertorService: PepTypeConvertorService\n ) {\n this.setupForm();\n }\n\n ngOnInit() {\n //\n }\n\n get f() {\n return this.form.controls;\n }\n\n get queryForm() {\n return (this.f.query as FormGroup).controls;\n }\n\n setupForm() {\n this.form = this._fb.group({\n smart: this._fb.group({\n fieldId: this._fb.control(null),\n fieldType: this._fb.control(null),\n operator: this._fb.control(null),\n operatorUnit: this._fb.control(null),\n values: this._fb.group({\n first: this._fb.control(null),\n second: this._fb.control(null)\n })\n }),\n query: this._fb.group({\n fieldType: this._fb.control(null)\n })\n });\n }\n\n addToParentForm() {\n this._parentForm.setControl(this.formKey, this.form);\n }\n\n onFieldChanged(key) {\n const item = this._fields.find(field => field.smart.id === key);\n\n this.setupForm();\n this.queryForm.fieldType.setValue(item.query.fieldType);\n this.addToParentForm();\n\n /**\n * hack due to angular's change detection bug -\n * ERROR Error: There is no FormControl instance attached to form control element with name: [formControlName]\n */\n this._selectedField = null;\n setTimeout(() => {\n this._selectedField = item ? item.smart : null;\n }, 0);\n\n this._filter = null;\n }\n\n onFilterChanged() {\n if (this.form.valid) {\n this.filterChange.emit();\n }\n }\n\n onDeleteItemClicked() {\n this.remove.emit();\n }\n\n\n\n}\n","import { PepSmartFilterType } from '@pepperi-addons/ngx-lib/smart-filters';\n\n\nexport class PepQueryBuilderTypeMap {\n private map: Map<string, PepSmartFilterType>;\n\n constructor() {\n this.loadTypes();\n }\n\n private loadTypes() {\n this.map = new Map<string, PepSmartFilterType>();\n this.map.set('Bool', 'boolean');\n this.map.set('JsonBool', 'boolean');\n this.map.set('Integer', 'int');\n this.map.set('Double', 'int');\n this.map.set('String', 'text');\n this.map.set('Guid', 'text');\n this.map.set('Date', 'date');\n this.map.set('DateTime', 'date-time');\n this.map.set('MultipleStringValues', 'multi-select');\n }\n\n /**\n * Converts legacy field type to smart builder type\n * @param type legacy type\n * @returns smart builder field type\n */\n getSmartBuilderType(key: string): PepSmartFilterType | null {\n const item = this.map.get(key);\n return item ? item : null;\n }\n\n}\n\n","\nimport { IPepSmartFilterOperatorUnit, PepSmartFilterOperatorUnits } from '@pepperi-addons/ngx-lib/smart-filters';\n\ninterface IPepQueryBuilderOperationUnit {\n legacy: string,\n smartFilter: IPepSmartFilterOperatorUnit,\n}\n\nconst Days: IPepQueryBuilderOperationUnit = {\n legacy: 'Days',\n smartFilter: PepSmartFilterOperatorUnits.Days\n};\n\nconst Weeks: IPepQueryBuilderOperationUnit = {\n legacy: 'Weeks',\n smartFilter: PepSmartFilterOperatorUnits.Weeks\n};\n\nconst Months: IPepQueryBuilderOperationUnit = {\n legacy: 'Months',\n smartFilter: PepSmartFilterOperatorUnits.Months\n};\n\nconst Years: IPepQueryBuilderOperationUnit = {\n legacy: 'Years',\n smartFilter: PepSmartFilterOperatorUnits.Years\n};\n\nconst PepQueryBuilderOperationUnit = [\n Days,\n Weeks,\n Months,\n Years,\n];\n\n/**\n * gets a smart filter operation unit item\n * @param operationUnit legacy operation unit\n * @returns smart filter operation unit item\n */\nexport function getSmartBuilderOperationUnit(operationUnit: string): IPepSmartFilterOperatorUnit | null {\n const smartFilterOperationUnit: IPepQueryBuilderOperationUnit = PepQueryBuilderOperationUnit.find(unit => unit.legacy === operationUnit);\n return smartFilterOperationUnit ? smartFilterOperationUnit.smartFilter : null;\n}\n\n/**\n * gets a legacy operation unit value\n * @param operationUnit smart filter operation unit item\n * @returns legacy operation unit value\n */\nexport function getLegacyOperationUnit(operationUnit: IPepSmartFilterOperatorUnit): string | null {\n const legacyOperationUnit: IPepQueryBuilderOperationUnit = PepQueryBuilderOperationUnit.find(unit => unit.smartFilter === operationUnit);\n return legacyOperationUnit ? legacyOperationUnit.legacy : null;\n}\n","import { Injectable } from '@angular/core';\nimport { IPepQuerySection, IPepQueryItem } from '../model/legacy';\nimport { getLegacyOperator } from '../model/operator';\nimport { PepOperatorTypes } from '../model/type';\nimport { getLegacyOperationUnit } from '../model/operator-unit';\nimport { PepSmartFilterOperators } from '@pepperi-addons/ngx-lib/smart-filters';\n\n\n@Injectable()\nexport class PepOutputQueryService {\n private _complexIdCounter: number;\n private _expressionIdCounter: number;\n\n constructor() {\n //\n }\n\n /**\n * generates a legacy query structure \n * @param filters UI smart filters structure \n * @returns legacy query\n */\n generateQuery(filters: any) {\n this.initParams();\n\n return this.sectionWalk(filters);\n }\n\n /**\n * init params\n */\n private initParams() {\n this._complexIdCounter = 1;\n this._expressionIdCounter = 1;\n }\n\n /**\n * a recursive function dynamically builds legacy query structure\n * @param current UI object represents either a section or filter component\n * @returns section query data\n */\n private sectionWalk(current: any) {\n let section: IPepQuerySection | IPepQueryItem = null;\n\n Object.keys(current).forEach(key => {\n if (key.includes('item')) {\n section = this.addToSection(section, {\n ExpressionId: (this._expressionIdCounter++).toString(),\n ApiName: current[key].smart.fieldId,\n FieldType: current[key].query.fieldType,\n Operation: getLegacyOperator(current[key].smart.operator, current[key].smart.fieldType),\n Values: this.getItemValues(current[key].smart)\n } as IPepQueryItem, current.operator);\n } else if (key.includes('section')) {\n const childSection = this.sectionWalk(current[key]);\n if (childSection) {\n section = this.addToSection(section, childSection, current.operator);\n }\n }\n });\n\n return section;\n }\n\n /**\n * adds a legacy filter object to the current query structure\n * @param section section query data\n * @param item filter item\n * @param operator query operator\n * @returns \n */\n private addToSection(section: any, item: any, operator: string): any {\n return section ? this.createSection(section, item, operator) : item;\n }\n\n /**\n * creates a legacy complex object\n * @param left LeftNode object\n * @param right RightNode object\n * @param operator query operator\n * @returns legacy complex object\n */\n private createSection(left: any, right: any, operator: string): IPepQuerySection {\n return {\n ComplexId: (this._complexIdCounter++).toString(),\n LeftNode: left,\n RightNode: right,\n Operation: <PepOperatorTypes>operator\n }\n }\n\n /**\n * gets legacy filter values object\n * @param current UI filter object's values\n * @returns an array represents legacy values\n */\n private getItemValues(current: any) {\n let values: any[] = [];\n\n if (current?.values?.first) {\n if (current.operator === PepSmartFilterOperators.In) { //multi select \n values = current.values.first;\n } else if (\n current.operator === PepSmartFilterOperators.InTheLast ||\n current.operator === PepSmartFilterOperators.NotInTheLast ||\n current.operator === PepSmartFilterOperators.DueIn ||\n current.operator === PepSmartFilterOperators.NotDueIn\n ) { //operation unit \n values.push(current.values.first);\n if (current.operatorUnit) {\n values.push(getLegacyOperationUnit(current.operatorUnit));\n }\n } else {\n values.push(current.values.first);\n if (current.values.second) {\n values.push(current.values.second);\n }\n }\n }\n\n return values;\n }\n\n}","export enum PepOperatorTypes {\n And = 'AND',\n Or = 'OR'\n}\n\n","import { Injectable, ViewContainerRef, ComponentFactoryResolver } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { BehaviorSubject } from 'rxjs';\nimport { } from 'lodash';\nimport { IPepQueryBuilderField, IPepQuerySection, IPepQueryItem } from './common/model/legacy';\nimport {\n IPepSmartFilterField,\n IPepSmartFilterData,\n PepSmartFilterOperators,\n IPepSmartFilterOperator,\n PepSmartFilterType,\n createSmartFilter,\n createSmartFilterField,\n PepSmartFilterBaseField\n} from '@pepperi-addons/ngx-lib/smart-filters';\nimport { getSmartBuilderOperator } from './common/model/operator';\nimport { PepQueryBuilderSectionComponent } from './query-builder-section/query-builder-section.component';\nimport { PepQueryBuilderItemComponent } from './query-builder-item/query-builder-item.component';\nimport { IPepQueryBuilderFieldContainer } from './common/model/field';\nimport { PepQueryBuilderTypeMap } from './common/model/type-map';\nimport { getSmartBuilderOperationUnit } from './common/model/operator-unit';\nimport { PepOutputQueryService } from './common/services/output-query.service';\nimport { IPepQueryBuilderValues } from './common/model/filter';\nimport { PepOperatorTypes } from './common/model/type';\n\nconst MAX_STRUCTURE_DEPTH = 3;\n\n@Injectable()\nexport class PepQueryBuilderService {\n private _outputQuery$ = new BehaviorSubject<IPepQuerySection | IPepQueryItem>(null);\n\n private _smartFilterFields: Array<IPepQueryBuilderFieldContainer>;\n private _form: FormGroup;\n private _maxStructureDepth = MAX_STRUCTURE_DEPTH;\n\n public outputQuery$ = this._outputQuery$.asObservable();\n\n constructor(private _fb: FormBuilder, private _resolver: ComponentFactoryResolver, private _outputQueryService: PepOutputQueryService) {\n\n }\n\n set maxDepth(value) {\n this._maxStructureDepth = value;\n }\n\n get maxDepth() {\n return this._maxStructureDepth;\n }\n\n set fields(list: Array<IPepQueryBuilderField>) {\n this._smartFilterFields = this.convertToSmartFilterFields(list);\n }\n\n get hasFields(): boolean {\n return this._smartFilterFields?.length > 0;\n }\n\n set form(value: FormGroup) {\n this._form = value;\n }\n\n get form() {\n return this._form;\n }\n\n /**\n * builds a dynamic UI query structure\n * might has a different structure than the query's due to parent-child elements merge\n * @param query legacy query \n * @param containerRef reference to root element\n */\n buildQueryStructure(\n query: IPepQuerySection | IPepQueryItem,\n containerRef: ViewContainerRef\n ) {\n //update root operator \n if (this.hasProperty(query, 'ComplexId') &&\n query?.Operation &&\n query.Operation !== this._form.get('operator').value) {\n this._form.get('operator').setValue(query.Operation);\n }\n this.flatten(this._form.get('operator').value, query, containerRef, this._form, 0);\n }\n\n /**\n * checks if the object contains property\n * @param obj object\n * @param prop property name\n * @returns true if contains, false otherwise\n */\n private hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n\n /**\n * a recursive function dynamically builds UI filters structure\n * @param parentOperator parent legacy complex operator\n * @param current child legacy object (either another complex or expression type)\n * @param containerRef parent element\n * @param parentForm parent form\n */\n private flatten(parentOperator: string, current: IPepQuerySection | IPepQueryItem, containerRef: ViewContainerRef, parentForm: FormGroup, depth: number) {\n if (this.hasProperty(current, 'ComplexId')) {\n const section = current as IPepQuerySection;\n if (parentOperator === current.Operation) {\n this.flatten(current.Operation, section.LeftNode, containerRef, parentForm, depth);\n this.flatten(current.Operation, section.RightNode, containerRef, parentForm, depth);\n } else {\n const result = this.createSection(section.Operation, containerRef, parentForm, depth);\n this.flatten(section.Operation, section.LeftNode, result.containerRef, result.parentForm, depth + 1);\n this.flatten(section.Operation, section.RightNode, result.containerRef, result.parentForm, depth + 1);\n }\n } else if (this.hasProperty(current, 'ExpressionId')) {\n this.createItem(current as IPepQueryItem, containerRef, parentForm);\n }\n }\n\n /**\n * creates a container object of two or more child filter items\n * @param operator AND/OR operator\n * @param containerRef parent element\n * @param parentForm parent form\n * @param depth\n * @returns an object containing the current element and current form\n */\n createSection(operator: PepOperatorTypes, containerRef: ViewContainerRef, parentForm: FormGroup, depth: number) {\n const factory = this._resolver.resolveComponentFactory(PepQueryBuilderSectionComponent);\n const componentRef = containerRef.createComponent(factory);\n\n const sectionGroup = this._fb.group({\n operator: this._fb.control(operator)\n });\n let counter = 1;\n Object.keys(parentForm.controls).forEach(item => { if (item.includes('section')) { counter++; } });\n const formKey = `section${counter}`;\n parentForm.addControl(formKey, sectionGroup);\n\n componentRef.instance.form = sectionGroup;\n componentRef.instance.depth = {\n current: depth,\n max: this._maxStructureDepth\n };\n componentRef.instance.createSection.subscribe(() => {\n const section = this.createSection(PepOperatorTypes.And, componentRef.instance.sectionContainer, sectionGroup, depth + 1);\n this.createItem(null, section.containerRef, section.parentForm);\n });\n componentRef.instance.createItem.subscribe(() => {\n this.createItem(null, componentRef.instance.sectionContainer, sectionGroup);\n });\n componentRef.instance.remove.subscribe(() => {\n parentForm.removeControl(formKey);\n componentRef.destroy();\n this.createOutputQuery();\n });\n componentRef.instance.operatorChange.subscribe(() => {\n this.createOutputQuery();\n });\n\n return {\n containerRef: componentRef.instance.sectionContainer,\n parentForm: sectionGroup\n };\n }\n\n /**\n * creates a component represents filter item (leaf element - has no childs)\n * @param current filter legacy element\n * @param containerRef parent element\n * @param parentForm parent form\n */\n createItem(current: IPepQueryItem, containerRef: ViewContainerRef, parentForm: FormGroup) {\n const factory = this._resolver.resolveComponentFactory(PepQueryBuilderItemComponent);\n const componentRef = containerRef.createComponent(factory);\n\n let counter = 1;\n Object.keys(parentForm.controls).forEach(item => { if (item.includes('item')) { counter++; } });\n const formKey = `item${counter}`;\n\n componentRef.instance.formKey = formKey;\n componentRef.instance.fields = this._smartFilterFields;\n const selectedField = this.getSelectedField(current);\n if (selectedField) {\n componentRef.instance.selected = selectedField;\n if (current) {\n componentRef.instance.filter = this.getFilter(current, selectedField.smart);\n }\n }\n componentRef.instance.parentForm = parentForm;\n componentRef.instance.filterChange.subscribe(() => {\n this.createOutputQuery();\n });\n componentRef.instance.remove.subscribe(() => {\n parentForm.removeControl(formKey);\n componentRef.destroy();\n this.createOutputQuery();\n });\n }\n\n /**\n * creates a smart filter object\n * @param current filter legacy element\n * @param field filter's selected field\n * @returns smart filter object\n */\n private getFilter(current: IPepQueryItem, field: PepSmartFilterBaseField): IPepSmartFilterData | null {\n const operator: IPepSmartFilterOperator = getSmartBuilderOperator(current.Operation, field.type);\n if (operator) {\n const filterValues: IPepQueryBuilderValues = this.getFilterValues(current, operator, field);\n return createSmartFilter(\n current.ApiName,\n operator,\n filterValues.first,\n filterValues.second,\n filterValues.operationUnit\n );\n } else {\n return null;\n }\n }\n\n /**\n * get smart filter field\n * @param current filter legacy element\n * @returns smart filter field, if not found returns the first field\n */\n private getSelectedField(current: IPepQueryItem): IPepQueryBuilderFieldContainer | null {\n if (current) {\n const item = this._smartFilterFields.find(field => field.smart.id === current.ApiName);\n return item ? item : this._smartFilterFields?.length > 0 ? this._smartFilterFields[0] : null;\n } else {\n return this._smartFilterFields?.length > 0 ? this._smartFilterFields[0] : null;\n }\n }\n\n /**\n * gets smart filter's values data\n * @param current filter legacy element\n * @param operator smart filter operator\n * @param field filter's selected field\n * @returns object contains the filter values data\n */\n private getFilterValues(current: IPepQueryItem, operator: IPepSmartFilterOperator, field: any) {\n const data: IPepQueryBuilderValues = {\n first: null,\n second: null,\n operationUnit: null\n };\n\n if (operator === PepSmartFilterOperators.In) { //multi select \n //filter keys don't exist on field options\n data.first = current?.Values?.length > 0 ? current.Values.filter(item => {\n return field.options.find(option => option.key === item);\n }) : null;\n } else if (\n operator === PepSmartFilterOperators.InTheLast ||\n operator === PepSmartFilterOperators.NotInTheLast ||\n operator === PepSmartFilterOperators.DueIn ||\n operator === PepSmartFilterOperators.NotDueIn\n ) { //operation unit\n data.first = current?.Values?.length > 0 ? current.Values[0] : null;\n if (current?.Values?.length === 2) {\n data.operationUnit = getSmartBuilderOperationUnit(current.Values[1]);\n }\n } else {\n data.first = current?.Values?.length > 0 ? current.Values[0] : null;\n data.second = current?.Values?.length === 2 ? current.Values[1] : null;\n }\n\n return data;\n }\n\n /**\n * converts legacy fields to smart filter fields\n * @param fields legacy fields array\n * @returns smart filter fields array\n */\n private convertToSmartFilterFields(fields: Array<IPepQueryBuilderField>): Array<IPepQueryBuilderFieldContainer> {\n if (fields?.length > 0) {\n const typeMapper = new PepQueryBuilderTypeMap();\n\n return fields.map((field) => {\n return {\n smart: createSmartFilterField(\n {\n id: field.FieldID,\n name: field.Title,\n options: field.OptionalValues?.map(option => {\n return {\n key: option.Key,\n value: option.Value\n }\n })\n }, typeMapper.getSmartBuilderType(field.FieldType) as PepSmartFilterType),\n query: {\n fieldType: field.FieldType\n }\n }\n })\n } else {\n return [];\n }\n }\n\n /**\n * creates a legacy output query \n */\n createOutputQuery() {\n if (this._form.valid) {\n const query = this._outputQueryService.generateQuery(this._form.value);\n this._outputQuery$.next(query);\n }\n }\n\n}","import {\n Component,\n EventEmitter,\n Input,\n Output,\n OnInit,\n OnDestroy,\n ViewChild\n} from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\nimport { PepQueryBuilderSectionComponent } from './query-builder-section/query-builder-section.component';\nimport { IPepQueryBuilderField, IPepQuerySection, IPepQueryItem } from './common/model/legacy';\nimport { PepQueryBuilderService } from './query-builder.service';\nimport { PepTypeConvertorService } from './common/services/type-convertor.service';\nimport { PepOutputQueryService } from './common/services/output-query.service';\nimport { IPepQueryDepth } from './common/model/structure';\nimport { PepOperatorTypes } from './common/model/type';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'pep-query-builder',\n templateUrl: './query-builder.component.html',\n styleUrls: ['./query-builder.component.scss'],\n providers: [PepQueryBuilderService, PepTypeConvertorService, PepOutputQueryService]\n})\nexport class PepQueryBuilderComponent implements OnInit, OnDestroy {\n _query: IPepQuerySection | IPepQueryItem = null;\n @Input()\n set query(object: IPepQuerySection | IPepQueryItem) {\n this._query = object;\n this.loadQuery()\n }\n @Input()\n set fields(list: Array<IPepQueryBuilderField>) {\n this.queryBuilderService.fields = list;\n this.hasFields = this.queryBuilderService.hasFields;\n this.loadQuery();\n }\n @Input()\n set maxDepth(value: number) {\n this.queryBuilderService.maxDepth = value;\n }\n\n @Output()\n queryChange: EventEmitter<IPepQuerySection | IPepQueryItem> = new EventEmitter<IPepQuerySection | IPepQueryItem>();\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ViewChild('rootContainer', { static: true }) root: PepQueryBuilderSectionComponent;\n\n _formSubscription$: Subscription;\n _outputQuerySubscription$: Subscription;\n _lastFormValidStatus = true;\n depth: IPepQueryDepth;\n hasFields = false;\n\n constructor(\n private _fb: FormBuilder,\n public queryBuilderService: PepQueryBuilderService\n ) {\n this.setupForm();\n this.initDepth();\n this._formSubscription$ = this.queryBuilderService.form.valueChanges.subscribe((val) => {\n if (this.queryBuilderService.form.valid !== this._lastFormValidStatus) {\n this._lastFormValidStatus = this.queryBuilderService.form.valid;\n this.formValidationChange.emit(this._lastFormValidStatus);\n }\n });\n this._outputQuerySubscription$ = this.queryBuilderService.outputQuery$.subscribe((outputQuery) => {\n this.queryChange.emit(outputQuery);\n });\n }\n\n ngOnInit() {\n //\n }\n\n setupForm() {\n this.queryBuilderService.form = this._fb.group({\n operator: this._fb.control(PepOperatorTypes.And)\n });\n }\n\n initDepth() {\n this.depth = {\n current: 0,\n max: this.queryBuilderService.maxDepth\n }\n }\n\n /**\n * builds UI query structure as soon as both the fields and query loads\n */\n loadQuery() {\n if (\n this._query &&\n this.queryBuilderService.hasFields &&\n this.root?.sectionContainer\n ) {\n this.queryBuilderService.buildQueryStructure(this._query, this.root.sectionContainer);\n }\n }\n\n onCreateSection() {\n const section = this.queryBuilderService.createSection(PepOperatorTypes.And, this.root.sectionContainer, this.queryBuilderService.form, 1);\n this.queryBuilderService.createItem(null, section.containerRef, section.parentForm);\n }\n\n onCreateItem() {\n this.queryBuilderService.createItem(null, this.root.sectionContainer, this.queryBuilderService.form);\n }\n\n onOperatorChange() {\n this.queryBuilderService.createOutputQuery();\n }\n\n ngOnDestroy() {\n if (this._formSubscription$) {\n this._formSubscription$.unsubscribe();\n }\n if (this._outputQuerySubscription$) {\n this._outputQuerySubscription$.unsubscribe();\n }\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { PepSmartFiltersModule } from '@pepperi-addons/ngx-lib/smart-filters';\nimport { PepSelectModule } from '@pepperi-addons/ngx-lib/select';\nimport { PepButtonModule } from '@pepperi-addons/ngx-lib/button';\nimport { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';\n\nimport { PepQueryBuilderComponent } from './query-builder.component';\nimport { PepQueryBuilderSectionComponent } from './query-builder-section/query-builder-section.component';\nimport { PepQueryBuilderItemComponent } from './query-builder-item/query-builder-item.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FlexLayoutModule,\n PepSelectModule,\n PepButtonModule,\n PepGroupButtonsModule,\n PepSmartFiltersModule\n ],\n exports: [\n PepQueryBuilderComponent\n ],\n declarations: [\n PepQueryBuilderComponent,\n PepQueryBuilderSectionComponent,\n PepQueryBuilderItemComponent\n ]\n})\nexport class PepQueryBuilderModule { }\n","/*\n * Public API Surface of ngx-lib/query-builder\n */\nexport * from './query-builder.module';\nexport * from './query-builder.component';\nexport * from './query-builder.service';\nexport * from './common/model/legacy';\n\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {PepOutputQueryService as ɵa} from './common/services/output-query.service';\nexport {PepTypeConvertorService as ɵb} from './common/services/type-convertor.service';\nexport {PepQueryBuilderItemComponent as ɵd} from './query-builder-item/query-builder-item.component';\nexport {PepQueryBuilderSectionComponent as ɵc} from './query-builder-section/query-builder-section.component';"],"names":[],"mappings":";;;;;;;;;;AASA,MAAM,MAAM,GAA6B;IACrC,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,uBAAuB,CAAC,MAAM;IAC3C,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,QAAQ,GAA6B;IACvC,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,uBAAuB,CAAC,QAAQ;IAC7C,IAAI,EAAE,IAAI;CACb,CAAC;AAEF,MAAM,QAAQ,GAA6B;IACvC,MAAM,EAAE,GAAG;IACX,WAAW,EAAE,uBAAuB,CAAC,QAAQ;IAC7C,IAAI,EAAE,IAAI;CACb,CAAC;AAEF,MAAM,WAAW,GAA6B;IAC1C,MAAM,EAAE,GAAG;IACX,WAAW,EAAE,uBAAuB,CAAC,WAAW;IAChD,IAAI,EAAE,IAAI;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,WAAW,GAA6B;IAC1C,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,uBAAuB,CAAC,WAAW;IAChD,IAAI,EAAE,CAAC,KAAK,CAAC;CAChB,C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mB;gBAC7B,uRAA6C;gBAE7C,SAAS,EAAE,CAAC,sBAAsB,EAAE,uBAAuB,EAAE,qBAAqB,CAAC;;aACtF;;;YAfQ,WAAW;YAGX,sBAAsB;;;oBAe1B,KAAK;qBAKL,KAAK;uBAML,KAAK;0BAKL,MAAM;mCAEN,MAAM;mBAGN,SAAS,SAAC,eAAe,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MCfnC,qBAAqB;;;YAnBjC,QAAQ,SAAC;gBACN,OAAO,EAAE;oBACL,YAAY;oBACZ,mBAAmB;oBACnB,gBAAgB;oBAChB,eAAe;oBACf,eAAe;oBACf,qBAAqB;oBACrB,qBAAqB;iBACxB;gBACD,OAAO,EAAE;oBACL,wBAAwB;iBAC3B;gBACD,YAAY,EAAE;oBACV,wBAAwB;oBACxB,+BAA+B;oBAC/B,4BAA4B;iBAC/B;aACJ;;;AChCD;;;;ACAA;;;;;;"}
|
|
@@ -36,6 +36,7 @@ class PepRichHtmlTextareaComponent {
|
|
|
36
36
|
this.form = null;
|
|
37
37
|
this.isActive = false;
|
|
38
38
|
this.showTitle = true;
|
|
39
|
+
this.renderTitle = true;
|
|
39
40
|
this._layoutType = 'form';
|
|
40
41
|
this.inlineMode = false;
|
|
41
42
|
this.valueChange = new EventEmitter();
|
|
@@ -100,6 +101,9 @@ class PepRichHtmlTextareaComponent {
|
|
|
100
101
|
this.setFieldHeight();
|
|
101
102
|
this.setDefaultForm();
|
|
102
103
|
this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
|
|
104
|
+
if (!this.renderTitle) {
|
|
105
|
+
this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
|
|
106
|
+
}
|
|
103
107
|
}
|
|
104
108
|
this.quillContent = this.value;
|
|
105
109
|
}
|
|
@@ -194,9 +198,9 @@ class PepRichHtmlTextareaComponent {
|
|
|
194
198
|
PepRichHtmlTextareaComponent.decorators = [
|
|
195
199
|
{ type: Component, args: [{
|
|
196
200
|
selector: 'pep-rich-html-textarea',
|
|
197
|
-
template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\">\n <div class=\"pep-textarea-container pep-report-textarea\" [ngClass]=\"{ 'stand-alone': standAlone,\n 'right-alignment': xAlignment == 'right', 'one-row': !isFormView && rowSpan === 1,\n 'pep-textarea-card-container': layoutType === 'card'}\">\n <pep-field-title *ngIf=\"isFormView\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [maxFieldCharacters]=\"inlineMode && !disabled && !readonly ? maxFieldCharacters : 0\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\" [inputLength]=\"quillContent?.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\"\n [ngClass]=\"{ 'pep-table-textarea': layoutType === 'table', 'active': active, 'ignore-disabled': disabled }\">\n <textarea [hidden]=\"true\" matInput [formControlName]=\"key\"></textarea>\n\n <ng-container *ngIf=\"inlineMode; then inlineBlock; else notInlineBlock\"></ng-container>\n\n <ng-template #inlineBlock>\n <ng-container *ngTemplateOutlet=\"quilTemplate; context: {inDialog: false}\"></ng-container>\n </ng-template>\n <ng-template #notInlineBlock>\n\n <!-- We can use the quill-view-html\n <quill-view-html class=\"body-sm rich-text-cont \"\n [ngStyle]=\"{ 'text-align': xAlignment == 'right' ? 'right' : 'left' }\" [content]=\"value | pepSafeHtml\"\n theme=\"snow\" [style.height]=\"fieldHeight\"></quill-view-html> \n -->\n\n <div class=\"body-sm rich-text-cont \"\n [ngStyle]=\"{ 'text-align': xAlignment == 'right' ? 'right' : 'left' }\"\n [innerHtml]=\"value | pepSafeHtml\" [style.height]=\"fieldHeight\">\n </div>\n </ng-template>\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\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 <div class=\"pep-textarea-card-container card-flex-container\"\n [ngClass]=\"{'one-row': rowSpan === 1, 'pep-button weak': isActive && !disabled}\"\n [ngStyle]=\"{ '-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\" class=\"body-sm value wrap\" [innerHtml]=\"value | pepSafeHtml\"></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-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 <div class=\"pep-textarea-card-container card-flex-container one-row\">\n <span [id]=\"key\" class=\"wrap\" [innerHtml]=\"value | pepSafeHtml\"></span>\n </div>\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 #richTextEditorDialogTemplate>\n <div class=\"rich-text-editor-container\">\n <button mat-button [mat-dialog-close]=\"null\" class=\"pep-button icon-button md weak pull-right flip\">\n <mat-icon>\n <pep-icon name=\"system_close\">\n </pep-icon>\n </mat-icon>\n </button>\n <ng-container *ngTemplateOutlet=\"quilTemplate; context: {inDialog: true}\"></ng-container>\n <div mat-dialog-actions class=\" pep-border-top\">\n <div class=\"pep-spacing-element-negative\">\n <button mat-button [mat-dialog-close]=\"null\" class=\"pep-spacing-element pep-button md weak\">\n {{'ACTIONS.CANCEL' | translate}}\n </button>\n <button mat-button [mat-dialog-close]=\"quillContentDialog || ''\" [disabled]=\"disabled\"\n class=\"pep-spacing-element pep-button md strong \">\n {{'ACTIONS.SAVE' | translate}}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #quilTemplate let-inDialog=\"inDialog\">\n <quill-editor id=\"{{inDialog ? 'quill-editor-dialog' : 'quill-editor-inline'}}\"\n [class]=\"inDialog ? 'dialog-quill' : 'inline-quill'\" [ngClass]=\"{ 'rich-text-cont': !inDialog }\"\n placeholder=\"{{'RICH_TEXTAREA.HINT' | translate}}\" [ngModel]=\"inDialog ? quillContentDialog : quillContent\"\n [sanitize]=\"true\" [readOnly]=\"disabled\" [maxLength]=\"maxFieldCharacters\" [required]=\"mandatory\"\n (onEditorCreated)=\"onEditorCreated($event, inDialog)\" (onContentChanged)=\"onContentChanged($event, inDialog)\"\n (onBlur)=\"onBlur($event, inDialog)\" (onFocus)=\"onFocus($event, inDialog)\" theme=\"\">\n <div *ngIf=\"!disabled\" quill-editor-toolbar>\n <div class=\"pep-spacing-element-negative\">\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.font\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-font select-arrow\">\n <option selected></option>\n <option value=\"serif\"></option>\n <option value=\"monospace\"></option>\n </select>\n <select *ngIf=\"toolbarOptions?.size\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-size select-arrow\">\n <option value=\"small\"></option>\n <option selected></option>\n <option value=\"large\"></option>\n <option value=\"huge\"></option>\n </select>\n </span>\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.header\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-header select-arrow\">\n <option value=\"1\"></option>\n <option value=\"2\"></option>\n <option value=\"3\"></option>\n <!-- \n <option value=\"4\"></option>\n <option value=\"5\"></option>\n <option value=\"6\"></option> \n -->\n <option value=\"false\" selected></option>\n </select>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.bold\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-bold\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.italic\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-italic\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.underline\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-underline\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.strike\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-strike\"></button>\n </span>\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.link\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-link\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.image\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-image\"></button>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.ordered\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-list\" value=\"ordered\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.bullet\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-list\" value=\"bullet\"></button>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.color\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-color\"></select>\n <select *ngIf=\"toolbarOptions?.background\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-background\"></select>\n </span>\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.align\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-align\">\n <option selected></option>\n <option value=\"center\"></option>\n <option value=\"right\"></option>\n <option value=\"justify\"></option>\n </select>\n </span>\n </div>\n </div>\n </quill-editor>\n</ng-template>",
|
|
201
|
+
template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\">\n <div class=\"pep-textarea-container pep-report-textarea\" [ngClass]=\"{ 'stand-alone': standAlone,\n 'right-alignment': xAlignment == 'right', 'one-row': !isFormView && rowSpan === 1,\n 'pep-textarea-card-container': layoutType === 'card'}\">\n <pep-field-title *ngIf=\"renderTitle && isFormView\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\"\n [maxFieldCharacters]=\"inlineMode && !disabled && !readonly ? maxFieldCharacters : 0\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\" [inputLength]=\"quillContent?.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\"\n [ngClass]=\"{ 'pep-table-textarea': layoutType === 'table', 'active': active, 'ignore-disabled': disabled }\">\n <textarea [hidden]=\"true\" matInput [formControlName]=\"key\"></textarea>\n\n <ng-container *ngIf=\"inlineMode; then inlineBlock; else notInlineBlock\"></ng-container>\n\n <ng-template #inlineBlock>\n <ng-container *ngTemplateOutlet=\"quilTemplate; context: {inDialog: false}\"></ng-container>\n </ng-template>\n <ng-template #notInlineBlock>\n\n <!-- We can use the quill-view-html\n <quill-view-html class=\"body-sm rich-text-cont \"\n [ngStyle]=\"{ 'text-align': xAlignment == 'right' ? 'right' : 'left' }\" [content]=\"value | pepSafeHtml\"\n theme=\"snow\" [style.height]=\"fieldHeight\"></quill-view-html> \n -->\n\n <div class=\"body-sm rich-text-cont \"\n [ngStyle]=\"{ 'text-align': xAlignment == 'right' ? 'right' : 'left' }\"\n [innerHtml]=\"value | pepSafeHtml\" [style.height]=\"fieldHeight\">\n </div>\n </ng-template>\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\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 <div class=\"pep-textarea-card-container card-flex-container\"\n [ngClass]=\"{'one-row': rowSpan === 1, 'pep-button weak': isActive && !disabled}\"\n [ngStyle]=\"{ '-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\" class=\"body-sm value wrap\" [innerHtml]=\"value | pepSafeHtml\"></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-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 <div class=\"pep-textarea-card-container card-flex-container one-row\">\n <span [id]=\"key\" class=\"wrap\" [innerHtml]=\"value | pepSafeHtml\"></span>\n </div>\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 #richTextEditorDialogTemplate>\n <div class=\"rich-text-editor-container\">\n <button mat-button [mat-dialog-close]=\"null\" class=\"pep-button icon-button md weak pull-right flip\">\n <mat-icon>\n <pep-icon name=\"system_close\">\n </pep-icon>\n </mat-icon>\n </button>\n <ng-container *ngTemplateOutlet=\"quilTemplate; context: {inDialog: true}\"></ng-container>\n <div mat-dialog-actions class=\" pep-border-top\">\n <div class=\"pep-spacing-element-negative\">\n <button mat-button [mat-dialog-close]=\"null\" class=\"pep-spacing-element pep-button md weak\">\n {{'ACTIONS.CANCEL' | translate}}\n </button>\n <button mat-button [mat-dialog-close]=\"quillContentDialog || ''\" [disabled]=\"disabled\"\n class=\"pep-spacing-element pep-button md strong \">\n {{'ACTIONS.SAVE' | translate}}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #quilTemplate let-inDialog=\"inDialog\">\n <quill-editor id=\"{{inDialog ? 'quill-editor-dialog' : 'quill-editor-inline'}}\"\n [class]=\"inDialog ? 'dialog-quill' : 'inline-quill'\" [ngClass]=\"{ 'rich-text-cont': !inDialog }\"\n placeholder=\"{{'RICH_TEXTAREA.HINT' | translate}}\" [ngModel]=\"inDialog ? quillContentDialog : quillContent\"\n [sanitize]=\"true\" [readOnly]=\"disabled\" [maxLength]=\"maxFieldCharacters\" [required]=\"mandatory\"\n (onEditorCreated)=\"onEditorCreated($event, inDialog)\" (onContentChanged)=\"onContentChanged($event, inDialog)\"\n (onBlur)=\"onBlur($event, inDialog)\" (onFocus)=\"onFocus($event, inDialog)\" theme=\"\">\n <div *ngIf=\"!disabled\" quill-editor-toolbar>\n <div class=\"pep-spacing-element-negative\">\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.font\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-font select-arrow\">\n <option selected></option>\n <option value=\"serif\"></option>\n <option value=\"monospace\"></option>\n </select>\n <select *ngIf=\"toolbarOptions?.size\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-size select-arrow\">\n <option value=\"small\"></option>\n <option selected></option>\n <option value=\"large\"></option>\n <option value=\"huge\"></option>\n </select>\n </span>\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.header\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-header select-arrow\">\n <option value=\"1\"></option>\n <option value=\"2\"></option>\n <option value=\"3\"></option>\n <!-- \n <option value=\"4\"></option>\n <option value=\"5\"></option>\n <option value=\"6\"></option> \n -->\n <option value=\"false\" selected></option>\n </select>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.bold\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-bold\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.italic\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-italic\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.underline\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-underline\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.strike\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-strike\"></button>\n </span>\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.link\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-link\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.image\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-image\"></button>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.ordered\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-list\" value=\"ordered\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.bullet\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-list\" value=\"bullet\"></button>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.color\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-color\"></select>\n <select *ngIf=\"toolbarOptions?.background\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-background\"></select>\n </span>\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.align\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-align\">\n <option selected></option>\n <option value=\"center\"></option>\n <option value=\"right\"></option>\n <option value=\"justify\"></option>\n </select>\n </span>\n </div>\n </div>\n </quill-editor>\n</ng-template>",
|
|
198
202
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
199
|
-
styles: [":host{height:inherit;display:block}.pep-textarea-container ::ng-deep.mat-form-field-infix,.pepperi-textarea-container ::ng-deep.mat-form-field-infix{margin-left:calc(.75rem * -1);margin-left:calc(var(--pep-spacing-md, .75rem) * -1)}.pep-textarea-container.right-alignment ::ng-deep.mat-form-field-infix,.pepperi-textarea-container.right-alignment ::ng-deep.mat-form-field-infix{margin-left:unset;margin-right:calc(.75rem * -1);margin-right:calc(var(--pep-spacing-md, .75rem) * -1)}.vertical-separator{display:none}"]
|
|
203
|
+
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}.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:block}.pep-textarea-container ::ng-deep.mat-form-field-infix,.pepperi-textarea-container ::ng-deep.mat-form-field-infix{margin-left:calc(.75rem * -1);margin-left:calc(var(--pep-spacing-md, .75rem) * -1)}.pep-textarea-container.right-alignment ::ng-deep.mat-form-field-infix,.pepperi-textarea-container.right-alignment ::ng-deep.mat-form-field-infix{margin-left:unset;margin-right:calc(.75rem * -1);margin-right:calc(var(--pep-spacing-md, .75rem) * -1)}.vertical-separator{display: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}.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}.mat-form-field.mat-form-field-disabled .mat-form-field-flex{color:#1a1a1a;color:hsl(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%))}.right-alignment quill-editor.inline-quill::ng-deep .ql-container .ql-editor{padding-right:unset;padding-left:calc(.5rem + 1rem);padding-left:calc(var(--pep-spacing-sm, .5rem) + 1rem)}quill-editor.inline-quill::ng-deep .ql-container .ql-editor{width:calc(100% + 1rem);padding-right:calc(.5rem + 1rem);padding-right:calc(var(--pep-spacing-sm, .5rem) + 1rem)}quill-editor ::ng-deep .ql-toolbar{display:flex;padding:0!important;border:unset}quill-editor ::ng-deep .ql-toolbar .ql-transparent{opacity:.9}quill-editor ::ng-deep .ql-toolbar .ql-formats{margin-right:0!important;margin-bottom:.5rem}quill-editor ::ng-deep .ql-toolbar .ql-formats button{height:2.5rem}quill-editor ::ng-deep .ql-toolbar .ql-formats button svg{width:1.25rem!important;float:unset!important}quill-editor ::ng-deep .ql-toolbar .ql-formats button.ql-active{box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);position:relative}quill-editor ::ng-deep .ql-toolbar .ql-formats button.ql-active:not(.keep-background-on-focus){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%))}quill-editor ::ng-deep .ql-toolbar .ql-formats button.ql-active:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid #1a1a1a;border:1px solid hsl(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%))}quill-editor ::ng-deep .ql-toolbar .ql-formats button:focus{box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);position:relative}quill-editor ::ng-deep .ql-toolbar .ql-formats button:focus:not(.keep-background-on-focus){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%))}quill-editor ::ng-deep .ql-toolbar .ql-formats button:focus:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid #1a1a1a;border:1px solid hsl(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%))}quill-editor ::ng-deep .ql-toolbar .ql-formats button:active{box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);position:relative}quill-editor ::ng-deep .ql-toolbar .ql-formats button:active:not(.keep-background-on-focus){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%))}quill-editor ::ng-deep .ql-toolbar .ql-formats button:active:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid #1a1a1a;border:1px solid hsl(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%))}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-stroke{stroke:rgba(26,26,26,.8);stroke:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.8)}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-fill{fill:rgba(26,26,26,.8);fill:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.8)}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker:not(.ql-color-picker) .ql-picker-options .ql-picker-item{outline:unset!important;width:100%;height:auto;padding:.25rem .5rem;padding:var(--pep-spacing-xs,.25rem) var(--pep-spacing-sm,.5rem);display:grid}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker:not(.ql-color-picker) .ql-picker-options .ql-picker-item:hover{background:rgba(26,26,26,.16);background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.16)}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker:not(.ql-color-picker) .ql-picker-options .ql-picker-item:active{box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);background:rgba(26,26,26,.24)!important;background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.24)!important}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker:not(.ql-color-picker) .ql-picker-options .ql-picker-item:active:not(.keep-background-on-focus){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%))}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker:not(.ql-color-picker) .ql-picker-options .ql-picker-item:disabled{box-shadow:unset;border:unset;color:rgba(26,26,26,.35)!important;color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)!important;background:rgba(26,26,26,.04)!important;background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.04)!important}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker:not(.ql-color-picker) .ql-picker-options .ql-picker-item:disabled:after{border:unset}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker:not(.ql-color-picker) .ql-picker-options .ql-picker-item:disabled .svg-icon{fill:rgba(26,26,26,.35);fill:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker:not(.ql-color-picker) .ql-picker-options .ql-picker-item:disabled .svg-icon.stroke{fill:unset;stroke:rgba(26,26,26,.35);stroke:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-color-picker,quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-icon-picker{width:unset}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker .ql-picker-label{outline:none;display:grid;grid-auto-flow:column;align-items:center;line-height:1rem;border:unset}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker .ql-picker-label svg{width:1.5rem}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker .ql-picker-label:after{content:url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dH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IEMxMi42Njc3MzgzLDE3LjE5MTE2MjQgMTEuMzMyMjYxNywxNy4xOTExNjI0IDEwLjUwODU2NDksMTYuNDI2NTEyOSBMNC4zMDg4ODYzMywxMC42NzEyNjM4IEMzLjg5NzAzNzg5LDEwLjI4ODkzOTEgMy44OTcwMzc4OSw5LjY2OTA2ODI2IDQuMzA4ODg2MzMsOS4yODY3NDM1NCBDNC43MjA3MzQ3OCw4LjkwNDQxODgyIDUuMzg4NDczMDMsOC45MDQ0MTg4MiA1LjgwMDMyMTQ4LDkuMjg2NzQzNTQgWiIKICAgICBmaWxsLXJ1bGU9ImV2ZW5vZGQiCiAgICAgZmlsbC1vcGFjaXR5PSIuNSIgLz4KPC9zdmc+Cg==\");cursor:pointer;display:grid;height:inherit;justify-content:center;align-content:center}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.select-arrow .ql-picker-label:before{line-height:unset}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.select-arrow .ql-picker-label svg{display:none}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker .ql-picker-options{border-radius:.25rem;border-radius:var(--pep-border-radius-md,.25rem);box-sizing:content-box;padding:unset;box-shadow:0 .25rem .5rem 0 rgba(26,26,26,.32);box-shadow:var(--pep-shadow-sm-offset,0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.32);border:1px solid #1a1a1a;border:1px solid hsl(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%))}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-color-picker .ql-picker-options{padding:.25rem .5rem;padding:var(--pep-spacing-xs,.25rem) var(--pep-spacing-sm,.5rem);width:140px}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-color-picker .ql-picker-options:focus{outline:unset!important}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-color-picker .ql-picker-options .ql-picker-item:focus{outline:unset!important}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-expanded{box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);position:relative}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-expanded:not(.keep-background-on-focus){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%))}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-expanded:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid #1a1a1a;border:1px solid hsl(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%))}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#1766a6;stroke:hsl(var(--pep-color-text-link-h,207),var(--pep-color-text-link-s,76%),var(--pep-color-text-link-l,37%))}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#1766a6;fill:hsl(var(--pep-color-text-link-h,207),var(--pep-color-text-link-s,76%),var(--pep-color-text-link-l,37%))}quill-editor ::ng-deep .ql-toolbar .ql-formats .ql-picker.ql-expanded .ql-picker-label{border:unset}quill-editor ::ng-deep .ql-toolbar .vertical-separator{border-color:rgba(26,26,26,.24);border-color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.24)}@media (max-width:568px){quill-editor ::ng-deep .ql-toolbar .ql-list{display:none}}@media (max-width:599px){quill-editor ::ng-deep .ql-toolbar .ql-italic,quill-editor ::ng-deep .ql-toolbar .ql-underline{display:none}}@media (max-width:460px){quill-editor ::ng-deep .ql-toolbar .ql-header,quill-editor ::ng-deep .ql-toolbar .ql-image,quill-editor ::ng-deep .ql-toolbar .ql-italic,quill-editor ::ng-deep .ql-toolbar .ql-list,quill-editor ::ng-deep .ql-toolbar .ql-underline{display:none}}quill-editor ::ng-deep .ql-container{height:16rem;border:unset;border-top:1px solid rgba(26,26,26,.24)!important;border-top:1px solid hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.24)!important}quill-editor ::ng-deep .ql-container .ql-editor{padding:.5rem 0;padding:var(--pep-spacing-sm,.5rem) 0}quill-editor ::ng-deep .ql-container .ql-editor.ql-blank:before{right:0;left:0}quill-editor ::ng-deep .ql-container .ql-tooltip.ql-flip{left:0!important}"]
|
|
200
204
|
},] }
|
|
201
205
|
];
|
|
202
206
|
PepRichHtmlTextareaComponent.ctorParameters = () => [
|
|
@@ -220,6 +224,7 @@ PepRichHtmlTextareaComponent.propDecorators = {
|
|
|
220
224
|
form: [{ type: Input }],
|
|
221
225
|
isActive: [{ type: Input }],
|
|
222
226
|
showTitle: [{ type: Input }],
|
|
227
|
+
renderTitle: [{ type: Input }],
|
|
223
228
|
layoutType: [{ type: Input }],
|
|
224
229
|
inlineMode: [{ type: Input }],
|
|
225
230
|
toolbarOptions: [{ type: Input }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-rich-html-textarea.js","sources":["../../../projects/ngx-lib/rich-html-textarea/rich-html-textarea.component.ts","../../../projects/ngx-lib/rich-html-textarea/rich-html-textarea.module.ts","../../../projects/ngx-lib/rich-html-textarea/public-api.ts","../../../projects/ngx-lib/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n ElementRef,\n Renderer2,\n TemplateRef,\n ViewChild,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepRichHtmlTextareaField,\n} from '@pepperi-addons/ngx-lib';\nimport {\n PepDialogService,\n PepDialogData,\n} from '@pepperi-addons/ngx-lib/dialog';\nimport { SafeHtml, DomSanitizer } from '@angular/platform-browser';\n\nexport interface IPepRichHtmlTextareaToolbarOptions {\n font?: any;\n size?: any;\n header?: any;\n bold?: any;\n italic?: any;\n underline?: any;\n strike?: any;\n link?: any;\n image?: any;\n ordered?: any;\n bullet?: any;\n color?: any;\n background?: any;\n align?: any;\n}\n\n@Component({\n selector: 'pep-rich-html-textarea',\n templateUrl: './rich-html-textarea.component.html',\n styleUrls: ['./rich-html-textarea.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepRichHtmlTextareaComponent\n implements OnInit, OnChanges, 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() 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 controlType = 'richhtmltextarea';\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 @Input() inlineMode = false;\n\n protected _toolbarOptions: IPepRichHtmlTextareaToolbarOptions;\n @Input()\n get toolbarOptions(): IPepRichHtmlTextareaToolbarOptions {\n return this._toolbarOptions;\n }\n set toolbarOptions(options: IPepRichHtmlTextareaToolbarOptions) {\n if (options) {\n this._toolbarOptions = options;\n }\n }\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @ViewChild('richTextEditorDialogTemplate', { read: TemplateRef })\n richTextEditorDialogTemplate: TemplateRef<any>;\n quillContent = '';\n quillContentDialog = '';\n\n fieldHeight = '';\n standAlone = false;\n active = false;\n\n constructor(\n private sanitizer: DomSanitizer,\n private dialogService: PepDialogService,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) {\n this.toolbarOptions = this.getDefaultToolbarOptions();\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 PepRichHtmlTextareaField({\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 this.quillContent = this.value;\n }\n\n ngOnChanges(): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n getDefaultToolbarOptions(): IPepRichHtmlTextareaToolbarOptions {\n return {\n font: false,\n size: false,\n header: true,\n bold: true,\n italic: true,\n underline: true,\n strike: false,\n link: true,\n image: true,\n ordered: true,\n bullet: true,\n color: true,\n background: false,\n align: true,\n };\n }\n\n changeValue(value: any): void {\n if (value !== this.value) {\n this.value = value;\n this.quillContent = 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 // minWidth: '50vw',\n // maxWidth: '90vw',\n // maxHeight: '90vh',\n },\n 'large'\n );\n\n // If disabled open regular modal as html mode.\n if (this.disabled || this.readonly) {\n const data = new PepDialogData({\n title: this.label,\n content: this.quillContent,\n showFooter: false,\n });\n this.dialogService.openDefaultDialog(data, config);\n } else {\n this.quillContentDialog = this.quillContent;\n const dialogRef = this.dialogService.openDialog(\n this.richTextEditorDialogTemplate,\n {},\n config\n );\n\n dialogRef.afterClosed().subscribe((value) => {\n if (value !== undefined && value !== null) {\n this.changeValue(value);\n }\n });\n }\n }\n\n // Init quillContent in case that there are html tags...\n onEditorCreated(quill: any, inDialog: boolean): void {\n if (!inDialog) {\n this.quillContent = quill.getText();\n }\n }\n\n onContentChanged(obj: any, inDialog: boolean): void {\n if (inDialog) {\n this.quillContentDialog = obj.html;\n } else {\n this.quillContent = obj.html;\n }\n }\n\n onBlur(obj: any, inDialog: boolean): void {\n if (!inDialog) {\n this.active = false;\n this.changeValue(this.quillContent);\n }\n }\n\n onFocus(obj: any, inDialog: boolean): void {\n if (!inDialog) {\n this.active = true;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } 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 { MatMenuModule } from '@angular/material/menu';\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 { QuillModule } from 'ngx-quill';\n\nimport { PepRichHtmlTextareaComponent } from './rich-html-textarea.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatMenuModule,\n MatIconModule,\n MatDialogModule,\n // External modules\n QuillModule.forRoot(),\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n PepDialogModule,\n ],\n exports: [PepRichHtmlTextareaComponent],\n declarations: [PepRichHtmlTextareaComponent],\n})\nexport class PepRichHtmlTextareaModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemClose,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/rich-html-textarea\n */\nexport * from './rich-html-textarea.module';\nexport * from './rich-html-textarea.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAoDa,4BAA4B;IAkFrC,YACY,SAAuB,EACvB,aAA+B,EAC/B,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;QAJnB,cAAS,GAAT,SAAS,CAAc;QACvB,kBAAa,GAAb,aAAa,CAAkB;QAC/B,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,aAAQ,GAAR,QAAQ,CAAW;QACnB,YAAO,GAAP,OAAO,CAAY;QArFtB,QAAG,GAAG,EAAE,CAAC;QACT,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,c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YANhB,uBAAuB;YATvB,SAAS;YADT,UAAU;;;kBA8CT,KAAK;oBACL,KAAK;oBACL,KAAK;wBACL,KAAK;uBACL,KAAK;uBACL,KAAK;iCACL,KAAK;yBACL,KAAK;sBAGL,KAAK;sBAUL,KAAK;mBAqBL,KAAK;uBACL,KAAK;wBACL,KAAK;yBAGL,KAAK;yBASL,KAAK;6BAGL,KAAK;0BAUL,MAAM;2CAGN,SAAS,SAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;;MCzEvD,yBAAyB;IAClC,YAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;QAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC;YAC/B,iBAAiB;YACjB,kBAAkB;SACrB,CAAC,CAAC;KACN;;;YA/BJ,QAAQ,SAAC;gBACN,OAAO,EAAE;oBACL,YAAY;oBACZ,mBAAmB;oBACnB,WAAW;;oBAEX,eAAe;oBACf,eAAe;oBACf,kBAAkB;oBAClB,cAAc;oBACd,aAAa;oBACb,aAAa;oBACb,eAAe;;oBAEf,WAAW,CAAC,OAAO,EAAE;;oBAErB,eAAe;oBACf,aAAa;oBACb,mBAAmB;oBACnB,oBAAoB;oBACpB,eAAe;iBAClB;gBACD,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE,CAAC,4BAA4B,CAAC;aAC/C;;;YApCG,eAAe;;;ACfnB;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-rich-html-textarea.js","sources":["../../../projects/ngx-lib/rich-html-textarea/rich-html-textarea.component.ts","../../../projects/ngx-lib/rich-html-textarea/rich-html-textarea.module.ts","../../../projects/ngx-lib/rich-html-textarea/public-api.ts","../../../projects/ngx-lib/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n ElementRef,\n Renderer2,\n TemplateRef,\n ViewChild,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepRichHtmlTextareaField,\n} from '@pepperi-addons/ngx-lib';\nimport {\n PepDialogService,\n PepDialogData,\n} from '@pepperi-addons/ngx-lib/dialog';\nimport { SafeHtml, DomSanitizer } from '@angular/platform-browser';\n\nexport interface IPepRichHtmlTextareaToolbarOptions {\n font?: any;\n size?: any;\n header?: any;\n bold?: any;\n italic?: any;\n underline?: any;\n strike?: any;\n link?: any;\n image?: any;\n ordered?: any;\n bullet?: any;\n color?: any;\n background?: any;\n align?: any;\n}\n\n@Component({\n selector: 'pep-rich-html-textarea',\n templateUrl: './rich-html-textarea.component.html',\n styleUrls: ['./rich-html-textarea.component.scss', './rich-html-textarea.component.theme.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepRichHtmlTextareaComponent\n implements OnInit, OnChanges, 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() 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 controlType = 'richhtmltextarea';\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 @Input() inlineMode = false;\n\n protected _toolbarOptions: IPepRichHtmlTextareaToolbarOptions;\n @Input()\n get toolbarOptions(): IPepRichHtmlTextareaToolbarOptions {\n return this._toolbarOptions;\n }\n set toolbarOptions(options: IPepRichHtmlTextareaToolbarOptions) {\n if (options) {\n this._toolbarOptions = options;\n }\n }\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @ViewChild('richTextEditorDialogTemplate', { read: TemplateRef })\n richTextEditorDialogTemplate: TemplateRef<any>;\n quillContent = '';\n quillContentDialog = '';\n\n fieldHeight = '';\n standAlone = false;\n active = false;\n\n constructor(\n private sanitizer: DomSanitizer,\n private dialogService: PepDialogService,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) {\n this.toolbarOptions = this.getDefaultToolbarOptions();\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 PepRichHtmlTextareaField({\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 this.quillContent = this.value;\n }\n\n ngOnChanges(): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n getDefaultToolbarOptions(): IPepRichHtmlTextareaToolbarOptions {\n return {\n font: false,\n size: false,\n header: true,\n bold: true,\n italic: true,\n underline: true,\n strike: false,\n link: true,\n image: true,\n ordered: true,\n bullet: true,\n color: true,\n background: false,\n align: true,\n };\n }\n\n changeValue(value: any): void {\n if (value !== this.value) {\n this.value = value;\n this.quillContent = 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 // minWidth: '50vw',\n // maxWidth: '90vw',\n // maxHeight: '90vh',\n },\n 'large'\n );\n\n // If disabled open regular modal as html mode.\n if (this.disabled || this.readonly) {\n const data = new PepDialogData({\n title: this.label,\n content: this.quillContent,\n showFooter: false,\n });\n this.dialogService.openDefaultDialog(data, config);\n } else {\n this.quillContentDialog = this.quillContent;\n const dialogRef = this.dialogService.openDialog(\n this.richTextEditorDialogTemplate,\n {},\n config\n );\n\n dialogRef.afterClosed().subscribe((value) => {\n if (value !== undefined && value !== null) {\n this.changeValue(value);\n }\n });\n }\n }\n\n // Init quillContent in case that there are html tags...\n onEditorCreated(quill: any, inDialog: boolean): void {\n if (!inDialog) {\n this.quillContent = quill.getText();\n }\n }\n\n onContentChanged(obj: any, inDialog: boolean): void {\n if (inDialog) {\n this.quillContentDialog = obj.html;\n } else {\n this.quillContent = obj.html;\n }\n }\n\n onBlur(obj: any, inDialog: boolean): void {\n if (!inDialog) {\n this.active = false;\n this.changeValue(this.quillContent);\n }\n }\n\n onFocus(obj: any, inDialog: boolean): void {\n if (!inDialog) {\n this.active = true;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } 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 { MatMenuModule } from '@angular/material/menu';\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 { QuillModule } from 'ngx-quill';\n\nimport { PepRichHtmlTextareaComponent } from './rich-html-textarea.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatMenuModule,\n MatIconModule,\n MatDialogModule,\n // External modules\n QuillModule.forRoot(),\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n PepDialogModule,\n ],\n exports: [PepRichHtmlTextareaComponent],\n declarations: [PepRichHtmlTextareaComponent],\n})\nexport class PepRichHtmlTextareaModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemClose,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/rich-html-textarea\n */\nexport * from './rich-html-textarea.module';\nexport * from './rich-html-textarea.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAoDa,4BAA4B;IAmFrC,YACY,SAAuB,EACvB,aAA+B,EAC/B,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;QAJnB,cAAS,GAAT,SAAS,CAAc;QACvB,kBAAa,GAAb,aAAa,C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AY,EAAE,CAAC,4BAA4B,CAAC;aAC/C;;;YApCG,eAAe;;;ACfnB;;;;ACAA;;;;;;"}
|
|
@@ -34,6 +34,7 @@ class PepSelectComponent {
|
|
|
34
34
|
this.isActive = false;
|
|
35
35
|
this.showTitle = true;
|
|
36
36
|
this.emptyOption = true;
|
|
37
|
+
this.renderTitle = true;
|
|
37
38
|
this.valueChange = new EventEmitter();
|
|
38
39
|
this.formValidationChange = new EventEmitter();
|
|
39
40
|
this.standAlone = false;
|
|
@@ -118,6 +119,9 @@ class PepSelectComponent {
|
|
|
118
119
|
this.standAlone = true;
|
|
119
120
|
this.setDefaultForm();
|
|
120
121
|
this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
|
|
122
|
+
if (!this.renderTitle) {
|
|
123
|
+
this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
|
|
124
|
+
}
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
127
|
ngOnChanges(changes) {
|
|
@@ -183,9 +187,9 @@ class PepSelectComponent {
|
|
|
183
187
|
PepSelectComponent.decorators = [
|
|
184
188
|
{ type: Component, args: [{
|
|
185
189
|
selector: 'pep-select',
|
|
186
|
-
template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <ng-container *ngIf=\"type == 'multi'; then multiSelectBlock; else regularSelectBlock\"></ng-container>\n <ng-template #regularSelectBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment === 'right' ? 'rtl' : 'ltr' }}\">\n <mat-select #select [required]=\"mandatory ? mandatory : undefined\" matInput disableOptionCentering\n class=\"body-sm text-align-{{ xAlignment }}\" [id]=\"key\"\n [ngClass]=\"{'right-alignment': xAlignment === 'right'}\"\n [placeholder]=\"disabled || readonly ? '' : ('SELECT.HINT' | translate)\"\n [(ngModel)]=\"selectedValueModel\" [ngModelOptions]=\"{standalone: true}\" [disabled]=\"disabled\"\n (selectionChange)=\"selectionChange($event)\" (openedChange)=\"openedChange($event)\"\n title=\"{{ fieldFormattedValue }}\">\n <mat-option *ngIf=\"emptyOption\" value=\"\" [title]=\"'LIST.NONE' | translate\">{{ 'LIST.NONE' |\n translate }}</mat-option>\n <mat-option *ngFor=\"let option of options\" [value]=\"option.key\" [title]=\"option.value\">{{\n option.value }}</mat-option>\n </mat-select>\n <mat-error>\n <span class=\"body-xs\" [title]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"\n [innerText]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"></span>\n </mat-error>\n </mat-form-field>\n </ng-template>\n <ng-template #multiSelectBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment === 'right' ? 'rtl' : 'ltr' }}\">\n <mat-select #select multiple [required]=\"mandatory ? mandatory : undefined\" matInput\n disableOptionCentering class=\"body-sm text-align-{{ xAlignment }}\" [id]=\"key\"\n [ngClass]=\"{'right-alignment': xAlignment === 'right'}\"\n [placeholder]=\"disabled || readonly ? '' : ('SELECT.HINT' | translate)\"\n [(ngModel)]=\"selectedValuesModel\" [ngModelOptions]=\"{standalone: true}\" [disabled]=\"disabled\"\n (openedChange)=\"openedChange($event)\" title=\"{{ fieldFormattedValue }}\">\n <mat-option *ngFor=\"let option of options\" [value]=\"option.key\" [title]=\"option.value\">{{\n option.value }}</mat-option>\n </mat-select>\n <mat-error><span class=\"body-xs\" [title]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"\n [innerText]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"> </span>\n </mat-error>\n </mat-form-field>\n </ng-template>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"!parentFieldKey\" [label]=\"label\" [mandatory]=\"mandatory\"
|
|
190
|
+
template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <ng-container *ngIf=\"type == 'multi'; then multiSelectBlock; else regularSelectBlock\"></ng-container>\n <ng-template #regularSelectBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment === 'right' ? 'rtl' : 'ltr' }}\">\n <mat-select #select [required]=\"mandatory ? mandatory : undefined\" matInput disableOptionCentering\n class=\"body-sm text-align-{{ xAlignment }}\" [id]=\"key\"\n [ngClass]=\"{'right-alignment': xAlignment === 'right'}\"\n [placeholder]=\"disabled || readonly ? '' : ('SELECT.HINT' | translate)\"\n [(ngModel)]=\"selectedValueModel\" [ngModelOptions]=\"{standalone: true}\" [disabled]=\"disabled\"\n (selectionChange)=\"selectionChange($event)\" (openedChange)=\"openedChange($event)\"\n title=\"{{ fieldFormattedValue }}\">\n <mat-option *ngIf=\"emptyOption\" value=\"\" [title]=\"'LIST.NONE' | translate\">{{ 'LIST.NONE' |\n translate }}</mat-option>\n <mat-option *ngFor=\"let option of options\" [value]=\"option.key\" [title]=\"option.value\">{{\n option.value }}</mat-option>\n </mat-select>\n <mat-error>\n <span class=\"body-xs\" [title]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"\n [innerText]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"></span>\n </mat-error>\n </mat-form-field>\n </ng-template>\n <ng-template #multiSelectBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment === 'right' ? 'rtl' : 'ltr' }}\">\n <mat-select #select multiple [required]=\"mandatory ? mandatory : undefined\" matInput\n disableOptionCentering class=\"body-sm text-align-{{ xAlignment }}\" [id]=\"key\"\n [ngClass]=\"{'right-alignment': xAlignment === 'right'}\"\n [placeholder]=\"disabled || readonly ? '' : ('SELECT.HINT' | translate)\"\n [(ngModel)]=\"selectedValuesModel\" [ngModelOptions]=\"{standalone: true}\" [disabled]=\"disabled\"\n (openedChange)=\"openedChange($event)\" title=\"{{ fieldFormattedValue }}\">\n <mat-option *ngFor=\"let option of options\" [value]=\"option.key\" [title]=\"option.value\">{{\n option.value }}</mat-option>\n </mat-select>\n <mat-error><span class=\"body-xs\" [title]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"\n [innerText]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"> </span>\n </mat-error>\n </mat-form-field>\n </ng-template>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"!parentFieldKey && renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\"\n [ngClass]=\"{'one-row': rowSpan === 1, 'pep-button weak': isActive && !disabled}\"\n [class]=\"'text-align-' + xAlignment\" (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }} </span>\n <span [id]=\"key\" title=\"{{ fieldFormattedValue }}\" class=\"body-sm value\">{{ fieldFormattedValue\n }}</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 </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\"></ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <span [id]=\"key\" class=\"body-sm pep-report-input\" [ngClass]=\"{readonly: disabled}\"\n title=\"{{ fieldFormattedValue }}\">{{ fieldFormattedValue }}</span>\n </ng-template>\n </ng-container>\n</ng-container>",
|
|
187
191
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
188
|
-
styles: [":host{height:inherit;display:grid}:host>*{align-self:center}"]
|
|
192
|
+
styles: [":host{height:inherit;display:grid}:host>*{align-self:center}::ng-deep .mat-select-trigger{display:flex;align-content:center;height:inherit}::ng-deep .mat-select-value{max-width:inherit;display:grid;align-self:center}::ng-deep .mat-select-arrow{width:1.5rem;height:1.5rem;margin:0;display:flex;align-items:center;justify-content:center}::ng-deep .mat-select-arrow:after{content:url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgaWQ9InN2ZzQiCiAgIHZlcnNpb249IjEuMSIKICAgdmlld0JveD0iMCAwIDI0IDI0IgogICBoZWlnaHQ9IjE2IgogICB3aWR0aD0iMTYiPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTEwIj4KICAgIDxyZGY6UkRGPgogICAgICA8Y2M6V29yawogICAgICAgICByZGY6YWJvdXQ9IiI+CiAgICAgICAgPGRjOmZvcm1hdD5pbWFnZS9zdmcreG1sPC9kYzpmb3JtYXQ+CiAgICAgICAgPGRjOnR5cGUKICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIiAvPgogICAgICA8L2NjOldvcms+CiAgICA8L3JkZjpSREY+CiAgPC9tZXRhZGF0YT4KICA8ZGVmcwogICAgIGlkPSJkZWZzOCIgLz4KICA8cGF0aAogICAgIGlkPSJwYXRoMiIKICAgICBkPSJNNS44MDAzMjE0OCw5LjI4Njc0MzU0IEwxMS4yNTQyODI0LDEzLjIwMjc1ODMgQzExLjY2NjEzMDksMTMuNTg1MDgzIDEyLjMzMzg2OTEsMTMuNTg1MDgzIDEyLjc0NTcxNzYsMTMuMjAyNzU4MyBMMTguMTk5Njc4NSw5LjI4Njc0MzU0IEMxOC42MTE1MjcsOC45MDQ0MTg4MiAxOS4yNzkyNjUyLDguOTA0NDE4ODIgMTkuNjkxMTEzNyw5LjI4Njc0MzU0IEMyMC4xMDI5NjIxLDkuNjY5MDY4MjYgMjAuMTAyOTYyMSwxMC4yODg5MzkxIDE5LjY5MTExMzcsMTAuNjcxMjYzOCBMMTMuNDkxNDM1MSwxNi40MjY1MTI5IEMxMi42Njc3MzgzLDE3LjE5MTE2MjQgMTEuMzMyMjYxNywxNy4xOTExNjI0IDEwLjUwODU2NDksMTYuNDI2NTEyOSBMNC4zMDg4ODYzMywxMC42NzEyNjM4IEMzLjg5NzAzNzg5LDEwLjI4ODkzOTEgMy44OTcwMzc4OSw5LjY2OTA2ODI2IDQuMzA4ODg2MzMsOS4yODY3NDM1NCBDNC43MjA3MzQ3OCw4LjkwNDQxODgyIDUuMzg4NDczMDMsOC45MDQ0MTg4MiA1LjgwMDMyMTQ4LDkuMjg2NzQzNTQgWiIKICAgICBmaWxsLXJ1bGU9ImV2ZW5vZGQiCiAgICAgZmlsbC1vcGFjaXR5PSIuNSIgLz4KPC9zdmc+Cg==\");cursor:pointer;width:1rem;height:1rem}::ng-deep .mat-select-disabled{pointer-events:none}::ng-deep .mat-select-disabled .mat-select-arrow:after{content:none}::ng-deep .mat-select-panel .mat-pseudo-checkbox{width:1rem;height:1rem;border-radius:.25rem}::ng-deep .mat-select-panel .mat-pseudo-checkbox:after{width:0;height:0}::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-checked{content:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNy41MTExNjM5LDcuMDAwNjI5NjggQzE3LjEzNTI3Myw3LjAxMDk5Mjg1IDE2Ljc3OTE1ODIsNy4xNjgzMTkwOSAxNi41MTYzMjg4LDcuNDM3NzU0MjEgQzE0LjIyNjEzMzksOS43MzI2NTE5MiAxMi4xMzU2Nzc4LDExLjk4MjQwMjIgOS45MzY5MTEzNSwxNC4yMjgxOTczIEw3LjM1MTc4NzA4LDEyLjE1NTYxMiBDNy4wNTIyMDMwMywxMS45MTUzODI5IDYuNjY5NzI4MTIsMTEuODA0MjI0MiA2LjI4ODE2OTY2LDExLjg0NjYyMjMgQzUuOTA1Njk0NzUsMTEuODg5MDE1NSA1LjU1NzEyODY0LDEyLjA4MTIwMDggNS4zMTY4OTcwNiwxMi4zODE3MzUxIEM1LjA3NzYwODQ2LDEyLjY4MTMxOTEgNC45NjY0NDk4MSwxMy4wNjM3OTQgNS4wMDg4NDc4NywxMy40NDUzNTI1IEM1LjA1MTI0MTExLDEzLjgyNzgyNzQgNS4yNDM0MjYzOCwxNC4xNzYzOTM1IDUuNTQyOTk1OTUsMTQuNDE2NjI1MSBMOS4xNjA1NzgyLDE3LjMxMDY5MDkgQzkuNzM5MDA1NDksMTcuNzcwNDEzMiAxMC41Njk5NCwxNy43MjIzNzE3IDExLjA4OTk1NTQsMTcuMTk3NjQxNCBDMTMuNjkxOTYxNywxNC41OTAwODgxIDE2LjAyMzYxNDEsMTIuMDI4MzU3NiAxOC41NjYyOTIxLDkuNDgwMTMyNjIgQzE4Ljk5MTE2NSw5LjA2Mjc4NDIxIDE5LjExNzQxODcsOC40Mjc4MjYxOCAxOC44ODQ3MTE2LDcuODgwNDg1OTggQzE4LjY1MTA3NjEsNy4zMzIyMDUyMSAxOC4xMDY1NDU2LDYuOTgzNjE0OTkgMTcuNTExMTYzOSw3LjAwMDU5MzUxIEwxNy41MTExNjM5LDcuMDAwNjI5NjggWiIvPgogIDwvc3ZnPg==\")}.right-alignment{direction:rtl}", "mat-select{outline:none}::ng-deep .mat-select-disabled .mat-select-value{color:rgba(26,26,26,.7);color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.7)}::ng-deep .mat-select-arrow-wrapper{transform:unset!important;vertical-align:unset}::ng-deep .mat-select-arrow-wrapper .mat-select-arrow{border:0}::ng-deep .mat-select-arrow-wrapper .mat-select-arrow:after{color:#1a1a1a;color:hsl(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%))}::ng-deep .mat-select-panel .mat-option{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%))}::ng-deep .mat-select-panel .mat-option:hover{background:rgba(26,26,26,.16);background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.16)}::ng-deep .mat-select-panel .mat-option:active{box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);background:rgba(26,26,26,.24)!important;background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.24)!important}::ng-deep .mat-select-panel .mat-option:active:not(.keep-background-on-focus){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%))}::ng-deep .mat-select-panel .mat-option:disabled{box-shadow:unset;border:unset;color:rgba(26,26,26,.35)!important;color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)!important;background:rgba(26,26,26,.04)!important;background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.04)!important}::ng-deep .mat-select-panel .mat-option:disabled:after{border:unset}::ng-deep .mat-select-panel .mat-option:disabled .svg-icon{fill:rgba(26,26,26,.35);fill:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .mat-select-panel .mat-option:disabled .svg-icon.stroke{fill:unset;stroke:rgba(26,26,26,.35);stroke:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .mat-select-panel .mat-option.mat-selected{background:rgba(26,26,26,.12);background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.12)}::ng-deep .mat-select-panel .mat-option.mat-selected:hover{background:rgba(26,26,26,.16);background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.16)}::ng-deep .mat-select-panel .mat-option.mat-selected:active{box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);background:rgba(26,26,26,.24)!important;background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.24)!important}::ng-deep .mat-select-panel .mat-option.mat-selected:active:not(.keep-background-on-focus){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%))}::ng-deep .mat-select-panel .mat-option.mat-selected:disabled{box-shadow:unset;border:unset;color:rgba(26,26,26,.35)!important;color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)!important;background:rgba(26,26,26,.04)!important;background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.04)!important}::ng-deep .mat-select-panel .mat-option.mat-selected:disabled:after{border:unset}::ng-deep .mat-select-panel .mat-option.mat-selected:disabled .svg-icon{fill:rgba(26,26,26,.35);fill:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .mat-select-panel .mat-option.mat-selected:disabled .svg-icon.stroke{fill:unset;stroke:rgba(26,26,26,.35);stroke:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .mat-select-panel .mat-pseudo-checkbox{background:#fafafa;background:hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),98%);box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);border:1px solid hsl(0,0%,calc(10% + 30%));border:1px solid hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),calc(var(--pep-color-regular-l, 10%) + 30%))}::ng-deep .mat-select-panel .mat-pseudo-checkbox:hover{background:#fafafa;background:hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),98%);box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.16);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.16);border:1px solid hsl(0,0%,calc(10% + 20%));border:1px solid hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),calc(var(--pep-color-regular-l, 10%) + 20%))}::ng-deep .mat-select-panel .mat-pseudo-checkbox:active{background:#e0e0e0;background:hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),88%);box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.32);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.32);border:1px solid #1a1a1a;border:1px solid hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),var(--pep-color-regular-l,10%))}::ng-deep .mat-select-panel .mat-pseudo-checkbox:disabled{box-shadow:unset;border:unset;color:rgba(26,26,26,.35)!important;color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)!important;background:#e0e0e0!important;background:hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),88%)!important;box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.04)!important;box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.04)!important;border:1px solid rgba(26,26,26,.08);border:1px solid hsla(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),var(--pep-color-regular-l,10%),.08)}::ng-deep .mat-select-panel .mat-pseudo-checkbox:disabled:after{border:unset}::ng-deep .mat-select-panel .mat-pseudo-checkbox:disabled .svg-icon{fill:rgba(26,26,26,.35);fill:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .mat-select-panel .mat-pseudo-checkbox:disabled .svg-icon.stroke{fill:unset;stroke:rgba(26,26,26,.35);stroke:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-checked,::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{background:#fafafa;background:hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),98%);box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);border:1px solid hsl(0,0%,calc(10% + 20%));border:1px solid hsl(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),calc(var(--pep-color-system-primary-l, 10%) + 20%))}::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-checked:hover,::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate:hover{background:#fafafa;background:hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),98%);box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.16);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.16);border:1px solid hsl(0,0%,calc(10% + 20%));border:1px solid hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),calc(var(--pep-color-regular-l, 10%) + 20%))}::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-checked:active,::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate:active{background:#e0e0e0;background:hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),88%);box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.32);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.32);border:1px solid #1a1a1a;border:1px solid hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),var(--pep-color-regular-l,10%))}::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-checked:disabled,::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate:disabled{box-shadow:unset;border:unset;color:rgba(26,26,26,.35)!important;color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)!important;background:#e0e0e0!important;background:hsl(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),88%)!important;box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.04)!important;box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.04)!important;border:1px solid rgba(26,26,26,.08);border:1px solid hsla(var(--pep-color-regular-h,0),var(--pep-color-regular-s,0%),var(--pep-color-regular-l,10%),.08)}::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-checked:disabled:after,::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate:disabled:after{border:unset}::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-checked:disabled .svg-icon,::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate:disabled .svg-icon{fill:rgba(26,26,26,.35);fill:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-checked:disabled .svg-icon.stroke,::ng-deep .mat-select-panel .mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate:disabled .svg-icon.stroke{fill:unset;stroke:rgba(26,26,26,.35);stroke:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .mat-select-panel .mat-pseudo-checkbox:after{color:#1a1a1a!important;color:hsl(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%))!important}"]
|
|
189
193
|
},] }
|
|
190
194
|
];
|
|
191
195
|
PepSelectComponent.ctorParameters = () => [
|
|
@@ -211,6 +215,7 @@ PepSelectComponent.propDecorators = {
|
|
|
211
215
|
isActive: [{ type: Input }],
|
|
212
216
|
showTitle: [{ type: Input }],
|
|
213
217
|
emptyOption: [{ type: Input }],
|
|
218
|
+
renderTitle: [{ type: Input }],
|
|
214
219
|
valueChange: [{ type: Output }],
|
|
215
220
|
formValidationChange: [{ type: Output }],
|
|
216
221
|
select: [{ type: ViewChild, args: ['select',] }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-select.js","sources":["../../../projects/ngx-lib/select/select.component.ts","../../../projects/ngx-lib/select/select.module.ts","../../../projects/ngx-lib/select/public-api.ts","../../../projects/ngx-lib/select/pepperi-addons-ngx-lib-select.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepSelectFieldType,\n PepSelectField,\n IPepOption,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepSelectComponent implements OnChanges, OnInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() type: PepSelectFieldType = 'select';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n @Input() options: Array<IPepOption> = [];\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 controlType = 'select';\n\n // @Input() field: PepFieldBase;\n @Input() form: FormGroup = null;\n @Input() layoutType: PepLayoutType = 'form';\n @Input() parentFieldKey: string = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() emptyOption = true;\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ViewChild('select') select: MatSelect;\n\n standAlone = false;\n isInEditMode = false;\n isMulti = false;\n selectedValuesModel: string[];\n selectedValueModel: string;\n fieldFormattedValue = '';\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) { }\n\n private addOptionsIfNeeded(): void {\n if (this.isMulti) {\n // Go gor all selected and add to options if not exist\n // for (let i = 0; i < this.selectedValuesModel.length; i++) {\n for (const selectedValue of this.selectedValuesModel) {\n let valueNotExist = false;\n\n if (\n this.options &&\n !this.options.find((opt) => opt.key === selectedValue)\n ) {\n valueNotExist = true;\n }\n\n // Add it to options.\n if (valueNotExist) {\n this.options.push({\n key: selectedValue,\n value: selectedValue,\n });\n }\n }\n } else {\n if (\n this.value &&\n this.value !== '' &&\n this.options &&\n !this.options.find((opt) => opt.key === this.value)\n ) {\n this.options.push({ key: this.value, value: this.value });\n }\n }\n }\n\n private setFieldFormattedValue(value: any): void {\n if (this.isMulti) {\n if (this.selectedValuesModel.length > 0) {\n this.fieldFormattedValue = this.selectedValuesModel\n .map((value) => {\n return this.options.find((opt) => opt.key === value)\n ?.value;\n })\n .join(', ');\n } else {\n this.fieldFormattedValue = '';\n }\n\n // this.fieldFormattedValue = typeof value === 'string' ? value.replace(new RegExp(';', 'g'), ', ') : '';\n } else {\n const selectedOpt = this.options.find((opt) => opt.key === value);\n\n if (selectedOpt) {\n this.fieldFormattedValue = selectedOpt.value;\n }\n }\n }\n\n private setDefaultForm(): void {\n const pepField = new PepSelectField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\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 this.isMulti = this.type === 'multi';\n if (this.isMulti) {\n this.selectedValuesModel =\n this.value.length > 0 ? this.value.split(';') : [];\n } else {\n this.selectedValueModel = this.value;\n }\n\n this.addOptionsIfNeeded();\n this.setFieldFormattedValue(this.value);\n }\n\n ngOnDestroy(): void {\n //\n }\n\n selectionChange(event: any): void {\n if (!this.isMulti) {\n this.changeValue(this.selectedValueModel);\n }\n }\n\n openedChange(event: any): void {\n // Only on close.\n if (!event) {\n if (this.isMulti) {\n this.changeValue(this.selectedValuesModel.join(';'));\n }\n\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }\n }\n\n changeValue(value: any): void {\n this.setFieldFormattedValue(value);\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n // value,\n this.fieldFormattedValue,\n this.parentFieldKey\n );\n\n if (this.mandatory) {\n const fieldControl = this.form.controls[this.key];\n if (value) {\n fieldControl.setErrors(null);\n } else {\n fieldControl.setErrors({\n serverError: 'Required',\n });\n }\n this.formValidationChange.emit(this.form.valid);\n }\n\n this.valueChange.emit(value);\n }\n\n cardTemplateClicked(event: any): void {\n this.isInEditMode = true;\n\n setTimeout(() => {\n this.select.open();\n }, 0);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\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 { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepSelectComponent } from './select.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n // Material modules\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatSelectModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepSelectComponent],\n declarations: [PepSelectComponent],\n})\nexport class PepSelectModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemEdit]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/select\n */\nexport * from './select.module';\nexport * from './select.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA+Ba,kBAAkB;IAwD3B,YACY,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;QAFnB,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,aAAQ,GAAR,QAAQ,CAAW;QACnB,YAAO,GAAP,OAAO,CAAY;QA1DtB,QAAG,GAAG,EAAE,CAAC;QACT,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,SAAI,GAAuB,QAA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AAC;QAEzB,UAAU,CAAC;YACP,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;SACtB,EAAE,CAAC,CAAC,CAAC;KACT;;;YA3NJ,SAAS,SAAC;gBACP,QAAQ,EAAE,YAAY;gBACtB,krKAAsC;gBAEtC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAClD;;;YAbG,uBAAuB;YANvB,SAAS;YAHT,UAAU;;;kBAwBT,KAAK;oBACL,KAAK;oBACL,KAAK;mBACL,KAAK;wBACL,KAAK;uBACL,KAAK;uBACL,KAAK;yBACL,KAAK;sBACL,KAAK;sBACL,KAAK;sBAGL,KAAK;mBAsBL,KAAK;yBACL,KAAK;6BACL,KAAK;uBACL,KAAK;wBACL,KAAK;0BACL,KAAK;0BAEL,MAAM;mCAEN,MAAM;qBAGN,SAAS,SAAC,QAAQ;;;MCvCV,eAAe;IACxB,YAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;QAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;KAC3D;;;YAtBJ,QAAQ,SAAC;gBACN,OAAO,EAAE;oBACL,YAAY;oBACZ,mBAAmB;oBACnB,WAAW;;oBAEX,eAAe;oBACf,eAAe;oBACf,kBAAkB;oBAClB,eAAe;oBACf,aAAa;;oBAEb,eAAe;oBACf,aAAa;oBACb,mBAAmB;iBACtB;gBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;gBAC7B,YAAY,EAAE,CAAC,kBAAkB,CAAC;aACrC;;;YAzBG,eAAe;;;ACbnB;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-select.js","sources":["../../../projects/ngx-lib/select/select.component.ts","../../../projects/ngx-lib/select/select.module.ts","../../../projects/ngx-lib/select/public-api.ts","../../../projects/ngx-lib/select/pepperi-addons-ngx-lib-select.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepSelectFieldType,\n PepSelectField,\n IPepOption,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss', './select.component.theme.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepSelectComponent implements OnChanges, OnInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() type: PepSelectFieldType = 'select';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n @Input() options: Array<IPepOption> = [];\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 controlType = 'select';\n\n // @Input() field: PepFieldBase;\n @Input() form: FormGroup = null;\n @Input() layoutType: PepLayoutType = 'form';\n @Input() parentFieldKey: string = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() emptyOption = true;\n @Input() renderTitle = true;\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ViewChild('select') select: MatSelect;\n\n standAlone = false;\n isInEditMode = false;\n isMulti = false;\n selectedValuesModel: string[];\n selectedValueModel: string;\n fieldFormattedValue = '';\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) { }\n\n private addOptionsIfNeeded(): void {\n if (this.isMulti) {\n // Go gor all selected and add to options if not exist\n // for (let i = 0; i < this.selectedValuesModel.length; i++) {\n for (const selectedValue of this.selectedValuesModel) {\n let valueNotExist = false;\n\n if (\n this.options &&\n !this.options.find((opt) => opt.key === selectedValue)\n ) {\n valueNotExist = true;\n }\n\n // Add it to options.\n if (valueNotExist) {\n this.options.push({\n key: selectedValue,\n value: selectedValue,\n });\n }\n }\n } else {\n if (\n this.value &&\n this.value !== '' &&\n this.options &&\n !this.options.find((opt) => opt.key === this.value)\n ) {\n this.options.push({ key: this.value, value: this.value });\n }\n }\n }\n\n private setFieldFormattedValue(value: any): void {\n if (this.isMulti) {\n if (this.selectedValuesModel.length > 0) {\n this.fieldFormattedValue = this.selectedValuesModel\n .map((value) => {\n return this.options.find((opt) => opt.key === value)\n ?.value;\n })\n .join(', ');\n } else {\n this.fieldFormattedValue = '';\n }\n\n // this.fieldFormattedValue = typeof value === 'string' ? value.replace(new RegExp(';', 'g'), ', ') : '';\n } else {\n const selectedOpt = this.options.find((opt) => opt.key === value);\n\n if (selectedOpt) {\n this.fieldFormattedValue = selectedOpt.value;\n }\n }\n }\n\n private setDefaultForm(): void {\n const pepField = new PepSelectField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\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 this.isMulti = this.type === 'multi';\n if (this.isMulti) {\n this.selectedValuesModel =\n this.value.length > 0 ? this.value.split(';') : [];\n } else {\n this.selectedValueModel = this.value;\n }\n\n this.addOptionsIfNeeded();\n this.setFieldFormattedValue(this.value);\n }\n\n ngOnDestroy(): void {\n //\n }\n\n selectionChange(event: any): void {\n if (!this.isMulti) {\n this.changeValue(this.selectedValueModel);\n }\n }\n\n openedChange(event: any): void {\n // Only on close.\n if (!event) {\n if (this.isMulti) {\n this.changeValue(this.selectedValuesModel.join(';'));\n }\n\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }\n }\n\n changeValue(value: any): void {\n this.setFieldFormattedValue(value);\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n // value,\n this.fieldFormattedValue,\n this.parentFieldKey\n );\n\n if (this.mandatory) {\n const fieldControl = this.form.controls[this.key];\n if (value) {\n fieldControl.setErrors(null);\n } else {\n fieldControl.setErrors({\n serverError: 'Required',\n });\n }\n this.formValidationChange.emit(this.form.valid);\n }\n\n this.valueChange.emit(value);\n }\n\n cardTemplateClicked(event: any): void {\n this.isInEditMode = true;\n\n setTimeout(() => {\n this.select.open();\n }, 0);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\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 { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepSelectComponent } from './select.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n // Material modules\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatSelectModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepSelectComponent],\n declarations: [PepSelectComponent],\n})\nexport class PepSelectModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemEdit]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/select\n */\nexport * from './select.module';\nexport * from './select.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA+Ba,kBAAkB;IAyD3B,YACY,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;QAFnB,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,aAAQ,GAAR,QAAQ,CAAW;QACnB,YAAO,GAAP,OAAO,CAAY;QA3DtB,QAAG,GAAG,EAAE,CAAC;QACT,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,SAAI,GAAuB,QAAQ,CAAC;QACpC,cAAS,GAAG,KAAK,CAAC;QAClB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QACjB,eAAU,GAA2B,4BAA4B,CAAC;QAClE,YAAO,GAAG,CAAC,CAAC;QACZ,YAAO,GAAsB,EAAE,CAAC;QAEjC,aAAQ,GAAG,IAAI,CAAC;QAoBxB,gBAAW,GAAG,QAAQ,CAAC;;QAGd,SAAI,GAAc,IAAI,CAAC;QACvB,eAAU,GAAkB,MAAM,CAAC;QACnC,mBAAc,GAAW,IAAI,CAAC;QAC9B,aAAQ,GAAG,KAAK,CAAC;QACjB,cAAS,GAAG,IAAI,CAAC;QACjB,gBAAW,GAAG,IAAI,CAAC;QACnB,gBAAW,GAAG,IAAI,CAAC;QAG5B,gBAAW,GAAyB,IAAI,YAAY,EAAU,CAAC;QAE/D,yBAAoB,GAA0B,IAAI,YAAY,EAAW,CAAC;QAI1E,eAAU,GAAG,KAAK,CAAC;QACnB,iBAAY,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