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

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 (163) hide show
  1. package/attachment/attachment.component.d.ts +0 -1
  2. package/attachment/pepperi-addons-ngx-lib-attachment.metadata.json +1 -1
  3. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js +1 -6
  4. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js.map +1 -1
  5. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js +0 -3
  6. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js.map +1 -1
  7. package/bundles/pepperi-addons-ngx-lib-color.umd.js +1 -6
  8. package/bundles/pepperi-addons-ngx-lib-color.umd.js.map +1 -1
  9. package/bundles/pepperi-addons-ngx-lib-date.umd.js +0 -3
  10. package/bundles/pepperi-addons-ngx-lib-date.umd.js.map +1 -1
  11. package/bundles/pepperi-addons-ngx-lib-form.umd.js +15 -18
  12. package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
  13. package/bundles/pepperi-addons-ngx-lib-image.umd.js +1 -6
  14. package/bundles/pepperi-addons-ngx-lib-image.umd.js.map +1 -1
  15. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js +1 -6
  16. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js.map +1 -1
  17. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js +1 -6
  18. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js.map +1 -1
  19. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js +1 -6
  20. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js.map +1 -1
  21. package/bundles/pepperi-addons-ngx-lib-select.umd.js +1 -6
  22. package/bundles/pepperi-addons-ngx-lib-select.umd.js.map +1 -1
  23. package/bundles/pepperi-addons-ngx-lib-separator.umd.js +0 -8
  24. package/bundles/pepperi-addons-ngx-lib-separator.umd.js.map +1 -1
  25. package/bundles/pepperi-addons-ngx-lib-signature.umd.js +1 -6
  26. package/bundles/pepperi-addons-ngx-lib-signature.umd.js.map +1 -1
  27. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js +173 -1432
  28. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js.map +1 -1
  29. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js +1 -6
  30. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js.map +1 -1
  31. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js +2 -4
  32. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js.map +1 -1
  33. package/bundles/pepperi-addons-ngx-lib.umd.js +101 -85
  34. package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
  35. package/color/color.component.d.ts +0 -1
  36. package/color/pepperi-addons-ngx-lib-color.metadata.json +1 -1
  37. package/core/common/services/color.service.d.ts +3 -3
  38. package/core/customization/customization.service.d.ts +0 -1
  39. package/esm2015/attachment/attachment.component.js +2 -7
  40. package/esm2015/checkbox/checkbox.component.js +1 -4
  41. package/esm2015/color/color.component.js +2 -7
  42. package/esm2015/color/public-api.js +1 -2
  43. package/esm2015/core/common/services/color.service.js +101 -83
  44. package/esm2015/core/customization/customization.service.js +2 -4
  45. package/esm2015/date/date.component.js +1 -4
  46. package/esm2015/form/internal-button.component.js +17 -20
  47. package/esm2015/image/image.component.js +2 -7
  48. package/esm2015/images-filmstrip/images-filmstrip.component.js +2 -7
  49. package/esm2015/quantity-selector/quantity-selector.component.js +2 -7
  50. package/esm2015/rich-html-textarea/rich-html-textarea.component.js +2 -7
  51. package/esm2015/select/select.component.js +2 -7
  52. package/esm2015/separator/separator.component.js +1 -9
  53. package/esm2015/signature/signature.component.js +2 -7
  54. package/esm2015/smart-filters/boolean-filter/boolean-filter.component.js +2 -12
  55. package/esm2015/smart-filters/common/model/base-filter-component.js +10 -40
  56. package/esm2015/smart-filters/common/model/creator.js +2 -8
  57. package/esm2015/smart-filters/common/model/field.js +1 -12
  58. package/esm2015/smart-filters/common/model/operator.js +8 -8
  59. package/esm2015/smart-filters/common/model/type.js +1 -1
  60. package/esm2015/smart-filters/date-filter/date-filter.component.js +2 -45
  61. package/esm2015/smart-filters/multi-select-filter/multi-select-filter.component.js +14 -53
  62. package/esm2015/smart-filters/number-filter/number-filter.component.js +2 -25
  63. package/esm2015/smart-filters/pepperi-addons-ngx-lib-smart-filters.js +1 -8
  64. package/esm2015/smart-filters/public-api.js +1 -2
  65. package/esm2015/smart-filters/smart-filters.module.js +2 -14
  66. package/esm2015/textarea/textarea.component.js +2 -7
  67. package/esm2015/textbox/textbox.component.js +3 -5
  68. package/fesm2015/pepperi-addons-ngx-lib-attachment.js +1 -6
  69. package/fesm2015/pepperi-addons-ngx-lib-attachment.js.map +1 -1
  70. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js +0 -3
  71. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js.map +1 -1
  72. package/fesm2015/pepperi-addons-ngx-lib-color.js +1 -6
  73. package/fesm2015/pepperi-addons-ngx-lib-color.js.map +1 -1
  74. package/fesm2015/pepperi-addons-ngx-lib-date.js +0 -3
  75. package/fesm2015/pepperi-addons-ngx-lib-date.js.map +1 -1
  76. package/fesm2015/pepperi-addons-ngx-lib-form.js +15 -18
  77. package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
  78. package/fesm2015/pepperi-addons-ngx-lib-image.js +1 -6
  79. package/fesm2015/pepperi-addons-ngx-lib-image.js.map +1 -1
  80. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js +1 -6
  81. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js.map +1 -1
  82. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js +1 -6
  83. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js.map +1 -1
  84. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js +1 -6
  85. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js.map +1 -1
  86. package/fesm2015/pepperi-addons-ngx-lib-select.js +1 -6
  87. package/fesm2015/pepperi-addons-ngx-lib-select.js.map +1 -1
  88. package/fesm2015/pepperi-addons-ngx-lib-separator.js +0 -8
  89. package/fesm2015/pepperi-addons-ngx-lib-separator.js.map +1 -1
  90. package/fesm2015/pepperi-addons-ngx-lib-signature.js +1 -6
  91. package/fesm2015/pepperi-addons-ngx-lib-signature.js.map +1 -1
  92. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js +128 -1293
  93. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js.map +1 -1
  94. package/fesm2015/pepperi-addons-ngx-lib-textarea.js +1 -6
  95. package/fesm2015/pepperi-addons-ngx-lib-textarea.js.map +1 -1
  96. package/fesm2015/pepperi-addons-ngx-lib-textbox.js +2 -4
  97. package/fesm2015/pepperi-addons-ngx-lib-textbox.js.map +1 -1
  98. package/fesm2015/pepperi-addons-ngx-lib.js +101 -85
  99. package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
  100. package/form/internal-button.component.d.ts +1 -0
  101. package/image/image.component.d.ts +0 -1
  102. package/image/pepperi-addons-ngx-lib-image.metadata.json +1 -1
  103. package/images-filmstrip/images-filmstrip.component.d.ts +0 -1
  104. package/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.metadata.json +1 -1
  105. package/package.json +1 -1
  106. package/pepperi-addons-ngx-lib.metadata.json +1 -1
  107. package/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.metadata.json +1 -1
  108. package/quantity-selector/quantity-selector.component.d.ts +0 -1
  109. package/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.metadata.json +1 -1
  110. package/rich-html-textarea/rich-html-textarea.component.d.ts +0 -1
  111. package/select/pepperi-addons-ngx-lib-select.metadata.json +1 -1
  112. package/select/select.component.d.ts +0 -1
  113. package/separator/pepperi-addons-ngx-lib-separator.metadata.json +1 -1
  114. package/signature/pepperi-addons-ngx-lib-signature.metadata.json +1 -1
  115. package/signature/signature.component.d.ts +0 -1
  116. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +1 -5
  117. package/smart-filters/common/model/base-filter-component.d.ts +1 -10
  118. package/smart-filters/common/model/field.d.ts +0 -4
  119. package/smart-filters/common/model/operator.d.ts +0 -1
  120. package/smart-filters/common/model/type.d.ts +2 -2
  121. package/smart-filters/date-filter/date-filter.component.d.ts +1 -8
  122. package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +0 -6
  123. package/smart-filters/number-filter/number-filter.component.d.ts +0 -5
  124. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.d.ts +0 -7
  125. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.metadata.json +1 -1
  126. package/smart-filters/public-api.d.ts +0 -1
  127. package/src/assets/i18n/en.ngx-lib.json +1 -2
  128. package/src/core/style/abstracts/mixins.scss +3 -3
  129. package/src/core/style/components/general.scss +2 -4
  130. package/textarea/pepperi-addons-ngx-lib-textarea.metadata.json +1 -1
  131. package/textarea/textarea.component.d.ts +0 -1
  132. package/theming.scss +0 -4
  133. package/esm2015/smart-filters/filter-builder/common/model/filter.js +0 -2
  134. package/esm2015/smart-filters/filter-builder/common/model/legacy.js +0 -2
  135. package/esm2015/smart-filters/filter-builder/common/model/operator-unit.js +0 -42
  136. package/esm2015/smart-filters/filter-builder/common/model/operator.js +0 -207
  137. package/esm2015/smart-filters/filter-builder/common/model/type-map.js +0 -27
  138. package/esm2015/smart-filters/filter-builder/common/model/type.js +0 -6
  139. package/esm2015/smart-filters/filter-builder/common/pipes/filter-item-counter.pipe.js +0 -18
  140. package/esm2015/smart-filters/filter-builder/common/services/output-filter.service.js +0 -132
  141. package/esm2015/smart-filters/filter-builder/common/services/type-convertor.service.js +0 -44
  142. package/esm2015/smart-filters/filter-builder/filter-builder-item/filter-builder-item.component.js +0 -106
  143. package/esm2015/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.js +0 -50
  144. package/esm2015/smart-filters/filter-builder/filter-builder.component.js +0 -65
  145. package/esm2015/smart-filters/filter-builder/filter-builder.service.js +0 -261
  146. package/esm2015/smart-filters/index.js +0 -5
  147. package/esm2015/smart-filters/text-filter/text-filter.component.js +0 -79
  148. package/smart-filters/filter-builder/common/model/filter.d.ts +0 -6
  149. package/smart-filters/filter-builder/common/model/legacy.d.ts +0 -23
  150. package/smart-filters/filter-builder/common/model/operator-unit.d.ts +0 -13
  151. package/smart-filters/filter-builder/common/model/operator.d.ts +0 -21
  152. package/smart-filters/filter-builder/common/model/type-map.d.ts +0 -12
  153. package/smart-filters/filter-builder/common/model/type.d.ts +0 -4
  154. package/smart-filters/filter-builder/common/pipes/filter-item-counter.pipe.d.ts +0 -5
  155. package/smart-filters/filter-builder/common/services/output-filter.service.d.ts +0 -52
  156. package/smart-filters/filter-builder/common/services/type-convertor.service.d.ts +0 -10
  157. package/smart-filters/filter-builder/filter-builder-item/filter-builder-item.component.d.ts +0 -32
  158. package/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.d.ts +0 -22
  159. package/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.theme.scss +0 -6
  160. package/smart-filters/filter-builder/filter-builder.component.d.ts +0 -22
  161. package/smart-filters/filter-builder/filter-builder.service.d.ts +0 -90
  162. package/smart-filters/index.d.ts +0 -1
  163. package/smart-filters/text-filter/text-filter.component.d.ts +0 -17
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-quantity-selector.js","sources":["../../../projects/ngx-lib/quantity-selector/quantity-selector.component.ts","../../../projects/ngx-lib/quantity-selector/quantity-selector-validation.directive.ts","../../../projects/ngx-lib/quantity-selector/quantity-selector.pipes.ts","../../../projects/ngx-lib/quantity-selector/quantity-selector.module.ts","../../../projects/ngx-lib/quantity-selector/public-api.ts","../../../projects/ngx-lib/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n OnDestroy,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Renderer2,\n AfterViewInit,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n trigger,\n state,\n style,\n animate,\n transition,\n} from '@angular/animations';\nimport {\n PepLayoutType,\n PepStyleType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n IPepFieldClickEvent,\n PepQuantitySelectorFieldType,\n PepQuantitySelectorField,\n PepUtilitiesService,\n} from '@pepperi-addons/ngx-lib';\nimport { BehaviorSubject, fromEvent, Subject } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Component({\n selector: 'pep-quantity-selector',\n templateUrl: './quantity-selector.component.html',\n styleUrls: ['./quantity-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('showHide', [\n state(\n 'show',\n style({\n opacity: 1,\n transform: 'scale(1)',\n })\n ),\n state(\n 'hide',\n style({\n opacity: 0,\n transform: 'scale(0)',\n })\n ),\n transition('show => hide', animate('250ms ease-out')),\n transition('hide => show', animate('250ms ease-in')),\n ]),\n ],\n})\nexport class PepQuantitySelectorComponent\n implements OnChanges, OnInit, AfterViewInit, OnDestroy {\n public static ENTER_CHILDREN = '[EnterChildren]';\n public static ENTER_PACKAGE = '[EnterPackage]';\n public static PLUS = '[+]';\n public static MINUS = '[-]';\n\n @Input() key = '';\n\n private _value = null;\n @Input()\n set value(value: string) {\n if (!value) {\n value = '';\n }\n\n this._value = value;\n\n if (this._calculateFormattedValue) {\n this.setFormattedValue(value);\n }\n }\n get value(): string {\n return this._value;\n }\n\n private _formattedValue = null;\n @Input()\n set formattedValue(value: string) {\n if (!value) {\n value = '';\n }\n\n if (this._calculateFormattedValue) {\n this._calculateFormattedValue = false;\n }\n\n this.setFormattedValue(value);\n }\n get formattedValue(): string {\n return this._formattedValue;\n }\n\n @Input() label = '';\n @Input() type: PepQuantitySelectorFieldType = 'qs';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n\n private _textColor = '';\n @Input()\n set textColor(value: string) {\n this._textColor = value;\n this.isCaution = value === '#FF0000';\n }\n get textColor(): string {\n return this._textColor;\n }\n\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n @Input() allowDecimal = false;\n @Input() additionalValue = '';\n\n private _notificationInfo: any;\n @Input()\n set notificationInfo(value: any) {\n this._notificationInfo = value;\n\n const messages = value && value > 0 ? JSON.parse(value).Messages : '';\n if (messages && messages.length > 0) {\n // Replace the msg keys.\n for (const msg of messages) {\n if (msg.Key === 'Inventory_Limit_Msg') {\n msg.Key = 'MESSAGES.ERROR_INVENTORY_LIMIT';\n } else if (msg.Key === 'Case_Quantity_Limit_Msg') {\n msg.Key = 'MESSAGES.ERROR_CASE_QUANTITY_LIMIT';\n } else if (msg.Key === 'Min_Quantity_Limit_Msg') {\n msg.Key = 'MESSAGES.ERROR_MIN_QUANTITY_LIMIT';\n } else if (msg.Key === 'Max_Quantity_Limit_Msg') {\n msg.Key = 'MESSAGES.ERROR_MAX_QUANTITY_LIMIT';\n }\n }\n\n this.messages = messages;\n\n const fieldControl = this.form.controls[this.key];\n fieldControl.setErrors({\n serverError: 'Error',\n });\n\n this.sameElementInTheWantedRow = null;\n setTimeout(() => {\n if (this.QSInput && this.QSInput.nativeElement) {\n this.QSInput.nativeElement.focus();\n }\n }, 150);\n }\n }\n get notificationInfo(): any {\n return this._notificationInfo;\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 = 'qs';\n\n @Input() form: FormGroup = null;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() layoutType: PepLayoutType = 'form';\n @Input() isActive = false;\n\n // Get default style from theme.\n @Input()\n styleType: PepStyleType = document.documentElement.style.getPropertyValue(\n PepCustomizationService.STYLE_QS_KEY\n ) as PepStyleType; //'strong';\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @Output()\n elementClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();\n\n @ViewChild('QSCont') QSCont: ElementRef;\n @ViewChild('QSInput') QSInput: ElementRef;\n\n private _calculateFormattedValue = true;\n get calculateFormattedValue(): boolean {\n return this._calculateFormattedValue;\n }\n\n private readonly _destroyed: Subject<void>;\n private qsWidthSubject: BehaviorSubject<number>;\n lastQsContClientWidth = 0;\n showQsBtn = true;\n\n standAlone = false;\n isInFocus = false;\n isMatrixFocus = false;\n\n isCaution = false;\n messages: Array<any> = null;\n\n sameElementInTheWantedRow = null;\n\n isEmptyKey = false;\n\n constructor(\n private cd: ChangeDetectorRef,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef,\n private translate: TranslateService,\n private utilitiesService: PepUtilitiesService\n ) {\n this._destroyed = new Subject();\n this.qsWidthSubject = new BehaviorSubject(0);\n }\n\n setForm() {\n const pepField = new PepQuantitySelectorField({\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 private setFormattedValue(value: string) {\n if (this._calculateFormattedValue) {\n this._formattedValue = this.utilitiesService.formatNumber(value);\n } else {\n this._formattedValue = value;\n }\n\n this.updateFormFieldValue();\n }\n\n private updateFormFieldValue() {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.formattedValue\n );\n }\n\n get displayValue(): string {\n const res = this.isInFocus\n ? parseFloat(this.value).toString()\n : this.formattedValue;\n return res;\n }\n\n protected getDestroyer() {\n return takeUntil(this._destroyed);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n if (this.key === '') {\n this.isEmptyKey = true;\n }\n\n this.standAlone = true;\n this.setForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n\n this.qsWidthSubject\n .asObservable()\n .pipe(this.getDestroyer(), distinctUntilChanged())\n .subscribe((qsWidth: number) => {\n this.setupQsButtons(qsWidth);\n });\n\n this.updateFormFieldValue();\n }\n\n ngAfterViewInit() {\n //\n }\n\n ngAfterViewChecked(): void {\n this.setQsView();\n }\n\n ngOnChanges(changes: any): void {\n // Bug fix for addons when the key is '' in the ngOnInit for some reson\n if (this.isEmptyKey && this.key !== '') {\n this.setForm();\n }\n\n setTimeout(() => {\n this.focusToTheSameElementInTheWantedRow();\n }, 150);\n }\n\n ngOnDestroy(): void {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n get getAdditionalValue(): string {\n return this.additionalValue.length > 0 ? 'show' : 'hide';\n }\n\n getParentByClass(el, parentSelector /* optional */): any {\n // If no parentSelector defined will bubble up all the way to *document*\n if (parentSelector === undefined) {\n parentSelector = document;\n }\n\n let p = el.parentNode;\n\n while (\n p &&\n !p?.classList?.contains(parentSelector) &&\n parentSelector !== document\n ) {\n const o = p;\n p = o?.parentNode || null;\n }\n\n return p?.className.indexOf(parentSelector) > -1 ? p : null;\n }\n\n getSameElementInTheWantedRowByClassName(event: any, isNext = true): any {\n const eventTarget = event.target || event.srcElement;\n let sameElementInTheWantedRowByClassName;\n\n let parentSelector;\n if (this.layoutType === 'table') {\n parentSelector = this.getParentByClass(eventTarget, 'table-row');\n } else if (this.layoutType === 'card') {\n parentSelector = this.getParentByClass(eventTarget, 'card-view');\n if (!parentSelector) {\n parentSelector = this.getParentByClass(\n eventTarget,\n 'line-view'\n );\n }\n }\n\n if (\n parentSelector.nextElementSibling === null &&\n parentSelector.previousElementSibling === null\n ) {\n sameElementInTheWantedRowByClassName = null;\n } else {\n if (isNext) {\n if (parentSelector.nextElementSibling === null) {\n sameElementInTheWantedRowByClassName = parentSelector.parentElement.querySelectorAll(\n '[name=' + this.key + ']'\n )[0];\n } else {\n sameElementInTheWantedRowByClassName = parentSelector.nextElementSibling.querySelectorAll(\n '[name=' + this.key + ']'\n )[0];\n }\n } else {\n if (parentSelector.previousElementSibling === null) {\n const elementsList = parentSelector.parentElement.querySelectorAll(\n '[name=' + this.key + ']'\n );\n sameElementInTheWantedRowByClassName =\n elementsList[elementsList.length - 1];\n } else {\n sameElementInTheWantedRowByClassName = parentSelector.previousElementSibling.querySelectorAll(\n '[name=' + this.key + ']'\n )[0];\n }\n }\n }\n\n return sameElementInTheWantedRowByClassName;\n }\n\n setSameElementInTheWantedRow(event: any, isNext = true): void {\n // Navigate to the QS in the next row.\n if (this.layoutType === 'card' || this.layoutType === 'table') {\n this.sameElementInTheWantedRow = this.getSameElementInTheWantedRowByClassName(\n event,\n isNext\n );\n }\n\n this.QSInput.nativeElement.blur();\n }\n\n focusToTheSameElementInTheWantedRow(): void {\n if (this.sameElementInTheWantedRow) {\n const elem = this.sameElementInTheWantedRow;\n // If this is regular item (qs and not button) .\n if (elem instanceof HTMLInputElement && elem.type === 'text') {\n elem.click();\n elem.select();\n } else {\n const parentElem = elem.parentNode;\n parentElem.click();\n elem.focus();\n }\n this.sameElementInTheWantedRow = null;\n }\n }\n\n cleanError(): void {\n const fieldControl = this.form.controls[this.key];\n\n // Clean the error message\n if (this.messages && this.messages.length > 0) {\n this.messages = this.notificationInfo = null;\n fieldControl.setErrors(null);\n }\n }\n\n onMatrixMouseEnter(event: any): void {\n this.isMatrixFocus = true;\n }\n\n onMatrixMouseleave(event: any): void {\n this.isMatrixFocus = false;\n }\n\n onMatrixClick(event: any): void {\n this.isInFocus = true;\n\n if (this.QSInput && this.QSInput.nativeElement) {\n this.QSInput.nativeElement.focus();\n }\n }\n\n onMatrixBlur(event: any): void {\n if (\n !event.relatedTarget ||\n event.relatedTarget.className.indexOf('qs') < 0\n ) {\n this.isMatrixFocus = false;\n }\n\n this.onBlur(event);\n }\n\n onFocus(event: any): void {\n this.isInFocus = true;\n }\n\n isDifferentValue(value: string): boolean {\n let res = false;\n\n const currentValue = this.utilitiesService.coerceNumberProperty(\n this.value\n );\n const newValue = this.utilitiesService.coerceNumberProperty(value);\n\n res = currentValue !== newValue;\n\n return res;\n }\n\n onBlur(event: any): void {\n this.isInFocus = false;\n this.cleanError();\n const value = event.target ? event.target.value : event;\n\n if (value !== this.value && this.isDifferentValue(value)) {\n this.value = value;\n\n // If the user is setting the formatted value then set the value till the user format it and return it back.\n if (!this._calculateFormattedValue) {\n this._formattedValue = value;\n }\n\n this.valueChange.emit(this.value);\n } else {\n this.focusToTheSameElementInTheWantedRow();\n }\n }\n\n onKeydown(event): any {\n const keyboardEvent = event as KeyboardEvent;\n\n if (keyboardEvent.key === 'Enter') {\n this.setSameElementInTheWantedRow(\n keyboardEvent,\n !keyboardEvent.shiftKey\n );\n return true;\n }\n }\n\n increment(event): void {\n if (this.standAlone) {\n this.value = this.utilitiesService.incrementNumber(this.value);\n }\n\n this.elementClick.emit({\n key: this.key,\n value: PepQuantitySelectorComponent.PLUS,\n controlType: this.controlType,\n eventWhich: event.which,\n });\n event.stopPropagation();\n }\n\n decrement(event): void {\n if (this.standAlone) {\n this.value = this.utilitiesService.decrementNumber(this.value);\n }\n\n this.elementClick.emit({\n key: this.key,\n value: PepQuantitySelectorComponent.MINUS,\n controlType: this.controlType,\n eventWhich: event.which,\n });\n event.stopPropagation();\n }\n\n enterChildren(event): void {\n this.elementClick.emit({\n key: this.key,\n value: PepQuantitySelectorComponent.ENTER_CHILDREN,\n controlType: this.controlType,\n eventWhich: event.which,\n });\n }\n\n enterPackage(event): void {\n this.elementClick.emit({\n key: this.key,\n value: PepQuantitySelectorComponent.ENTER_PACKAGE,\n controlType: this.controlType,\n eventWhich: event.which,\n otherData: this.notificationInfo,\n });\n }\n\n setupQsButtons(qsWidth: number) {\n this.showQsBtn = qsWidth > 120;\n\n if (!this.cd['destroyed']) {\n this.cd.detectChanges();\n }\n }\n\n setQsView(): void {\n if (\n this.QSCont &&\n this.QSCont.nativeElement &&\n this.QSCont.nativeElement.clientWidth > 0\n ) {\n setTimeout(() => {\n this.qsWidthSubject.next(this.QSCont.nativeElement.clientWidth);\n }, 0);\n }\n }\n}\n","import { getLocaleNumberSymbol, NumberSymbol } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnInit,\n} from '@angular/core';\nimport { PepValidatorService } from '@pepperi-addons/ngx-lib';\n\n@Directive({\n selector: '[pepQsValidation]',\n})\nexport class PepQuantitySelectorValidationDirective implements OnInit {\n @Input() allowDecimal: boolean;\n\n previousValue = '';\n\n constructor(\n private hostElement: ElementRef,\n private validatorService: PepValidatorService\n ) {}\n\n ngOnInit() {\n //\n }\n\n @HostListener('change', ['$event'])\n onChange(e) {\n this.validateValue(this.hostElement.nativeElement.value);\n }\n\n @HostListener('keydown', ['$event'])\n onKeyDown(e: KeyboardEvent) {\n const originalValue: string = e.target['value'];\n\n // save value before keydown event\n this.previousValue = originalValue;\n\n const isNumber = this.validatorService.isNumber(e, this.allowDecimal);\n if (isNumber) return;\n else e.preventDefault();\n }\n\n validateValue(value: string): void {\n const newValue = this.validatorService.validateNumber(\n value,\n this.allowDecimal\n );\n this.hostElement.nativeElement['value'] = newValue ? newValue : 0;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'pepQuantitySelectorNumber' })\nexport class PepQuantitySelectorNumberPipe implements PipeTransform {\n transform(value: string, allowDecimal: boolean): string {\n const tmpValue = parseFloat(value);\n\n if (tmpValue === 0) {\n return '0';\n } else if (allowDecimal) {\n return tmpValue.toString();\n } else {\n return parseInt(value).toString();\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 { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconNumberMinus,\n pepIconNumberPlus,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepQuantitySelectorComponent } from './quantity-selector.component';\nimport { PepQuantitySelectorValidationDirective } from './quantity-selector-validation.directive';\nimport { PepQuantitySelectorNumberPipe } from './quantity-selector.pipes';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n MatBadgeModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepQuantitySelectorComponent],\n declarations: [\n PepQuantitySelectorComponent,\n PepQuantitySelectorNumberPipe,\n PepQuantitySelectorValidationDirective,\n ],\n})\nexport class PepQuantitySelectorModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconNumberMinus,\n pepIconNumberPlus,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/quantity-selector\n */\nexport * from './quantity-selector.module';\nexport * from './quantity-selector.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {PepQuantitySelectorValidationDirective as ɵb} from './quantity-selector-validation.directive';\nexport {PepQuantitySelectorNumberPipe as ɵa} from './quantity-selector.pipes';"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAgEa,4BAA4B;IAuKrC,YACY,EAAqB,EACrB,oB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4BAA4B,CAAC;gBACvC,YAAY,EAAE;oBACV,4BAA4B;oBAC5B,6BAA6B;oBAC7B,sCAAsC;iBACzC;aACJ;;;YAhCG,eAAe;;;ACdnB;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-quantity-selector.js","sources":["../../../projects/ngx-lib/quantity-selector/quantity-selector.component.ts","../../../projects/ngx-lib/quantity-selector/quantity-selector-validation.directive.ts","../../../projects/ngx-lib/quantity-selector/quantity-selector.pipes.ts","../../../projects/ngx-lib/quantity-selector/quantity-selector.module.ts","../../../projects/ngx-lib/quantity-selector/public-api.ts","../../../projects/ngx-lib/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n OnDestroy,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Renderer2,\n AfterViewInit,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n trigger,\n state,\n style,\n animate,\n transition,\n} from '@angular/animations';\nimport {\n PepLayoutType,\n PepStyleType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n IPepFieldClickEvent,\n PepQuantitySelectorFieldType,\n PepQuantitySelectorField,\n PepUtilitiesService,\n} from '@pepperi-addons/ngx-lib';\nimport { BehaviorSubject, fromEvent, Subject } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Component({\n selector: 'pep-quantity-selector',\n templateUrl: './quantity-selector.component.html',\n styleUrls: ['./quantity-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('showHide', [\n state(\n 'show',\n style({\n opacity: 1,\n transform: 'scale(1)',\n })\n ),\n state(\n 'hide',\n style({\n opacity: 0,\n transform: 'scale(0)',\n })\n ),\n transition('show => hide', animate('250ms ease-out')),\n transition('hide => show', animate('250ms ease-in')),\n ]),\n ],\n})\nexport class PepQuantitySelectorComponent\n implements OnChanges, OnInit, AfterViewInit, OnDestroy {\n public static ENTER_CHILDREN = '[EnterChildren]';\n public static ENTER_PACKAGE = '[EnterPackage]';\n public static PLUS = '[+]';\n public static MINUS = '[-]';\n\n @Input() key = '';\n\n private _value = null;\n @Input()\n set value(value: string) {\n if (!value) {\n value = '';\n }\n\n this._value = value;\n\n if (this._calculateFormattedValue) {\n this.setFormattedValue(value);\n }\n }\n get value(): string {\n return this._value;\n }\n\n private _formattedValue = null;\n @Input()\n set formattedValue(value: string) {\n if (!value) {\n value = '';\n }\n\n if (this._calculateFormattedValue) {\n this._calculateFormattedValue = false;\n }\n\n this.setFormattedValue(value);\n }\n get formattedValue(): string {\n return this._formattedValue;\n }\n\n @Input() label = '';\n @Input() type: PepQuantitySelectorFieldType = 'qs';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n\n private _textColor = '';\n @Input()\n set textColor(value: string) {\n this._textColor = value;\n this.isCaution = value === '#FF0000';\n }\n get textColor(): string {\n return this._textColor;\n }\n\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n @Input() allowDecimal = false;\n @Input() additionalValue = '';\n\n private _notificationInfo: any;\n @Input()\n set notificationInfo(value: any) {\n this._notificationInfo = value;\n\n const messages = value && value > 0 ? JSON.parse(value).Messages : '';\n if (messages && messages.length > 0) {\n // Replace the msg keys.\n for (const msg of messages) {\n if (msg.Key === 'Inventory_Limit_Msg') {\n msg.Key = 'MESSAGES.ERROR_INVENTORY_LIMIT';\n } else if (msg.Key === 'Case_Quantity_Limit_Msg') {\n msg.Key = 'MESSAGES.ERROR_CASE_QUANTITY_LIMIT';\n } else if (msg.Key === 'Min_Quantity_Limit_Msg') {\n msg.Key = 'MESSAGES.ERROR_MIN_QUANTITY_LIMIT';\n } else if (msg.Key === 'Max_Quantity_Limit_Msg') {\n msg.Key = 'MESSAGES.ERROR_MAX_QUANTITY_LIMIT';\n }\n }\n\n this.messages = messages;\n\n const fieldControl = this.form.controls[this.key];\n fieldControl.setErrors({\n serverError: 'Error',\n });\n\n this.sameElementInTheWantedRow = null;\n setTimeout(() => {\n if (this.QSInput && this.QSInput.nativeElement) {\n this.QSInput.nativeElement.focus();\n }\n }, 150);\n }\n }\n get notificationInfo(): any {\n return this._notificationInfo;\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 = 'qs';\n\n @Input() form: FormGroup = null;\n @Input() showTitle = true;\n @Input() layoutType: PepLayoutType = 'form';\n @Input() isActive = false;\n\n // Get default style from theme.\n @Input()\n styleType: PepStyleType = document.documentElement.style.getPropertyValue(\n PepCustomizationService.STYLE_QS_KEY\n ) as PepStyleType; //'strong';\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @Output()\n elementClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();\n\n @ViewChild('QSCont') QSCont: ElementRef;\n @ViewChild('QSInput') QSInput: ElementRef;\n\n private _calculateFormattedValue = true;\n get calculateFormattedValue(): boolean {\n return this._calculateFormattedValue;\n }\n\n private readonly _destroyed: Subject<void>;\n private qsWidthSubject: BehaviorSubject<number>;\n lastQsContClientWidth = 0;\n showQsBtn = true;\n\n standAlone = false;\n isInFocus = false;\n isMatrixFocus = false;\n\n isCaution = false;\n messages: Array<any> = null;\n\n sameElementInTheWantedRow = null;\n\n isEmptyKey = false;\n\n constructor(\n private cd: ChangeDetectorRef,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef,\n private translate: TranslateService,\n private utilitiesService: PepUtilitiesService\n ) {\n this._destroyed = new Subject();\n this.qsWidthSubject = new BehaviorSubject(0);\n }\n\n setForm() {\n const pepField = new PepQuantitySelectorField({\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 private setFormattedValue(value: string) {\n if (this._calculateFormattedValue) {\n this._formattedValue = this.utilitiesService.formatNumber(value);\n } else {\n this._formattedValue = value;\n }\n\n this.updateFormFieldValue();\n }\n\n private updateFormFieldValue() {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.formattedValue\n );\n }\n\n get displayValue(): string {\n const res = this.isInFocus\n ? parseFloat(this.value).toString()\n : this.formattedValue;\n return res;\n }\n\n protected getDestroyer() {\n return takeUntil(this._destroyed);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n if (this.key === '') {\n this.isEmptyKey = true;\n }\n\n this.standAlone = true;\n this.setForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n }\n\n this.qsWidthSubject\n .asObservable()\n .pipe(this.getDestroyer(), distinctUntilChanged())\n .subscribe((qsWidth: number) => {\n this.setupQsButtons(qsWidth);\n });\n\n this.updateFormFieldValue();\n }\n\n ngAfterViewInit() {\n //\n }\n\n ngAfterViewChecked(): void {\n this.setQsView();\n }\n\n ngOnChanges(changes: any): void {\n // Bug fix for addons when the key is '' in the ngOnInit for some reson\n if (this.isEmptyKey && this.key !== '') {\n this.setForm();\n }\n\n setTimeout(() => {\n this.focusToTheSameElementInTheWantedRow();\n }, 150);\n }\n\n ngOnDestroy(): void {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n get getAdditionalValue(): string {\n return this.additionalValue.length > 0 ? 'show' : 'hide';\n }\n\n getParentByClass(el, parentSelector /* optional */): any {\n // If no parentSelector defined will bubble up all the way to *document*\n if (parentSelector === undefined) {\n parentSelector = document;\n }\n\n let p = el.parentNode;\n\n while (\n p &&\n !p?.classList?.contains(parentSelector) &&\n parentSelector !== document\n ) {\n const o = p;\n p = o?.parentNode || null;\n }\n\n return p?.className.indexOf(parentSelector) > -1 ? p : null;\n }\n\n getSameElementInTheWantedRowByClassName(event: any, isNext = true): any {\n const eventTarget = event.target || event.srcElement;\n let sameElementInTheWantedRowByClassName;\n\n let parentSelector;\n if (this.layoutType === 'table') {\n parentSelector = this.getParentByClass(eventTarget, 'table-row');\n } else if (this.layoutType === 'card') {\n parentSelector = this.getParentByClass(eventTarget, 'card-view');\n if (!parentSelector) {\n parentSelector = this.getParentByClass(\n eventTarget,\n 'line-view'\n );\n }\n }\n\n if (\n parentSelector.nextElementSibling === null &&\n parentSelector.previousElementSibling === null\n ) {\n sameElementInTheWantedRowByClassName = null;\n } else {\n if (isNext) {\n if (parentSelector.nextElementSibling === null) {\n sameElementInTheWantedRowByClassName = parentSelector.parentElement.querySelectorAll(\n '[name=' + this.key + ']'\n )[0];\n } else {\n sameElementInTheWantedRowByClassName = parentSelector.nextElementSibling.querySelectorAll(\n '[name=' + this.key + ']'\n )[0];\n }\n } else {\n if (parentSelector.previousElementSibling === null) {\n const elementsList = parentSelector.parentElement.querySelectorAll(\n '[name=' + this.key + ']'\n );\n sameElementInTheWantedRowByClassName =\n elementsList[elementsList.length - 1];\n } else {\n sameElementInTheWantedRowByClassName = parentSelector.previousElementSibling.querySelectorAll(\n '[name=' + this.key + ']'\n )[0];\n }\n }\n }\n\n return sameElementInTheWantedRowByClassName;\n }\n\n setSameElementInTheWantedRow(event: any, isNext = true): void {\n // Navigate to the QS in the next row.\n if (this.layoutType === 'card' || this.layoutType === 'table') {\n this.sameElementInTheWantedRow = this.getSameElementInTheWantedRowByClassName(\n event,\n isNext\n );\n }\n\n this.QSInput.nativeElement.blur();\n }\n\n focusToTheSameElementInTheWantedRow(): void {\n if (this.sameElementInTheWantedRow) {\n const elem = this.sameElementInTheWantedRow;\n // If this is regular item (qs and not button) .\n if (elem instanceof HTMLInputElement && elem.type === 'text') {\n elem.click();\n elem.select();\n } else {\n const parentElem = elem.parentNode;\n parentElem.click();\n elem.focus();\n }\n this.sameElementInTheWantedRow = null;\n }\n }\n\n cleanError(): void {\n const fieldControl = this.form.controls[this.key];\n\n // Clean the error message\n if (this.messages && this.messages.length > 0) {\n this.messages = this.notificationInfo = null;\n fieldControl.setErrors(null);\n }\n }\n\n onMatrixMouseEnter(event: any): void {\n this.isMatrixFocus = true;\n }\n\n onMatrixMouseleave(event: any): void {\n this.isMatrixFocus = false;\n }\n\n onMatrixClick(event: any): void {\n this.isInFocus = true;\n\n if (this.QSInput && this.QSInput.nativeElement) {\n this.QSInput.nativeElement.focus();\n }\n }\n\n onMatrixBlur(event: any): void {\n if (\n !event.relatedTarget ||\n event.relatedTarget.className.indexOf('qs') < 0\n ) {\n this.isMatrixFocus = false;\n }\n\n this.onBlur(event);\n }\n\n onFocus(event: any): void {\n this.isInFocus = true;\n }\n\n isDifferentValue(value: string): boolean {\n let res = false;\n\n const currentValue = this.utilitiesService.coerceNumberProperty(\n this.value\n );\n const newValue = this.utilitiesService.coerceNumberProperty(value);\n\n res = currentValue !== newValue;\n\n return res;\n }\n\n onBlur(event: any): void {\n this.isInFocus = false;\n this.cleanError();\n const value = event.target ? event.target.value : event;\n\n if (value !== this.value && this.isDifferentValue(value)) {\n this.value = value;\n\n // If the user is setting the formatted value then set the value till the user format it and return it back.\n if (!this._calculateFormattedValue) {\n this._formattedValue = value;\n }\n\n this.valueChange.emit(this.value);\n } else {\n this.focusToTheSameElementInTheWantedRow();\n }\n }\n\n onKeydown(event): any {\n const keyboardEvent = event as KeyboardEvent;\n\n if (keyboardEvent.key === 'Enter') {\n this.setSameElementInTheWantedRow(\n keyboardEvent,\n !keyboardEvent.shiftKey\n );\n return true;\n }\n }\n\n increment(event): void {\n if (this.standAlone) {\n this.value = this.utilitiesService.incrementNumber(this.value);\n }\n\n this.elementClick.emit({\n key: this.key,\n value: PepQuantitySelectorComponent.PLUS,\n controlType: this.controlType,\n eventWhich: event.which,\n });\n event.stopPropagation();\n }\n\n decrement(event): void {\n if (this.standAlone) {\n this.value = this.utilitiesService.decrementNumber(this.value);\n }\n\n this.elementClick.emit({\n key: this.key,\n value: PepQuantitySelectorComponent.MINUS,\n controlType: this.controlType,\n eventWhich: event.which,\n });\n event.stopPropagation();\n }\n\n enterChildren(event): void {\n this.elementClick.emit({\n key: this.key,\n value: PepQuantitySelectorComponent.ENTER_CHILDREN,\n controlType: this.controlType,\n eventWhich: event.which,\n });\n }\n\n enterPackage(event): void {\n this.elementClick.emit({\n key: this.key,\n value: PepQuantitySelectorComponent.ENTER_PACKAGE,\n controlType: this.controlType,\n eventWhich: event.which,\n otherData: this.notificationInfo,\n });\n }\n\n setupQsButtons(qsWidth: number) {\n this.showQsBtn = qsWidth > 120;\n\n if (!this.cd['destroyed']) {\n this.cd.detectChanges();\n }\n }\n\n setQsView(): void {\n if (\n this.QSCont &&\n this.QSCont.nativeElement &&\n this.QSCont.nativeElement.clientWidth > 0\n ) {\n setTimeout(() => {\n this.qsWidthSubject.next(this.QSCont.nativeElement.clientWidth);\n }, 0);\n }\n }\n}\n","import { getLocaleNumberSymbol, NumberSymbol } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnInit,\n} from '@angular/core';\nimport { PepValidatorService } from '@pepperi-addons/ngx-lib';\n\n@Directive({\n selector: '[pepQsValidation]',\n})\nexport class PepQuantitySelectorValidationDirective implements OnInit {\n @Input() allowDecimal: boolean;\n\n previousValue = '';\n\n constructor(\n private hostElement: ElementRef,\n private validatorService: PepValidatorService\n ) {}\n\n ngOnInit() {\n //\n }\n\n @HostListener('change', ['$event'])\n onChange(e) {\n this.validateValue(this.hostElement.nativeElement.value);\n }\n\n @HostListener('keydown', ['$event'])\n onKeyDown(e: KeyboardEvent) {\n const originalValue: string = e.target['value'];\n\n // save value before keydown event\n this.previousValue = originalValue;\n\n const isNumber = this.validatorService.isNumber(e, this.allowDecimal);\n if (isNumber) return;\n else e.preventDefault();\n }\n\n validateValue(value: string): void {\n const newValue = this.validatorService.validateNumber(\n value,\n this.allowDecimal\n );\n this.hostElement.nativeElement['value'] = newValue ? newValue : 0;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'pepQuantitySelectorNumber' })\nexport class PepQuantitySelectorNumberPipe implements PipeTransform {\n transform(value: string, allowDecimal: boolean): string {\n const tmpValue = parseFloat(value);\n\n if (tmpValue === 0) {\n return '0';\n } else if (allowDecimal) {\n return tmpValue.toString();\n } else {\n return parseInt(value).toString();\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 { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconNumberMinus,\n pepIconNumberPlus,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepQuantitySelectorComponent } from './quantity-selector.component';\nimport { PepQuantitySelectorValidationDirective } from './quantity-selector-validation.directive';\nimport { PepQuantitySelectorNumberPipe } from './quantity-selector.pipes';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n MatBadgeModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepQuantitySelectorComponent],\n declarations: [\n PepQuantitySelectorComponent,\n PepQuantitySelectorNumberPipe,\n PepQuantitySelectorValidationDirective,\n ],\n})\nexport class PepQuantitySelectorModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconNumberMinus,\n pepIconNumberPlus,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/quantity-selector\n */\nexport * from './quantity-selector.module';\nexport * from './quantity-selector.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {PepQuantitySelectorValidationDirective as ɵb} from './quantity-selector-validation.directive';\nexport {PepQuantitySelectorNumberPipe as ɵa} from './quantity-selector.pipes';"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAgEa,4BAA4B;IAsKrC,YACY,EAAqB,EACrB,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB,EACnB,SAA2B,EAC3B,gBAAqC;QALrC,OAAE,GAAF,EAAE,CAAmB;QACrB,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,aAAQ,GAAR,QAAQ,CAAW;QACnB,YAAO,GAAP,OAAO,CAAY;QACnB,cAAS,GAAT,SAAS,CAAkB;QAC3B,qBAAgB,GAAhB,gBAAgB,CAAqB;QArKxC,QAAG,GAAG,EAAE,CAAC;QAEV,WAAM,GAAG,IAAI,CAAC;QAiBd,oBAAe,GAAG,IAAI,CAAC;QAiBtB,UAAK,GAAG,EAAE,CAAC;QACX,SAAI,GAAiC,IAAI,CAAC;QAC1C,cAAS,GAAG,KAAK,CAAC;QAClB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAElB,eAAU,GAAG,EAAE,CAAC;QAUf,eAAU,GAA2B,4BAA4B,CAAC;QAClE,YAAO,GAAG,CAAC,CAAC;QACZ,iBAAY,GAAG,KAAK,CAAC;QACrB,oBAAe,GAAG,EAAE,CAAC;QAyCtB,aAAQ,GAAG,IAAI,CAAC;QAoBxB,gBAAW,GAAG,IAAI,CAAC;QAEV,SAAI,GAAc,IAAI,CAAC;QACvB,cAAS,GAAG,IAAI,CAAC;QACjB,eAAU,GAAkB,MAAM,CAAC;QACnC,aAAQ,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BACL,YAAY;oBACZ,mBAAmB;;oBAEnB,eAAe;oBACf,kBAAkB;oBAClB,cAAc;oBACd,eAAe;oBACf,cAAc;oBACd,aAAa;;oBAEb,eAAe;oBACf,aAAa;oBACb,mBAAmB;iBACtB;gBACD,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE;oBACV,4BAA4B;oBAC5B,6BAA6B;oBAC7B,sCAAsC;iBACzC;aACJ;;;YAhCG,eAAe;;;ACdnB;;;;ACAA;;;;;;"}
@@ -36,7 +36,6 @@ class PepRichHtmlTextareaComponent {
36
36
  this.form = null;
37
37
  this.isActive = false;
38
38
  this.showTitle = true;
39
- this.renderTitle = true;
40
39
  this._layoutType = 'form';
41
40
  this.inlineMode = false;
42
41
  this.valueChange = new EventEmitter();
@@ -101,9 +100,6 @@ class PepRichHtmlTextareaComponent {
101
100
  this.setFieldHeight();
102
101
  this.setDefaultForm();
103
102
  this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
104
- if (!this.renderTitle) {
105
- this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
106
- }
107
103
  }
108
104
  this.quillContent = this.value;
109
105
  }
@@ -198,7 +194,7 @@ class PepRichHtmlTextareaComponent {
198
194
  PepRichHtmlTextareaComponent.decorators = [
199
195
  { type: Component, args: [{
200
196
  selector: 'pep-rich-html-textarea',
201
- template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\">\n <div class=\"pep-textarea-container pep-report-textarea\" [ngClass]=\"{ 'stand-alone': standAlone,\n 'right-alignment': xAlignment == 'right', 'one-row': !isFormView && rowSpan === 1,\n 'pep-textarea-card-container': layoutType === 'card'}\">\n <pep-field-title *ngIf=\"renderTitle && isFormView\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\"\n [maxFieldCharacters]=\"inlineMode && !disabled && !readonly ? maxFieldCharacters : 0\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\" [inputLength]=\"quillContent?.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\"\n [ngClass]=\"{ 'pep-table-textarea': layoutType === 'table', 'active': active, 'ignore-disabled': disabled }\">\n <textarea [hidden]=\"true\" matInput [formControlName]=\"key\"></textarea>\n\n <ng-container *ngIf=\"inlineMode; then inlineBlock; else notInlineBlock\"></ng-container>\n\n <ng-template #inlineBlock>\n <ng-container *ngTemplateOutlet=\"quilTemplate; context: {inDialog: false}\"></ng-container>\n </ng-template>\n <ng-template #notInlineBlock>\n\n <!-- We can use the quill-view-html\n <quill-view-html class=\"body-sm rich-text-cont \"\n [ngStyle]=\"{ 'text-align': xAlignment == 'right' ? 'right' : 'left' }\" [content]=\"value | pepSafeHtml\"\n theme=\"snow\" [style.height]=\"fieldHeight\"></quill-view-html> \n -->\n\n <div class=\"body-sm rich-text-cont \"\n [ngStyle]=\"{ 'text-align': xAlignment == 'right' ? 'right' : 'left' }\"\n [innerHtml]=\"value | pepSafeHtml\" [style.height]=\"fieldHeight\">\n </div>\n </ng-template>\n <pep-textbox-icon matSuffix [value]=\"value\" [label]=\"label\" [type]=\"controlType\"\n [disabled]=\"disabled || readonly\"\n [ngClass]=\"{ 'card-one-row-icon': layoutType === 'card' && rowSpan === 1 }\"\n (iconClick)=\"openDialog()\">\n </pep-textbox-icon>\n <mat-error>\n <span class=\"body-xs\"\n [title]=\"mandatory && value.length == 0 ? ('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label }) : ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\"\n [innerText]=\"mandatory && value.length == 0 ? ('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label }) : ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\"></span>\n </mat-error>\n\n </mat-form-field>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <div class=\"pep-textarea-card-container card-flex-container\"\n [ngClass]=\"{'one-row': rowSpan === 1, 'pep-button weak': isActive && !disabled}\"\n [ngStyle]=\"{ '-webkit-line-clamp': rowSpan }\" [class]=\"'text-align-' + xAlignment\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\" [style.height]=\"fieldHeight\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title no-shrink\" title=\"{{ label }}\">{{ label\n }}:&nbsp;</span>\n <span [id]=\"key\" class=\"body-sm value wrap\" [innerHtml]=\"value | pepSafeHtml\"></span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button self-start\"\n [ngClass]=\"{'self-end' : value && value !== ''}\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false }\"></ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"value?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <div class=\"pep-textarea-card-container card-flex-container one-row\">\n <span [id]=\"key\" class=\"wrap\" [innerHtml]=\"value | pepSafeHtml\"></span>\n </div>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n </ng-template>\n </ng-container>\n</ng-container>\n\n<ng-template #richTextEditorDialogTemplate>\n <div class=\"rich-text-editor-container\">\n <button mat-button [mat-dialog-close]=\"null\" class=\"pep-button icon-button md weak pull-right flip\">\n <mat-icon>\n <pep-icon name=\"system_close\">\n </pep-icon>\n </mat-icon>\n </button>\n <ng-container *ngTemplateOutlet=\"quilTemplate; context: {inDialog: true}\"></ng-container>\n <div mat-dialog-actions class=\" pep-border-top\">\n <div class=\"pep-spacing-element-negative\">\n <button mat-button [mat-dialog-close]=\"null\" class=\"pep-spacing-element pep-button md weak\">\n {{'ACTIONS.CANCEL' | translate}}\n </button>\n <button mat-button [mat-dialog-close]=\"quillContentDialog || ''\" [disabled]=\"disabled\"\n class=\"pep-spacing-element pep-button md strong \">\n {{'ACTIONS.SAVE' | translate}}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #quilTemplate let-inDialog=\"inDialog\">\n <quill-editor id=\"{{inDialog ? 'quill-editor-dialog' : 'quill-editor-inline'}}\"\n [class]=\"inDialog ? 'dialog-quill' : 'inline-quill'\" [ngClass]=\"{ 'rich-text-cont': !inDialog }\"\n placeholder=\"{{'RICH_TEXTAREA.HINT' | translate}}\" [ngModel]=\"inDialog ? quillContentDialog : quillContent\"\n [sanitize]=\"true\" [readOnly]=\"disabled\" [maxLength]=\"maxFieldCharacters\" [required]=\"mandatory\"\n (onEditorCreated)=\"onEditorCreated($event, inDialog)\" (onContentChanged)=\"onContentChanged($event, inDialog)\"\n (onBlur)=\"onBlur($event, inDialog)\" (onFocus)=\"onFocus($event, inDialog)\" theme=\"\">\n <div *ngIf=\"!disabled\" quill-editor-toolbar>\n <div class=\"pep-spacing-element-negative\">\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.font\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-font select-arrow\">\n <option selected></option>\n <option value=\"serif\"></option>\n <option value=\"monospace\"></option>\n </select>\n <select *ngIf=\"toolbarOptions?.size\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-size select-arrow\">\n <option value=\"small\"></option>\n <option selected></option>\n <option value=\"large\"></option>\n <option value=\"huge\"></option>\n </select>\n </span>\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.header\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-header select-arrow\">\n <option value=\"1\"></option>\n <option value=\"2\"></option>\n <option value=\"3\"></option>\n <!-- \n <option value=\"4\"></option>\n <option value=\"5\"></option>\n <option value=\"6\"></option> \n -->\n <option value=\"false\" selected></option>\n </select>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.bold\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-bold\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.italic\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-italic\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.underline\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-underline\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.strike\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-strike\"></button>\n </span>\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.link\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-link\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.image\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-image\"></button>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.ordered\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-list\" value=\"ordered\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.bullet\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-list\" value=\"bullet\"></button>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.color\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-color\"></select>\n <select *ngIf=\"toolbarOptions?.background\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-background\"></select>\n </span>\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.align\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-align\">\n <option selected></option>\n <option value=\"center\"></option>\n <option value=\"right\"></option>\n <option value=\"justify\"></option>\n </select>\n </span>\n </div>\n </div>\n </quill-editor>\n</ng-template>",
197
+ template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate let-isFormView=\"isFormView\">\n <div class=\"pep-textarea-container pep-report-textarea\" [ngClass]=\"{ 'stand-alone': standAlone,\n 'right-alignment': xAlignment == 'right', 'one-row': !isFormView && rowSpan === 1,\n 'pep-textarea-card-container': layoutType === 'card'}\">\n <pep-field-title *ngIf=\"isFormView\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [maxFieldCharacters]=\"inlineMode && !disabled && !readonly ? maxFieldCharacters : 0\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\" [inputLength]=\"quillContent?.length\">\n </pep-field-title>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\"\n [ngClass]=\"{ 'pep-table-textarea': layoutType === 'table', 'active': active, 'ignore-disabled': disabled }\">\n <textarea [hidden]=\"true\" matInput [formControlName]=\"key\"></textarea>\n\n <ng-container *ngIf=\"inlineMode; then inlineBlock; else notInlineBlock\"></ng-container>\n\n <ng-template #inlineBlock>\n <ng-container *ngTemplateOutlet=\"quilTemplate; context: {inDialog: false}\"></ng-container>\n </ng-template>\n <ng-template #notInlineBlock>\n\n <!-- We can use the quill-view-html\n <quill-view-html class=\"body-sm rich-text-cont \"\n [ngStyle]=\"{ 'text-align': xAlignment == 'right' ? 'right' : 'left' }\" [content]=\"value | pepSafeHtml\"\n theme=\"snow\" [style.height]=\"fieldHeight\"></quill-view-html> \n -->\n\n <div class=\"body-sm rich-text-cont \"\n [ngStyle]=\"{ 'text-align': xAlignment == 'right' ? 'right' : 'left' }\"\n [innerHtml]=\"value | pepSafeHtml\" [style.height]=\"fieldHeight\">\n </div>\n </ng-template>\n <pep-textbox-icon matSuffix [value]=\"value\" [label]=\"label\" [type]=\"controlType\"\n [disabled]=\"disabled || readonly\"\n [ngClass]=\"{ 'card-one-row-icon': layoutType === 'card' && rowSpan === 1 }\"\n (iconClick)=\"openDialog()\">\n </pep-textbox-icon>\n <mat-error>\n <span class=\"body-xs\"\n [title]=\"mandatory && value.length == 0 ? ('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label }) : ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\"\n [innerText]=\"mandatory && value.length == 0 ? ('MESSAGES.ERROR_IS_REQUIRED' | translate: { field: label }) : ('MESSAGES.ERROR_IS_NOT_VALID' | translate: { field: label })\"></span>\n </mat-error>\n\n </mat-form-field>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: true }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <div class=\"pep-textarea-card-container card-flex-container\"\n [ngClass]=\"{'one-row': rowSpan === 1, 'pep-button weak': isActive && !disabled}\"\n [ngStyle]=\"{ '-webkit-line-clamp': rowSpan }\" [class]=\"'text-align-' + xAlignment\"\n (click)=\"!disabled ? cardTemplateClicked($event) : ''\" [style.height]=\"fieldHeight\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title no-shrink\" title=\"{{ label }}\">{{ label\n }}:&nbsp;</span>\n <span [id]=\"key\" class=\"body-sm value wrap\" [innerHtml]=\"value | pepSafeHtml\"></span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button self-start\"\n [ngClass]=\"{'self-end' : value && value !== ''}\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate; context: { isFormView: false }\"></ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngIf=\"value?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <div class=\"pep-textarea-card-container card-flex-container one-row\">\n <span [id]=\"key\" class=\"wrap\" [innerHtml]=\"value | pepSafeHtml\"></span>\n </div>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n </ng-template>\n </ng-container>\n</ng-container>\n\n<ng-template #richTextEditorDialogTemplate>\n <div class=\"rich-text-editor-container\">\n <button mat-button [mat-dialog-close]=\"null\" class=\"pep-button icon-button md weak pull-right flip\">\n <mat-icon>\n <pep-icon name=\"system_close\">\n </pep-icon>\n </mat-icon>\n </button>\n <ng-container *ngTemplateOutlet=\"quilTemplate; context: {inDialog: true}\"></ng-container>\n <div mat-dialog-actions class=\" pep-border-top\">\n <div class=\"pep-spacing-element-negative\">\n <button mat-button [mat-dialog-close]=\"null\" class=\"pep-spacing-element pep-button md weak\">\n {{'ACTIONS.CANCEL' | translate}}\n </button>\n <button mat-button [mat-dialog-close]=\"quillContentDialog || ''\" [disabled]=\"disabled\"\n class=\"pep-spacing-element pep-button md strong \">\n {{'ACTIONS.SAVE' | translate}}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #quilTemplate let-inDialog=\"inDialog\">\n <quill-editor id=\"{{inDialog ? 'quill-editor-dialog' : 'quill-editor-inline'}}\"\n [class]=\"inDialog ? 'dialog-quill' : 'inline-quill'\" [ngClass]=\"{ 'rich-text-cont': !inDialog }\"\n placeholder=\"{{'RICH_TEXTAREA.HINT' | translate}}\" [ngModel]=\"inDialog ? quillContentDialog : quillContent\"\n [sanitize]=\"true\" [readOnly]=\"disabled\" [maxLength]=\"maxFieldCharacters\" [required]=\"mandatory\"\n (onEditorCreated)=\"onEditorCreated($event, inDialog)\" (onContentChanged)=\"onContentChanged($event, inDialog)\"\n (onBlur)=\"onBlur($event, inDialog)\" (onFocus)=\"onFocus($event, inDialog)\" theme=\"\">\n <div *ngIf=\"!disabled\" quill-editor-toolbar>\n <div class=\"pep-spacing-element-negative\">\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.font\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-font select-arrow\">\n <option selected></option>\n <option value=\"serif\"></option>\n <option value=\"monospace\"></option>\n </select>\n <select *ngIf=\"toolbarOptions?.size\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-size select-arrow\">\n <option value=\"small\"></option>\n <option selected></option>\n <option value=\"large\"></option>\n <option value=\"huge\"></option>\n </select>\n </span>\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.header\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-header select-arrow\">\n <option value=\"1\"></option>\n <option value=\"2\"></option>\n <option value=\"3\"></option>\n <!-- \n <option value=\"4\"></option>\n <option value=\"5\"></option>\n <option value=\"6\"></option> \n -->\n <option value=\"false\" selected></option>\n </select>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.bold\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-bold\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.italic\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-italic\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.underline\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-underline\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.strike\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-strike\"></button>\n </span>\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.link\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-link\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.image\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-image\"></button>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <button mat-button *ngIf=\"toolbarOptions?.ordered\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-list\" value=\"ordered\"></button>\n <button mat-button *ngIf=\"toolbarOptions?.bullet\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-list\" value=\"bullet\"></button>\n </span>\n <!-- <hr class=\"vertical-separator\" /> -->\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.color\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-color\"></select>\n <select *ngIf=\"toolbarOptions?.background\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-background\"></select>\n </span>\n <span class=\"ql-formats\">\n <select *ngIf=\"toolbarOptions?.align\"\n class=\"pep-spacing-element pep-button icon-button md weak ql-align\">\n <option selected></option>\n <option value=\"center\"></option>\n <option value=\"right\"></option>\n <option value=\"justify\"></option>\n </select>\n </span>\n </div>\n </div>\n </quill-editor>\n</ng-template>",
202
198
  changeDetection: ChangeDetectionStrategy.OnPush,
203
199
  styles: [":host{height:inherit;display:block}.pep-textarea-container ::ng-deep.mat-form-field-infix,.pepperi-textarea-container ::ng-deep.mat-form-field-infix{margin-left:calc(.75rem * -1);margin-left:calc(var(--pep-spacing-md, .75rem) * -1)}.pep-textarea-container.right-alignment ::ng-deep.mat-form-field-infix,.pepperi-textarea-container.right-alignment ::ng-deep.mat-form-field-infix{margin-left:unset;margin-right:calc(.75rem * -1);margin-right:calc(var(--pep-spacing-md, .75rem) * -1)}.vertical-separator{display:none}"]
204
200
  },] }
@@ -224,7 +220,6 @@ PepRichHtmlTextareaComponent.propDecorators = {
224
220
  form: [{ type: Input }],
225
221
  isActive: [{ type: Input }],
226
222
  showTitle: [{ type: Input }],
227
- renderTitle: [{ type: Input }],
228
223
  layoutType: [{ type: Input }],
229
224
  inlineMode: [{ type: Input }],
230
225
  toolbarOptions: [{ type: Input }],
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-rich-html-textarea.js","sources":["../../../projects/ngx-lib/rich-html-textarea/rich-html-textarea.component.ts","../../../projects/ngx-lib/rich-html-textarea/rich-html-textarea.module.ts","../../../projects/ngx-lib/rich-html-textarea/public-api.ts","../../../projects/ngx-lib/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n ElementRef,\n Renderer2,\n TemplateRef,\n ViewChild,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepRichHtmlTextareaField,\n} from '@pepperi-addons/ngx-lib';\nimport {\n PepDialogService,\n PepDialogData,\n} from '@pepperi-addons/ngx-lib/dialog';\nimport { SafeHtml, DomSanitizer } from '@angular/platform-browser';\n\nexport interface IPepRichHtmlTextareaToolbarOptions {\n font?: any;\n size?: any;\n header?: any;\n bold?: any;\n italic?: any;\n underline?: any;\n strike?: any;\n link?: any;\n image?: any;\n ordered?: any;\n bullet?: any;\n color?: any;\n background?: any;\n align?: any;\n}\n\n@Component({\n selector: 'pep-rich-html-textarea',\n templateUrl: './rich-html-textarea.component.html',\n styleUrls: ['./rich-html-textarea.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepRichHtmlTextareaComponent\n implements OnInit, OnChanges, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() maxFieldCharacters: number;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n private _rowSpan = 1;\n @Input()\n set rowSpan(value) {\n this._rowSpan = value;\n this.setFieldHeight();\n }\n get rowSpan(): number {\n return this._rowSpan;\n }\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n controlType = 'richhtmltextarea';\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n\n private _layoutType: PepLayoutType = 'form';\n @Input()\n set layoutType(value: PepLayoutType) {\n this._layoutType = value;\n this.setFieldHeight();\n }\n get layoutType(): PepLayoutType {\n return this._layoutType;\n }\n\n @Input() inlineMode = false;\n\n protected _toolbarOptions: IPepRichHtmlTextareaToolbarOptions;\n @Input()\n get toolbarOptions(): IPepRichHtmlTextareaToolbarOptions {\n return this._toolbarOptions;\n }\n set toolbarOptions(options: IPepRichHtmlTextareaToolbarOptions) {\n if (options) {\n this._toolbarOptions = options;\n }\n }\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @ViewChild('richTextEditorDialogTemplate', { read: TemplateRef })\n richTextEditorDialogTemplate: TemplateRef<any>;\n quillContent = '';\n quillContentDialog = '';\n\n fieldHeight = '';\n standAlone = false;\n active = false;\n\n constructor(\n private sanitizer: DomSanitizer,\n private dialogService: PepDialogService,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) {\n this.toolbarOptions = this.getDefaultToolbarOptions();\n }\n\n private setFieldHeight(): void {\n this.fieldHeight = this.customizationService.calculateFieldHeight(\n this.layoutType,\n this.rowSpan,\n this.standAlone\n );\n }\n\n private setDefaultForm(): void {\n const pepField = new PepRichHtmlTextareaField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n maxFieldCharacters: this.maxFieldCharacters,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n\n this.quillContent = this.value;\n }\n\n ngOnChanges(): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n getDefaultToolbarOptions(): IPepRichHtmlTextareaToolbarOptions {\n return {\n font: false,\n size: false,\n header: true,\n bold: true,\n italic: true,\n underline: true,\n strike: false,\n link: true,\n image: true,\n ordered: true,\n bullet: true,\n color: true,\n background: false,\n align: true,\n };\n }\n\n changeValue(value: any): void {\n if (value !== this.value) {\n this.value = value;\n this.quillContent = value;\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n value\n );\n this.valueChange.emit(value);\n }\n }\n\n cardTemplateClicked(event: any): void {\n this.openDialog();\n }\n\n openDialog(): void {\n const config = this.dialogService.getDialogConfig(\n {\n // minWidth: '50vw',\n // maxWidth: '90vw',\n // maxHeight: '90vh',\n },\n 'large'\n );\n\n // If disabled open regular modal as html mode.\n if (this.disabled || this.readonly) {\n const data = new PepDialogData({\n title: this.label,\n content: this.quillContent,\n showFooter: false,\n });\n this.dialogService.openDefaultDialog(data, config);\n } else {\n this.quillContentDialog = this.quillContent;\n const dialogRef = this.dialogService.openDialog(\n this.richTextEditorDialogTemplate,\n {},\n config\n );\n\n dialogRef.afterClosed().subscribe((value) => {\n if (value !== undefined && value !== null) {\n this.changeValue(value);\n }\n });\n }\n }\n\n // Init quillContent in case that there are html tags...\n onEditorCreated(quill: any, inDialog: boolean): void {\n if (!inDialog) {\n this.quillContent = quill.getText();\n }\n }\n\n onContentChanged(obj: any, inDialog: boolean): void {\n if (inDialog) {\n this.quillContentDialog = obj.html;\n } else {\n this.quillContent = obj.html;\n }\n }\n\n onBlur(obj: any, inDialog: boolean): void {\n if (!inDialog) {\n this.active = false;\n this.changeValue(this.quillContent);\n }\n }\n\n onFocus(obj: any, inDialog: boolean): void {\n if (!inDialog) {\n this.active = true;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatDialogModule } from '@angular/material/dialog';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemClose,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\n\nimport { QuillModule } from 'ngx-quill';\n\nimport { PepRichHtmlTextareaComponent } from './rich-html-textarea.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatMenuModule,\n MatIconModule,\n MatDialogModule,\n // External modules\n QuillModule.forRoot(),\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n PepDialogModule,\n ],\n exports: [PepRichHtmlTextareaComponent],\n declarations: [PepRichHtmlTextareaComponent],\n})\nexport class PepRichHtmlTextareaModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemClose,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/rich-html-textarea\n */\nexport * from './rich-html-textarea.module';\nexport * from './rich-html-textarea.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":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a;oBACb,eAAe;;oBAEf,WAAW,CAAC,OAAO,EAAE;;oBAErB,eAAe;oBACf,aAAa;oBACb,mBAAmB;oBACnB,oBAAoB;oBACpB,eAAe;iBAClB;gBACD,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE,CAAC,4BAA4B,CAAC;aAC/C;;;YApCG,eAAe;;;ACfnB;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-rich-html-textarea.js","sources":["../../../projects/ngx-lib/rich-html-textarea/rich-html-textarea.component.ts","../../../projects/ngx-lib/rich-html-textarea/rich-html-textarea.module.ts","../../../projects/ngx-lib/rich-html-textarea/public-api.ts","../../../projects/ngx-lib/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n ElementRef,\n Renderer2,\n TemplateRef,\n ViewChild,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepRichHtmlTextareaField,\n} from '@pepperi-addons/ngx-lib';\nimport {\n PepDialogService,\n PepDialogData,\n} from '@pepperi-addons/ngx-lib/dialog';\nimport { SafeHtml, DomSanitizer } from '@angular/platform-browser';\n\nexport interface IPepRichHtmlTextareaToolbarOptions {\n font?: any;\n size?: any;\n header?: any;\n bold?: any;\n italic?: any;\n underline?: any;\n strike?: any;\n link?: any;\n image?: any;\n ordered?: any;\n bullet?: any;\n color?: any;\n background?: any;\n align?: any;\n}\n\n@Component({\n selector: 'pep-rich-html-textarea',\n templateUrl: './rich-html-textarea.component.html',\n styleUrls: ['./rich-html-textarea.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepRichHtmlTextareaComponent\n implements OnInit, OnChanges, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() maxFieldCharacters: number;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n private _rowSpan = 1;\n @Input()\n set rowSpan(value) {\n this._rowSpan = value;\n this.setFieldHeight();\n }\n get rowSpan(): number {\n return this._rowSpan;\n }\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n controlType = 'richhtmltextarea';\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n\n private _layoutType: PepLayoutType = 'form';\n @Input()\n set layoutType(value: PepLayoutType) {\n this._layoutType = value;\n this.setFieldHeight();\n }\n get layoutType(): PepLayoutType {\n return this._layoutType;\n }\n\n @Input() inlineMode = false;\n\n protected _toolbarOptions: IPepRichHtmlTextareaToolbarOptions;\n @Input()\n get toolbarOptions(): IPepRichHtmlTextareaToolbarOptions {\n return this._toolbarOptions;\n }\n set toolbarOptions(options: IPepRichHtmlTextareaToolbarOptions) {\n if (options) {\n this._toolbarOptions = options;\n }\n }\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @ViewChild('richTextEditorDialogTemplate', { read: TemplateRef })\n richTextEditorDialogTemplate: TemplateRef<any>;\n quillContent = '';\n quillContentDialog = '';\n\n fieldHeight = '';\n standAlone = false;\n active = false;\n\n constructor(\n private sanitizer: DomSanitizer,\n private dialogService: PepDialogService,\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) {\n this.toolbarOptions = this.getDefaultToolbarOptions();\n }\n\n private setFieldHeight(): void {\n this.fieldHeight = this.customizationService.calculateFieldHeight(\n this.layoutType,\n this.rowSpan,\n this.standAlone\n );\n }\n\n private setDefaultForm(): void {\n const pepField = new PepRichHtmlTextareaField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n maxFieldCharacters: this.maxFieldCharacters,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n }\n\n this.quillContent = this.value;\n }\n\n ngOnChanges(): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n getDefaultToolbarOptions(): IPepRichHtmlTextareaToolbarOptions {\n return {\n font: false,\n size: false,\n header: true,\n bold: true,\n italic: true,\n underline: true,\n strike: false,\n link: true,\n image: true,\n ordered: true,\n bullet: true,\n color: true,\n background: false,\n align: true,\n };\n }\n\n changeValue(value: any): void {\n if (value !== this.value) {\n this.value = value;\n this.quillContent = value;\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n value\n );\n this.valueChange.emit(value);\n }\n }\n\n cardTemplateClicked(event: any): void {\n this.openDialog();\n }\n\n openDialog(): void {\n const config = this.dialogService.getDialogConfig(\n {\n // minWidth: '50vw',\n // maxWidth: '90vw',\n // maxHeight: '90vh',\n },\n 'large'\n );\n\n // If disabled open regular modal as html mode.\n if (this.disabled || this.readonly) {\n const data = new PepDialogData({\n title: this.label,\n content: this.quillContent,\n showFooter: false,\n });\n this.dialogService.openDefaultDialog(data, config);\n } else {\n this.quillContentDialog = this.quillContent;\n const dialogRef = this.dialogService.openDialog(\n this.richTextEditorDialogTemplate,\n {},\n config\n );\n\n dialogRef.afterClosed().subscribe((value) => {\n if (value !== undefined && value !== null) {\n this.changeValue(value);\n }\n });\n }\n }\n\n // Init quillContent in case that there are html tags...\n onEditorCreated(quill: any, inDialog: boolean): void {\n if (!inDialog) {\n this.quillContent = quill.getText();\n }\n }\n\n onContentChanged(obj: any, inDialog: boolean): void {\n if (inDialog) {\n this.quillContentDialog = obj.html;\n } else {\n this.quillContent = obj.html;\n }\n }\n\n onBlur(obj: any, inDialog: boolean): void {\n if (!inDialog) {\n this.active = false;\n this.changeValue(this.quillContent);\n }\n }\n\n onFocus(obj: any, inDialog: boolean): void {\n if (!inDialog) {\n this.active = true;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatDialogModule } from '@angular/material/dialog';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemClose,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepTextboxIconModule } from '@pepperi-addons/ngx-lib/textbox-icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\n\nimport { QuillModule } from 'ngx-quill';\n\nimport { PepRichHtmlTextareaComponent } from './rich-html-textarea.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n // Material modules,\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n MatMenuModule,\n MatIconModule,\n MatDialogModule,\n // External modules\n QuillModule.forRoot(),\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n PepTextboxIconModule,\n PepDialogModule,\n ],\n exports: [PepRichHtmlTextareaComponent],\n declarations: [PepRichHtmlTextareaComponent],\n})\nexport class PepRichHtmlTextareaModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemClose,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/rich-html-textarea\n */\nexport * from './rich-html-textarea.module';\nexport * from './rich-html-textarea.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAoDa,4BAA4B;IAkFrC,YACY,SAAuB,EACvB,aAA+B,EAC/B,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;QAJnB,cAAS,GAAT,SAAS,CAAc;QACvB,kBAAa,GAAb,aAAa,CAAkB;QAC/B,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,aAAQ,GAAR,QAAQ,CAAW;QACnB,YAAO,GAAP,OAAO,CAAY;QArFtB,QAAG,GAAG,EAAE,CAAC;QACT,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,cAAS,GAAG,KAAK,CAAC;QAClB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAEjB,eAAU,GAA2B,4BAA4B,CAAC;QAEnE,aAAQ,GAAG,CAAC,CAAC;QAUb,aAAQ,GAAG,IAAI,CAAC;QAoBxB,gBAAW,GAAG,kBAAkB,CAAC;QAExB,SAAI,GAAc,IAAI,CAAC;QACvB,aAAQ,GAAG,KAAK,CAAC;QACjB,cAAS,GAAG,IAAI,CAAC;QAElB,gBAAW,GAAkB,MAAM,CAAC;QAUnC,eAAU,GAAG,KAAK,CAAC;QAc5B,gBAAW,GAAyB,IAAI,YAAY,EAAU,CAAC;QAI/D,iBAAY,GAAG,EAAE,CAAC;QAClB,uBAAkB,GAAG,EAAE,CAAC;QAExB,gBAAW,GAAG,EAAE,CAAC;QACjB,eAAU,GAAG,KAAK,CAAC;QACnB,WAAM,GAAG,KAAK,CAAC;QASX,IAAI,CAAC,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e;oBACf,kBAAkB;oBAClB,cAAc;oBACd,aAAa;oBACb,aAAa;oBACb,eAAe;;oBAEf,WAAW,CAAC,OAAO,EAAE;;oBAErB,eAAe;oBACf,aAAa;oBACb,mBAAmB;oBACnB,oBAAoB;oBACpB,eAAe;iBAClB;gBACD,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE,CAAC,4BAA4B,CAAC;aAC/C;;;YApCG,eAAe;;;ACfnB;;;;ACAA;;;;;;"}
@@ -34,7 +34,6 @@ class PepSelectComponent {
34
34
  this.isActive = false;
35
35
  this.showTitle = true;
36
36
  this.emptyOption = true;
37
- this.renderTitle = true;
38
37
  this.valueChange = new EventEmitter();
39
38
  this.formValidationChange = new EventEmitter();
40
39
  this.standAlone = false;
@@ -119,9 +118,6 @@ class PepSelectComponent {
119
118
  this.standAlone = true;
120
119
  this.setDefaultForm();
121
120
  this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
122
- if (!this.renderTitle) {
123
- this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME);
124
- }
125
121
  }
126
122
  }
127
123
  ngOnChanges(changes) {
@@ -187,7 +183,7 @@ class PepSelectComponent {
187
183
  PepSelectComponent.decorators = [
188
184
  { type: Component, args: [{
189
185
  selector: 'pep-select',
190
- template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <ng-container *ngIf=\"type == 'multi'; then multiSelectBlock; else regularSelectBlock\"></ng-container>\n <ng-template #regularSelectBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment === 'right' ? 'rtl' : 'ltr' }}\">\n <mat-select #select [required]=\"mandatory ? mandatory : undefined\" matInput disableOptionCentering\n class=\"body-sm text-align-{{ xAlignment }}\" [id]=\"key\"\n [ngClass]=\"{'right-alignment': xAlignment === 'right'}\"\n [placeholder]=\"disabled || readonly ? '' : ('SELECT.HINT' | translate)\"\n [(ngModel)]=\"selectedValueModel\" [ngModelOptions]=\"{standalone: true}\" [disabled]=\"disabled\"\n (selectionChange)=\"selectionChange($event)\" (openedChange)=\"openedChange($event)\"\n title=\"{{ fieldFormattedValue }}\">\n <mat-option *ngIf=\"emptyOption\" value=\"\" [title]=\"'LIST.NONE' | translate\">{{ 'LIST.NONE' |\n translate }}</mat-option>\n <mat-option *ngFor=\"let option of options\" [value]=\"option.key\" [title]=\"option.value\">{{\n option.value }}</mat-option>\n </mat-select>\n <mat-error>\n <span class=\"body-xs\" [title]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"\n [innerText]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"></span>\n </mat-error>\n </mat-form-field>\n </ng-template>\n <ng-template #multiSelectBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment === 'right' ? 'rtl' : 'ltr' }}\">\n <mat-select #select multiple [required]=\"mandatory ? mandatory : undefined\" matInput\n disableOptionCentering class=\"body-sm text-align-{{ xAlignment }}\" [id]=\"key\"\n [ngClass]=\"{'right-alignment': xAlignment === 'right'}\"\n [placeholder]=\"disabled || readonly ? '' : ('SELECT.HINT' | translate)\"\n [(ngModel)]=\"selectedValuesModel\" [ngModelOptions]=\"{standalone: true}\" [disabled]=\"disabled\"\n (openedChange)=\"openedChange($event)\" title=\"{{ fieldFormattedValue }}\">\n <mat-option *ngFor=\"let option of options\" [value]=\"option.key\" [title]=\"option.value\">{{\n option.value }}</mat-option>\n </mat-select>\n <mat-error><span class=\"body-xs\" [title]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"\n [innerText]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"> </span>\n </mat-error>\n </mat-form-field>\n </ng-template>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"!parentFieldKey && renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\"\n [disabled]=\"disabled\" [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\"\n [ngClass]=\"{'one-row': rowSpan === 1, 'pep-button weak': isActive && !disabled}\"\n [class]=\"'text-align-' + xAlignment\" (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }}&nbsp;</span>\n <span [id]=\"key\" title=\"{{ fieldFormattedValue }}\" class=\"body-sm value\">{{ fieldFormattedValue\n }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <span [id]=\"key\" class=\"body-sm pep-report-input\" [ngClass]=\"{readonly: disabled}\"\n title=\"{{ fieldFormattedValue }}\">{{ fieldFormattedValue }}</span>\n </ng-template>\n </ng-container>\n</ng-container>",
186
+ template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <ng-container *ngIf=\"type == 'multi'; then multiSelectBlock; else regularSelectBlock\"></ng-container>\n <ng-template #regularSelectBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment === 'right' ? 'rtl' : 'ltr' }}\">\n <mat-select #select [required]=\"mandatory ? mandatory : undefined\" matInput disableOptionCentering\n class=\"body-sm text-align-{{ xAlignment }}\" [id]=\"key\"\n [ngClass]=\"{'right-alignment': xAlignment === 'right'}\"\n [placeholder]=\"disabled || readonly ? '' : ('SELECT.HINT' | translate)\"\n [(ngModel)]=\"selectedValueModel\" [ngModelOptions]=\"{standalone: true}\" [disabled]=\"disabled\"\n (selectionChange)=\"selectionChange($event)\" (openedChange)=\"openedChange($event)\"\n title=\"{{ fieldFormattedValue }}\">\n <mat-option *ngIf=\"emptyOption\" value=\"\" [title]=\"'LIST.NONE' | translate\">{{ 'LIST.NONE' |\n translate }}</mat-option>\n <mat-option *ngFor=\"let option of options\" [value]=\"option.key\" [title]=\"option.value\">{{\n option.value }}</mat-option>\n </mat-select>\n <mat-error>\n <span class=\"body-xs\" [title]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"\n [innerText]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"></span>\n </mat-error>\n </mat-form-field>\n </ng-template>\n <ng-template #multiSelectBlock>\n <mat-form-field appearance=\"outline\" dir=\"{{ xAlignment === 'right' ? 'rtl' : 'ltr' }}\">\n <mat-select #select multiple [required]=\"mandatory ? mandatory : undefined\" matInput\n disableOptionCentering class=\"body-sm text-align-{{ xAlignment }}\" [id]=\"key\"\n [ngClass]=\"{'right-alignment': xAlignment === 'right'}\"\n [placeholder]=\"disabled || readonly ? '' : ('SELECT.HINT' | translate)\"\n [(ngModel)]=\"selectedValuesModel\" [ngModelOptions]=\"{standalone: true}\" [disabled]=\"disabled\"\n (openedChange)=\"openedChange($event)\" title=\"{{ fieldFormattedValue }}\">\n <mat-option *ngFor=\"let option of options\" [value]=\"option.key\" [title]=\"option.value\">{{\n option.value }}</mat-option>\n </mat-select>\n <mat-error><span class=\"body-xs\" [title]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"\n [innerText]=\"'MESSAGES.ERROR_IS_REQUIRED' | translate: {field: label}\"> </span>\n </mat-error>\n </mat-form-field>\n </ng-template>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"!parentFieldKey\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"isInEditMode; then editBlock; else readOnlyBlock\"></ng-container>\n <ng-template #editBlock>\n <div [ngClass]=\"{'one-row': rowSpan === 1}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #readOnlyBlock>\n <div class=\"pep-card-input card-flex-container\"\n [ngClass]=\"{'one-row': rowSpan === 1, 'pep-button weak': isActive && !disabled}\"\n [class]=\"'text-align-' + xAlignment\" (click)=\"!disabled ? cardTemplateClicked($event) : ''\">\n <span *ngIf=\"showTitle && label != ''\" class=\"body-xs title\" title=\"{{ label }}\">{{ label\n }}&nbsp;</span>\n <span [id]=\"key\" title=\"{{ fieldFormattedValue }}\" class=\"body-sm value\">{{ fieldFormattedValue\n }}</span>\n <button *ngIf=\"isActive && !disabled\" class=\"pep-button weak card-edit-button\" mat-button>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </button>\n </div>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-template>\n <ng-template #notSelectedBlock>\n <span [id]=\"key\" class=\"body-sm pep-report-input\" [ngClass]=\"{readonly: disabled}\"\n title=\"{{ fieldFormattedValue }}\">{{ fieldFormattedValue }}</span>\n </ng-template>\n </ng-container>\n</ng-container>",
191
187
  changeDetection: ChangeDetectionStrategy.OnPush,
192
188
  styles: [":host{height:inherit;display:grid}:host>*{align-self:center}"]
193
189
  },] }
@@ -215,7 +211,6 @@ PepSelectComponent.propDecorators = {
215
211
  isActive: [{ type: Input }],
216
212
  showTitle: [{ type: Input }],
217
213
  emptyOption: [{ type: Input }],
218
- renderTitle: [{ type: Input }],
219
214
  valueChange: [{ type: Output }],
220
215
  formValidationChange: [{ type: Output }],
221
216
  select: [{ type: ViewChild, args: ['select',] }]
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-select.js","sources":["../../../projects/ngx-lib/select/select.component.ts","../../../projects/ngx-lib/select/select.module.ts","../../../projects/ngx-lib/select/public-api.ts","../../../projects/ngx-lib/select/pepperi-addons-ngx-lib-select.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepSelectFieldType,\n PepSelectField,\n IPepOption,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepSelectComponent implements OnChanges, OnInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() type: PepSelectFieldType = 'select';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n @Input() options: Array<IPepOption> = [];\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n controlType = 'select';\n\n // @Input() field: PepFieldBase;\n @Input() form: FormGroup = null;\n @Input() layoutType: PepLayoutType = 'form';\n @Input() parentFieldKey: string = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() emptyOption = true;\n @Input() renderTitle = true;\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ViewChild('select') select: MatSelect;\n\n standAlone = false;\n isInEditMode = false;\n isMulti = false;\n selectedValuesModel: string[];\n selectedValueModel: string;\n fieldFormattedValue = '';\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) { }\n\n private addOptionsIfNeeded(): void {\n if (this.isMulti) {\n // Go gor all selected and add to options if not exist\n // for (let i = 0; i < this.selectedValuesModel.length; i++) {\n for (const selectedValue of this.selectedValuesModel) {\n let valueNotExist = false;\n\n if (\n this.options &&\n !this.options.find((opt) => opt.key === selectedValue)\n ) {\n valueNotExist = true;\n }\n\n // Add it to options.\n if (valueNotExist) {\n this.options.push({\n key: selectedValue,\n value: selectedValue,\n });\n }\n }\n } else {\n if (\n this.value &&\n this.value !== '' &&\n this.options &&\n !this.options.find((opt) => opt.key === this.value)\n ) {\n this.options.push({ key: this.value, value: this.value });\n }\n }\n }\n\n private setFieldFormattedValue(value: any): void {\n if (this.isMulti) {\n if (this.selectedValuesModel.length > 0) {\n this.fieldFormattedValue = this.selectedValuesModel\n .map((value) => {\n return this.options.find((opt) => opt.key === value)\n ?.value;\n })\n .join(', ');\n } else {\n this.fieldFormattedValue = '';\n }\n\n // this.fieldFormattedValue = typeof value === 'string' ? value.replace(new RegExp(';', 'g'), ', ') : '';\n } else {\n const selectedOpt = this.options.find((opt) => opt.key === value);\n\n if (selectedOpt) {\n this.fieldFormattedValue = selectedOpt.value;\n }\n }\n }\n\n private setDefaultForm(): void {\n const pepField = new PepSelectField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n\n this.isMulti = this.type === 'multi';\n if (this.isMulti) {\n this.selectedValuesModel =\n this.value.length > 0 ? this.value.split(';') : [];\n } else {\n this.selectedValueModel = this.value;\n }\n\n this.addOptionsIfNeeded();\n this.setFieldFormattedValue(this.value);\n }\n\n ngOnDestroy(): void {\n //\n }\n\n selectionChange(event: any): void {\n if (!this.isMulti) {\n this.changeValue(this.selectedValueModel);\n }\n }\n\n openedChange(event: any): void {\n // Only on close.\n if (!event) {\n if (this.isMulti) {\n this.changeValue(this.selectedValuesModel.join(';'));\n }\n\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }\n }\n\n changeValue(value: any): void {\n this.setFieldFormattedValue(value);\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n // value,\n this.fieldFormattedValue,\n this.parentFieldKey\n );\n\n if (this.mandatory) {\n const fieldControl = this.form.controls[this.key];\n if (value) {\n fieldControl.setErrors(null);\n } else {\n fieldControl.setErrors({\n serverError: 'Required',\n });\n }\n this.formValidationChange.emit(this.form.valid);\n }\n\n this.valueChange.emit(value);\n }\n\n cardTemplateClicked(event: any): void {\n this.isInEditMode = true;\n\n setTimeout(() => {\n this.select.open();\n }, 0);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepSelectComponent } from './select.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n // Material modules\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatSelectModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepSelectComponent],\n declarations: [PepSelectComponent],\n})\nexport class PepSelectModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemEdit]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/select\n */\nexport * from './select.module';\nexport * from './select.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA+Ba,kBAAkB;IAyD3B,YACY,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;QAFnB,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,aAAQ,GAAR,QAAQ,CAAW;QACnB,YAAO,GAAP,OAAO,CAAY;QA3DtB,QAAG,GAAG,EAAE,CAAC;QACT,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,SAAI,GAAuB,QAAQ,CAAC;QACpC,cAAS,GAAG,KAAK,CAAC;QAClB,a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.ts","../../../projects/ngx-lib/select/select.module.ts","../../../projects/ngx-lib/select/public-api.ts","../../../projects/ngx-lib/select/pepperi-addons-ngx-lib-select.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepSelectFieldType,\n PepSelectField,\n IPepOption,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepSelectComponent implements OnChanges, OnInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() type: PepSelectFieldType = 'select';\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n @Input() options: Array<IPepOption> = [];\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n controlType = 'select';\n\n // @Input() field: PepFieldBase;\n @Input() form: FormGroup = null;\n @Input() layoutType: PepLayoutType = 'form';\n @Input() parentFieldKey: string = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() emptyOption = true;\n\n @Output()\n valueChange: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ViewChild('select') select: MatSelect;\n\n standAlone = false;\n isInEditMode = false;\n isMulti = false;\n selectedValuesModel: string[];\n selectedValueModel: string;\n fieldFormattedValue = '';\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n private element: ElementRef\n ) { }\n\n private addOptionsIfNeeded(): void {\n if (this.isMulti) {\n // Go gor all selected and add to options if not exist\n // for (let i = 0; i < this.selectedValuesModel.length; i++) {\n for (const selectedValue of this.selectedValuesModel) {\n let valueNotExist = false;\n\n if (\n this.options &&\n !this.options.find((opt) => opt.key === selectedValue)\n ) {\n valueNotExist = true;\n }\n\n // Add it to options.\n if (valueNotExist) {\n this.options.push({\n key: selectedValue,\n value: selectedValue,\n });\n }\n }\n } else {\n if (\n this.value &&\n this.value !== '' &&\n this.options &&\n !this.options.find((opt) => opt.key === this.value)\n ) {\n this.options.push({ key: this.value, value: this.value });\n }\n }\n }\n\n private setFieldFormattedValue(value: any): void {\n if (this.isMulti) {\n if (this.selectedValuesModel.length > 0) {\n this.fieldFormattedValue = this.selectedValuesModel\n .map((value) => {\n return this.options.find((opt) => opt.key === value)\n ?.value;\n })\n .join(', ');\n } else {\n this.fieldFormattedValue = '';\n }\n\n // this.fieldFormattedValue = typeof value === 'string' ? value.replace(new RegExp(';', 'g'), ', ') : '';\n } else {\n const selectedOpt = this.options.find((opt) => opt.key === value);\n\n if (selectedOpt) {\n this.fieldFormattedValue = selectedOpt.value;\n }\n }\n }\n\n private setDefaultForm(): void {\n const pepField = new PepSelectField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n\n this.isMulti = this.type === 'multi';\n if (this.isMulti) {\n this.selectedValuesModel =\n this.value.length > 0 ? this.value.split(';') : [];\n } else {\n this.selectedValueModel = this.value;\n }\n\n this.addOptionsIfNeeded();\n this.setFieldFormattedValue(this.value);\n }\n\n ngOnDestroy(): void {\n //\n }\n\n selectionChange(event: any): void {\n if (!this.isMulti) {\n this.changeValue(this.selectedValueModel);\n }\n }\n\n openedChange(event: any): void {\n // Only on close.\n if (!event) {\n if (this.isMulti) {\n this.changeValue(this.selectedValuesModel.join(';'));\n }\n\n if (this.isInEditMode) {\n this.isInEditMode = false;\n }\n }\n }\n\n changeValue(value: any): void {\n this.setFieldFormattedValue(value);\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n // value,\n this.fieldFormattedValue,\n this.parentFieldKey\n );\n\n if (this.mandatory) {\n const fieldControl = this.form.controls[this.key];\n if (value) {\n fieldControl.setErrors(null);\n } else {\n fieldControl.setErrors({\n serverError: 'Required',\n });\n }\n this.formValidationChange.emit(this.form.valid);\n }\n\n this.valueChange.emit(value);\n }\n\n cardTemplateClicked(event: any): void {\n this.isInEditMode = true;\n\n setTimeout(() => {\n this.select.open();\n }, 0);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepSelectComponent } from './select.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n // Material modules\n MatCommonModule,\n MatButtonModule,\n MatFormFieldModule,\n MatSelectModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepSelectComponent],\n declarations: [PepSelectComponent],\n})\nexport class PepSelectModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemEdit]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/select\n */\nexport * from './select.module';\nexport * from './select.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA+Ba,kBAAkB;IAwD3B,YACY,oBAA6C,EAC7C,QAAmB,EACnB,OAAmB;QAFnB,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,aAAQ,GAAR,QAAQ,CAAW;QACnB,YAAO,GAAP,OAAO,CAAY;QA1DtB,QAAG,GAAG,EAAE,CAAC;QACT,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,SAAI,GAAuB,QAAQ,CAAC;QACpC,cAAS,GAAG,KAAK,CAAC;QAClB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QACjB,eAAU,GAA2B,4BAA4B,CAAC;QAClE,YAAO,GAAG,CAAC,CAAC;QACZ,YAAO,GAAsB,EAAE,CAAC;QAEjC,aAAQ,GAAG,IAAI,CAAC;QAoBxB,gBAAW,GAAG,QAAQ,CAAC;;QAGd,SAAI,GAAc,IAAI,CAAC;QACvB,eAAU,GAAkB,MAAM,CAAC;QACnC,mBAAc,GAAW,IAAI,CAAC;QAC9B,aAAQ,GAAG,KAAK,CAAC;QACjB,cAAS,GAAG,IAAI,CAAC;QACjB,gBAAW,GAAG,IAAI,CAAC;QAG5B,gBAAW,GAAyB,IAAI,YAAY,EAAU,CAAC;QAE/D,yBAAoB,GAA0B,IAAI,YAAY,EAAW,CAAC;QAI1E,eAAU,GAAG,KAAK,CAAC;QACnB,iBAAY,GAAG,KAAK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IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;KAC3D;;;YAtBJ,QAAQ,SAAC;gBACN,OAAO,EAAE;oBACL,YAAY;oBACZ,mBAAmB;oBACnB,WAAW;;oBAEX,eAAe;oBACf,eAAe;oBACf,kBAAkB;oBAClB,eAAe;oBACf,aAAa;;oBAEb,eAAe;oBACf,aAAa;oBACb,mBAAmB;iBACtB;gBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;gBAC7B,YAAY,EAAE,CAAC,kBAAkB,CAAC;aACrC;;;YAzBG,eAAe;;;ACbnB;;;;ACAA;;;;;;"}
@@ -12,7 +12,6 @@ class PepSeparatorComponent {
12
12
  this.controlType = 'separator';
13
13
  this.form = null;
14
14
  this.layoutType = 'form';
15
- // @Input() renderTitle = true;
16
15
  this._visible = true;
17
16
  this.standAlone = false;
18
17
  }
@@ -32,13 +31,6 @@ class PepSeparatorComponent {
32
31
  if (this.form === null) {
33
32
  this.standAlone = true;
34
33
  this.renderer.addClass(this.element.nativeElement, PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME);
35
- // There is no pep-title-field here
36
- // if (!this.renderTitle) {
37
- // this.renderer.addClass(
38
- // this.element.nativeElement,
39
- // PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME
40
- // );
41
- // }
42
34
  }
43
35
  }
44
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-separator.js","sources":["../../../projects/ngx-lib/separator/separator.component.ts","../../../projects/ngx-lib/separator/separator.module.ts","../../../projects/ngx-lib/separator/public-api.ts","../../../projects/ngx-lib/separator/pepperi-addons-ngx-lib-separator.ts"],"sourcesContent":["import {\n Component,\n Input,\n OnInit,\n ChangeDetectionStrategy,\n Renderer2,\n ElementRef,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-separator',\n templateUrl: './separator.component.html',\n styleUrls: ['./separator.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepSeparatorComponent implements OnInit {\n @Input() key = '';\n @Input() label = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n controlType = 'separator';\n\n @Input() form: FormGroup = null;\n @Input() layoutType: PepLayoutType = 'form';\n // @Input() renderTitle = true;\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 standAlone = false;\n\n constructor(private renderer: Renderer2, private element: ElementRef) { }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n // There is no pep-title-field here\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","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PepSeparatorComponent } from './separator.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [PepSeparatorComponent],\n declarations: [PepSeparatorComponent],\n})\nexport class PepSeparatorModule {}\n","/*\n * Public API Surface of ngx-lib/separator\n */\nexport * from './separator.module';\nexport * from './separator.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAsBa,qBAAqB;IAiC9B,YAAoB,QAAmB,EAAU,OAAmB;QAAhD,aAAQ,GAAR,QAAQ,CAAW;QAAU,YAAO,GAAP,OAAO,C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AAY,EAAE,CAAC,qBAAqB,CAAC;aACxC;;;ACTD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-separator.js","sources":["../../../projects/ngx-lib/separator/separator.component.ts","../../../projects/ngx-lib/separator/separator.module.ts","../../../projects/ngx-lib/separator/public-api.ts","../../../projects/ngx-lib/separator/pepperi-addons-ngx-lib-separator.ts"],"sourcesContent":["import {\n Component,\n Input,\n OnInit,\n ChangeDetectionStrategy,\n Renderer2,\n ElementRef,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepLayoutType,\n PepCustomizationService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-separator',\n templateUrl: './separator.component.html',\n styleUrls: ['./separator.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepSeparatorComponent implements OnInit {\n @Input() key = '';\n @Input() label = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n controlType = 'separator';\n\n @Input() form: FormGroup = null;\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 standAlone = false;\n\n constructor(private renderer: Renderer2, private element: ElementRef) { }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PepSeparatorComponent } from './separator.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [PepSeparatorComponent],\n declarations: [PepSeparatorComponent],\n})\nexport class PepSeparatorModule {}\n","/*\n * Public API Surface of ngx-lib/separator\n */\nexport * from './separator.module';\nexport * from './separator.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAsBa,qBAAqB;IAgC9B,YAAoB,QAAmB,EAAU,OAAmB;QAAhD,aAAQ,GAAR,QAAQ,CAAW;QAAU,YAAO,GAAP,OAAO,CAAY;QA/B3D,QAAG,GAAG,EAAE,CAAC;QACT,UAAK,GAAG,EAAE,CAAC;QACX,eAAU,GAA2B,4BAA4B,CAAC;QAE3E,gBAAW,GAAG,WAAW,CAAC;QAEjB,SAAI,GAAc,IAAI,CAAC;QACvB,eAAU,GAAkB,MAAM,CAAC;QAEpC,aAAQ,GAAG,IAAI,CAAC;QAoBxB,eAAU,GAAG,KAAK,CAAC;KAEsD;IArBzE,IACI,OAAO,CAAC,OAAgB;QACxB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,QAAQ,CAAC,WAAW,CACrB,IAAI,CAAC,OAAO,CAAC,aAAa,EAC1B,gBAAgB,CACnB,CAAC;SACL;aAAM;YACH,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAClB,IAAI,CAAC,OAAO,CAAC,aAAa,EAC1B,gBAAgB,CACnB,CAAC;SACL;KACJ;IACD,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;IAMD,QAAQ;QACJ,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;YACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YAEvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAClB,IAAI,CAAC,OAAO,CAAC,aAAa,EAC1B,uBAAuB,CAAC,4BAA4B,CACvD,CAAC;SACL;KACJ;;;YAjDJ,SAAS,SAAC;gBACP,QAAQ,EAAE,eAAe;gBACzB,4uBAAyC;gBAEzC,eAAe,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