@pepperi-addons/ngx-lib 0.2.55 → 0.2.58-beta.1

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.
Files changed (177) hide show
  1. package/attachment/attachment.component.d.ts +1 -0
  2. package/attachment/pepperi-addons-ngx-lib-attachment.metadata.json +1 -1
  3. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js +6 -1
  4. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js.map +1 -1
  5. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js +3 -0
  6. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js.map +1 -1
  7. package/bundles/pepperi-addons-ngx-lib-color.umd.js +6 -1
  8. package/bundles/pepperi-addons-ngx-lib-color.umd.js.map +1 -1
  9. package/bundles/pepperi-addons-ngx-lib-date.umd.js +4 -1
  10. package/bundles/pepperi-addons-ngx-lib-date.umd.js.map +1 -1
  11. package/bundles/pepperi-addons-ngx-lib-form.umd.js +20 -15
  12. package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
  13. package/bundles/pepperi-addons-ngx-lib-image.umd.js +6 -1
  14. package/bundles/pepperi-addons-ngx-lib-image.umd.js.map +1 -1
  15. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js +6 -1
  16. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js.map +1 -1
  17. package/bundles/pepperi-addons-ngx-lib-list.umd.js +4 -2
  18. package/bundles/pepperi-addons-ngx-lib-list.umd.js.map +1 -1
  19. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js +6 -1
  20. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js.map +1 -1
  21. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js +6 -1
  22. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js.map +1 -1
  23. package/bundles/pepperi-addons-ngx-lib-select.umd.js +6 -1
  24. package/bundles/pepperi-addons-ngx-lib-select.umd.js.map +1 -1
  25. package/bundles/pepperi-addons-ngx-lib-separator.umd.js +8 -0
  26. package/bundles/pepperi-addons-ngx-lib-separator.umd.js.map +1 -1
  27. package/bundles/pepperi-addons-ngx-lib-signature.umd.js +6 -1
  28. package/bundles/pepperi-addons-ngx-lib-signature.umd.js.map +1 -1
  29. package/bundles/pepperi-addons-ngx-lib-slider.umd.js.map +1 -1
  30. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js +1432 -173
  31. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js.map +1 -1
  32. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js +6 -1
  33. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js.map +1 -1
  34. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js +4 -2
  35. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js.map +1 -1
  36. package/bundles/pepperi-addons-ngx-lib-top-bar.umd.js +1 -1
  37. package/bundles/pepperi-addons-ngx-lib.umd.js +4 -2
  38. package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
  39. package/color/color.component.d.ts +1 -0
  40. package/color/pepperi-addons-ngx-lib-color.metadata.json +1 -1
  41. package/core/customization/customization.service.d.ts +1 -0
  42. package/esm2015/attachment/attachment.component.js +7 -2
  43. package/esm2015/checkbox/checkbox.component.js +4 -1
  44. package/esm2015/color/color.component.js +7 -2
  45. package/esm2015/core/common/services/translate.service.js +1 -1
  46. package/esm2015/core/customization/customization.service.js +4 -2
  47. package/esm2015/date/date.component.js +4 -1
  48. package/esm2015/form/form.component.js +2 -1
  49. package/esm2015/form/internal-button.component.js +20 -17
  50. package/esm2015/form/internal-carusel.component.js +2 -1
  51. package/esm2015/image/image.component.js +7 -2
  52. package/esm2015/image/image.service.js +1 -1
  53. package/esm2015/images-filmstrip/images-filmstrip.component.js +7 -2
  54. package/esm2015/list/list-total.component.js +5 -3
  55. package/esm2015/quantity-selector/quantity-selector.component.js +7 -2
  56. package/esm2015/rich-html-textarea/rich-html-textarea.component.js +7 -2
  57. package/esm2015/select/select.component.js +7 -2
  58. package/esm2015/separator/separator.component.js +9 -1
  59. package/esm2015/signature/signature.component.js +7 -2
  60. package/esm2015/slider/slider.component.js +1 -1
  61. package/esm2015/smart-filters/boolean-filter/boolean-filter.component.js +12 -2
  62. package/esm2015/smart-filters/common/model/base-filter-component.js +40 -10
  63. package/esm2015/smart-filters/common/model/creator.js +8 -2
  64. package/esm2015/smart-filters/common/model/field.js +12 -1
  65. package/esm2015/smart-filters/common/model/operator.js +8 -8
  66. package/esm2015/smart-filters/common/model/type.js +1 -1
  67. package/esm2015/smart-filters/date-filter/date-filter.component.js +45 -2
  68. package/esm2015/smart-filters/filter-builder/common/model/filter.js +2 -0
  69. package/esm2015/smart-filters/filter-builder/common/model/legacy.js +2 -0
  70. package/esm2015/smart-filters/filter-builder/common/model/operator-unit.js +42 -0
  71. package/esm2015/smart-filters/filter-builder/common/model/operator.js +207 -0
  72. package/esm2015/smart-filters/filter-builder/common/model/type-map.js +27 -0
  73. package/esm2015/smart-filters/filter-builder/common/model/type.js +6 -0
  74. package/esm2015/smart-filters/filter-builder/common/pipes/filter-item-counter.pipe.js +18 -0
  75. package/esm2015/smart-filters/filter-builder/common/services/output-filter.service.js +132 -0
  76. package/esm2015/smart-filters/filter-builder/common/services/type-convertor.service.js +44 -0
  77. package/esm2015/smart-filters/filter-builder/filter-builder-item/filter-builder-item.component.js +106 -0
  78. package/esm2015/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.js +50 -0
  79. package/esm2015/smart-filters/filter-builder/filter-builder.component.js +65 -0
  80. package/esm2015/smart-filters/filter-builder/filter-builder.service.js +261 -0
  81. package/esm2015/smart-filters/index.js +5 -0
  82. package/esm2015/smart-filters/multi-select-filter/multi-select-filter.component.js +53 -14
  83. package/esm2015/smart-filters/number-filter/number-filter.component.js +25 -2
  84. package/esm2015/smart-filters/pepperi-addons-ngx-lib-smart-filters.js +8 -1
  85. package/esm2015/smart-filters/public-api.js +2 -1
  86. package/esm2015/smart-filters/smart-filters.module.js +14 -2
  87. package/esm2015/smart-filters/text-filter/text-filter.component.js +79 -0
  88. package/esm2015/textarea/textarea.component.js +7 -2
  89. package/esm2015/textbox/textbox.component.js +5 -3
  90. package/esm2015/top-bar/top-bar.component.js +1 -1
  91. package/fesm2015/pepperi-addons-ngx-lib-attachment.js +6 -1
  92. package/fesm2015/pepperi-addons-ngx-lib-attachment.js.map +1 -1
  93. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js +3 -0
  94. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js.map +1 -1
  95. package/fesm2015/pepperi-addons-ngx-lib-color.js +6 -1
  96. package/fesm2015/pepperi-addons-ngx-lib-color.js.map +1 -1
  97. package/fesm2015/pepperi-addons-ngx-lib-date.js +3 -0
  98. package/fesm2015/pepperi-addons-ngx-lib-date.js.map +1 -1
  99. package/fesm2015/pepperi-addons-ngx-lib-form.js +20 -15
  100. package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
  101. package/fesm2015/pepperi-addons-ngx-lib-image.js +6 -1
  102. package/fesm2015/pepperi-addons-ngx-lib-image.js.map +1 -1
  103. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js +6 -1
  104. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js.map +1 -1
  105. package/fesm2015/pepperi-addons-ngx-lib-list.js +4 -2
  106. package/fesm2015/pepperi-addons-ngx-lib-list.js.map +1 -1
  107. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js +6 -1
  108. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js.map +1 -1
  109. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js +6 -1
  110. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js.map +1 -1
  111. package/fesm2015/pepperi-addons-ngx-lib-select.js +6 -1
  112. package/fesm2015/pepperi-addons-ngx-lib-select.js.map +1 -1
  113. package/fesm2015/pepperi-addons-ngx-lib-separator.js +8 -0
  114. package/fesm2015/pepperi-addons-ngx-lib-separator.js.map +1 -1
  115. package/fesm2015/pepperi-addons-ngx-lib-signature.js +6 -1
  116. package/fesm2015/pepperi-addons-ngx-lib-signature.js.map +1 -1
  117. package/fesm2015/pepperi-addons-ngx-lib-slider.js.map +1 -1
  118. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js +1293 -128
  119. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js.map +1 -1
  120. package/fesm2015/pepperi-addons-ngx-lib-textarea.js +6 -1
  121. package/fesm2015/pepperi-addons-ngx-lib-textarea.js.map +1 -1
  122. package/fesm2015/pepperi-addons-ngx-lib-textbox.js +4 -2
  123. package/fesm2015/pepperi-addons-ngx-lib-textbox.js.map +1 -1
  124. package/fesm2015/pepperi-addons-ngx-lib-top-bar.js +1 -1
  125. package/fesm2015/pepperi-addons-ngx-lib.js +3 -1
  126. package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
  127. package/form/internal-button.component.d.ts +0 -1
  128. package/image/image.component.d.ts +1 -0
  129. package/image/pepperi-addons-ngx-lib-image.metadata.json +1 -1
  130. package/images-filmstrip/images-filmstrip.component.d.ts +1 -0
  131. package/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.metadata.json +1 -1
  132. package/list/list-total.component.d.ts +2 -0
  133. package/list/pepperi-addons-ngx-lib-list.metadata.json +1 -1
  134. package/package.json +4 -4
  135. package/pepperi-addons-ngx-lib.metadata.json +1 -1
  136. package/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.metadata.json +1 -1
  137. package/quantity-selector/quantity-selector.component.d.ts +1 -0
  138. package/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.metadata.json +1 -1
  139. package/rich-html-textarea/rich-html-textarea.component.d.ts +1 -0
  140. package/select/pepperi-addons-ngx-lib-select.metadata.json +1 -1
  141. package/select/select.component.d.ts +1 -0
  142. package/separator/pepperi-addons-ngx-lib-separator.metadata.json +1 -1
  143. package/signature/pepperi-addons-ngx-lib-signature.metadata.json +1 -1
  144. package/signature/signature.component.d.ts +1 -0
  145. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +5 -1
  146. package/smart-filters/common/model/base-filter-component.d.ts +10 -1
  147. package/smart-filters/common/model/field.d.ts +4 -0
  148. package/smart-filters/common/model/operator.d.ts +1 -0
  149. package/smart-filters/common/model/type.d.ts +2 -2
  150. package/smart-filters/date-filter/date-filter.component.d.ts +8 -1
  151. package/smart-filters/filter-builder/common/model/filter.d.ts +6 -0
  152. package/smart-filters/filter-builder/common/model/legacy.d.ts +23 -0
  153. package/smart-filters/filter-builder/common/model/operator-unit.d.ts +13 -0
  154. package/smart-filters/filter-builder/common/model/operator.d.ts +21 -0
  155. package/smart-filters/filter-builder/common/model/type-map.d.ts +12 -0
  156. package/smart-filters/filter-builder/common/model/type.d.ts +4 -0
  157. package/smart-filters/filter-builder/common/pipes/filter-item-counter.pipe.d.ts +5 -0
  158. package/smart-filters/filter-builder/common/services/output-filter.service.d.ts +52 -0
  159. package/smart-filters/filter-builder/common/services/type-convertor.service.d.ts +10 -0
  160. package/smart-filters/filter-builder/filter-builder-item/filter-builder-item.component.d.ts +32 -0
  161. package/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.d.ts +22 -0
  162. package/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.theme.scss +6 -0
  163. package/smart-filters/filter-builder/filter-builder.component.d.ts +22 -0
  164. package/smart-filters/filter-builder/filter-builder.service.d.ts +90 -0
  165. package/smart-filters/index.d.ts +1 -0
  166. package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +6 -0
  167. package/smart-filters/number-filter/number-filter.component.d.ts +5 -0
  168. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.d.ts +7 -0
  169. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.metadata.json +1 -1
  170. package/smart-filters/public-api.d.ts +1 -0
  171. package/smart-filters/text-filter/text-filter.component.d.ts +17 -0
  172. package/src/assets/i18n/en.ngx-lib.json +2 -1
  173. package/src/core/style/components/general.scss +4 -2
  174. package/textarea/pepperi-addons-ngx-lib-textarea.metadata.json +1 -1
  175. package/textarea/textarea.component.d.ts +1 -0
  176. package/theming.scss +4 -0
  177. package/top-bar/pepperi-addons-ngx-lib-top-bar.metadata.json +1 -1
@@ -60,6 +60,7 @@ export declare class PepAttachmentComponent implements OnInit, OnChanges, OnDest
60
60
  controlType: string;
61
61
  form: FormGroup;
62
62
  showTitle: boolean;
63
+ renderTitle: boolean;
63
64
  private _layoutType;
64
65
  set layoutType(value: PepLayoutType);
65
66
  get layoutType(): PepLayoutType;
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"PepAttachmentModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":15,"character":8},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":16,"character":8},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":18,"character":8},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":19,"character":8},{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib","name":"PepNgxLibModule","line":21,"character":8},{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib/field-title","name":"PepFieldTitleModule","line":22,"character":8},{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib/files-uploader","name":"PepFilesUploaderModule","line":23,"character":8}],"exports":[{"__symbolic":"reference","name":"PepAttachmentComponent"}],"declarations":[{"__symbolic":"reference","name":"PepAttachmentComponent"}]}]}],"members":{}},"PepAttachmentComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"pep-attachment","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":27,"character":21},"member":"OnPush"},"template":"<ng-template #pepTemplate>\n <pep-files-uploader [key]=\"key\" [src]=\"src\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [rowSpan]=\"rowSpan\" [fieldHeight]=\"fieldHeight\" [controlType]=\"controlType\"\n [form]=\"form\" [layoutType]=\"layoutType\" [standAlone]=\"standAlone\" (fileChange)=\"onFileChanged($event)\"\n (elementClick)=\"onFileClicked($event)\" [acceptedExtensions]=\"acceptAttachmentType\">\n </pep-files-uploader>\n</ng-template>\n\n<ng-template #pepReadonlyTemplate>\n <ng-container *ngIf=\"src?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <div class=\"pep-file-container\">\n <a [id]=\"key\" class=\"color-link body-sm pep-card-input \" *ngIf=\"src != null\" title=\"{{ src }}\"\n target=\"_blank\" href=\"{{ src }}\">{{ src }}</a>\n </div>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n</ng-template>\n\n<ng-container *ngIf=\"layoutType === 'form'\">\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone }\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>\n\n\n<ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container one-row\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>","styles":[":host{display:block}"]}]}],"members":{"key":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":5}}]}],"src":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":5}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":5}}]}],"mandatory":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":71,"character":5}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":78,"character":5}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":85,"character":5}}]}],"xAlignment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":5}}]}],"rowSpan":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":96,"character":5}}]}],"visible":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":106,"character":5}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":127,"character":5}}]}],"showTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":128,"character":5}}]}],"layoutType":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":131,"character":5}}]}],"isActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":140,"character":5}}]}],"fileChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":142,"character":5}}]}],"elementClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":145,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib","name":"PepCustomizationService","line":156,"character":38},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":157,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":158,"character":24},{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib","name":"PepFileService","line":159,"character":29}]}],"setFieldHeight":[{"__symbolic":"method"}],"setDefaultForm":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"onFileChanged":[{"__symbolic":"method"}],"onFileClicked":[{"__symbolic":"method"}]}}},"origins":{"PepAttachmentModule":"./attachment.module","PepAttachmentComponent":"./attachment.component"},"importAs":"@pepperi-addons/ngx-lib/attachment"}
1
+ {"__symbolic":"module","version":4,"metadata":{"PepAttachmentModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":15,"character":8},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":16,"character":8},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":18,"character":8},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":19,"character":8},{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib","name":"PepNgxLibModule","line":21,"character":8},{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib/field-title","name":"PepFieldTitleModule","line":22,"character":8},{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib/files-uploader","name":"PepFilesUploaderModule","line":23,"character":8}],"exports":[{"__symbolic":"reference","name":"PepAttachmentComponent"}],"declarations":[{"__symbolic":"reference","name":"PepAttachmentComponent"}]}]}],"members":{}},"PepAttachmentComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"pep-attachment","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":27,"character":21},"member":"OnPush"},"template":"<ng-template #pepTemplate>\n <pep-files-uploader [key]=\"key\" [src]=\"src\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [rowSpan]=\"rowSpan\" [fieldHeight]=\"fieldHeight\" [controlType]=\"controlType\"\n [form]=\"form\" [layoutType]=\"layoutType\" [standAlone]=\"standAlone\" (fileChange)=\"onFileChanged($event)\"\n (elementClick)=\"onFileClicked($event)\" [acceptedExtensions]=\"acceptAttachmentType\">\n </pep-files-uploader>\n</ng-template>\n\n<ng-template #pepReadonlyTemplate>\n <ng-container *ngIf=\"src?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <div class=\"pep-file-container\">\n <a [id]=\"key\" class=\"color-link body-sm pep-card-input \" *ngIf=\"src != null\" title=\"{{ src }}\"\n target=\"_blank\" href=\"{{ src }}\">{{ src }}</a>\n </div>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n</ng-template>\n\n<ng-container *ngIf=\"layoutType === 'form'\">\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone }\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>\n\n\n<ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container one-row\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>","styles":[":host{display:block}"]}]}],"members":{"key":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":5}}]}],"src":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":5}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":5}}]}],"mandatory":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":71,"character":5}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":78,"character":5}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":85,"character":5}}]}],"xAlignment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":5}}]}],"rowSpan":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":96,"character":5}}]}],"visible":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":106,"character":5}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":127,"character":5}}]}],"showTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":128,"character":5}}]}],"renderTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":129,"character":5}}]}],"layoutType":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":5}}]}],"isActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":141,"character":5}}]}],"fileChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":143,"character":5}}]}],"elementClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":146,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib","name":"PepCustomizationService","line":157,"character":38},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":158,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":159,"character":24},{"__symbolic":"reference","module":"@pepperi-addons/ngx-lib","name":"PepFileService","line":160,"character":29}]}],"setFieldHeight":[{"__symbolic":"method"}],"setDefaultForm":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"onFileChanged":[{"__symbolic":"method"}],"onFileClicked":[{"__symbolic":"method"}]}}},"origins":{"PepAttachmentModule":"./attachment.module","PepAttachmentComponent":"./attachment.component"},"importAs":"@pepperi-addons/ngx-lib/attachment"}
@@ -53,6 +53,7 @@
53
53
  this.controlType = 'attachment';
54
54
  this.form = null;
55
55
  this.showTitle = true;
56
+ this.renderTitle = true;
56
57
  this._layoutType = 'form';
57
58
  this.isActive = false;
58
59
  this.fileChange = new core.EventEmitter();
@@ -144,6 +145,9 @@
144
145
  this.setFieldHeight();
145
146
  this.setDefaultForm();
146
147
  this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
148
+ if (!this.renderTitle) {
149
+ this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
150
+ }
147
151
  }
148
152
  };
149
153
  PepAttachmentComponent.prototype.ngOnChanges = function (changes) {
@@ -194,7 +198,7 @@
194
198
  PepAttachmentComponent.decorators = [
195
199
  { type: core.Component, args: [{
196
200
  selector: 'pep-attachment',
197
- template: "<ng-template #pepTemplate>\n <pep-files-uploader [key]=\"key\" [src]=\"src\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [rowSpan]=\"rowSpan\" [fieldHeight]=\"fieldHeight\" [controlType]=\"controlType\"\n [form]=\"form\" [layoutType]=\"layoutType\" [standAlone]=\"standAlone\" (fileChange)=\"onFileChanged($event)\"\n (elementClick)=\"onFileClicked($event)\" [acceptedExtensions]=\"acceptAttachmentType\">\n </pep-files-uploader>\n</ng-template>\n\n<ng-template #pepReadonlyTemplate>\n <ng-container *ngIf=\"src?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <div class=\"pep-file-container\">\n <a [id]=\"key\" class=\"color-link body-sm pep-card-input \" *ngIf=\"src != null\" title=\"{{ src }}\"\n target=\"_blank\" href=\"{{ src }}\">{{ src }}</a>\n </div>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n</ng-template>\n\n<ng-container *ngIf=\"layoutType === 'form'\">\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone }\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>\n\n\n<ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container one-row\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>",
201
+ template: "<ng-template #pepTemplate>\n <pep-files-uploader [key]=\"key\" [src]=\"src\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [rowSpan]=\"rowSpan\" [fieldHeight]=\"fieldHeight\" [controlType]=\"controlType\"\n [form]=\"form\" [layoutType]=\"layoutType\" [standAlone]=\"standAlone\" (fileChange)=\"onFileChanged($event)\"\n (elementClick)=\"onFileClicked($event)\" [acceptedExtensions]=\"acceptAttachmentType\">\n </pep-files-uploader>\n</ng-template>\n\n<ng-template #pepReadonlyTemplate>\n <ng-container *ngIf=\"src?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <div class=\"pep-file-container\">\n <a [id]=\"key\" class=\"color-link body-sm pep-card-input \" *ngIf=\"src != null\" title=\"{{ src }}\"\n target=\"_blank\" href=\"{{ src }}\">{{ src }}</a>\n </div>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n</ng-template>\n\n<ng-container *ngIf=\"layoutType === 'form'\">\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone }\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>\n\n\n<ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container one-row\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>",
198
202
  changeDetection: core.ChangeDetectionStrategy.OnPush,
199
203
  styles: [":host{display:block}"]
200
204
  },] }
@@ -217,6 +221,7 @@
217
221
  visible: [{ type: core.Input }],
218
222
  form: [{ type: core.Input }],
219
223
  showTitle: [{ type: core.Input }],
224
+ renderTitle: [{ type: core.Input }],
220
225
  layoutType: [{ type: core.Input }],
221
226
  isActive: [{ type: core.Input }],
222
227
  fileChange: [{ type: core.Output }],
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-attachment.umd.js","sources":["../../../projects/ngx-lib/attachment/attachment.component.ts","../../../projects/ngx-lib/attachment/attachment.module.ts","../../../projects/ngx-lib/attachment/public-api.ts","../../../projects/ngx-lib/attachment/pepperi-addons-ngx-lib-attachment.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n Renderer2,\n OnDestroy,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepFileService,\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n IPepFieldClickEvent,\n PepAttachmentField,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-attachment',\n templateUrl: './attachment.component.html',\n styleUrls: ['./attachment.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepAttachmentComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * The attachment key.\n *\n * @memberof PepAttachmentComponent\n */\n @Input() key = '';\n\n private _src = '';\n /**\n * The src of the attachment.\n *\n * @memberof PepAttachmentComponent\n */\n @Input()\n set src(value: string) {\n if (!value) {\n value = '';\n }\n\n this._src = value;\n if (this._src.length > 0) {\n // Empty dataURI.\n this.dataURI = null;\n }\n }\n get src(): string {\n return this._src;\n }\n\n /**\n * The title of the attachment.\n *\n * @memberof PepAttachmentComponent\n */\n @Input() label = '';\n\n /**\n * If the attachment is mandatory\n *\n * @memberof PepAttachmentComponent\n */\n @Input() mandatory = false;\n\n /**\n * If the attachment is disabled\n *\n * @memberof PepAttachmentComponent\n */\n @Input() disabled = false;\n\n /**\n * If the attachment is readonly\n *\n * @memberof PepAttachmentComponent\n */\n @Input() readonly = false;\n\n /**\n * The horizontal alignment of the attachment\n *\n * @type {PepHorizontalAlignment}\n * @memberof PepAttachmentComponent\n */\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 = 'attachment';\n\n @Input() form: FormGroup = null;\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() isActive = false;\n\n @Output()\n fileChange: EventEmitter<any> = new EventEmitter<any>();\n\n @Output()\n elementClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();\n\n fieldHeight = '';\n standAlone = false;\n dataURI = null;\n\n acceptAttachmentType =\n 'application/pdf,application/json,text/csv,text/csv-schema,application/msword,application/vnd.ms-excel,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/bmp,image/jpg, image/jpeg, image/png, image/tif, image/tiff, txt, json';\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n public element: ElementRef,\n private fileService: PepFileService\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 PepAttachmentField({\n key: this.key,\n value: this.src,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnDestroy(): void {\n //\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n // Moved to src input\n // if (changes.src && changes.src.currentValue.length > 0) {\n // // Empty dataURI if there is change in the src.\n // this.dataURI = null;\n // }\n }\n\n onFileChanged(fileData: any): void {\n // const tmp = value.length > 0 ? JSON.parse(value) : null;\n // set this.dataURI after this.src cause it initialize in the src setter.\n this.src = fileData ? fileData.fileStr : '';\n this.dataURI = fileData;\n\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.dataURI ? this.dataURI.fileExt : ''\n );\n // this.valueChange.emit({\n // key: this.key,\n // value,\n // });\n\n this.fileChange.emit(fileData);\n // this.fileChange.emit(value.length > 0 ? JSON.parse(value) : value);\n }\n\n onFileClicked(event: IPepFieldClickEvent): void {\n if (this.dataURI != null) {\n const fileStrArr = this.dataURI.fileStr.split(';');\n if (fileStrArr.length === 2) {\n const win = window.open('', '_blank');\n const contentType = fileStrArr[0].split(':')[1];\n const base64 = fileStrArr[1].split(',')[1];\n const blob = this.fileService.convertFromb64toBlob(\n base64,\n contentType\n );\n const url = URL.createObjectURL(blob);\n win.location.href = url;\n }\n } else {\n if (this.fileService.isValidUrl(this.src)) {\n const win = window.open('', '_blank');\n win.location.href = this.src;\n }\n }\n\n this.elementClick.emit(event);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepFilesUploaderModule } from '@pepperi-addons/ngx-lib/files-uploader';\n\nimport { PepAttachmentComponent } from './attachment.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepFieldTitleModule,\n PepFilesUploaderModule,\n ],\n exports: [PepAttachmentComponent],\n declarations: [PepAttachmentComponent],\n})\nexport class PepAttachmentModule {}\n","/*\n * Public API Surface of ngx-lib/attachment\n */\nexport * from './attachment.module';\nexport * from './attachment.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepAttachmentField","PepCustomizationService","Component","ChangeDetectionStrategy","Renderer2","ElementRef","PepFileService","Input","Output","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatFormFieldModule","PepNgxLibModule","PepFieldTitleModule","PepFilesUploaderModule"],"mappings":";;;;;;;QA2JI,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mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,4BAAkB;;wBAElBC,sBAAe;wBACfC,8BAAmB;wBACnBC,oCAAsB;qBACzB;oBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,YAAY,EAAE,CAAC,sBAAsB,CAAC;iBACzC;;;IC3BD;;;;ICAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-attachment.umd.js","sources":["../../../projects/ngx-lib/attachment/attachment.component.ts","../../../projects/ngx-lib/attachment/attachment.module.ts","../../../projects/ngx-lib/attachment/public-api.ts","../../../projects/ngx-lib/attachment/pepperi-addons-ngx-lib-attachment.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n Renderer2,\n OnDestroy,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepFileService,\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n IPepFieldClickEvent,\n PepAttachmentField,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-attachment',\n templateUrl: './attachment.component.html',\n styleUrls: ['./attachment.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepAttachmentComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * The attachment key.\n *\n * @memberof PepAttachmentComponent\n */\n @Input() key = '';\n\n private _src = '';\n /**\n * The src of the attachment.\n *\n * @memberof PepAttachmentComponent\n */\n @Input()\n set src(value: string) {\n if (!value) {\n value = '';\n }\n\n this._src = value;\n if (this._src.length > 0) {\n // Empty dataURI.\n this.dataURI = null;\n }\n }\n get src(): string {\n return this._src;\n }\n\n /**\n * The title of the attachment.\n *\n * @memberof PepAttachmentComponent\n */\n @Input() label = '';\n\n /**\n * If the attachment is mandatory\n *\n * @memberof PepAttachmentComponent\n */\n @Input() mandatory = false;\n\n /**\n * If the attachment is disabled\n *\n * @memberof PepAttachmentComponent\n */\n @Input() disabled = false;\n\n /**\n * If the attachment is readonly\n *\n * @memberof PepAttachmentComponent\n */\n @Input() readonly = false;\n\n /**\n * The horizontal alignment of the attachment\n *\n * @type {PepHorizontalAlignment}\n * @memberof PepAttachmentComponent\n */\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 = 'attachment';\n\n @Input() form: FormGroup = null;\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() isActive = false;\n\n @Output()\n fileChange: EventEmitter<any> = new EventEmitter<any>();\n\n @Output()\n elementClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();\n\n fieldHeight = '';\n standAlone = false;\n dataURI = null;\n\n acceptAttachmentType =\n 'application/pdf,application/json,text/csv,text/csv-schema,application/msword,application/vnd.ms-excel,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/bmp,image/jpg, image/jpeg, image/png, image/tif, image/tiff, txt, json';\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n public element: ElementRef,\n private fileService: PepFileService\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 PepAttachmentField({\n key: this.key,\n value: this.src,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnDestroy(): void {\n //\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n // Moved to src input\n // if (changes.src && changes.src.currentValue.length > 0) {\n // // Empty dataURI if there is change in the src.\n // this.dataURI = null;\n // }\n }\n\n onFileChanged(fileData: any): void {\n // const tmp = value.length > 0 ? JSON.parse(value) : null;\n // set this.dataURI after this.src cause it initialize in the src setter.\n this.src = fileData ? fileData.fileStr : '';\n this.dataURI = fileData;\n\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.dataURI ? this.dataURI.fileExt : ''\n );\n // this.valueChange.emit({\n // key: this.key,\n // value,\n // });\n\n this.fileChange.emit(fileData);\n // this.fileChange.emit(value.length > 0 ? JSON.parse(value) : value);\n }\n\n onFileClicked(event: IPepFieldClickEvent): void {\n if (this.dataURI != null) {\n const fileStrArr = this.dataURI.fileStr.split(';');\n if (fileStrArr.length === 2) {\n const win = window.open('', '_blank');\n const contentType = fileStrArr[0].split(':')[1];\n const base64 = fileStrArr[1].split(',')[1];\n const blob = this.fileService.convertFromb64toBlob(\n base64,\n contentType\n );\n const url = URL.createObjectURL(blob);\n win.location.href = url;\n }\n } else {\n if (this.fileService.isValidUrl(this.src)) {\n const win = window.open('', '_blank');\n win.location.href = this.src;\n }\n }\n\n this.elementClick.emit(event);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepFilesUploaderModule } from '@pepperi-addons/ngx-lib/files-uploader';\n\nimport { PepAttachmentComponent } from './attachment.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepFieldTitleModule,\n PepFilesUploaderModule,\n ],\n exports: [PepAttachmentComponent],\n declarations: [PepAttachmentComponent],\n})\nexport class PepAttachmentModule {}\n","/*\n * Public API Surface of ngx-lib/attachment\n */\nexport * from './attachment.module';\nexport * from './attachment.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepAttachmentField","PepCustomizationService","Component","ChangeDetectionStrategy","Renderer2","ElementRef","PepFileService","Input","Output","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatFormFieldModule","PepNgxLibModule","PepFieldTitleModule","PepFilesUploaderModule"],"mappings":";;;;;;;QA4JI,gCACY,oBAA6C,EAC7C,QAAmB,EACpB,OAAmB,EAClB,WAA2B;YAH3B,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,aAAQ,GAAR,QAAQ,CAAW;YACpB,YAAO,GAAP,OAAO,CAAY;YAClB,gBAAW,GAAX,WAAW,CAAgB;;;;;;YA7H9B,QAAG,GAAG,EAAE,CAAC;YAEV,SAAI,GAAG,EAAE,CAAC;;;;;;YA2BT,UAAK,GAAG,EAAE,CAAC;;;;;;YAOX,cAAS,GAAG,KAAK,CA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ACzB;oBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,YAAY,EAAE,CAAC,sBAAsB,CAAC;iBACzC;;;IC3BD;;;;ICAA;;;;;;;;;;;;;"}
@@ -102,6 +102,9 @@
102
102
  this.standAlone = true;
103
103
  this.setDefaultForm();
104
104
  this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
105
+ if (!this.renderTitle) {
106
+ this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
107
+ }
105
108
  }
106
109
  };
107
110
  PepCheckboxComponent.prototype.ngOnChanges = function (changes) {
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-checkbox.umd.js","sources":["../../../projects/ngx-lib/checkbox/checkbox.component.ts","../../../projects/ngx-lib/checkbox/checkbox.module.ts","../../../projects/ngx-lib/checkbox/public-api.ts","../../../projects/ngx-lib/checkbox/pepperi-addons-ngx-lib-checkbox.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n ElementRef,\n Optional,\n OnChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatCheckboxChange } from '@angular/material/checkbox';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepCheckboxFieldType,\n PepCheckboxField,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepCheckboxComponent implements OnInit, OnChanges, OnDestroy {\n @Input() key = '';\n @Input() value = false;\n @Input() label = '';\n\n private _type: PepCheckboxFieldType = 'checkbox'; // || 'booleanText'\n @Input()\n set type(value: PepCheckboxFieldType) {\n this._type = value;\n this.setAdditionalValueObject();\n }\n get type(): PepCheckboxFieldType {\n return this._type;\n }\n\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n\n private _additionalValue: any = undefined;\n @Input()\n set additionalValue(value: any) {\n this._additionalValue = value;\n this.setAdditionalValueObject();\n }\n get additionalValue(): any {\n return this._additionalValue;\n }\n\n controlType = 'checkbox';\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() layoutType: PepLayoutType = 'form';\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 @Output()\n valueChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n standAlone = false;\n\n additionalValueObject: any;\n public jsonLib = JSON;\n\n constructor(\n private renderer: Renderer2,\n private customizationService: PepCustomizationService,\n private element: ElementRef,\n private translate: TranslateService\n ) { }\n\n private setAdditionalValueObject() {\n if (this.additionalValue && this.type === 'booleanText') {\n try {\n if (typeof this.additionalValue === 'string') {\n this.additionalValueObject = JSON.parse(\n this.additionalValue\n );\n } else {\n this.additionalValueObject = this.additionalValue;\n }\n } catch {\n this.additionalValueObject = {\n CheckedText: this.translate.instant('CHECKBOX.TRUE'),\n UncheckedText: this.translate.instant('CHECKBOX.FALSE'),\n };\n }\n }\n }\n\n private setDefaultForm(): void {\n const pepField = new PepCheckboxField({\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\n ngOnDestroy(): void {\n //\n }\n\n onMaterialChange(e: MatCheckboxChange): void {\n this.changeValue(e.checked);\n }\n\n toggleChecked(event: Event): void {\n if (!this.disabled) {\n const isChecked: boolean =\n this.value ? true : false;\n const newValue = !isChecked;\n this.value = newValue;\n this.changeValue(newValue);\n }\n }\n\n changeValue(value: any): void {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n value\n );\n this.valueChange.emit(value);\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemBolt,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepCheckboxComponent } from './checkbox.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepCheckboxComponent],\n declarations: [PepCheckboxComponent],\n})\nexport class PepCheckboxModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemBolt]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/checkbox\n */\nexport * from './checkbox.module';\nexport * from './checkbox.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepCheckboxField","PepCustomizationService","Component","ChangeDetectionStrategy","Renderer2","ElementRef","TranslateService","Input","Output","pepIconSystemBolt","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatFormFieldModule","MatCheckboxModule","MatIconModule","PepNgxLibModule","PepIconModule","PepFieldTitleModule","PepIconRegistry"],"mappings":";;;;;;;QAkGI,8BACY,QAAmB,EACnB,oBAA6C,EAC7C,OAAmB,EACnB,SAA2B;YAH3B,aAAQ,GAAR,QAAQ,CAAW;YACnB,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,YAAO,GAAP,OAAO,CAAY;YACnB,cAAS,GAAT,SAAS,CAAkB;YAtE9B,QAAG,GAAG,EAAE,CAAC;YACT,UAAK,GAAG,KAAK,CAAC;YACd,UAAK,GAAG,EAAE,CAAC;YAEZ,UAAK,GAAyB,UAAU,CAAC;YAUxC,cAAS,GAAG,KAAK,CAAC;YAClB,aAAQ,GAAG,KAAK,CAAC;YACjB,aAAQ,GAAG,KAAK,CAAC;YACjB,eAAU,GAA2BA,mCAA4B,CAAC;YAClE,YAAO,GAAG,CAAC,CAAC;YAEb,qBAAgB,GAAQ,SAAS,CAAC;YAU1C,gBAAW,GAAG,UAAU,CAAC;YAEhB,SAAI,GAAc,IAAI,CAAC;YACvB,aAAQ,GAAG,KAAK,CAAC;YACjB,cAAS,GAAG,IAAI,CAAC;YACjB,gBAAW,GAAG,IAAI,CAAC;YACnB,eAAU,GAAkB,MAAM,CAAC;YAEpC,aAAQ,GAAG,IAAI,CAAC;YAqBxB,gBAAW,GAA0B,IAAIC,iBAAY,EAAW,CAAC;YAEjE,eAAU,GAAG,KAAK,CAAC;YAGZ,YAAO,GAAG,IAAI,CAAC;SAOjB;QAlEL,sBACI,sCAAI;iBAIR;gBACI,OAAO,IAAI,CAAC,KAAK,CAAC;aACrB;iBAPD,UACS,KAA2B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YAClB,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,CAC1C,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,GAAG,EACR,KAAK,CACR,CAAC;YACF,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAChC;;;;gBAzJJC,cAAS,SAAC;oBACP,QAAQ,EAAE,cAAc;oBACxB,uqHAAwC;oBAExC,eAAe,EAAEC,4BAAuB,CAAC,MAAM;;iBAClD;;;gBAtBGC,cAAS;gBASTH,8BAAuB;gBARvBI,eAAU;gBAMLC,uBAAgB;;;sBAiBpBC,UAAK;wBACLA,UAAK;wBACLA,UAAK;uBAGLA,UAAK;4BASLA,UAAK;2BACLA,UAAK;2BACLA,UAAK;6BACLA,UAAK;0BACLA,UAAK;kCAGLA,UAAK;uBAWLA,UAAK;2BACLA,UAAK;4BACLA,UAAK;8BACLA,UAAK;6BACLA,UAAK;0BAGLA,UAAK;8BAmBLC,WAAM;;;;QCrDP,2BAAoB,eAAgC;YAAhC,oBAAe,GAAf,eAAe,CAAiB;YAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAACC,sBAAiB,CAAC,CAAC,CAAC;SAC3D;;;;gBApBJC,aAAQ,SAAC;oBACN,OAAO,EAAE;wBACLC,mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,4BAAkB;wBAClBC,0BAAiB;wBACjBC,oBAAa;;wBAEbC,sBAAe;wBACfC,kBAAa;wBACbC,8BAAmB;qBACtB;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;iBACvC;;;gBAvBGC,oBAAe;;;ICZnB;;;;ICAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-checkbox.umd.js","sources":["../../../projects/ngx-lib/checkbox/checkbox.component.ts","../../../projects/ngx-lib/checkbox/checkbox.module.ts","../../../projects/ngx-lib/checkbox/public-api.ts","../../../projects/ngx-lib/checkbox/pepperi-addons-ngx-lib-checkbox.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n ElementRef,\n Optional,\n OnChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatCheckboxChange } from '@angular/material/checkbox';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepCheckboxFieldType,\n PepCheckboxField,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepCheckboxComponent implements OnInit, OnChanges, OnDestroy {\n @Input() key = '';\n @Input() value = false;\n @Input() label = '';\n\n private _type: PepCheckboxFieldType = 'checkbox'; // || 'booleanText'\n @Input()\n set type(value: PepCheckboxFieldType) {\n this._type = value;\n this.setAdditionalValueObject();\n }\n get type(): PepCheckboxFieldType {\n return this._type;\n }\n\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n\n private _additionalValue: any = undefined;\n @Input()\n set additionalValue(value: any) {\n this._additionalValue = value;\n this.setAdditionalValueObject();\n }\n get additionalValue(): any {\n return this._additionalValue;\n }\n\n controlType = 'checkbox';\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() layoutType: PepLayoutType = 'form';\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 @Output()\n valueChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n standAlone = false;\n\n additionalValueObject: any;\n public jsonLib = JSON;\n\n constructor(\n private renderer: Renderer2,\n private customizationService: PepCustomizationService,\n private element: ElementRef,\n private translate: TranslateService\n ) { }\n\n private setAdditionalValueObject() {\n if (this.additionalValue && this.type === 'booleanText') {\n try {\n if (typeof this.additionalValue === 'string') {\n this.additionalValueObject = JSON.parse(\n this.additionalValue\n );\n } else {\n this.additionalValueObject = this.additionalValue;\n }\n } catch {\n this.additionalValueObject = {\n CheckedText: this.translate.instant('CHECKBOX.TRUE'),\n UncheckedText: this.translate.instant('CHECKBOX.FALSE'),\n };\n }\n }\n }\n\n private setDefaultForm(): void {\n const pepField = new PepCheckboxField({\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\n ngOnDestroy(): void {\n //\n }\n\n onMaterialChange(e: MatCheckboxChange): void {\n this.changeValue(e.checked);\n }\n\n toggleChecked(event: Event): void {\n if (!this.disabled) {\n const isChecked: boolean =\n this.value ? true : false;\n const newValue = !isChecked;\n this.value = newValue;\n this.changeValue(newValue);\n }\n }\n\n changeValue(value: any): void {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n value\n );\n this.valueChange.emit(value);\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemBolt,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepCheckboxComponent } from './checkbox.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepCheckboxComponent],\n declarations: [PepCheckboxComponent],\n})\nexport class PepCheckboxModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemBolt]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/checkbox\n */\nexport * from './checkbox.module';\nexport * from './checkbox.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepCheckboxField","PepCustomizationService","Component","ChangeDetectionStrategy","Renderer2","ElementRef","TranslateService","Input","Output","pepIconSystemBolt","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatFormFieldModule","MatCheckboxModule","MatIconModule","PepNgxLibModule","PepIconModule","PepFieldTitleModule","PepIconRegistry"],"mappings":";;;;;;;QAkGI,8BACY,QAAmB,EACnB,oBAA6C,EAC7C,OAAmB,EACnB,SAA2B;YAH3B,aAAQ,GAAR,QAAQ,CAAW;YACnB,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,YAAO,GAAP,OAAO,CAAY;YACnB,cAAS,GAAT,SAAS,CAAkB;YAtE9B,Q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vBI,eAAU;gBAMLC,uBAAgB;;;sBAiBpBC,UAAK;wBACLA,UAAK;wBACLA,UAAK;uBAGLA,UAAK;4BASLA,UAAK;2BACLA,UAAK;2BACLA,UAAK;6BACLA,UAAK;0BACLA,UAAK;kCAGLA,UAAK;uBAWLA,UAAK;2BACLA,UAAK;4BACLA,UAAK;8BACLA,UAAK;6BACLA,UAAK;0BAGLA,UAAK;8BAmBLC,WAAM;;;;QCrDP,2BAAoB,eAAgC;YAAhC,oBAAe,GAAf,eAAe,CAAiB;YAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAACC,sBAAiB,CAAC,CAAC,CAAC;SAC3D;;;;gBApBJC,aAAQ,SAAC;oBACN,OAAO,EAAE;wBACLC,mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,4BAAkB;wBAClBC,0BAAiB;wBACjBC,oBAAa;;wBAEbC,sBAAe;wBACfC,kBAAa;wBACbC,8BAAmB;qBACtB;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;iBACvC;;;gBAvBGC,oBAAe;;;ICZnB;;;;ICAA;;;;;;;;;;;;;"}
@@ -201,12 +201,16 @@
201
201
  this.rowSpan = 1;
202
202
  this.type = 'any';
203
203
  this.showTitle = true;
204
+ this.renderTitle = true;
204
205
  this.showAAComplient = true;
205
206
  this.layoutType = 'form';
206
207
  this.valueChange = new core.EventEmitter();
207
208
  }
208
209
  PepColorComponent.prototype.ngOnInit = function () {
209
210
  this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
211
+ if (!this.renderTitle) {
212
+ this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
213
+ }
210
214
  };
211
215
  PepColorComponent.prototype.ngOnDestroy = function () {
212
216
  //
@@ -233,7 +237,7 @@
233
237
  PepColorComponent.decorators = [
234
238
  { type: core.Component, args: [{
235
239
  selector: 'pep-color',
236
- template: "<pep-field-title [label]=\"label\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n</pep-field-title>\n<div [id]=\"key\" class=\"pep-color-container\" [ngClass]=\"{ 'right-alignment': xAlignment == 'right' }\">\n <div pepRtlDirection (click)=\"!disabled ? chooseColor() : ''\" class=\"pep-color pep-input\"\n [ngClass]=\"{disable: disabled, 'one-row': rowSpan === 1}\"\n style=\"background: {{ value ? value + '!important' : 'transparent' }}; opacity: {{ disabled && value ? 0.12 : 1}};\">\n <button *ngIf=\"!disabled\" class=\"pep-button icon-button xs weak invert mat-button btn-edit\" tabindex=\"-1\"\n pepButtonBlur mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\"></pep-icon>\n </mat-icon>\n </button>\n </div>\n</div>",
240
+ template: "<pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n</pep-field-title>\n<div [id]=\"key\" class=\"pep-color-container\" [ngClass]=\"{ 'right-alignment': xAlignment == 'right' }\">\n <div pepRtlDirection (click)=\"!disabled ? chooseColor() : ''\" class=\"pep-color pep-input\"\n [ngClass]=\"{disable: disabled, 'one-row': rowSpan === 1}\"\n style=\"background: {{ value ? value + '!important' : 'transparent' }}; opacity: {{ disabled && value ? 0.12 : 1}};\">\n <button *ngIf=\"!disabled\" class=\"pep-button icon-button xs weak invert mat-button btn-edit\" tabindex=\"-1\"\n pepButtonBlur mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\"></pep-icon>\n </mat-icon>\n </button>\n </div>\n</div>",
237
241
  styles: [":host{display:grid}.pep-color-container .pep-color,.pep-color-container .pepperi-color,.pepperi-color-container .pep-color,.pepperi-color-container .pepperi-color{padding:0;display:grid}.pep-color-container .pep-color .btn-edit,.pep-color-container .pepperi-color .btn-edit,.pepperi-color-container .pep-color .btn-edit,.pepperi-color-container .pepperi-color .btn-edit{width:calc(2.5rem - 1rem);width:calc(var(--pep-form-field-height, 2.5rem) - var(--pep-spacing-lg, 1rem));min-width:unset;padding:0;margin:0 .75rem;margin:0 var(--pep-spacing-md,.75rem);justify-self:end;align-self:center}.pep-color-container.right-alignment .pep-color .btn-edit,.pep-color-container.right-alignment .pepperi-color .btn-edit,.pepperi-color-container.right-alignment .pep-color .btn-edit,.pepperi-color-container.right-alignment .pepperi-color .btn-edit{justify-self:start}"]
238
242
  },] }
239
243
  ];
@@ -251,6 +255,7 @@
251
255
  rowSpan: [{ type: core.Input }],
252
256
  type: [{ type: core.Input }],
253
257
  showTitle: [{ type: core.Input }],
258
+ renderTitle: [{ type: core.Input }],
254
259
  showAAComplient: [{ type: core.Input }],
255
260
  layoutType: [{ type: core.Input }],
256
261
  valueChange: [{ type: core.Output }]
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-color.umd.js","sources":["../../../projects/ngx-lib/color/color-picker.component.ts","../../../projects/ngx-lib/color/color.component.ts","../../../projects/ngx-lib/color/color.module.ts","../../../projects/ngx-lib/color/public-api.ts","../../../projects/ngx-lib/color/pepperi-addons-ngx-lib-color.ts"],"sourcesContent":["import { Component, OnInit, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n// import {\n// hex2hsl,\n// hslString2hsl,\n// rgbString2hsl,\n// IPepHslColor,\n// findClosestAccessibleColor,\n// hsl2hex,\n// convertHslToStringHsl,\n// } from './color-utils';\nimport { PepColorService, IPepHslColor } from '@pepperi-addons/ngx-lib';\n\nimport { PepColorType } from './color.model';\n\nenum PepContrastRatioType {\n AA = 4.5,\n AAA = 7,\n}\n\ninterface IPepColorPickerDialogData {\n value: string;\n type: PepColorType;\n showAAComplient: boolean;\n textColor: string;\n contrastRatio: PepContrastRatioType;\n}\n\n@Component({\n templateUrl: './color-picker.component.html',\n styleUrls: ['./color-picker.component.scss'],\n})\nexport class PepColorPickerComponent implements OnInit {\n static CURRENT_HUE = '--pep-color-picker-current-hue';\n private readonly defaultColor = '#ccc';\n\n checkAAComplient = true;\n\n constructor(\n private colorService: PepColorService,\n private dialogRef: MatDialogRef<PepColorPickerComponent>,\n @Inject(MAT_DIALOG_DATA) public data: IPepColorPickerDialogData\n ) {\n this.data.type = data ? data.type : 'any';\n this.data.showAAComplient = !data\n ? false\n : data.showAAComplient ?? true;\n this.data.textColor = data && data.textColor ? data.textColor : '#fff';\n this.data.contrastRatio =\n data && data.contrastRatio\n ? data.contrastRatio\n : PepContrastRatioType.AA;\n }\n\n private defaultHueBackground = `linear-gradient(to right,\n hsl(0, 100%, 50%) 0%,\n hsl(60, 100%, 50%) 17%,\n hsl(120, 100%, 50%) 33%,\n hsl(180, 100%, 50%) 50%,\n hsl(240, 100%, 50%) 67%,\n hsl(300, 100%, 50%) 83%,\n hsl(360, 100%, 50%) 100%)`;\n\n currentHue = 100;\n currentHueMin = 0;\n currentHueMax = 360;\n currentHueBackground = this.defaultHueBackground;\n\n private defaultSaturationBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 0.01%, 50%) 0%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 100%)`;\n\n currentSaturation = 50;\n currentSaturationMin = 0;\n currentSaturationMax = 100;\n currentSaturationBackground = this.defaultSaturationBackground;\n\n private defaultLightnessBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 100%, 100%) 0%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 50%,\n hsl(var(--pep-color-picker-current-hue), 100%, 0.01%) 100%)`;\n\n currentLightness = 50;\n currentLightnessMin = 0;\n currentLightnessMax = 100;\n currentLightnessBackground = this.defaultLightnessBackground;\n\n complientColor: string;\n isUserChooseAAComplientColor: boolean;\n\n ngOnInit(): void {\n this.initVars();\n this.checkAAComplient = this.data.showAAComplient;\n this.convertValueStringToColor(this.data.value);\n }\n\n initVars(): void {\n if (this.data.type === 'main') {\n this.currentLightnessMax = 10;\n this.currentLightness = 5;\n this.currentHueBackground = this.defaultHueBackground;\n this.currentSaturationBackground = this.defaultSaturationBackground;\n this.currentLightnessBackground = this.defaultLightnessBackground;\n } else if (this.data.type === 'success') {\n this.currentHueMin = 70;\n this.currentHueMax = 150;\n this.currentHue = 100;\n\n this.currentSaturationMin = 50;\n this.currentSaturationMax = 100;\n this.currentSaturation = 50;\n\n this.currentLightnessMin = 10;\n this.currentLightnessMax = 65;\n this.currentLightness = 50;\n\n this.currentHueBackground = `linear-gradient(to right,\n hsl(70, 100%, 50%) 0%,\n hsl(150, 100%, 50%) 100%)`;\n this.currentSaturationBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 50%, 50%) 50%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 100%)`;\n this.currentLightnessBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 100%, 65%) 10%,\n hsl(var(--pep-color-picker-current-hue), 100%, 35%) 35%,\n hsl(var(--pep-color-picker-current-hue), 100%, 10%) 65%)`;\n\n } else if (this.data.type === 'caution') {\n this.currentHueMin = -20;\n this.currentHueMax = 20;\n this.currentHue = 10;\n\n this.currentSaturationMin = 75;\n this.currentSaturationMax = 100;\n this.currentSaturation = 75;\n\n this.currentLightnessMin = 25;\n this.currentLightnessMax = 75;\n this.currentLightness = 50;\n\n this.currentHueBackground = `linear-gradient(to right,\n hsl(340, 100%, 50%) 0%,\n hsl(20, 100%, 50%) 100%)`;\n this.currentSaturationBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 75%, 50%) 75%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 100%)`;\n this.currentLightnessBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 100%, 75%) 25%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 50%,\n hsl(var(--pep-color-picker-current-hue), 100%, 25%) 75%)`;\n }\n }\n\n setCurrentHueInCss(): void {\n document.documentElement.style.setProperty(\n PepColorPickerComponent.CURRENT_HUE,\n this.currentHue.toString()\n );\n }\n\n convertValueStringToColor(color): void {\n if (color.indexOf('hsl') === 0) {\n const hsl = this.colorService.hslString2hsl(color);\n this.convertColorToValueString(hsl);\n } else if (color.indexOf('rgb') === 0) {\n const hsl = this.colorService.rgbString2hsl(color);\n this.convertColorToValueString(hsl);\n } else if (color.indexOf('#') === 0) {\n const hsl = this.colorService.hex2hsl(color);\n this.convertColorToValueString(hsl);\n } else {\n // Handle default.\n const hsl = this.colorService.hex2hsl(this.defaultColor);\n this.convertColorToValueString(hsl);\n }\n\n this.setCurrentHueInCss();\n }\n\n convertColorToValueString(hslColor: IPepHslColor): void {\n // Regular hue\n if (\n hslColor.h >= this.currentHueMin &&\n hslColor.h <= this.currentHueMax\n ) {\n this.currentHue = hslColor.h;\n } else if (\n this.currentHueMin < 0 &&\n hslColor.h >= 0 &&\n hslColor.h <= 360\n ) {\n // For min with - (change to the other side of the circle)\n hslColor.h = hslColor.h - 360;\n\n if (\n hslColor.h >= this.currentHueMin &&\n hslColor.h <= this.currentHueMax\n ) {\n this.currentHue = hslColor.h;\n }\n }\n\n this.currentSaturation =\n hslColor.s >= this.currentSaturationMin &&\n hslColor.s <= this.currentSaturationMax\n ? hslColor.s\n : this.currentSaturation;\n\n this.currentLightness =\n hslColor.l >= this.currentLightnessMin &&\n hslColor.l <= this.currentLightnessMax\n ? hslColor.l\n : this.currentLightness;\n\n // Write the value (if hue is changed to the other side of the circle return it back).\n const hsl = {\n h: this.currentHue,\n s: this.currentSaturation,\n l: this.currentLightness,\n };\n this.data.value = this.colorService.convertHslToStringHsl(hsl);\n\n // Check the contrast ratio - set the closest accessible color to complientColor\n // and update isUserChooseAAComplientColor.\n const adjustableColor = this.colorService.hsl2hex(hsl);\n const closestHex = this.colorService.findClosestAccessibleColor(\n adjustableColor,\n this.data.textColor,\n this.data.contrastRatio\n );\n\n this.isUserChooseAAComplientColor = adjustableColor === closestHex;\n this.complientColor = this.colorService.convertHslToStringHsl(\n this.colorService.hex2hsl(closestHex)\n );\n }\n\n onHueChange(value): void {\n this.convertColorToValueString({ h: value });\n this.setCurrentHueInCss();\n }\n\n onSaturationChange(value): void {\n // this.currentSaturation = event.value;\n this.convertColorToValueString({ s: value });\n }\n\n onLightnessChange(value): void {\n // this.currentLightness = event.value;\n this.convertColorToValueString({\n l:\n this.currentLightnessMax -\n value +\n this.currentLightnessMin,\n });\n }\n\n onColorValueChange(event): void {\n this.convertValueStringToColor(event.value);\n }\n\n onSave(event): void {\n const color = this.checkAAComplient\n ? this.complientColor\n : this.data.value;\n\n // this.notify.emit({ key: this.key, value: color });\n this.dialogRef.close(color);\n }\n}\n","import {\n Component,\n OnInit,\n Input,\n Output,\n Renderer2,\n ElementRef,\n EventEmitter,\n OnChanges,\n OnDestroy,\n} from '@angular/core';\nimport {\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n} from '@pepperi-addons/ngx-lib';\nimport { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';\nimport { PepColorPickerComponent } from './color-picker.component';\nimport { PepColorType } from './color.model';\n\n@Component({\n selector: 'pep-color',\n templateUrl: './color.component.html',\n styleUrls: ['./color.component.scss'],\n})\nexport class PepColorComponent implements OnInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() disabled = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n @Input() type: PepColorType = 'any';\n\n @Input() showTitle = true;\n @Input() showAAComplient = true;\n @Input() layoutType: PepLayoutType = 'form';\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n constructor(\n private dialogService: PepDialogService,\n private renderer: Renderer2,\n private element: ElementRef\n ) {}\n\n ngOnInit(): void {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n }\n\n ngOnDestroy(): void {\n //\n }\n\n changeColor(value: any): void {\n this.value = value;\n this.valueChange.emit(value);\n }\n\n chooseColor(): void {\n const dialogRef = this.dialogService.openDialog(\n PepColorPickerComponent,\n {\n value: this.value,\n type: this.type,\n showAAComplient: this.showAAComplient,\n }\n );\n\n dialogRef.afterClosed().subscribe((value) => {\n if (value !== undefined && value !== null) {\n this.changeColor(value);\n }\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSliderModule } from '@angular/material/slider';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\nimport { PepSliderModule } from '@pepperi-addons/ngx-lib/slider';\n\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemOk,\n pepIconSystemClose,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepTextboxModule } from '@pepperi-addons/ngx-lib/textbox';\n\nimport { PepColorComponent } from './color.component';\nimport { PepColorPickerComponent } from './color-picker.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatDialogModule,\n MatIconModule,\n MatSliderModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepDialogModule,\n PepIconModule,\n PepSliderModule,\n PepFieldTitleModule,\n PepTextboxModule,\n ],\n exports: [PepColorComponent],\n declarations: [PepColorComponent, PepColorPickerComponent],\n entryComponents: [PepColorPickerComponent],\n})\nexport class PepColorModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemOk,\n pepIconSystemClose,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/color\n */\nexport * from './color.module';\nexport * from './color.model';\n// export * from './color-utils';\nexport * from './color.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {PepColorPickerComponent as ɵa} from './color-picker.component';"],"names":["Component","PepColorService","MatDialogRef","Inject","MAT_DIALOG_DATA","DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepCustomizationService","PepDialogService","Renderer2","ElementRef","Input","Output","pepIconSystemEdit","pepIconSystemOk","pepIconSystemClose","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatButtonModule","MatFormFieldModule","MatCheckboxModule","MatDialogModule","MatIconModule","MatSliderModule","PepNgxLibModule","PepDialogModule","PepIconModule","PepSliderModule","PepFieldTitleModule","PepTextboxModule","PepIconRegistry"],"mappings":";;;;;;IAeA,IAAK,oBAGJ;IAHD,WAAK,oBAAoB;QACrB,6DAAQ,CAAA;QACR,6DAAO,CAAA;IACX,CAAC,EAHI,oBAAoB,KAApB,oBAAoB,QAGxB;;QAoBG,iCACY,YAA6B,EAC7B,SAAgD,EACxB,IAA+B;;YAFvD,iBAAY,GAAZ,YAAY,CAAiB;YAC7B,cAAS,GAAT,SAAS,CAAuC;YACxB,SAAI,GAAJ,IAAI,CAA2B;YAPlD,iBAAY,GAAG,MAAM,CAAC;YAEvC,qBAAgB,GAAG,IAAI,CAAC;YAkBhB,yBAAoB,GAAG,sQAOD,CAAC;YAE/B,eAAU,GAAG,GAAG,CAAC;YACjB,kBAAa,GAAG,CAAC,CAAC;YAClB,kBAAa,GAAG,GAAG,CAAC;YACpB,yBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC;YAEzC,gCAA2B,GAAG,gKAEwB,CAAC;YAE/D,sBAAiB,GAAG,EAAE,CAAC;YACv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AC;SACN;;;;gBA1DJP,cAAS,SAAC;oBACP,QAAQ,EAAE,WAAW;oBACrB,01BAAqC;;iBAExC;;;gBARQQ,yBAAgB;gBAZrBC,cAAS;gBACTC,eAAU;;;sBAqBTC,UAAK;wBACLA,UAAK;wBACLA,UAAK;2BACLA,UAAK;6BACLA,UAAK;0BACLA,UAAK;uBACLA,UAAK;4BAELA,UAAK;kCACLA,UAAK;6BACLA,UAAK;8BAELC,WAAM;;;;QCeP,wBAAoB,eAAgC;YAAhC,oBAAe,GAAf,eAAe,CAAiB;YAChD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC;gBAC/BC,sBAAiB;gBACjBC,oBAAe;gBACfC,uBAAkB;aACrB,CAAC,CAAC;SACN;;;;gBA/BJC,aAAQ,SAAC;oBACN,OAAO,EAAE;wBACLC,mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,sBAAe;wBACfC,4BAAkB;wBAClBC,0BAAiB;wBACjBC,sBAAe;wBACfC,oBAAa;wBACbC,sBAAe;;wBAEfC,sBAAe;wBACfC,wBAAe;wBACfC,kBAAa;wBACbC,wBAAe;wBACfC,8BAAmB;wBACnBC,wBAAgB;qBACnB;oBACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,YAAY,EAAE,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;oBAC1D,eAAe,EAAE,CAAC,uBAAuB,CAAC;iBAC7C;;;gBAlCGC,oBAAe;;;IClBnB;;;;ICAA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-color.umd.js","sources":["../../../projects/ngx-lib/color/color-picker.component.ts","../../../projects/ngx-lib/color/color.component.ts","../../../projects/ngx-lib/color/color.module.ts","../../../projects/ngx-lib/color/public-api.ts","../../../projects/ngx-lib/color/pepperi-addons-ngx-lib-color.ts"],"sourcesContent":["import { Component, OnInit, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n// import {\n// hex2hsl,\n// hslString2hsl,\n// rgbString2hsl,\n// IPepHslColor,\n// findClosestAccessibleColor,\n// hsl2hex,\n// convertHslToStringHsl,\n// } from './color-utils';\nimport { PepColorService, IPepHslColor } from '@pepperi-addons/ngx-lib';\n\nimport { PepColorType } from './color.model';\n\nenum PepContrastRatioType {\n AA = 4.5,\n AAA = 7,\n}\n\ninterface IPepColorPickerDialogData {\n value: string;\n type: PepColorType;\n showAAComplient: boolean;\n textColor: string;\n contrastRatio: PepContrastRatioType;\n}\n\n@Component({\n templateUrl: './color-picker.component.html',\n styleUrls: ['./color-picker.component.scss'],\n})\nexport class PepColorPickerComponent implements OnInit {\n static CURRENT_HUE = '--pep-color-picker-current-hue';\n private readonly defaultColor = '#ccc';\n\n checkAAComplient = true;\n\n constructor(\n private colorService: PepColorService,\n private dialogRef: MatDialogRef<PepColorPickerComponent>,\n @Inject(MAT_DIALOG_DATA) public data: IPepColorPickerDialogData\n ) {\n this.data.type = data ? data.type : 'any';\n this.data.showAAComplient = !data\n ? false\n : data.showAAComplient ?? true;\n this.data.textColor = data && data.textColor ? data.textColor : '#fff';\n this.data.contrastRatio =\n data && data.contrastRatio\n ? data.contrastRatio\n : PepContrastRatioType.AA;\n }\n\n private defaultHueBackground = `linear-gradient(to right,\n hsl(0, 100%, 50%) 0%,\n hsl(60, 100%, 50%) 17%,\n hsl(120, 100%, 50%) 33%,\n hsl(180, 100%, 50%) 50%,\n hsl(240, 100%, 50%) 67%,\n hsl(300, 100%, 50%) 83%,\n hsl(360, 100%, 50%) 100%)`;\n\n currentHue = 100;\n currentHueMin = 0;\n currentHueMax = 360;\n currentHueBackground = this.defaultHueBackground;\n\n private defaultSaturationBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 0.01%, 50%) 0%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 100%)`;\n\n currentSaturation = 50;\n currentSaturationMin = 0;\n currentSaturationMax = 100;\n currentSaturationBackground = this.defaultSaturationBackground;\n\n private defaultLightnessBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 100%, 100%) 0%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 50%,\n hsl(var(--pep-color-picker-current-hue), 100%, 0.01%) 100%)`;\n\n currentLightness = 50;\n currentLightnessMin = 0;\n currentLightnessMax = 100;\n currentLightnessBackground = this.defaultLightnessBackground;\n\n complientColor: string;\n isUserChooseAAComplientColor: boolean;\n\n ngOnInit(): void {\n this.initVars();\n this.checkAAComplient = this.data.showAAComplient;\n this.convertValueStringToColor(this.data.value);\n }\n\n initVars(): void {\n if (this.data.type === 'main') {\n this.currentLightnessMax = 10;\n this.currentLightness = 5;\n this.currentHueBackground = this.defaultHueBackground;\n this.currentSaturationBackground = this.defaultSaturationBackground;\n this.currentLightnessBackground = this.defaultLightnessBackground;\n } else if (this.data.type === 'success') {\n this.currentHueMin = 70;\n this.currentHueMax = 150;\n this.currentHue = 100;\n\n this.currentSaturationMin = 50;\n this.currentSaturationMax = 100;\n this.currentSaturation = 50;\n\n this.currentLightnessMin = 10;\n this.currentLightnessMax = 65;\n this.currentLightness = 50;\n\n this.currentHueBackground = `linear-gradient(to right,\n hsl(70, 100%, 50%) 0%,\n hsl(150, 100%, 50%) 100%)`;\n this.currentSaturationBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 50%, 50%) 50%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 100%)`;\n this.currentLightnessBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 100%, 65%) 10%,\n hsl(var(--pep-color-picker-current-hue), 100%, 35%) 35%,\n hsl(var(--pep-color-picker-current-hue), 100%, 10%) 65%)`;\n\n } else if (this.data.type === 'caution') {\n this.currentHueMin = -20;\n this.currentHueMax = 20;\n this.currentHue = 10;\n\n this.currentSaturationMin = 75;\n this.currentSaturationMax = 100;\n this.currentSaturation = 75;\n\n this.currentLightnessMin = 25;\n this.currentLightnessMax = 75;\n this.currentLightness = 50;\n\n this.currentHueBackground = `linear-gradient(to right,\n hsl(340, 100%, 50%) 0%,\n hsl(20, 100%, 50%) 100%)`;\n this.currentSaturationBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 75%, 50%) 75%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 100%)`;\n this.currentLightnessBackground = `linear-gradient(to right,\n hsl(var(--pep-color-picker-current-hue), 100%, 75%) 25%,\n hsl(var(--pep-color-picker-current-hue), 100%, 50%) 50%,\n hsl(var(--pep-color-picker-current-hue), 100%, 25%) 75%)`;\n }\n }\n\n setCurrentHueInCss(): void {\n document.documentElement.style.setProperty(\n PepColorPickerComponent.CURRENT_HUE,\n this.currentHue.toString()\n );\n }\n\n convertValueStringToColor(color): void {\n if (color.indexOf('hsl') === 0) {\n const hsl = this.colorService.hslString2hsl(color);\n this.convertColorToValueString(hsl);\n } else if (color.indexOf('rgb') === 0) {\n const hsl = this.colorService.rgbString2hsl(color);\n this.convertColorToValueString(hsl);\n } else if (color.indexOf('#') === 0) {\n const hsl = this.colorService.hex2hsl(color);\n this.convertColorToValueString(hsl);\n } else {\n // Handle default.\n const hsl = this.colorService.hex2hsl(this.defaultColor);\n this.convertColorToValueString(hsl);\n }\n\n this.setCurrentHueInCss();\n }\n\n convertColorToValueString(hslColor: IPepHslColor): void {\n // Regular hue\n if (\n hslColor.h >= this.currentHueMin &&\n hslColor.h <= this.currentHueMax\n ) {\n this.currentHue = hslColor.h;\n } else if (\n this.currentHueMin < 0 &&\n hslColor.h >= 0 &&\n hslColor.h <= 360\n ) {\n // For min with - (change to the other side of the circle)\n hslColor.h = hslColor.h - 360;\n\n if (\n hslColor.h >= this.currentHueMin &&\n hslColor.h <= this.currentHueMax\n ) {\n this.currentHue = hslColor.h;\n }\n }\n\n this.currentSaturation =\n hslColor.s >= this.currentSaturationMin &&\n hslColor.s <= this.currentSaturationMax\n ? hslColor.s\n : this.currentSaturation;\n\n this.currentLightness =\n hslColor.l >= this.currentLightnessMin &&\n hslColor.l <= this.currentLightnessMax\n ? hslColor.l\n : this.currentLightness;\n\n // Write the value (if hue is changed to the other side of the circle return it back).\n const hsl = {\n h: this.currentHue,\n s: this.currentSaturation,\n l: this.currentLightness,\n };\n this.data.value = this.colorService.convertHslToStringHsl(hsl);\n\n // Check the contrast ratio - set the closest accessible color to complientColor\n // and update isUserChooseAAComplientColor.\n const adjustableColor = this.colorService.hsl2hex(hsl);\n const closestHex = this.colorService.findClosestAccessibleColor(\n adjustableColor,\n this.data.textColor,\n this.data.contrastRatio\n );\n\n this.isUserChooseAAComplientColor = adjustableColor === closestHex;\n this.complientColor = this.colorService.convertHslToStringHsl(\n this.colorService.hex2hsl(closestHex)\n );\n }\n\n onHueChange(value): void {\n this.convertColorToValueString({ h: value });\n this.setCurrentHueInCss();\n }\n\n onSaturationChange(value): void {\n // this.currentSaturation = event.value;\n this.convertColorToValueString({ s: value });\n }\n\n onLightnessChange(value): void {\n // this.currentLightness = event.value;\n this.convertColorToValueString({\n l:\n this.currentLightnessMax -\n value +\n this.currentLightnessMin,\n });\n }\n\n onColorValueChange(event): void {\n this.convertValueStringToColor(event.value);\n }\n\n onSave(event): void {\n const color = this.checkAAComplient\n ? this.complientColor\n : this.data.value;\n\n // this.notify.emit({ key: this.key, value: color });\n this.dialogRef.close(color);\n }\n}\n","import {\n Component,\n OnInit,\n Input,\n Output,\n Renderer2,\n ElementRef,\n EventEmitter,\n OnChanges,\n OnDestroy,\n} from '@angular/core';\nimport {\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n} from '@pepperi-addons/ngx-lib';\nimport { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';\nimport { PepColorPickerComponent } from './color-picker.component';\nimport { PepColorType } from './color.model';\n\n@Component({\n selector: 'pep-color',\n templateUrl: './color.component.html',\n styleUrls: ['./color.component.scss'],\n})\nexport class PepColorComponent implements OnInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() disabled = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n @Input() type: PepColorType = 'any';\n\n @Input() showTitle = true;\n @Input() renderTitle = true;\n\n @Input() showAAComplient = true;\n @Input() layoutType: PepLayoutType = 'form';\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n constructor(\n private dialogService: PepDialogService,\n private renderer: Renderer2,\n private element: ElementRef\n ) { }\n\n ngOnInit(): void {\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 ngOnDestroy(): void {\n //\n }\n\n changeColor(value: any): void {\n this.value = value;\n this.valueChange.emit(value);\n }\n\n chooseColor(): void {\n const dialogRef = this.dialogService.openDialog(\n PepColorPickerComponent,\n {\n value: this.value,\n type: this.type,\n showAAComplient: this.showAAComplient,\n }\n );\n\n dialogRef.afterClosed().subscribe((value) => {\n if (value !== undefined && value !== null) {\n this.changeColor(value);\n }\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSliderModule } from '@angular/material/slider';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\nimport { PepSliderModule } from '@pepperi-addons/ngx-lib/slider';\n\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemOk,\n pepIconSystemClose,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepTextboxModule } from '@pepperi-addons/ngx-lib/textbox';\n\nimport { PepColorComponent } from './color.component';\nimport { PepColorPickerComponent } from './color-picker.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatDialogModule,\n MatIconModule,\n MatSliderModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepDialogModule,\n PepIconModule,\n PepSliderModule,\n PepFieldTitleModule,\n PepTextboxModule,\n ],\n exports: [PepColorComponent],\n declarations: [PepColorComponent, PepColorPickerComponent],\n entryComponents: [PepColorPickerComponent],\n})\nexport class PepColorModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemOk,\n pepIconSystemClose,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/color\n */\nexport * from './color.module';\nexport * from './color.model';\n// export * from './color-utils';\nexport * from './color.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {PepColorPickerComponent as ɵa} from './color-picker.component';"],"names":["Component","PepColorService","MatDialogRef","Inject","MAT_DIALOG_DATA","DEFAULT_HORIZONTAL_ALIGNMENT","EventEmitter","PepCustomizationService","PepDialogService","Renderer2","ElementRef","Input","Output","pepIconSystemEdit","pepIconSystemOk","pepIconSystemClose","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatButtonModule","MatFormFieldModule","MatCheckboxModule","MatDialogModule","MatIconModule","MatSliderModule","PepNgxLibModule","PepDialogModule","PepIconModule","PepSliderModule","PepFieldTitleModule","PepTextboxModule","PepIconRegistry"],"mappings":";;;;;;IAeA,IAAK,oBAGJ;IAHD,WAAK,oBAAoB;QACrB,6DAAQ,CAAA;QACR,6D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AE;wBACLC,mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,sBAAe;wBACfC,4BAAkB;wBAClBC,0BAAiB;wBACjBC,sBAAe;wBACfC,oBAAa;wBACbC,sBAAe;;wBAEfC,sBAAe;wBACfC,wBAAe;wBACfC,kBAAa;wBACbC,wBAAe;wBACfC,8BAAmB;wBACnBC,wBAAgB;qBACnB;oBACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,YAAY,EAAE,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;oBAC1D,eAAe,EAAE,CAAC,uBAAuB,CAAC;iBAC7C;;;gBAlCGC,oBAAe;;;IClBnB;;;;ICAA;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material/button'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/icon'), require('@mat-datetimepicker/core'), require('@pepperi-addons/ngx-lib'), require('@pepperi-addons/ngx-lib/icon'), require('@pepperi-addons/ngx-lib/textbox-icon'), require('@pepperi-addons/ngx-lib/field-title'), require('moment/moment'), require('@angular/material-moment-adapter'), require('@mat-datetimepicker/moment')) :
3
3
  typeof define === 'function' && define.amd ? define('@pepperi-addons/ngx-lib/date', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/core', '@angular/material/button', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/icon', '@mat-datetimepicker/core', '@pepperi-addons/ngx-lib', '@pepperi-addons/ngx-lib/icon', '@pepperi-addons/ngx-lib/textbox-icon', '@pepperi-addons/ngx-lib/field-title', 'moment/moment', '@angular/material-moment-adapter', '@mat-datetimepicker/moment'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['pepperi-addons'] = global['pepperi-addons'] || {}, global['pepperi-addons']['ngx-lib'] = global['pepperi-addons']['ngx-lib'] || {}, global['pepperi-addons']['ngx-lib'].date = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.core, global.ng.material.button, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.icon, global['datetimepicker-core'], global['pepperi-addons']['ngx-lib'], global['pepperi-addons']['ngx-lib'].icon, global['pepperi-addons']['ngx-lib']['textbox-icon'], global['pepperi-addons']['ngx-lib']['field-title'], global.moment$1, global.ng.materialMomentAdapter, global['datetimepicker-moment']));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['pepperi-addons'] = global['pepperi-addons'] || {}, global['pepperi-addons']['ngx-lib'] = global['pepperi-addons']['ngx-lib'] || {}, global['pepperi-addons']['ngx-lib'].date = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.core, global.ng.material.button, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.icon, global['datetimepicker-core'], global['pepperi-addons']['ngx-lib'], global['pepperi-addons']['ngx-lib'].icon, global['pepperi-addons']['ngx-lib']['textbox-icon'], global['pepperi-addons']['ngx-lib']['field-title'], global['moment/moment'], global.ng.materialMomentAdapter, global['datetimepicker-moment']));
5
5
  }(this, (function (exports, core, common, forms, core$1, button, datepicker, formField, input, icon$1, core$2, ngxLib, icon, textboxIcon, fieldTitle, moment$1, materialMomentAdapter, moment) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
@@ -485,6 +485,9 @@
485
485
  this.standAlone = true;
486
486
  this.setDefaultForm();
487
487
  this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
488
+ if (!this.renderTitle) {
489
+ this.renderer.addClass(this.element.nativeElement, ngxLib.PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
490
+ }
488
491
  }
489
492
  var culture = this.layoutService.getCurrentLanguage();
490
493
  this.adapter.setLocale(culture);