@pepperi-addons/ngx-lib 0.4.0-angular14.9 → 0.4.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/chips/chips.component.d.ts +93 -0
  2. package/chips/chips.component.theme.scss +58 -0
  3. package/chips/chips.model.d.ts +13 -0
  4. package/chips/chips.module.d.ts +20 -0
  5. package/chips/chips.service.d.ts +15 -0
  6. package/{plugin → chips}/index.d.ts +1 -1
  7. package/chips/public-api.d.ts +3 -0
  8. package/color/color-picker.component.d.ts +1 -1
  9. package/core/common/model/wapi.model.d.ts +1 -0
  10. package/core/common/services/addon.service.d.ts +13 -9
  11. package/core/common/services/utilities.service.d.ts +5 -4
  12. package/core/customization/customization.model.d.ts +7 -0
  13. package/esm2020/address/address.component.mjs +1 -1
  14. package/esm2020/attachment/attachment.component.mjs +1 -1
  15. package/esm2020/checkbox/checkbox.component.mjs +1 -1
  16. package/esm2020/chips/chips.component.mjs +158 -0
  17. package/esm2020/chips/chips.model.mjs +2 -0
  18. package/esm2020/chips/chips.module.mjs +81 -0
  19. package/esm2020/chips/chips.service.mjs +44 -0
  20. package/esm2020/chips/pepperi-addons-ngx-lib-chips.mjs +5 -0
  21. package/esm2020/chips/public-api.mjs +7 -0
  22. package/esm2020/color/color-picker.component.mjs +4 -4
  23. package/esm2020/color/color.component.mjs +1 -1
  24. package/esm2020/core/common/model/wapi.model.mjs +1 -1
  25. package/esm2020/core/common/services/addon.service.mjs +43 -38
  26. package/esm2020/core/common/services/utilities.service.mjs +66 -13
  27. package/esm2020/core/customization/customization.model.mjs +10 -1
  28. package/esm2020/core/http/interceptors/loader.interceptor.mjs +4 -5
  29. package/esm2020/core/http/services/loader.service.mjs +4 -4
  30. package/esm2020/date/date.component.mjs +3 -3
  31. package/esm2020/field-title/field-title.component.mjs +6 -3
  32. package/esm2020/form/field-generator.component.mjs +7 -7
  33. package/esm2020/form/form.component.mjs +12 -3
  34. package/esm2020/form/internal-button.component.mjs +1 -1
  35. package/esm2020/form/internal-field-generator.component.mjs +3 -3
  36. package/esm2020/form/internal-form.component.mjs +4 -2
  37. package/esm2020/form/internal-list.component.mjs +5 -2
  38. package/esm2020/group-buttons/group-buttons.component.mjs +8 -4
  39. package/esm2020/icon/icon-generated-all.model.mjs +8 -1
  40. package/esm2020/icon/icon-generated.model.mjs +29 -1
  41. package/esm2020/image/image.component.mjs +1 -1
  42. package/esm2020/images-filmstrip/images-filmstrip.component.mjs +3 -91
  43. package/esm2020/images-filmstrip/images-filmstrip.module.mjs +1 -56
  44. package/esm2020/link/link.component.mjs +1 -1
  45. package/esm2020/list/list-pager.component.mjs +1 -1
  46. package/esm2020/list/list.component.mjs +5 -2
  47. package/esm2020/list/virtual-scroller.mjs +11 -10
  48. package/esm2020/menu/menu.component.mjs +11 -3
  49. package/esm2020/page-layout/page-layout.component.mjs +3 -3
  50. package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +1 -1
  51. package/esm2020/quantity-selector/quantity-selector.component.mjs +24 -4
  52. package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +1 -1
  53. package/esm2020/query-builder/query-builder-section/query-builder-section.component.mjs +1 -1
  54. package/esm2020/remote-loader/addon-block-loader.component.mjs +23 -5
  55. package/esm2020/remote-loader/addon-block-loader.service.mjs +9 -8
  56. package/esm2020/remote-loader/public-api.mjs +2 -1
  57. package/esm2020/remote-loader/remote-loader-element.component.mjs +109 -0
  58. package/esm2020/remote-loader/remote-loader.component.mjs +37 -59
  59. package/esm2020/remote-loader/remote-loader.model.mjs +1 -1
  60. package/esm2020/remote-loader/remote-loader.module.mjs +12 -3
  61. package/esm2020/remote-loader/remote-loader.service.mjs +50 -26
  62. package/esm2020/rich-html-textarea/rich-html-textarea.component.mjs +1 -1
  63. package/esm2020/select/select.component.mjs +33 -7
  64. package/esm2020/side-bar/side-bar.component.mjs +11 -27
  65. package/esm2020/side-bar/side-bar.module.mjs +7 -3
  66. package/esm2020/signature/signature.component.mjs +1 -1
  67. package/esm2020/size-detector/size-detector.component.mjs +2 -2
  68. package/esm2020/slider/slider.component.mjs +1 -1
  69. package/esm2020/smart-filters/boolean-filter/boolean-filter.component.mjs +1 -1
  70. package/esm2020/smart-filters/date-filter/date-filter.component.mjs +1 -1
  71. package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +1 -1
  72. package/esm2020/smart-filters/number-filter/number-filter.component.mjs +3 -3
  73. package/esm2020/smart-filters/text-filter/text-filter.component.mjs +1 -1
  74. package/esm2020/textarea/textarea.component.mjs +1 -1
  75. package/esm2020/textbox/textbox.component.mjs +48 -7
  76. package/esm2020/textbox-icon/textbox-icon.component.mjs +2 -2
  77. package/fesm2015/pepperi-addons-ngx-lib-address.mjs +1 -1
  78. package/fesm2015/pepperi-addons-ngx-lib-address.mjs.map +1 -1
  79. package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs +1 -1
  80. package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs.map +1 -1
  81. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs +1 -1
  82. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -1
  83. package/fesm2015/pepperi-addons-ngx-lib-chips.mjs +287 -0
  84. package/fesm2015/pepperi-addons-ngx-lib-chips.mjs.map +1 -0
  85. package/fesm2015/pepperi-addons-ngx-lib-color.mjs +4 -4
  86. package/fesm2015/pepperi-addons-ngx-lib-color.mjs.map +1 -1
  87. package/fesm2015/pepperi-addons-ngx-lib-date.mjs +2 -2
  88. package/fesm2015/pepperi-addons-ngx-lib-date.mjs.map +1 -1
  89. package/fesm2015/pepperi-addons-ngx-lib-field-title.mjs +5 -2
  90. package/fesm2015/pepperi-addons-ngx-lib-field-title.mjs.map +1 -1
  91. package/fesm2015/pepperi-addons-ngx-lib-form.mjs +23 -12
  92. package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -1
  93. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs +7 -3
  94. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -1
  95. package/fesm2015/pepperi-addons-ngx-lib-icon.mjs +36 -1
  96. package/fesm2015/pepperi-addons-ngx-lib-icon.mjs.map +1 -1
  97. package/fesm2015/pepperi-addons-ngx-lib-image.mjs +1 -1
  98. package/fesm2015/pepperi-addons-ngx-lib-image.mjs.map +1 -1
  99. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs +2 -129
  100. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -1
  101. package/fesm2015/pepperi-addons-ngx-lib-link.mjs +1 -1
  102. package/fesm2015/pepperi-addons-ngx-lib-link.mjs.map +1 -1
  103. package/fesm2015/pepperi-addons-ngx-lib-list.mjs +15 -11
  104. package/fesm2015/pepperi-addons-ngx-lib-list.mjs.map +1 -1
  105. package/fesm2015/pepperi-addons-ngx-lib-menu.mjs +10 -2
  106. package/fesm2015/pepperi-addons-ngx-lib-menu.mjs.map +1 -1
  107. package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs +2 -2
  108. package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -1
  109. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +1 -1
  110. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
  111. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +23 -3
  112. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
  113. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +2 -2
  114. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
  115. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +249 -105
  116. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
  117. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +1 -1
  118. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
  119. package/fesm2015/pepperi-addons-ngx-lib-select.mjs +32 -6
  120. package/fesm2015/pepperi-addons-ngx-lib-select.mjs.map +1 -1
  121. package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs +15 -27
  122. package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -1
  123. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs +1 -1
  124. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs.map +1 -1
  125. package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs +1 -1
  126. package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs.map +1 -1
  127. package/fesm2015/pepperi-addons-ngx-lib-slider.mjs +1 -1
  128. package/fesm2015/pepperi-addons-ngx-lib-slider.mjs.map +1 -1
  129. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +6 -6
  130. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
  131. package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs +1 -1
  132. package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs.map +1 -1
  133. package/fesm2015/pepperi-addons-ngx-lib-textbox-icon.mjs +1 -1
  134. package/fesm2015/pepperi-addons-ngx-lib-textbox-icon.mjs.map +1 -1
  135. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +49 -8
  136. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
  137. package/fesm2015/pepperi-addons-ngx-lib.mjs +128 -57
  138. package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
  139. package/fesm2020/pepperi-addons-ngx-lib-address.mjs +1 -1
  140. package/fesm2020/pepperi-addons-ngx-lib-address.mjs.map +1 -1
  141. package/fesm2020/pepperi-addons-ngx-lib-attachment.mjs +1 -1
  142. package/fesm2020/pepperi-addons-ngx-lib-attachment.mjs.map +1 -1
  143. package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs +1 -1
  144. package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -1
  145. package/fesm2020/pepperi-addons-ngx-lib-chips.mjs +287 -0
  146. package/fesm2020/pepperi-addons-ngx-lib-chips.mjs.map +1 -0
  147. package/fesm2020/pepperi-addons-ngx-lib-color.mjs +4 -4
  148. package/fesm2020/pepperi-addons-ngx-lib-color.mjs.map +1 -1
  149. package/fesm2020/pepperi-addons-ngx-lib-date.mjs +2 -2
  150. package/fesm2020/pepperi-addons-ngx-lib-date.mjs.map +1 -1
  151. package/fesm2020/pepperi-addons-ngx-lib-field-title.mjs +5 -2
  152. package/fesm2020/pepperi-addons-ngx-lib-field-title.mjs.map +1 -1
  153. package/fesm2020/pepperi-addons-ngx-lib-form.mjs +26 -12
  154. package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -1
  155. package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs +7 -3
  156. package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -1
  157. package/fesm2020/pepperi-addons-ngx-lib-icon.mjs +36 -1
  158. package/fesm2020/pepperi-addons-ngx-lib-icon.mjs.map +1 -1
  159. package/fesm2020/pepperi-addons-ngx-lib-image.mjs +1 -1
  160. package/fesm2020/pepperi-addons-ngx-lib-image.mjs.map +1 -1
  161. package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs +2 -129
  162. package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -1
  163. package/fesm2020/pepperi-addons-ngx-lib-link.mjs +1 -1
  164. package/fesm2020/pepperi-addons-ngx-lib-link.mjs.map +1 -1
  165. package/fesm2020/pepperi-addons-ngx-lib-list.mjs +15 -11
  166. package/fesm2020/pepperi-addons-ngx-lib-list.mjs.map +1 -1
  167. package/fesm2020/pepperi-addons-ngx-lib-menu.mjs +10 -2
  168. package/fesm2020/pepperi-addons-ngx-lib-menu.mjs.map +1 -1
  169. package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs +2 -2
  170. package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -1
  171. package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs +1 -1
  172. package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
  173. package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +23 -3
  174. package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
  175. package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +2 -2
  176. package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
  177. package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +230 -98
  178. package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
  179. package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs +1 -1
  180. package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
  181. package/fesm2020/pepperi-addons-ngx-lib-select.mjs +32 -6
  182. package/fesm2020/pepperi-addons-ngx-lib-select.mjs.map +1 -1
  183. package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs +15 -27
  184. package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -1
  185. package/fesm2020/pepperi-addons-ngx-lib-signature.mjs +1 -1
  186. package/fesm2020/pepperi-addons-ngx-lib-signature.mjs.map +1 -1
  187. package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs +1 -1
  188. package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs.map +1 -1
  189. package/fesm2020/pepperi-addons-ngx-lib-slider.mjs +1 -1
  190. package/fesm2020/pepperi-addons-ngx-lib-slider.mjs.map +1 -1
  191. package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +6 -6
  192. package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
  193. package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs +1 -1
  194. package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs.map +1 -1
  195. package/fesm2020/pepperi-addons-ngx-lib-textbox-icon.mjs +1 -1
  196. package/fesm2020/pepperi-addons-ngx-lib-textbox-icon.mjs.map +1 -1
  197. package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +48 -8
  198. package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
  199. package/fesm2020/pepperi-addons-ngx-lib.mjs +125 -58
  200. package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
  201. package/field-title/field-title.component.d.ts +2 -1
  202. package/form/field-generator.component.d.ts +1 -1
  203. package/group-buttons/group-buttons.component.d.ts +2 -1
  204. package/icon/icon-generated-all.model.d.ts +7 -0
  205. package/icon/icon-generated.model.d.ts +29 -1
  206. package/menu/menu.component.d.ts +2 -0
  207. package/package.json +14 -13
  208. package/page-layout/page-layout.component.d.ts +1 -1
  209. package/quantity-selector/quantity-selector.component.d.ts +7 -1
  210. package/remote-loader/addon-block-loader.component.d.ts +10 -6
  211. package/remote-loader/addon-block-loader.service.d.ts +2 -3
  212. package/remote-loader/public-api.d.ts +1 -0
  213. package/remote-loader/remote-loader-element.component.d.ts +30 -0
  214. package/remote-loader/remote-loader.component.d.ts +3 -5
  215. package/remote-loader/remote-loader.model.d.ts +16 -11
  216. package/remote-loader/remote-loader.module.d.ts +8 -6
  217. package/remote-loader/remote-loader.service.d.ts +5 -7
  218. package/select/select.component.d.ts +10 -4
  219. package/side-bar/side-bar.component.d.ts +3 -3
  220. package/src/assets/i18n/en.ngx-lib.json +4 -0
  221. package/src/core/style/components/checkbox.scss +20 -1
  222. package/src/core/style/components/general.scss +5 -4
  223. package/textbox/textbox.component.d.ts +16 -1
  224. package/esm2020/plugin/pepperi-addons-ngx-lib-plugin.mjs +0 -5
  225. package/esm2020/plugin/plugin-proxy.component.mjs +0 -90
  226. package/esm2020/plugin/plugin.model.mjs +0 -2
  227. package/esm2020/plugin/public-api.mjs +0 -6
  228. package/fesm2015/pepperi-addons-ngx-lib-plugin.mjs +0 -107
  229. package/fesm2015/pepperi-addons-ngx-lib-plugin.mjs.map +0 -1
  230. package/fesm2020/pepperi-addons-ngx-lib-plugin.mjs +0 -101
  231. package/fesm2020/pepperi-addons-ngx-lib-plugin.mjs.map +0 -1
  232. package/plugin/plugin-proxy.component.d.ts +0 -22
  233. package/plugin/plugin.model.d.ts +0 -5
  234. package/plugin/public-api.d.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-attachment.mjs","sources":["../../../projects/ngx-lib/attachment/attachment.component.ts","../../../projects/ngx-lib/attachment/attachment.component.html","../../../projects/ngx-lib/attachment/attachment.module.ts","../../../projects/ngx-lib/attachment/public-api.ts","../../../projects/ngx-lib/attachment/pepperi-addons-ngx-lib-attachment.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n Renderer2,\n OnDestroy,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepFileService,\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n IPepFieldClickEvent,\n PepAttachmentField,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-attachment',\n templateUrl: './attachment.component.html',\n styleUrls: ['./attachment.component.scss', './attachment.component.theme.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepAttachmentComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * The attachment key.\n *\n * @memberof PepAttachmentComponent\n */\n @Input() key = '';\n\n private _src = '';\n /**\n * The src of the attachment.\n *\n * @memberof PepAttachmentComponent\n */\n @Input()\n set src(value: string) {\n if (!value) {\n value = '';\n }\n\n this._src = value;\n if (this._src.length > 0) {\n // Empty dataURI.\n this.dataURI = null;\n }\n }\n get src(): string {\n return this._src;\n }\n\n /**\n * The title of the attachment.\n *\n * @memberof PepAttachmentComponent\n */\n @Input() label = '';\n\n /**\n * If the attachment is mandatory\n *\n * @memberof PepAttachmentComponent\n */\n @Input() mandatory = false;\n\n /**\n * If the attachment is disabled\n *\n * @memberof PepAttachmentComponent\n */\n @Input() disabled = false;\n\n /**\n * If the attachment is readonly\n *\n * @memberof PepAttachmentComponent\n */\n @Input() readonly = false;\n\n /**\n * The horizontal alignment of the attachment\n *\n * @type {PepHorizontalAlignment}\n * @memberof PepAttachmentComponent\n */\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n private _rowSpan = 1;\n @Input()\n set rowSpan(value) {\n this._rowSpan = value;\n this.setFieldHeight();\n }\n get rowSpan(): number {\n return this._rowSpan;\n }\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n controlType = 'attachment';\n\n @Input() form: FormGroup = null;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n\n private _layoutType: PepLayoutType = 'form';\n @Input()\n set layoutType(value: PepLayoutType) {\n this._layoutType = value;\n this.setFieldHeight();\n }\n get layoutType(): PepLayoutType {\n return this._layoutType;\n }\n\n @Input() isActive = false;\n\n @Output()\n fileChange: EventEmitter<any> = new EventEmitter<any>();\n\n @Output()\n elementClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();\n\n fieldHeight = '';\n standAlone = false;\n dataURI = null;\n\n acceptAttachmentType =\n 'application/pdf,application/json,text/csv,text/csv-schema,application/msword,application/vnd.ms-excel,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/bmp,image/jpg, image/jpeg, image/png, image/tif, image/tiff, txt, json, html';\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n public element: ElementRef,\n private fileService: PepFileService\n ) { }\n\n private setFieldHeight(): void {\n this.fieldHeight = this.customizationService.calculateFieldHeight(\n this.layoutType,\n this.rowSpan,\n this.standAlone\n );\n }\n\n private setDefaultForm(): void {\n const pepField = new PepAttachmentField({\n key: this.key,\n value: this.src,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnDestroy(): void {\n //\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n // Moved to src input\n // if (changes.src && changes.src.currentValue.length > 0) {\n // // Empty dataURI if there is change in the src.\n // this.dataURI = null;\n // }\n }\n\n onFileChanged(fileData: any): void {\n // const tmp = value.length > 0 ? JSON.parse(value) : null;\n // set this.dataURI after this.src cause it initialize in the src setter.\n this.src = fileData ? fileData.fileStr : '';\n this.dataURI = fileData;\n\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.dataURI ? this.dataURI.fileExt : ''\n );\n // this.valueChange.emit({\n // key: this.key,\n // value,\n // });\n\n this.fileChange.emit(fileData);\n // this.fileChange.emit(value.length > 0 ? JSON.parse(value) : value);\n }\n\n onFileClicked(event: IPepFieldClickEvent): void {\n if (this.dataURI != null) {\n const fileStrArr = this.dataURI.fileStr.split(';');\n if (fileStrArr.length === 2) {\n const win = window.open('', '_blank');\n const contentType = fileStrArr[0].split(':')[1];\n const base64 = fileStrArr[1].split(',')[1];\n const blob = this.fileService.convertFromb64toBlob(\n base64,\n contentType\n );\n const url = URL.createObjectURL(blob);\n win.location.href = url;\n }\n } else {\n if (this.fileService.isValidUrl(this.src)) {\n const win = window.open('', '_blank');\n win.location.href = this.src;\n }\n }\n\n this.elementClick.emit(event);\n }\n}\n","<ng-template #pepTemplate>\n <pep-files-uploader [key]=\"key\" [src]=\"src\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [rowSpan]=\"rowSpan\" [fieldHeight]=\"fieldHeight\" [controlType]=\"controlType\"\n [form]=\"form\" [layoutType]=\"layoutType\" [standAlone]=\"standAlone\" (fileChange)=\"onFileChanged($event)\"\n (elementClick)=\"onFileClicked($event)\" [acceptedExtensions]=\"acceptAttachmentType\">\n </pep-files-uploader>\n</ng-template>\n\n<ng-template #pepReadonlyTemplate>\n <ng-container *ngIf=\"src?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <div class=\"pep-file-container\">\n <a [id]=\"key\" class=\"color-link body-sm pep-card-input \" *ngIf=\"src != null\" title=\"{{ src }}\"\n target=\"_blank\" href=\"{{ src }}\">{{ src }}</a>\n </div>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n</ng-template>\n\n<ng-container *ngIf=\"layoutType === 'form'\">\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone }\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>\n\n\n<ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container one-row\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepFilesUploaderModule } from '@pepperi-addons/ngx-lib/files-uploader';\n\nimport { PepAttachmentComponent } from './attachment.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepFieldTitleModule,\n PepFilesUploaderModule,\n ],\n exports: [PepAttachmentComponent],\n declarations: [PepAttachmentComponent],\n})\nexport class PepAttachmentModule {}\n","/*\n * Public API Surface of ngx-lib/attachment\n */\nexport * from './attachment.module';\nexport * from './attachment.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA6Ba,sBAAsB,CAAA;AA+H/B,IAAA,WAAA,CACY,oBAA6C,EAC7C,QAAmB,EACpB,OAAmB,EAClB,WAA2B,EAAA;AAH3B,QAAA,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAyB;AAC7C,QAAA,IAAQ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,EAAE,CAAC,sBAAsB,CAAC;iBACzC,CAAA;;;AC3BD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-attachment.mjs","sources":["../../../projects/ngx-lib/attachment/attachment.component.ts","../../../projects/ngx-lib/attachment/attachment.component.html","../../../projects/ngx-lib/attachment/attachment.module.ts","../../../projects/ngx-lib/attachment/public-api.ts","../../../projects/ngx-lib/attachment/pepperi-addons-ngx-lib-attachment.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ElementRef,\n Renderer2,\n OnDestroy,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n PepFileService,\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n IPepFieldClickEvent,\n PepAttachmentField,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-attachment',\n templateUrl: './attachment.component.html',\n styleUrls: ['./attachment.component.scss', './attachment.component.theme.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepAttachmentComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * The attachment key.\n *\n * @memberof PepAttachmentComponent\n */\n @Input() key = '';\n\n private _src = '';\n /**\n * The src of the attachment.\n *\n * @memberof PepAttachmentComponent\n */\n @Input()\n set src(value: string) {\n if (!value) {\n value = '';\n }\n\n this._src = value;\n if (this._src.length > 0) {\n // Empty dataURI.\n this.dataURI = null;\n }\n }\n get src(): string {\n return this._src;\n }\n\n /**\n * The title of the attachment.\n *\n * @memberof PepAttachmentComponent\n */\n @Input() label = '';\n\n /**\n * If the attachment is mandatory\n *\n * @memberof PepAttachmentComponent\n */\n @Input() mandatory = false;\n\n /**\n * If the attachment is disabled\n *\n * @memberof PepAttachmentComponent\n */\n @Input() disabled = false;\n\n /**\n * If the attachment is readonly\n *\n * @memberof PepAttachmentComponent\n */\n @Input() readonly = false;\n\n /**\n * The horizontal alignment of the attachment\n *\n * @type {PepHorizontalAlignment}\n * @memberof PepAttachmentComponent\n */\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n private _rowSpan = 1;\n @Input()\n set rowSpan(value) {\n this._rowSpan = value;\n this.setFieldHeight();\n }\n get rowSpan(): number {\n return this._rowSpan;\n }\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n controlType = 'attachment';\n\n @Input() form: FormGroup = null;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n\n private _layoutType: PepLayoutType = 'form';\n @Input()\n set layoutType(value: PepLayoutType) {\n this._layoutType = value;\n this.setFieldHeight();\n }\n get layoutType(): PepLayoutType {\n return this._layoutType;\n }\n\n @Input() isActive = false;\n\n @Output()\n fileChange: EventEmitter<any> = new EventEmitter<any>();\n\n @Output()\n elementClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();\n\n fieldHeight = '';\n standAlone = false;\n dataURI = null;\n\n acceptAttachmentType =\n 'application/pdf,application/json,text/csv,text/csv-schema,application/msword,application/vnd.ms-excel,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/bmp,image/jpg, image/jpeg, image/png, image/tif, image/tiff, txt, json, html';\n\n constructor(\n private customizationService: PepCustomizationService,\n private renderer: Renderer2,\n public element: ElementRef,\n private fileService: PepFileService\n ) { }\n\n private setFieldHeight(): void {\n this.fieldHeight = this.customizationService.calculateFieldHeight(\n this.layoutType,\n this.rowSpan,\n this.standAlone\n );\n }\n\n private setDefaultForm(): void {\n const pepField = new PepAttachmentField({\n key: this.key,\n value: this.src,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnDestroy(): void {\n //\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n // Moved to src input\n // if (changes.src && changes.src.currentValue.length > 0) {\n // // Empty dataURI if there is change in the src.\n // this.dataURI = null;\n // }\n }\n\n onFileChanged(fileData: any): void {\n // const tmp = value.length > 0 ? JSON.parse(value) : null;\n // set this.dataURI after this.src cause it initialize in the src setter.\n this.src = fileData ? fileData.fileStr : '';\n this.dataURI = fileData;\n\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n this.dataURI ? this.dataURI.fileExt : ''\n );\n // this.valueChange.emit({\n // key: this.key,\n // value,\n // });\n\n this.fileChange.emit(fileData);\n // this.fileChange.emit(value.length > 0 ? JSON.parse(value) : value);\n }\n\n onFileClicked(event: IPepFieldClickEvent): void {\n if (this.dataURI != null) {\n const fileStrArr = this.dataURI.fileStr.split(';');\n if (fileStrArr.length === 2) {\n const win = window.open('', '_blank');\n const contentType = fileStrArr[0].split(':')[1];\n const base64 = fileStrArr[1].split(',')[1];\n const blob = this.fileService.convertFromb64toBlob(\n base64,\n contentType\n );\n const url = URL.createObjectURL(blob);\n win.location.href = url;\n }\n } else {\n if (this.fileService.isValidUrl(this.src)) {\n const win = window.open('', '_blank');\n win.location.href = this.src;\n }\n }\n\n this.elementClick.emit(event);\n }\n}\n","<ng-template #pepTemplate>\n <pep-files-uploader [key]=\"key\" [src]=\"src\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [rowSpan]=\"rowSpan\" [fieldHeight]=\"fieldHeight\" [controlType]=\"controlType\"\n [form]=\"form\" [layoutType]=\"layoutType\" [standAlone]=\"standAlone\" (fileChange)=\"onFileChanged($event)\"\n (elementClick)=\"onFileClicked($event)\" [acceptedExtensions]=\"acceptAttachmentType\">\n </pep-files-uploader>\n</ng-template>\n\n<ng-template #pepReadonlyTemplate>\n <ng-container *ngIf=\"src?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <div class=\"pep-file-container\">\n <a [id]=\"key\" class=\"color-link body-sm pep-card-input \" *ngIf=\"src != null\" title=\"{{ src }}\"\n target=\"_blank\" href=\"{{ src }}\">{{ src }}</a>\n </div>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n</ng-template>\n\n<ng-container *ngIf=\"layoutType === 'form'\">\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone }\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container\" [ngClass]=\"{ 'one-row': rowSpan == 1, 'stand-alone': standAlone}\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>\n\n\n<ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"false && isActive && !disabled; then selectedBlock; else notSelectedBlock\"></ng-container>\n <ng-template #selectedBlock>\n <div class=\"pep-file-container one-row\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </div>\n </ng-template>\n <ng-template #notSelectedBlock>\n <ng-container *ngTemplateOutlet=\"pepReadonlyTemplate\"></ng-container>\n </ng-template>\n</ng-container>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepFilesUploaderModule } from '@pepperi-addons/ngx-lib/files-uploader';\n\nimport { PepAttachmentComponent } from './attachment.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepFieldTitleModule,\n PepFilesUploaderModule,\n ],\n exports: [PepAttachmentComponent],\n declarations: [PepAttachmentComponent],\n})\nexport class PepAttachmentModule {}\n","/*\n * Public API Surface of ngx-lib/attachment\n */\nexport * from './attachment.module';\nexport * from './attachment.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA6Ba,sBAAsB,CAAA;AA+H/B,IAAA,WAAA,CACY,oBAA6C,EAC7C,QAAmB,EACpB,OAAmB,EAClB,WAA2B,EAAA;AAH3B,QAAA,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAyB;AAC7C,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AACpB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAY;AAClB,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAgB;AAlIvC;;;;AAIG;AACM,QAA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Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCheckboxComponent, deps: [{ token: i0.Renderer2 }, { token: i1.PepCustomizationService }, { token: i0.ElementRef }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
138
- PepCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepCheckboxComponent, selector: "pep-checkbox", inputs: { key: "key", value: "value", label: "label", type: "type", mandatory: "mandatory", disabled: "disabled", readonly: "readonly", xAlignment: "xAlignment", rowSpan: "rowSpan", additionalValue: "additionalValue", form: "form", isActive: "isActive", showTitle: "showTitle", renderTitle: "renderTitle", layoutType: "layoutType", visible: "visible" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <div class=\"pep-checkbox-container pep-input\" [ngClass]=\"{\n 'disable': disabled,\n 'pep-report-checkbox': layoutType === 'table' && !isActive,\n 'pep-card-checkbox': layoutType === 'card',\n 'one-row': rowSpan === 1,\n 'no-title': label.length == 0,\n 'right-alignment pull-right flip': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\">\n <!--\n This is cause a bug that when click on the pep-input area and after on the checkbox\n the value is updated only for the second time.\n (click)=\"toggleChecked($event)\" \n -->\n <ng-container *ngIf=\"type == 'booleanText'; then booleanTextTemplate; else regularTemplate\"></ng-container>\n <ng-template #booleanTextTemplate>\n <div class=\"mat-checkbox-layout body-sm\" (click)=\"toggleChecked($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\">\n <button [id]=\"key\" class=\"emoji-icon ellipsis pull-left flip\">\n {{ value ? additionalValueObject?.CheckedText : additionalValueObject?.UncheckedText }}\n </button>\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\" class=\"mat-checkbox-label emoji-title\">{{\n label }}</span>\n </div>\n </ng-template>\n <ng-template #regularTemplate>\n <mat-checkbox [name]=\"key\" class=\"body-sm\" type=\"checkbox\" (change)=\"onMaterialChange($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\"\n [checked]=\"value\" [disabled]=\"disabled\">\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\">{{ label }}</span>\n </mat-checkbox>\n </ng-template>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"false\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"key === 'ItemHasActiveCampaign'; then itemCampaignBlock; else checkboxBlock\">\n </ng-container>\n <ng-template #itemCampaignBlock>\n <ng-container *ngIf=\"value; then trueTemplate; else falseTemplate\">\n </ng-container>\n <ng-template #trueTemplate>\n <mat-icon class=\"has-active-campaign\" title=\"{{ 'CHECKBOX.TRUE' | translate }}\">\n <pep-icon name=\"system_bolt\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #falseTemplate>\n <span>&nbsp;</span>\n </ng-template>\n </ng-template>\n <ng-template #checkboxBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n</ng-container>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}\n", ""], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1$1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i9.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
138
+ PepCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepCheckboxComponent, selector: "pep-checkbox", inputs: { key: "key", value: "value", label: "label", type: "type", mandatory: "mandatory", disabled: "disabled", readonly: "readonly", xAlignment: "xAlignment", rowSpan: "rowSpan", additionalValue: "additionalValue", form: "form", isActive: "isActive", showTitle: "showTitle", renderTitle: "renderTitle", layoutType: "layoutType", visible: "visible" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <div class=\"pep-checkbox-container pep-input\" [ngClass]=\"{\n 'disable': disabled,\n 'pep-report-checkbox': layoutType === 'table' && !isActive,\n 'pep-card-checkbox': layoutType === 'card',\n 'one-row': rowSpan === 1,\n 'no-title': label.length == 0,\n 'right-alignment pull-right flip': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\">\n <!--\n This is cause a bug that when click on the pep-input area and after on the checkbox\n the value is updated only for the second time.\n (click)=\"toggleChecked($event)\" \n -->\n <ng-container *ngIf=\"type == 'booleanText'; then booleanTextTemplate; else regularTemplate\"></ng-container>\n <ng-template #booleanTextTemplate>\n <div class=\"mat-checkbox-layout body-sm\" (click)=\"toggleChecked($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\">\n <button [id]=\"key\" class=\"emoji-icon ellipsis pull-left flip\">\n {{ value ? additionalValueObject?.CheckedText : additionalValueObject?.UncheckedText }}\n </button>\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\" class=\"mat-checkbox-label emoji-title\">{{\n label }}</span>\n </div>\n </ng-template>\n <ng-template #regularTemplate>\n <mat-checkbox [name]=\"key\" class=\"body-sm\" type=\"checkbox\" (change)=\"onMaterialChange($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\"\n [checked]=\"value\" [disabled]=\"disabled\">\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\">{{ label }}</span>\n </mat-checkbox>\n </ng-template>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"false\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"key === 'ItemHasActiveCampaign'; then itemCampaignBlock; else checkboxBlock\">\n </ng-container>\n <ng-template #itemCampaignBlock>\n <ng-container *ngIf=\"value; then trueTemplate; else falseTemplate\">\n </ng-container>\n <ng-template #trueTemplate>\n <mat-icon class=\"has-active-campaign\" title=\"{{ 'CHECKBOX.TRUE' | translate }}\">\n <pep-icon name=\"system_bolt\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #falseTemplate>\n <span>&nbsp;</span>\n </ng-template>\n </ng-template>\n <ng-template #checkboxBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n</ng-container>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}\n", ""], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1$1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i9.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength", "fontBodyType"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
139
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCheckboxComponent, decorators: [{
140
140
  type: Component,
141
141
  args: [{ selector: 'pep-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <div class=\"pep-checkbox-container pep-input\" [ngClass]=\"{\n 'disable': disabled,\n 'pep-report-checkbox': layoutType === 'table' && !isActive,\n 'pep-card-checkbox': layoutType === 'card',\n 'one-row': rowSpan === 1,\n 'no-title': label.length == 0,\n 'right-alignment pull-right flip': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\">\n <!--\n This is cause a bug that when click on the pep-input area and after on the checkbox\n the value is updated only for the second time.\n (click)=\"toggleChecked($event)\" \n -->\n <ng-container *ngIf=\"type == 'booleanText'; then booleanTextTemplate; else regularTemplate\"></ng-container>\n <ng-template #booleanTextTemplate>\n <div class=\"mat-checkbox-layout body-sm\" (click)=\"toggleChecked($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\">\n <button [id]=\"key\" class=\"emoji-icon ellipsis pull-left flip\">\n {{ value ? additionalValueObject?.CheckedText : additionalValueObject?.UncheckedText }}\n </button>\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\" class=\"mat-checkbox-label emoji-title\">{{\n label }}</span>\n </div>\n </ng-template>\n <ng-template #regularTemplate>\n <mat-checkbox [name]=\"key\" class=\"body-sm\" type=\"checkbox\" (change)=\"onMaterialChange($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\"\n [checked]=\"value\" [disabled]=\"disabled\">\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\">{{ label }}</span>\n </mat-checkbox>\n </ng-template>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"false\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"key === 'ItemHasActiveCampaign'; then itemCampaignBlock; else checkboxBlock\">\n </ng-container>\n <ng-template #itemCampaignBlock>\n <ng-container *ngIf=\"value; then trueTemplate; else falseTemplate\">\n </ng-container>\n <ng-template #trueTemplate>\n <mat-icon class=\"has-active-campaign\" title=\"{{ 'CHECKBOX.TRUE' | translate }}\">\n <pep-icon name=\"system_bolt\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #falseTemplate>\n <span>&nbsp;</span>\n </ng-template>\n </ng-template>\n <ng-template #checkboxBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n</ng-container>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}\n"] }]
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-checkbox.mjs","sources":["../../../projects/ngx-lib/checkbox/checkbox.component.ts","../../../projects/ngx-lib/checkbox/checkbox.component.html","../../../projects/ngx-lib/checkbox/checkbox.module.ts","../../../projects/ngx-lib/checkbox/public-api.ts","../../../projects/ngx-lib/checkbox/pepperi-addons-ngx-lib-checkbox.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n ElementRef,\n Optional,\n OnChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatCheckboxChange } from '@angular/material/checkbox';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepCheckboxFieldType,\n PepCheckboxField,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss', './checkbox.component.theme.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepCheckboxComponent implements OnInit, OnChanges, OnDestroy {\n @Input() key = '';\n @Input() value = false;\n @Input() label = '';\n\n private _type: PepCheckboxFieldType = 'checkbox'; // || 'booleanText'\n @Input()\n set type(value: PepCheckboxFieldType) {\n this._type = value;\n this.setAdditionalValueObject();\n }\n get type(): PepCheckboxFieldType {\n return this._type;\n }\n\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n\n private _additionalValue: any = undefined;\n @Input()\n set additionalValue(value: any) {\n this._additionalValue = value;\n this.setAdditionalValueObject();\n }\n get additionalValue(): any {\n return this._additionalValue;\n }\n\n controlType = 'checkbox';\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() layoutType: PepLayoutType = 'form';\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n @Output()\n valueChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n standAlone = false;\n\n additionalValueObject: any;\n public jsonLib = JSON;\n\n constructor(\n private renderer: Renderer2,\n private customizationService: PepCustomizationService,\n private element: ElementRef,\n private translate: TranslateService\n ) { }\n\n private setAdditionalValueObject() {\n if (this.additionalValue && this.type === 'booleanText') {\n try {\n if (typeof this.additionalValue === 'string') {\n this.additionalValueObject = JSON.parse(\n this.additionalValue\n );\n } else {\n this.additionalValueObject = this.additionalValue;\n }\n } catch {\n this.additionalValueObject = {\n CheckedText: this.translate.instant('CHECKBOX.TRUE'),\n UncheckedText: this.translate.instant('CHECKBOX.FALSE'),\n };\n }\n }\n }\n\n private setDefaultForm(): void {\n const pepField = new PepCheckboxField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n onMaterialChange(e: MatCheckboxChange): void {\n this.changeValue(e.checked);\n }\n\n toggleChecked(event: Event): void {\n if (!this.disabled) {\n const isChecked: boolean =\n this.value ? true : false;\n const newValue = !isChecked;\n this.value = newValue;\n this.changeValue(newValue);\n }\n }\n\n changeValue(value: any): void {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n value\n );\n this.valueChange.emit(value);\n }\n}","<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <div class=\"pep-checkbox-container pep-input\" [ngClass]=\"{\n 'disable': disabled,\n 'pep-report-checkbox': layoutType === 'table' && !isActive,\n 'pep-card-checkbox': layoutType === 'card',\n 'one-row': rowSpan === 1,\n 'no-title': label.length == 0,\n 'right-alignment pull-right flip': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\">\n <!--\n This is cause a bug that when click on the pep-input area and after on the checkbox\n the value is updated only for the second time.\n (click)=\"toggleChecked($event)\" \n -->\n <ng-container *ngIf=\"type == 'booleanText'; then booleanTextTemplate; else regularTemplate\"></ng-container>\n <ng-template #booleanTextTemplate>\n <div class=\"mat-checkbox-layout body-sm\" (click)=\"toggleChecked($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\">\n <button [id]=\"key\" class=\"emoji-icon ellipsis pull-left flip\">\n {{ value ? additionalValueObject?.CheckedText : additionalValueObject?.UncheckedText }}\n </button>\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\" class=\"mat-checkbox-label emoji-title\">{{\n label }}</span>\n </div>\n </ng-template>\n <ng-template #regularTemplate>\n <mat-checkbox [name]=\"key\" class=\"body-sm\" type=\"checkbox\" (change)=\"onMaterialChange($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\"\n [checked]=\"value\" [disabled]=\"disabled\">\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\">{{ label }}</span>\n </mat-checkbox>\n </ng-template>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"false\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"key === 'ItemHasActiveCampaign'; then itemCampaignBlock; else checkboxBlock\">\n </ng-container>\n <ng-template #itemCampaignBlock>\n <ng-container *ngIf=\"value; then trueTemplate; else falseTemplate\">\n </ng-container>\n <ng-template #trueTemplate>\n <mat-icon class=\"has-active-campaign\" title=\"{{ 'CHECKBOX.TRUE' | translate }}\">\n <pep-icon name=\"system_bolt\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #falseTemplate>\n <span>&nbsp;</span>\n </ng-template>\n </ng-template>\n <ng-template #checkboxBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n</ng-container>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemBolt,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepCheckboxComponent } from './checkbox.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepCheckboxComponent],\n declarations: [PepCheckboxComponent],\n})\nexport class PepCheckboxModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemBolt]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/checkbox\n */\nexport * from './checkbox.module';\nexport * from './checkbox.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i8","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;MA+Ba,oBAAoB,CAAA;AAmE7B,IAAA,WAAA,CACY,QAAmB,EACnB,oBAA6C,EAC7C,OAAmB,EACnB,SAA2B,EAAA;AAH3B,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AACnB,QAAA,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAyB;AAC7C,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAY;AACnB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkB;AAtE9B,QAAA,IAAG,CAAA,GAAA,GAAG,EAAE,CAAC;AACT,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;AACd,QAAA,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;AAEZ,QAAA,IAAA,CAAA,KAAK,GAAyB,UAAU,CAAC;AAUxC,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAClB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AACjB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AACjB,QAAA,IAAU,CAAA,UAAA,GAA2B,4BAA4B,CAAC;AAClE,QAAA,IAAO,CAAA,OAAA,GAAG,CAAC,CAAC;AAEb,QAAA,IAAgB,CAAA,gBAAA,GAAQ,SAAS,CAAC;AAU1C,QAAA,IAAW,CAAA,WAAA,GAAG,UAAU,CAAC;AAEhB,QAAA,IAAI,CAAA,IAAA,GAAc,IAAI,CAAC;AACvB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AACjB,QAAA,IAAS,CAAA,S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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAftB,YAAY;QACZ,mBAAmB;;QAEnB,eAAe;QACf,kBAAkB;QAClB,iBAAiB;QACjB,aAAa;;QAEb,eAAe;QACf,aAAa;QACb,mBAAmB,CAAA,EAAA,CAAA,CAAA;2FAKd,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAjB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,mBAAmB;;wBAEnB,eAAe;wBACf,kBAAkB;wBAClB,iBAAiB;wBACjB,aAAa;;wBAEb,eAAe;wBACf,aAAa;wBACb,mBAAmB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;iBACvC,CAAA;;;ACnCD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-checkbox.mjs","sources":["../../../projects/ngx-lib/checkbox/checkbox.component.ts","../../../projects/ngx-lib/checkbox/checkbox.component.html","../../../projects/ngx-lib/checkbox/checkbox.module.ts","../../../projects/ngx-lib/checkbox/public-api.ts","../../../projects/ngx-lib/checkbox/pepperi-addons-ngx-lib-checkbox.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n ElementRef,\n Optional,\n OnChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatCheckboxChange } from '@angular/material/checkbox';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepCustomizationService,\n PepLayoutType,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepCheckboxFieldType,\n PepCheckboxField,\n} from '@pepperi-addons/ngx-lib';\n\n@Component({\n selector: 'pep-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss', './checkbox.component.theme.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepCheckboxComponent implements OnInit, OnChanges, OnDestroy {\n @Input() key = '';\n @Input() value = false;\n @Input() label = '';\n\n private _type: PepCheckboxFieldType = 'checkbox'; // || 'booleanText'\n @Input()\n set type(value: PepCheckboxFieldType) {\n this._type = value;\n this.setAdditionalValueObject();\n }\n get type(): PepCheckboxFieldType {\n return this._type;\n }\n\n @Input() mandatory = false;\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n @Input() rowSpan = 1;\n\n private _additionalValue: any = undefined;\n @Input()\n set additionalValue(value: any) {\n this._additionalValue = value;\n this.setAdditionalValueObject();\n }\n get additionalValue(): any {\n return this._additionalValue;\n }\n\n controlType = 'checkbox';\n\n @Input() form: FormGroup = null;\n @Input() isActive = false;\n @Input() showTitle = true;\n @Input() renderTitle = true;\n @Input() layoutType: PepLayoutType = 'form';\n\n private _visible = true;\n @Input()\n set visible(visible: boolean) {\n this._visible = visible;\n if (visible) {\n this.renderer.removeClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n } else {\n this.renderer.addClass(\n this.element.nativeElement,\n 'hidden-element'\n );\n }\n }\n get visible(): boolean {\n return this._visible;\n }\n\n @Output()\n valueChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n standAlone = false;\n\n additionalValueObject: any;\n public jsonLib = JSON;\n\n constructor(\n private renderer: Renderer2,\n private customizationService: PepCustomizationService,\n private element: ElementRef,\n private translate: TranslateService\n ) { }\n\n private setAdditionalValueObject() {\n if (this.additionalValue && this.type === 'booleanText') {\n try {\n if (typeof this.additionalValue === 'string') {\n this.additionalValueObject = JSON.parse(\n this.additionalValue\n );\n } else {\n this.additionalValueObject = this.additionalValue;\n }\n } catch {\n this.additionalValueObject = {\n CheckedText: this.translate.instant('CHECKBOX.TRUE'),\n UncheckedText: this.translate.instant('CHECKBOX.FALSE'),\n };\n }\n }\n }\n\n private setDefaultForm(): void {\n const pepField = new PepCheckboxField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n ngOnInit(): void {\n if (this.form === null) {\n this.standAlone = true;\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n ngOnChanges(changes: any): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n //\n }\n\n onMaterialChange(e: MatCheckboxChange): void {\n this.changeValue(e.checked);\n }\n\n toggleChecked(event: Event): void {\n if (!this.disabled) {\n const isChecked: boolean =\n this.value ? true : false;\n const newValue = !isChecked;\n this.value = newValue;\n this.changeValue(newValue);\n }\n }\n\n changeValue(value: any): void {\n this.customizationService.updateFormFieldValue(\n this.form,\n this.key,\n value\n );\n this.valueChange.emit(value);\n }\n}","<ng-container [formGroup]=\"form\">\n <ng-template #pepTemplate>\n <div class=\"pep-checkbox-container pep-input\" [ngClass]=\"{\n 'disable': disabled,\n 'pep-report-checkbox': layoutType === 'table' && !isActive,\n 'pep-card-checkbox': layoutType === 'card',\n 'one-row': rowSpan === 1,\n 'no-title': label.length == 0,\n 'right-alignment pull-right flip': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\" dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\">\n <!--\n This is cause a bug that when click on the pep-input area and after on the checkbox\n the value is updated only for the second time.\n (click)=\"toggleChecked($event)\" \n -->\n <ng-container *ngIf=\"type == 'booleanText'; then booleanTextTemplate; else regularTemplate\"></ng-container>\n <ng-template #booleanTextTemplate>\n <div class=\"mat-checkbox-layout body-sm\" (click)=\"toggleChecked($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\">\n <button [id]=\"key\" class=\"emoji-icon ellipsis pull-left flip\">\n {{ value ? additionalValueObject?.CheckedText : additionalValueObject?.UncheckedText }}\n </button>\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\" class=\"mat-checkbox-label emoji-title\">{{\n label }}</span>\n </div>\n </ng-template>\n <ng-template #regularTemplate>\n <mat-checkbox [name]=\"key\" class=\"body-sm\" type=\"checkbox\" (change)=\"onMaterialChange($event)\"\n [title]=\"(label.length > 0 ? label + ': ' : '') + (value ? ('CHECKBOX.TRUE' | translate) : ('CHECKBOX.FALSE' | translate))\"\n [checked]=\"value\" [disabled]=\"disabled\">\n <span *ngIf=\"label.length > 0 && layoutType !== 'table'\">{{ label }}</span>\n </mat-checkbox>\n </ng-template>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"layoutType === 'form'\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\"\n [xAlignment]=\"xAlignment\" [showTitle]=\"false\">\n </pep-field-title>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'card'\">\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"layoutType === 'table'\">\n <ng-container *ngIf=\"key === 'ItemHasActiveCampaign'; then itemCampaignBlock; else checkboxBlock\">\n </ng-container>\n <ng-template #itemCampaignBlock>\n <ng-container *ngIf=\"value; then trueTemplate; else falseTemplate\">\n </ng-container>\n <ng-template #trueTemplate>\n <mat-icon class=\"has-active-campaign\" title=\"{{ 'CHECKBOX.TRUE' | translate }}\">\n <pep-icon name=\"system_bolt\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #falseTemplate>\n <span>&nbsp;</span>\n </ng-template>\n </ng-template>\n <ng-template #checkboxBlock>\n <ng-container *ngTemplateOutlet=\"pepTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n</ng-container>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemBolt,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepCheckboxComponent } from './checkbox.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepCheckboxComponent],\n declarations: [PepCheckboxComponent],\n})\nexport class PepCheckboxModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemBolt]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/checkbox\n */\nexport * from './checkbox.module';\nexport * from './checkbox.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i8","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;MA+Ba,oBAAoB,CAAA;AAmE7B,IAAA,WAAA,CACY,QAAmB,EACnB,oBAA6C,EAC7C,OAAmB,EACnB,SAA2B,EAAA;AAH3B,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AACnB,QAAA,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAyB;AAC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wBACf,aAAa;wBACb,mBAAmB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;iBACvC,CAAA;;;ACnCD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,287 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
3
+ import * as i3 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import { ReactiveFormsModule } from '@angular/forms';
6
+ import { MatCommonModule } from '@angular/material/core';
7
+ import * as i4 from '@angular/material/form-field';
8
+ import { MatFormFieldModule } from '@angular/material/form-field';
9
+ import * as i5 from '@angular/material/chips';
10
+ import { MatChipsModule, MAT_CHIPS_DEFAULT_OPTIONS } from '@angular/material/chips';
11
+ import { MatIconModule } from '@angular/material/icon';
12
+ import { ENTER, COMMA } from '@angular/cdk/keycodes';
13
+ import { PepNgxLibModule } from '@pepperi-addons/ngx-lib';
14
+ import * as i1 from '@pepperi-addons/ngx-lib/icon';
15
+ import { pepIconSystemBolt, pepIconSystemClose, PepIconModule } from '@pepperi-addons/ngx-lib/icon';
16
+ import { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';
17
+ import * as i6 from '@pepperi-addons/ngx-lib/button';
18
+ import { PepButtonModule } from '@pepperi-addons/ngx-lib/button';
19
+ import { Subject } from 'rxjs';
20
+ import { takeUntil } from 'rxjs/operators';
21
+ import * as i2 from '@ngx-translate/core';
22
+
23
+ class PepChipsService {
24
+ constructor() {
25
+ this._chips = [];
26
+ this._destroyer = new Subject();
27
+ }
28
+ get chips() {
29
+ return this._chips;
30
+ }
31
+ get selected() {
32
+ return this._chips.filter(chip => chip.selected).map(chip => chip.value);
33
+ }
34
+ initData(chips) {
35
+ this._chips = [];
36
+ if (chips === null || chips === void 0 ? void 0 : chips.length) {
37
+ chips.forEach(chip => this.addChip(chip));
38
+ }
39
+ }
40
+ addChip(chip) {
41
+ this._chips.push({
42
+ value: chip.value,
43
+ disabled: chip.disabled !== undefined ? chip.disabled : false,
44
+ selected: chip.selected !== undefined ? chip.selected : false,
45
+ removable: chip.removable !== undefined ? chip.removable : true,
46
+ selectable: chip.selectable !== undefined ? chip.selectable : true
47
+ });
48
+ }
49
+ destroy() {
50
+ this._destroyer.next();
51
+ this._destroyer.complete();
52
+ }
53
+ get destroyer() {
54
+ return takeUntil(this._destroyer);
55
+ }
56
+ }
57
+ PepChipsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
58
+ PepChipsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipsService });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipsService, decorators: [{
60
+ type: Injectable
61
+ }], ctorParameters: function () { return []; } });
62
+
63
+ class PepChipsComponent {
64
+ constructor(chipsService, _translate) {
65
+ this.chipsService = chipsService;
66
+ this._translate = _translate;
67
+ /**
68
+ * The add chip emitter type.
69
+ *
70
+ * @type {PepChipsInputType}
71
+ * @memberof PepChipsComponent
72
+ */
73
+ this.type = 'input';
74
+ /**
75
+ * The chip layput direction type.
76
+ *
77
+ * @type {PepChipsOrientationType}
78
+ * @memberof PepChipsComponent
79
+ */
80
+ this.orientation = 'horizontal';
81
+ /**
82
+ * The style of the button.
83
+ *
84
+ * @type {PepStyleType}
85
+ * @memberof PepButtonComponent
86
+ */
87
+ this.styleType = 'regular';
88
+ /**
89
+ * Whether chip multi select allowed.
90
+ *
91
+ * @memberof PepChipsComponent
92
+ */
93
+ this.multiSelect = false;
94
+ /**
95
+ * Add new chip placeholder.
96
+ *
97
+ * @memberof PepChipsComponent
98
+ */
99
+ this.placeholder = '';
100
+ /**
101
+ * Add new chip(s) event.
102
+ *
103
+ * @type {EventEmitter<void>}
104
+ * @memberof PepButtonComponent
105
+ */
106
+ this.fieldClick = new EventEmitter();
107
+ this.selectionChange = new EventEmitter();
108
+ //
109
+ }
110
+ /**
111
+ * The chips within the chip list.
112
+ *
113
+ * @memberof PepChipsComponent
114
+ */
115
+ set chips(chips) {
116
+ this.chipsService.initData(chips);
117
+ }
118
+ get chips() {
119
+ return this.chipsService.chips;
120
+ }
121
+ /**
122
+ * Selected chip(s)
123
+ */
124
+ get selected() {
125
+ const selected = this.chipsService.selected;
126
+ if (this.multiSelect) {
127
+ return selected.length ? selected : [];
128
+ }
129
+ else {
130
+ return selected.length ? selected[0] : null;
131
+ }
132
+ }
133
+ ngOnInit() {
134
+ this._translate.get("CHIPS.ADD_CHIP").pipe(this.chipsService.destroyer).subscribe((text) => this.placeholder = text);
135
+ }
136
+ /**
137
+ * Adding chip(s) to current chips list
138
+ * @param chips Chip(s) to add
139
+ */
140
+ addChipsToList(chips) {
141
+ chips.forEach(chip => this.chipsService.addChip(chip));
142
+ }
143
+ /**
144
+ * On new chip added
145
+ * @param event Chip addition event
146
+ */
147
+ onChipAdded(event) {
148
+ const value = (event.value || '').trim();
149
+ if (value) {
150
+ this.chipsService.addChip({
151
+ value: value
152
+ });
153
+ // clear the input value
154
+ event.chipInput.clear();
155
+ }
156
+ }
157
+ /**
158
+ * On chip removed
159
+ * @param chip Removed chip item
160
+ */
161
+ onChipRemoved(chip) {
162
+ const index = this.chips.indexOf(chip);
163
+ if (index >= 0) {
164
+ this.chips.splice(index, 1);
165
+ }
166
+ }
167
+ /**
168
+ * On chip selection status changed
169
+ * @param isSelected Whether the chip is selected
170
+ * @param chip Selected chip item
171
+ */
172
+ onSelectionChanged(isSelected, chip) {
173
+ chip.selected = isSelected;
174
+ this.selectionChange.emit({
175
+ value: chip.value,
176
+ isSelected: isSelected
177
+ });
178
+ }
179
+ /**
180
+ * On Add new chip(s) clicked
181
+ */
182
+ onChipsSelectClicked() {
183
+ this.fieldClick.emit();
184
+ }
185
+ ngOnDestroy() {
186
+ this.chipsService.destroy();
187
+ }
188
+ }
189
+ PepChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipsComponent, deps: [{ token: PepChipsService }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
190
+ PepChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepChipsComponent, selector: "pep-chips", inputs: { chips: "chips", type: "type", orientation: "orientation", styleType: "styleType", multiSelect: "multiSelect", placeholder: "placeholder" }, outputs: { fieldClick: "fieldClick", selectionChange: "selectionChange" }, providers: [PepChipsService], ngImport: i0, template: "<mat-form-field class=\"pep-chips-container\" appearance=\"outline\">\n <mat-chip-list #chipList aria-label=\"Fruit selection\"\n [ngClass]=\"{'mat-chip-list-stacked': orientation === 'vertical'}\" [multiple]=\"multiSelect\">\n <mat-chip *ngFor=\"let chip of chips\" class=\"pep-chips {{ styleType }}\" [disabled]=\"chip.disabled\"\n [selected]=\"chip.selected\" [removable]=\"chip.removable\" [selectable]=\"chip.selectable\"\n (removed)=\"onChipRemoved(chip)\" (selectionChange)=\"onSelectionChanged($event.selected, chip)\">\n <span class=\"ellipsis pull-left flip\" title=\"{{chip.value}}\">{{chip.value}}</span> \n <pep-button *ngIf=\"chip.removable\" matChipRemove sizeType=\"xs\" iconName=\"system_close\"></pep-button>\n </mat-chip>\n <input *ngIf=\"type === 'input'\" matInput [placeholder]=\"placeholder\" [matChipInputFor]=\"chipList\"\n [matChipInputAddOnBlur]=\"true\" (matChipInputTokenEnd)=\"onChipAdded($event)\">\n <div *ngIf=\"type === 'select'\" class=\"chips-select\" (click)=\"onChipsSelectClicked()\">{{ 'CHIPS.ADD_CHIP' | translate\n }}</div>\n </mat-chip-list>\n</mat-form-field>", styles: [".pep-chips-container ::ng-deep .mat-chip-list{width:100%}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper{gap:var(--pep-spacing-sm, .5rem);margin:var(--pep-spacing-sm, .5rem)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:var(--pep-font-size-xs, .75rem);font-weight:var(--pep-font-weight-normal, 400);line-height:var(--pep-line-height-xs, 1rem);margin:0;padding-top:0;padding-bottom:0;height:var(--pep-line-height-md, 1.5rem);min-height:unset;z-index:1;gap:var(--pep-spacing-xs, .25rem);max-width:100%}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips .mat-chip-remove{height:unset;width:unset;margin:0}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips .mat-chip-remove .pep-button{flex-shrink:0;border-radius:50%;min-width:unset;height:var(--pep-spacing-lg, 1rem);width:var(--pep-spacing-lg, 1rem)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips .mat-chip-remove .pep-button .mat-icon{height:var(--pep-spacing-md, .75rem);width:var(--pep-spacing-md, .75rem);font-size:var(--pep-font-size-md, 1rem);margin:unset}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .mat-chip-input{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:var(--pep-font-size-xs, .75rem);font-weight:var(--pep-font-weight-normal, 400);line-height:var(--pep-line-height-md, 1.5rem);margin:0}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .chips-select{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:var(--pep-font-size-xs, .75rem);font-weight:var(--pep-font-weight-normal, 400);line-height:var(--pep-line-height-md, 1.5rem);z-index:1}.pep-chips-container ::ng-deep .mat-chip-list.mat-chip-list-stacked .pep-chips{justify-content:space-between;width:-moz-fit-content!important;width:fit-content!important}.pep-chips-container ::ng-deep .mat-chip-list.mat-chip-list-stacked .mat-chip-input{flex:unset;width:100%}\n", ".pep-chips-container ::ng-deep .mat-chip-list .mat-chip.mat-standard-chip:after{background:unset}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip.mat-standard-chip:focus:after{opacity:unset}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.regular{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.regular:hover{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 20%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.regular.mat-chip-selected{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),88%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),var(--pep-color-regular-l, 10%));color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.regular:focus{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),88%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),var(--pep-color-regular-l, 10%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak{background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.12)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak:hover{background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.16)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak.mat-chip-selected{box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);position:relative;color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak.mat-chip-selected:not(.keep-background-on-focus){background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak.mat-chip-selected:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid hsl(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak:focus{box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);position:relative;box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak:focus:not(.keep-background-on-focus){background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak:focus:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid hsl(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak-invert{background:hsla(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak-invert:hover{background:hsla(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%),.5);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);cursor:pointer}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak-invert.mat-chip-selected{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16);color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak-invert:focus{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong{font-weight:var(--pep-font-weight-bold, 600);background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong:hover{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 8%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong.mat-chip-selected{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 15%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong:focus{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 15%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button{font-weight:var(--pep-font-weight-bold, 600);background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:hover{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 8%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:focus{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 15%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:active{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 15%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled){box-shadow:unset;border:unset;background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%))!important;opacity:.5!important;color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled):after{border:unset}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled) .svg-icon{fill:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.35)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled) .svg-icon.stroke{fill:unset;stroke:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.35)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled) .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled) .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i5.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipsComponent, decorators: [{
192
+ type: Component,
193
+ args: [{ selector: 'pep-chips', providers: [PepChipsService], template: "<mat-form-field class=\"pep-chips-container\" appearance=\"outline\">\n <mat-chip-list #chipList aria-label=\"Fruit selection\"\n [ngClass]=\"{'mat-chip-list-stacked': orientation === 'vertical'}\" [multiple]=\"multiSelect\">\n <mat-chip *ngFor=\"let chip of chips\" class=\"pep-chips {{ styleType }}\" [disabled]=\"chip.disabled\"\n [selected]=\"chip.selected\" [removable]=\"chip.removable\" [selectable]=\"chip.selectable\"\n (removed)=\"onChipRemoved(chip)\" (selectionChange)=\"onSelectionChanged($event.selected, chip)\">\n <span class=\"ellipsis pull-left flip\" title=\"{{chip.value}}\">{{chip.value}}</span> \n <pep-button *ngIf=\"chip.removable\" matChipRemove sizeType=\"xs\" iconName=\"system_close\"></pep-button>\n </mat-chip>\n <input *ngIf=\"type === 'input'\" matInput [placeholder]=\"placeholder\" [matChipInputFor]=\"chipList\"\n [matChipInputAddOnBlur]=\"true\" (matChipInputTokenEnd)=\"onChipAdded($event)\">\n <div *ngIf=\"type === 'select'\" class=\"chips-select\" (click)=\"onChipsSelectClicked()\">{{ 'CHIPS.ADD_CHIP' | translate\n }}</div>\n </mat-chip-list>\n</mat-form-field>", styles: [".pep-chips-container ::ng-deep .mat-chip-list{width:100%}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper{gap:var(--pep-spacing-sm, .5rem);margin:var(--pep-spacing-sm, .5rem)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:var(--pep-font-size-xs, .75rem);font-weight:var(--pep-font-weight-normal, 400);line-height:var(--pep-line-height-xs, 1rem);margin:0;padding-top:0;padding-bottom:0;height:var(--pep-line-height-md, 1.5rem);min-height:unset;z-index:1;gap:var(--pep-spacing-xs, .25rem);max-width:100%}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips .mat-chip-remove{height:unset;width:unset;margin:0}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips .mat-chip-remove .pep-button{flex-shrink:0;border-radius:50%;min-width:unset;height:var(--pep-spacing-lg, 1rem);width:var(--pep-spacing-lg, 1rem)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips .mat-chip-remove .pep-button .mat-icon{height:var(--pep-spacing-md, .75rem);width:var(--pep-spacing-md, .75rem);font-size:var(--pep-font-size-md, 1rem);margin:unset}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .mat-chip-input{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:var(--pep-font-size-xs, .75rem);font-weight:var(--pep-font-weight-normal, 400);line-height:var(--pep-line-height-md, 1.5rem);margin:0}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .chips-select{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:var(--pep-font-size-xs, .75rem);font-weight:var(--pep-font-weight-normal, 400);line-height:var(--pep-line-height-md, 1.5rem);z-index:1}.pep-chips-container ::ng-deep .mat-chip-list.mat-chip-list-stacked .pep-chips{justify-content:space-between;width:-moz-fit-content!important;width:fit-content!important}.pep-chips-container ::ng-deep .mat-chip-list.mat-chip-list-stacked .mat-chip-input{flex:unset;width:100%}\n", ".pep-chips-container ::ng-deep .mat-chip-list .mat-chip.mat-standard-chip:after{background:unset}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip.mat-standard-chip:focus:after{opacity:unset}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.regular{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.regular:hover{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 20%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.regular.mat-chip-selected{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),88%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),var(--pep-color-regular-l, 10%));color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.regular:focus{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),88%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),var(--pep-color-regular-l, 10%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak{background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.12)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak:hover{background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.16)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak.mat-chip-selected{box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);position:relative;color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak.mat-chip-selected:not(.keep-background-on-focus){background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak.mat-chip-selected:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid hsl(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak:focus{box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);position:relative;box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak:focus:not(.keep-background-on-focus){background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak:focus:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid hsl(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak-invert{background:hsla(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak-invert:hover{background:hsla(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%),.5);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);cursor:pointer}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak-invert.mat-chip-selected{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16);color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.weak-invert:focus{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong{font-weight:var(--pep-font-weight-bold, 600);background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong:hover{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 8%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong.mat-chip-selected{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 15%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong:focus{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 15%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button{font-weight:var(--pep-font-weight-bold, 600);background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:hover{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 8%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:focus{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 15%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:active{background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),calc(var(--pep-color-strong-l, 27%) - 15%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled){box-shadow:unset;border:unset;background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%))!important;opacity:.5!important;color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled):after{border:unset}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled) .svg-icon{fill:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.35)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled) .svg-icon.stroke{fill:unset;stroke:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.35)}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled) .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-chips-container ::ng-deep .mat-chip-list .mat-chip-list-wrapper .pep-chips.strong .pep-button:disabled:not(.ignore-disabled) .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}\n"] }]
194
+ }], ctorParameters: function () { return [{ type: PepChipsService }, { type: i2.TranslateService }]; }, propDecorators: { chips: [{
195
+ type: Input
196
+ }], type: [{
197
+ type: Input
198
+ }], orientation: [{
199
+ type: Input
200
+ }], styleType: [{
201
+ type: Input
202
+ }], multiSelect: [{
203
+ type: Input
204
+ }], placeholder: [{
205
+ type: Input
206
+ }], fieldClick: [{
207
+ type: Output
208
+ }], selectionChange: [{
209
+ type: Output
210
+ }] } });
211
+
212
+ const pepIcons = [
213
+ pepIconSystemBolt,
214
+ pepIconSystemClose
215
+ ];
216
+ class PepChipsModule {
217
+ constructor(pepIconRegistry) {
218
+ this.pepIconRegistry = pepIconRegistry;
219
+ this.pepIconRegistry.registerIcons(pepIcons);
220
+ }
221
+ }
222
+ PepChipsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipsModule, deps: [{ token: i1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
223
+ PepChipsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepChipsModule, declarations: [PepChipsComponent], imports: [CommonModule,
224
+ ReactiveFormsModule,
225
+ MatCommonModule,
226
+ MatFormFieldModule,
227
+ MatChipsModule,
228
+ MatIconModule,
229
+ PepNgxLibModule,
230
+ PepIconModule,
231
+ PepFieldTitleModule,
232
+ PepButtonModule], exports: [PepChipsComponent] });
233
+ PepChipsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipsModule, providers: [
234
+ {
235
+ provide: MAT_CHIPS_DEFAULT_OPTIONS,
236
+ useValue: {
237
+ separatorKeyCodes: [ENTER, COMMA]
238
+ }
239
+ }
240
+ ], imports: [CommonModule,
241
+ ReactiveFormsModule,
242
+ MatCommonModule,
243
+ MatFormFieldModule,
244
+ MatChipsModule,
245
+ MatIconModule,
246
+ PepNgxLibModule,
247
+ PepIconModule,
248
+ PepFieldTitleModule,
249
+ PepButtonModule] });
250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipsModule, decorators: [{
251
+ type: NgModule,
252
+ args: [{
253
+ declarations: [PepChipsComponent],
254
+ imports: [
255
+ CommonModule,
256
+ ReactiveFormsModule,
257
+ MatCommonModule,
258
+ MatFormFieldModule,
259
+ MatChipsModule,
260
+ MatIconModule,
261
+ PepNgxLibModule,
262
+ PepIconModule,
263
+ PepFieldTitleModule,
264
+ PepButtonModule
265
+ ],
266
+ exports: [PepChipsComponent],
267
+ providers: [
268
+ {
269
+ provide: MAT_CHIPS_DEFAULT_OPTIONS,
270
+ useValue: {
271
+ separatorKeyCodes: [ENTER, COMMA]
272
+ }
273
+ }
274
+ ]
275
+ }]
276
+ }], ctorParameters: function () { return [{ type: i1.PepIconRegistry }]; } });
277
+
278
+ /*
279
+ * Public API Surface of ngx-lib/chips
280
+ */
281
+
282
+ /**
283
+ * Generated bundle index. Do not edit.
284
+ */
285
+
286
+ export { PepChipsComponent, PepChipsModule };
287
+ //# sourceMappingURL=pepperi-addons-ngx-lib-chips.mjs.map