@pepperi-addons/ngx-lib 0.4.0-angular14.36 → 0.4.0-angular14.39

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 (732) hide show
  1. package/address/address.component.d.ts +30 -30
  2. package/address/address.module.d.ts +15 -15
  3. package/address/index.d.ts +5 -5
  4. package/address/public-api.d.ts +2 -2
  5. package/attachment/attachment.component.d.ts +85 -85
  6. package/attachment/attachment.module.d.ts +14 -14
  7. package/attachment/index.d.ts +5 -5
  8. package/attachment/public-api.d.ts +2 -2
  9. package/bread-crumbs/bread-crumbs.component.d.ts +27 -27
  10. package/bread-crumbs/bread-crumbs.model.d.ts +11 -11
  11. package/bread-crumbs/bread-crumbs.module.d.ts +15 -15
  12. package/bread-crumbs/index.d.ts +5 -5
  13. package/bread-crumbs/public-api.d.ts +3 -3
  14. package/button/button.component.d.ts +102 -102
  15. package/button/button.model.d.ts +14 -14
  16. package/button/button.module.d.ts +13 -13
  17. package/button/index.d.ts +5 -5
  18. package/button/public-api.d.ts +3 -3
  19. package/carousel/carousel-item.directive.d.ts +12 -12
  20. package/carousel/carousel.component.d.ts +148 -148
  21. package/carousel/carousel.module.d.ts +8 -8
  22. package/carousel/index.d.ts +5 -5
  23. package/carousel/public-api.d.ts +3 -3
  24. package/checkbox/checkbox.component.d.ts +50 -50
  25. package/checkbox/checkbox.module.d.ts +19 -19
  26. package/checkbox/index.d.ts +5 -5
  27. package/checkbox/public-api.d.ts +2 -2
  28. package/chip/chip.component.d.ts +18 -0
  29. package/chip/chip.module.d.ts +19 -0
  30. package/chip/index.d.ts +5 -0
  31. package/chip/public-api.d.ts +2 -0
  32. package/color/color-picker.component.d.ts +57 -57
  33. package/color/color.component.d.ts +30 -30
  34. package/color/color.model.d.ts +1 -1
  35. package/color/color.module.d.ts +26 -26
  36. package/color/index.d.ts +5 -5
  37. package/color/public-api.d.ts +3 -3
  38. package/core/clipboard/clipboard.directive.d.ts +5 -5
  39. package/core/clipboard/clipboard.service.d.ts +5 -5
  40. package/core/clipboard/index.d.ts +1 -1
  41. package/core/clipboard/public-api.d.ts +2 -2
  42. package/core/common/directives/auto-width.directive.d.ts +19 -19
  43. package/core/common/directives/button-blur.directive.d.ts +9 -9
  44. package/core/common/directives/button-loader.directive.d.ts +26 -26
  45. package/core/common/directives/data-qa.directive.d.ts +11 -11
  46. package/core/common/directives/index.d.ts +1 -1
  47. package/core/common/directives/menu-blur.directive.d.ts +10 -10
  48. package/core/common/directives/prevent-multi-click.directive.d.ts +7 -7
  49. package/core/common/directives/print.directive.d.ts +75 -75
  50. package/core/common/directives/public-api.d.ts +7 -7
  51. package/core/common/index.d.ts +1 -1
  52. package/core/common/model/index.d.ts +1 -1
  53. package/core/common/model/papi.model.d.ts +2 -2
  54. package/core/common/model/public-api.d.ts +3 -3
  55. package/core/common/model/utilities.model.d.ts +5 -5
  56. package/core/common/model/wapi.model.d.ts +200 -200
  57. package/core/common/pipes/common-pipes.d.ts +57 -57
  58. package/core/common/pipes/date-ago.pipe.d.ts +11 -11
  59. package/core/common/pipes/index.d.ts +1 -1
  60. package/core/common/pipes/public-api.d.ts +2 -2
  61. package/core/common/public-api.d.ts +4 -4
  62. package/core/common/services/addon.service.d.ts +38 -38
  63. package/core/common/services/color.service.d.ts +51 -51
  64. package/core/common/services/cookie.service.d.ts +53 -53
  65. package/core/common/services/data-convertor.service.d.ts +44 -44
  66. package/core/common/services/file.service.d.ts +27 -27
  67. package/core/common/services/index.d.ts +1 -1
  68. package/core/common/services/jwt-helper.service.d.ts +13 -13
  69. package/core/common/services/public-api.d.ts +11 -11
  70. package/core/common/services/session.service.d.ts +18 -18
  71. package/core/common/services/translate.service.d.ts +12 -12
  72. package/core/common/services/utilities.service.d.ts +37 -37
  73. package/core/common/services/validator.service.d.ts +31 -31
  74. package/core/common/services/window-scrolling.service.d.ts +10 -10
  75. package/core/customization/customization.model.d.ts +266 -266
  76. package/core/customization/customization.service.d.ts +159 -159
  77. package/core/customization/index.d.ts +1 -1
  78. package/core/customization/public-api.d.ts +2 -2
  79. package/core/http/index.d.ts +1 -1
  80. package/core/http/interceptors/error.interceptor.d.ts +8 -8
  81. package/core/http/interceptors/index.d.ts +11 -11
  82. package/core/http/interceptors/loader.interceptor.d.ts +11 -11
  83. package/core/http/interceptors/profiler.interceptor.d.ts +8 -8
  84. package/core/http/public-api.d.ts +2 -2
  85. package/core/http/services/http.service.d.ts +28 -28
  86. package/core/http/services/loader.service.d.ts +13 -13
  87. package/core/index.d.ts +1 -1
  88. package/core/layout/index.d.ts +1 -1
  89. package/core/layout/layout.service.d.ts +36 -36
  90. package/core/layout/public-api.d.ts +2 -2
  91. package/core/layout/rtl.directive.d.ts +21 -21
  92. package/core/portal/attach.directive.d.ts +13 -13
  93. package/core/portal/index.d.ts +1 -1
  94. package/core/portal/portal.service.d.ts +12 -12
  95. package/core/portal/public-api.d.ts +3 -3
  96. package/core/portal/target.directive.d.ts +12 -12
  97. package/core/public-api.d.ts +7 -7
  98. package/core/scroll-to/index.d.ts +1 -1
  99. package/core/scroll-to/public-api.d.ts +1 -1
  100. package/core/scroll-to/scroll-to.service.d.ts +11 -11
  101. package/date/date.component.d.ts +69 -69
  102. package/date/date.model.d.ts +31 -31
  103. package/date/date.module.d.ts +23 -23
  104. package/date/index.d.ts +5 -5
  105. package/date/public-api.d.ts +2 -2
  106. package/dialog/default-dialog.component.d.ts +12 -12
  107. package/dialog/dialog.component.d.ts +13 -13
  108. package/dialog/dialog.model.d.ts +31 -31
  109. package/dialog/dialog.module.d.ts +18 -18
  110. package/dialog/dialog.service.d.ts +27 -27
  111. package/dialog/index.d.ts +5 -5
  112. package/dialog/public-api.d.ts +4 -4
  113. package/draggable-items/draggable-item/draggable-item.component.d.ts +11 -11
  114. package/draggable-items/draggable-items.component.d.ts +36 -36
  115. package/draggable-items/draggable-items.model.d.ts +11 -11
  116. package/draggable-items/draggable-items.module.d.ts +18 -18
  117. package/draggable-items/index.d.ts +5 -5
  118. package/draggable-items/public-api.d.ts +4 -4
  119. package/esm2020/address/address.component.mjs +108 -108
  120. package/esm2020/address/address.module.mjs +53 -53
  121. package/esm2020/address/pepperi-addons-ngx-lib-address.mjs +4 -4
  122. package/esm2020/address/public-api.mjs +5 -5
  123. package/esm2020/attachment/attachment.component.mjs +219 -219
  124. package/esm2020/attachment/attachment.module.mjs +49 -49
  125. package/esm2020/attachment/pepperi-addons-ngx-lib-attachment.mjs +4 -4
  126. package/esm2020/attachment/public-api.mjs +5 -5
  127. package/esm2020/bread-crumbs/bread-crumbs.component.mjs +84 -84
  128. package/esm2020/bread-crumbs/bread-crumbs.model.mjs +6 -6
  129. package/esm2020/bread-crumbs/bread-crumbs.module.mjs +49 -49
  130. package/esm2020/bread-crumbs/pepperi-addons-ngx-lib-bread-crumbs.mjs +4 -4
  131. package/esm2020/bread-crumbs/public-api.mjs +6 -6
  132. package/esm2020/button/button.component.mjs +137 -137
  133. package/esm2020/button/button.model.mjs +5 -5
  134. package/esm2020/button/button.module.mjs +45 -45
  135. package/esm2020/button/pepperi-addons-ngx-lib-button.mjs +4 -4
  136. package/esm2020/button/public-api.mjs +6 -6
  137. package/esm2020/carousel/carousel-item.directive.mjs +32 -32
  138. package/esm2020/carousel/carousel.component.mjs +736 -736
  139. package/esm2020/carousel/carousel.module.mjs +16 -16
  140. package/esm2020/carousel/pepperi-addons-ngx-lib-carousel.mjs +4 -4
  141. package/esm2020/carousel/public-api.mjs +7 -7
  142. package/esm2020/checkbox/checkbox.component.mjs +167 -167
  143. package/esm2020/checkbox/checkbox.module.mjs +62 -62
  144. package/esm2020/checkbox/pepperi-addons-ngx-lib-checkbox.mjs +4 -4
  145. package/esm2020/checkbox/public-api.mjs +5 -5
  146. package/esm2020/chip/chip.component.mjs +36 -0
  147. package/esm2020/chip/chip.module.mjs +60 -0
  148. package/esm2020/chip/pepperi-addons-ngx-lib-chip.mjs +5 -0
  149. package/esm2020/chip/public-api.mjs +6 -0
  150. package/esm2020/color/color-picker.component.mjs +198 -198
  151. package/esm2020/color/color.component.mjs +89 -89
  152. package/esm2020/color/color.model.mjs +1 -1
  153. package/esm2020/color/color.module.mjs +92 -92
  154. package/esm2020/color/pepperi-addons-ngx-lib-color.mjs +4 -4
  155. package/esm2020/color/public-api.mjs +6 -6
  156. package/esm2020/core/clipboard/clipboard.directive.mjs +23 -23
  157. package/esm2020/core/clipboard/clipboard.service.mjs +13 -13
  158. package/esm2020/core/clipboard/index.mjs +4 -4
  159. package/esm2020/core/clipboard/public-api.mjs +5 -5
  160. package/esm2020/core/common/directives/auto-width.directive.mjs +76 -76
  161. package/esm2020/core/common/directives/button-blur.directive.mjs +23 -23
  162. package/esm2020/core/common/directives/button-loader.directive.mjs +111 -111
  163. package/esm2020/core/common/directives/data-qa.directive.mjs +22 -22
  164. package/esm2020/core/common/directives/index.mjs +4 -4
  165. package/esm2020/core/common/directives/menu-blur.directive.mjs +31 -31
  166. package/esm2020/core/common/directives/prevent-multi-click.directive.mjs +26 -26
  167. package/esm2020/core/common/directives/print.directive.mjs +144 -144
  168. package/esm2020/core/common/directives/public-api.mjs +11 -11
  169. package/esm2020/core/common/index.mjs +4 -4
  170. package/esm2020/core/common/model/index.mjs +4 -4
  171. package/esm2020/core/common/model/papi.model.mjs +2 -2
  172. package/esm2020/core/common/model/public-api.mjs +6 -6
  173. package/esm2020/core/common/model/utilities.model.mjs +56 -56
  174. package/esm2020/core/common/model/wapi.model.mjs +155 -155
  175. package/esm2020/core/common/pipes/common-pipes.mjs +166 -166
  176. package/esm2020/core/common/pipes/date-ago.pipe.mjs +45 -45
  177. package/esm2020/core/common/pipes/index.mjs +4 -4
  178. package/esm2020/core/common/pipes/public-api.mjs +5 -5
  179. package/esm2020/core/common/public-api.mjs +7 -7
  180. package/esm2020/core/common/services/addon.service.mjs +153 -151
  181. package/esm2020/core/common/services/color.service.mjs +358 -358
  182. package/esm2020/core/common/services/cookie.service.mjs +152 -152
  183. package/esm2020/core/common/services/data-convertor.service.mjs +118 -118
  184. package/esm2020/core/common/services/file.service.mjs +212 -212
  185. package/esm2020/core/common/services/index.mjs +4 -4
  186. package/esm2020/core/common/services/jwt-helper.service.mjs +105 -105
  187. package/esm2020/core/common/services/public-api.mjs +14 -14
  188. package/esm2020/core/common/services/session.service.mjs +70 -70
  189. package/esm2020/core/common/services/translate.service.mjs +45 -45
  190. package/esm2020/core/common/services/utilities.service.mjs +253 -253
  191. package/esm2020/core/common/services/validator.service.mjs +271 -271
  192. package/esm2020/core/common/services/window-scrolling.service.mjs +31 -31
  193. package/esm2020/core/customization/customization.model.mjs +289 -289
  194. package/esm2020/core/customization/customization.service.mjs +770 -770
  195. package/esm2020/core/customization/index.mjs +4 -4
  196. package/esm2020/core/customization/public-api.mjs +5 -5
  197. package/esm2020/core/http/index.mjs +4 -4
  198. package/esm2020/core/http/interceptors/error.interceptor.mjs +26 -26
  199. package/esm2020/core/http/interceptors/index.mjs +23 -23
  200. package/esm2020/core/http/interceptors/loader.interceptor.mjs +31 -31
  201. package/esm2020/core/http/interceptors/profiler.interceptor.mjs +31 -31
  202. package/esm2020/core/http/public-api.mjs +5 -5
  203. package/esm2020/core/http/services/http.service.mjs +154 -154
  204. package/esm2020/core/http/services/loader.service.mjs +49 -49
  205. package/esm2020/core/index.mjs +4 -4
  206. package/esm2020/core/layout/index.mjs +4 -4
  207. package/esm2020/core/layout/layout.service.mjs +167 -167
  208. package/esm2020/core/layout/public-api.mjs +5 -5
  209. package/esm2020/core/layout/rtl.directive.mjs +43 -43
  210. package/esm2020/core/portal/attach.directive.mjs +26 -26
  211. package/esm2020/core/portal/index.mjs +4 -4
  212. package/esm2020/core/portal/portal.service.mjs +35 -35
  213. package/esm2020/core/portal/public-api.mjs +6 -6
  214. package/esm2020/core/portal/target.directive.mjs +23 -23
  215. package/esm2020/core/public-api.mjs +10 -10
  216. package/esm2020/core/scroll-to/index.mjs +4 -4
  217. package/esm2020/core/scroll-to/public-api.mjs +5 -5
  218. package/esm2020/core/scroll-to/scroll-to.service.mjs +83 -83
  219. package/esm2020/date/date.component.mjs +294 -294
  220. package/esm2020/date/date.model.mjs +53 -53
  221. package/esm2020/date/date.module.mjs +87 -87
  222. package/esm2020/date/pepperi-addons-ngx-lib-date.mjs +4 -4
  223. package/esm2020/date/public-api.mjs +5 -5
  224. package/esm2020/dialog/default-dialog.component.mjs +36 -36
  225. package/esm2020/dialog/dialog.component.mjs +35 -35
  226. package/esm2020/dialog/dialog.model.mjs +32 -32
  227. package/esm2020/dialog/dialog.module.mjs +58 -58
  228. package/esm2020/dialog/dialog.service.mjs +81 -81
  229. package/esm2020/dialog/pepperi-addons-ngx-lib-dialog.mjs +4 -4
  230. package/esm2020/dialog/public-api.mjs +7 -7
  231. package/esm2020/draggable-items/draggable-item/draggable-item.component.mjs +26 -26
  232. package/esm2020/draggable-items/draggable-items.component.mjs +101 -101
  233. package/esm2020/draggable-items/draggable-items.model.mjs +1 -1
  234. package/esm2020/draggable-items/draggable-items.module.mjs +59 -59
  235. package/esm2020/draggable-items/pepperi-addons-ngx-lib-draggable-items.mjs +4 -4
  236. package/esm2020/draggable-items/public-api.mjs +7 -7
  237. package/esm2020/field-title/field-title.component.mjs +41 -41
  238. package/esm2020/field-title/field-title.module.mjs +46 -46
  239. package/esm2020/field-title/pepperi-addons-ngx-lib-field-title.mjs +4 -4
  240. package/esm2020/field-title/public-api.mjs +5 -5
  241. package/esm2020/files-uploader/files-uploader.component.mjs +240 -240
  242. package/esm2020/files-uploader/files-uploader.module.mjs +78 -78
  243. package/esm2020/files-uploader/pepperi-addons-ngx-lib-files-uploader.mjs +4 -4
  244. package/esm2020/files-uploader/public-api.mjs +5 -5
  245. package/esm2020/form/field-generator.component.mjs +152 -152
  246. package/esm2020/form/form.component.mjs +1224 -1224
  247. package/esm2020/form/form.model.mjs +1 -1
  248. package/esm2020/form/form.module.mjs +175 -175
  249. package/esm2020/form/indicators.component.mjs +22 -22
  250. package/esm2020/form/internal-button.component.mjs +183 -183
  251. package/esm2020/form/internal-carusel.component.mjs +116 -116
  252. package/esm2020/form/internal-carusel.service.mjs +31 -31
  253. package/esm2020/form/internal-field-generator.component.mjs +146 -146
  254. package/esm2020/form/internal-form.component.mjs +1213 -1213
  255. package/esm2020/form/internal-list.component.mjs +509 -509
  256. package/esm2020/form/internal-menu.component.mjs +65 -65
  257. package/esm2020/form/internal-page.component.mjs +361 -361
  258. package/esm2020/form/internal-page.service.mjs +119 -119
  259. package/esm2020/form/pepperi-addons-ngx-lib-form.mjs +4 -4
  260. package/esm2020/form/public-api.mjs +6 -6
  261. package/esm2020/group-buttons/group-buttons.component.mjs +71 -71
  262. package/esm2020/group-buttons/group-buttons.module.mjs +58 -58
  263. package/esm2020/group-buttons/pepperi-addons-ngx-lib-group-buttons.mjs +4 -4
  264. package/esm2020/group-buttons/public-api.mjs +5 -5
  265. package/esm2020/icon/icon-generated-all.model.mjs +107 -105
  266. package/esm2020/icon/icon-generated.model.mjs +414 -406
  267. package/esm2020/icon/icon-registry.service.mjs +24 -24
  268. package/esm2020/icon/icon.component.mjs +90 -90
  269. package/esm2020/icon/icon.module.mjs +19 -19
  270. package/esm2020/icon/icon.service.mjs +30 -30
  271. package/esm2020/icon/pepperi-addons-ngx-lib-icon.mjs +4 -4
  272. package/esm2020/icon/public-api.mjs +10 -10
  273. package/esm2020/image/image.component.mjs +246 -246
  274. package/esm2020/image/image.module.mjs +73 -73
  275. package/esm2020/image/image.service.mjs +51 -51
  276. package/esm2020/image/pepperi-addons-ngx-lib-image.mjs +4 -4
  277. package/esm2020/image/public-api.mjs +6 -6
  278. package/esm2020/images-filmstrip/images-filmstrip.component.mjs +336 -336
  279. package/esm2020/images-filmstrip/images-filmstrip.module.mjs +82 -82
  280. package/esm2020/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.mjs +4 -4
  281. package/esm2020/images-filmstrip/public-api.mjs +5 -5
  282. package/esm2020/link/link.component.mjs +338 -338
  283. package/esm2020/link/link.module.mjs +79 -79
  284. package/esm2020/link/link.pipes.mjs +17 -17
  285. package/esm2020/link/pepperi-addons-ngx-lib-link.mjs +4 -4
  286. package/esm2020/link/public-api.mjs +5 -5
  287. package/esm2020/list/list-actions.component.mjs +43 -43
  288. package/esm2020/list/list-carousel.component.mjs +106 -106
  289. package/esm2020/list/list-chooser.component.mjs +63 -63
  290. package/esm2020/list/list-pager.component.mjs +119 -119
  291. package/esm2020/list/list-sorting.component.mjs +60 -60
  292. package/esm2020/list/list-total.component.mjs +29 -29
  293. package/esm2020/list/list-views.component.mjs +84 -84
  294. package/esm2020/list/list.component.mjs +1159 -1159
  295. package/esm2020/list/list.model.mjs +3 -3
  296. package/esm2020/list/list.module.mjs +143 -143
  297. package/esm2020/list/list.pipes.mjs +46 -46
  298. package/esm2020/list/pepperi-addons-ngx-lib-list.mjs +4 -4
  299. package/esm2020/list/public-api.mjs +14 -14
  300. package/esm2020/list/virtual-scroller.mjs +1060 -1060
  301. package/esm2020/menu/menu-item.component.mjs +114 -114
  302. package/esm2020/menu/menu.component.mjs +204 -204
  303. package/esm2020/menu/menu.model.mjs +18 -18
  304. package/esm2020/menu/menu.module.mjs +58 -58
  305. package/esm2020/menu/pepperi-addons-ngx-lib-menu.mjs +4 -4
  306. package/esm2020/menu/public-api.mjs +6 -6
  307. package/esm2020/ngx-lib.module.mjs +157 -157
  308. package/esm2020/page-layout/page-layout.component.mjs +34 -34
  309. package/esm2020/page-layout/page-layout.module.mjs +33 -33
  310. package/esm2020/page-layout/pepperi-addons-ngx-lib-page-layout.mjs +4 -4
  311. package/esm2020/page-layout/public-api.mjs +5 -5
  312. package/esm2020/pepperi-addons-ngx-lib.mjs +4 -4
  313. package/esm2020/plugin/pepperi-addons-ngx-lib-plugin.mjs +4 -4
  314. package/esm2020/plugin/plugin-proxy.component.mjs +93 -93
  315. package/esm2020/plugin/plugin.model.mjs +1 -1
  316. package/esm2020/plugin/public-api.mjs +5 -5
  317. package/esm2020/profile-data-views-list/pepperi-addons-ngx-lib-profile-data-views-list.mjs +4 -4
  318. package/esm2020/profile-data-views-list/profile-data-view/profile-data-view.component.mjs +44 -44
  319. package/esm2020/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.mjs +64 -64
  320. package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +94 -94
  321. package/esm2020/profile-data-views-list/profile-data-views-list.model.mjs +1 -1
  322. package/esm2020/profile-data-views-list/profile-data-views-list.module.mjs +87 -87
  323. package/esm2020/profile-data-views-list/public-api.mjs +8 -8
  324. package/esm2020/public-api.mjs +5 -5
  325. package/esm2020/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.mjs +4 -4
  326. package/esm2020/quantity-selector/public-api.mjs +5 -5
  327. package/esm2020/quantity-selector/quantity-selector-validation.directive.mjs +46 -46
  328. package/esm2020/quantity-selector/quantity-selector.component.mjs +510 -510
  329. package/esm2020/quantity-selector/quantity-selector.module.mjs +81 -81
  330. package/esm2020/quantity-selector/quantity-selector.pipes.mjs +22 -22
  331. package/esm2020/query-builder/common/model/field.mjs +1 -1
  332. package/esm2020/query-builder/common/model/filter.mjs +1 -1
  333. package/esm2020/query-builder/common/model/legacy.mjs +1 -1
  334. package/esm2020/query-builder/common/model/operator-unit.mjs +41 -41
  335. package/esm2020/query-builder/common/model/operator.mjs +265 -265
  336. package/esm2020/query-builder/common/model/structure.mjs +1 -1
  337. package/esm2020/query-builder/common/model/type-map.mjs +26 -26
  338. package/esm2020/query-builder/common/model/type.mjs +5 -5
  339. package/esm2020/query-builder/common/services/output-query.service.mjs +113 -113
  340. package/esm2020/query-builder/common/services/query-structure.service.mjs +225 -225
  341. package/esm2020/query-builder/common/services/type-convertor.service.mjs +41 -41
  342. package/esm2020/query-builder/pepperi-addons-ngx-lib-query-builder.mjs +4 -4
  343. package/esm2020/query-builder/public-api.mjs +8 -8
  344. package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +124 -124
  345. package/esm2020/query-builder/query-builder-section/query-builder-section.component.mjs +70 -70
  346. package/esm2020/query-builder/query-builder.component.mjs +109 -109
  347. package/esm2020/query-builder/query-builder.module.mjs +58 -58
  348. package/esm2020/query-builder/query-builder.service.mjs +101 -101
  349. package/esm2020/remote-loader/addon-block-loader.component.mjs +83 -83
  350. package/esm2020/remote-loader/addon-block-loader.service.mjs +59 -59
  351. package/esm2020/remote-loader/pepperi-addons-ngx-lib-remote-loader.mjs +4 -4
  352. package/esm2020/remote-loader/public-api.mjs +9 -9
  353. package/esm2020/remote-loader/remote-loader.component.mjs +105 -105
  354. package/esm2020/remote-loader/remote-loader.model.mjs +1 -1
  355. package/esm2020/remote-loader/remote-loader.module.mjs +59 -59
  356. package/esm2020/remote-loader/remote-loader.service.mjs +57 -57
  357. package/esm2020/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.mjs +4 -4
  358. package/esm2020/rich-html-textarea/public-api.mjs +5 -5
  359. package/esm2020/rich-html-textarea/rich-html-textarea.component.mjs +244 -244
  360. package/esm2020/rich-html-textarea/rich-html-textarea.module.mjs +94 -94
  361. package/esm2020/search/pepperi-addons-ngx-lib-search.mjs +4 -4
  362. package/esm2020/search/public-api.mjs +6 -6
  363. package/esm2020/search/search.component.mjs +316 -316
  364. package/esm2020/search/search.model.mjs +1 -1
  365. package/esm2020/search/search.module.mjs +69 -69
  366. package/esm2020/select/pepperi-addons-ngx-lib-select.mjs +4 -4
  367. package/esm2020/select/public-api.mjs +5 -5
  368. package/esm2020/select/select.component.mjs +263 -263
  369. package/esm2020/select/select.module.mjs +69 -69
  370. package/esm2020/separator/pepperi-addons-ngx-lib-separator.mjs +4 -4
  371. package/esm2020/separator/public-api.mjs +5 -5
  372. package/esm2020/separator/separator.component.mjs +62 -62
  373. package/esm2020/separator/separator.module.mjs +17 -17
  374. package/esm2020/side-bar/pepperi-addons-ngx-lib-side-bar.mjs +4 -4
  375. package/esm2020/side-bar/public-api.mjs +6 -6
  376. package/esm2020/side-bar/side-bar.component.mjs +121 -121
  377. package/esm2020/side-bar/side-bar.model.mjs +1 -1
  378. package/esm2020/side-bar/side-bar.module.mjs +54 -54
  379. package/esm2020/signature/pepperi-addons-ngx-lib-signature.mjs +4 -4
  380. package/esm2020/signature/public-api.mjs +5 -5
  381. package/esm2020/signature/signature.component.mjs +253 -253
  382. package/esm2020/signature/signature.module.mjs +89 -89
  383. package/esm2020/size-detector/pepperi-addons-ngx-lib-size-detector.mjs +4 -4
  384. package/esm2020/size-detector/public-api.mjs +5 -5
  385. package/esm2020/size-detector/size-detector.component.mjs +91 -91
  386. package/esm2020/size-detector/size-detector.module.mjs +34 -34
  387. package/esm2020/slider/pepperi-addons-ngx-lib-slider.mjs +4 -4
  388. package/esm2020/slider/public-api.mjs +5 -5
  389. package/esm2020/slider/slider.component.mjs +100 -100
  390. package/esm2020/slider/slider.module.mjs +41 -41
  391. package/esm2020/smart-filters/boolean-filter/boolean-filter.component.mjs +74 -74
  392. package/esm2020/smart-filters/common/filter-actions.component.mjs +28 -28
  393. package/esm2020/smart-filters/common/model/base-filter-component.mjs +294 -294
  394. package/esm2020/smart-filters/common/model/creator.mjs +75 -75
  395. package/esm2020/smart-filters/common/model/field.mjs +116 -116
  396. package/esm2020/smart-filters/common/model/filter.mjs +1 -1
  397. package/esm2020/smart-filters/common/model/operator.mjs +270 -270
  398. package/esm2020/smart-filters/common/model/type.mjs +1 -1
  399. package/esm2020/smart-filters/date-filter/date-filter.component.mjs +171 -171
  400. package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +199 -199
  401. package/esm2020/smart-filters/number-filter/number-filter.component.mjs +115 -115
  402. package/esm2020/smart-filters/pepperi-addons-ngx-lib-smart-filters.mjs +4 -4
  403. package/esm2020/smart-filters/public-api.mjs +18 -18
  404. package/esm2020/smart-filters/smart-filters.component.mjs +140 -140
  405. package/esm2020/smart-filters/smart-filters.module.mjs +157 -157
  406. package/esm2020/smart-filters/text-filter/text-filter.component.mjs +91 -91
  407. package/esm2020/snack-bar/default-snack-bar.component.mjs +28 -28
  408. package/esm2020/snack-bar/pepperi-addons-ngx-lib-snack-bar.mjs +4 -4
  409. package/esm2020/snack-bar/public-api.mjs +7 -7
  410. package/esm2020/snack-bar/snack-bar.component.mjs +25 -25
  411. package/esm2020/snack-bar/snack-bar.model.mjs +6 -6
  412. package/esm2020/snack-bar/snack-bar.module.mjs +62 -62
  413. package/esm2020/snack-bar/snack-bar.service.mjs +59 -59
  414. package/esm2020/textarea/pepperi-addons-ngx-lib-textarea.mjs +4 -4
  415. package/esm2020/textarea/public-api.mjs +5 -5
  416. package/esm2020/textarea/textarea.component.mjs +181 -181
  417. package/esm2020/textarea/textarea.module.mjs +81 -81
  418. package/esm2020/textbox/pepperi-addons-ngx-lib-textbox.mjs +4 -4
  419. package/esm2020/textbox/public-api.mjs +5 -5
  420. package/esm2020/textbox/textbox-validation.directive.mjs +88 -88
  421. package/esm2020/textbox/textbox.component.mjs +448 -442
  422. package/esm2020/textbox/textbox.module.mjs +71 -71
  423. package/esm2020/textbox-icon/pepperi-addons-ngx-lib-textbox-icon.mjs +4 -4
  424. package/esm2020/textbox-icon/public-api.mjs +5 -5
  425. package/esm2020/textbox-icon/textbox-icon.component.mjs +47 -47
  426. package/esm2020/textbox-icon/textbox-icon.module.mjs +63 -63
  427. package/esm2020/top-bar/pepperi-addons-ngx-lib-top-bar.mjs +4 -4
  428. package/esm2020/top-bar/public-api.mjs +6 -6
  429. package/esm2020/top-bar/top-bar.component.mjs +111 -111
  430. package/esm2020/top-bar/top-bar.model.mjs +1 -1
  431. package/esm2020/top-bar/top-bar.module.mjs +61 -61
  432. package/fesm2015/pepperi-addons-ngx-lib-address.mjs +143 -143
  433. package/fesm2015/pepperi-addons-ngx-lib-address.mjs.map +1 -1
  434. package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs +253 -253
  435. package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.mjs +122 -122
  436. package/fesm2015/pepperi-addons-ngx-lib-button.mjs +171 -171
  437. package/fesm2015/pepperi-addons-ngx-lib-carousel.mjs +780 -780
  438. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs +206 -206
  439. package/fesm2015/pepperi-addons-ngx-lib-chip.mjs +104 -0
  440. package/fesm2015/pepperi-addons-ngx-lib-chip.mjs.map +1 -0
  441. package/fesm2015/pepperi-addons-ngx-lib-color.mjs +336 -336
  442. package/fesm2015/pepperi-addons-ngx-lib-color.mjs.map +1 -1
  443. package/fesm2015/pepperi-addons-ngx-lib-date.mjs +397 -397
  444. package/fesm2015/pepperi-addons-ngx-lib-dialog.mjs +207 -207
  445. package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs +163 -163
  446. package/fesm2015/pepperi-addons-ngx-lib-field-title.mjs +73 -73
  447. package/fesm2015/pepperi-addons-ngx-lib-files-uploader.mjs +291 -291
  448. package/fesm2015/pepperi-addons-ngx-lib-form.mjs +4112 -4112
  449. package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -1
  450. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs +109 -109
  451. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -1
  452. package/fesm2015/pepperi-addons-ngx-lib-icon.mjs +668 -658
  453. package/fesm2015/pepperi-addons-ngx-lib-icon.mjs.map +1 -1
  454. package/fesm2015/pepperi-addons-ngx-lib-image.mjs +340 -340
  455. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs +390 -390
  456. package/fesm2015/pepperi-addons-ngx-lib-link.mjs +401 -401
  457. package/fesm2015/pepperi-addons-ngx-lib-list.mjs +2822 -2822
  458. package/fesm2015/pepperi-addons-ngx-lib-list.mjs.map +1 -1
  459. package/fesm2015/pepperi-addons-ngx-lib-menu.mjs +360 -360
  460. package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs +59 -59
  461. package/fesm2015/pepperi-addons-ngx-lib-plugin.mjs +97 -97
  462. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +254 -254
  463. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +620 -620
  464. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +1119 -1119
  465. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +342 -342
  466. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +300 -300
  467. package/fesm2015/pepperi-addons-ngx-lib-search.mjs +356 -356
  468. package/fesm2015/pepperi-addons-ngx-lib-select.mjs +305 -305
  469. package/fesm2015/pepperi-addons-ngx-lib-separator.mjs +73 -73
  470. package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs +158 -158
  471. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs +311 -311
  472. package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs +114 -114
  473. package/fesm2015/pepperi-addons-ngx-lib-slider.mjs +130 -130
  474. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +1602 -1602
  475. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
  476. package/fesm2015/pepperi-addons-ngx-lib-snack-bar.mjs +152 -152
  477. package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs +232 -232
  478. package/fesm2015/pepperi-addons-ngx-lib-textbox-icon.mjs +95 -95
  479. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +573 -567
  480. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
  481. package/fesm2015/pepperi-addons-ngx-lib-top-bar.mjs +155 -155
  482. package/fesm2015/pepperi-addons-ngx-lib.mjs +4452 -4448
  483. package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
  484. package/fesm2020/pepperi-addons-ngx-lib-address.mjs +143 -143
  485. package/fesm2020/pepperi-addons-ngx-lib-address.mjs.map +1 -1
  486. package/fesm2020/pepperi-addons-ngx-lib-attachment.mjs +253 -253
  487. package/fesm2020/pepperi-addons-ngx-lib-bread-crumbs.mjs +122 -122
  488. package/fesm2020/pepperi-addons-ngx-lib-button.mjs +171 -171
  489. package/fesm2020/pepperi-addons-ngx-lib-carousel.mjs +776 -776
  490. package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs +206 -206
  491. package/fesm2020/pepperi-addons-ngx-lib-chip.mjs +104 -0
  492. package/fesm2020/pepperi-addons-ngx-lib-chip.mjs.map +1 -0
  493. package/fesm2020/pepperi-addons-ngx-lib-color.mjs +333 -333
  494. package/fesm2020/pepperi-addons-ngx-lib-color.mjs.map +1 -1
  495. package/fesm2020/pepperi-addons-ngx-lib-date.mjs +393 -393
  496. package/fesm2020/pepperi-addons-ngx-lib-dialog.mjs +203 -203
  497. package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs +162 -162
  498. package/fesm2020/pepperi-addons-ngx-lib-field-title.mjs +73 -73
  499. package/fesm2020/pepperi-addons-ngx-lib-files-uploader.mjs +288 -288
  500. package/fesm2020/pepperi-addons-ngx-lib-form.mjs +4111 -4111
  501. package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -1
  502. package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs +109 -109
  503. package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -1
  504. package/fesm2020/pepperi-addons-ngx-lib-icon.mjs +666 -656
  505. package/fesm2020/pepperi-addons-ngx-lib-icon.mjs.map +1 -1
  506. package/fesm2020/pepperi-addons-ngx-lib-image.mjs +338 -338
  507. package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs +387 -387
  508. package/fesm2020/pepperi-addons-ngx-lib-link.mjs +401 -401
  509. package/fesm2020/pepperi-addons-ngx-lib-list.mjs +2808 -2808
  510. package/fesm2020/pepperi-addons-ngx-lib-list.mjs.map +1 -1
  511. package/fesm2020/pepperi-addons-ngx-lib-menu.mjs +360 -360
  512. package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs +59 -59
  513. package/fesm2020/pepperi-addons-ngx-lib-plugin.mjs +92 -92
  514. package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs +253 -253
  515. package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +619 -619
  516. package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +1108 -1108
  517. package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +332 -332
  518. package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs +300 -300
  519. package/fesm2020/pepperi-addons-ngx-lib-search.mjs +355 -355
  520. package/fesm2020/pepperi-addons-ngx-lib-select.mjs +305 -305
  521. package/fesm2020/pepperi-addons-ngx-lib-separator.mjs +73 -73
  522. package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs +158 -158
  523. package/fesm2020/pepperi-addons-ngx-lib-signature.mjs +311 -311
  524. package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs +114 -114
  525. package/fesm2020/pepperi-addons-ngx-lib-slider.mjs +129 -129
  526. package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +1595 -1595
  527. package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
  528. package/fesm2020/pepperi-addons-ngx-lib-snack-bar.mjs +149 -149
  529. package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs +231 -231
  530. package/fesm2020/pepperi-addons-ngx-lib-textbox-icon.mjs +95 -95
  531. package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +573 -567
  532. package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
  533. package/fesm2020/pepperi-addons-ngx-lib-top-bar.mjs +154 -154
  534. package/fesm2020/pepperi-addons-ngx-lib.mjs +4432 -4430
  535. package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
  536. package/field-title/field-title.component.d.ts +14 -14
  537. package/field-title/field-title.module.d.ts +15 -15
  538. package/field-title/index.d.ts +5 -5
  539. package/field-title/public-api.d.ts +2 -2
  540. package/files-uploader/files-uploader.component.d.ts +57 -57
  541. package/files-uploader/files-uploader.module.d.ts +21 -21
  542. package/files-uploader/index.d.ts +5 -5
  543. package/files-uploader/public-api.d.ts +2 -2
  544. package/form/field-generator.component.d.ts +39 -39
  545. package/form/form.component.d.ts +93 -93
  546. package/form/form.model.d.ts +20 -20
  547. package/form/form.module.d.ts +49 -49
  548. package/form/index.d.ts +5 -5
  549. package/form/indicators.component.d.ts +10 -10
  550. package/form/internal-button.component.d.ts +42 -42
  551. package/form/internal-carusel.component.d.ts +39 -39
  552. package/form/internal-carusel.service.d.ts +10 -10
  553. package/form/internal-field-generator.component.d.ts +35 -35
  554. package/form/internal-form.component.d.ts +89 -89
  555. package/form/internal-list.component.d.ts +95 -95
  556. package/form/internal-menu.component.d.ts +19 -19
  557. package/form/internal-page.component.d.ts +73 -73
  558. package/form/internal-page.service.d.ts +22 -22
  559. package/form/public-api.d.ts +3 -3
  560. package/group-buttons/group-buttons.component.d.ts +24 -24
  561. package/group-buttons/group-buttons.module.d.ts +18 -18
  562. package/group-buttons/index.d.ts +5 -5
  563. package/group-buttons/public-api.d.ts +2 -2
  564. package/icon/icon-generated-all.model.d.ts +105 -103
  565. package/icon/icon-generated.model.d.ts +418 -410
  566. package/icon/icon-registry.service.d.ts +9 -9
  567. package/icon/icon.component.d.ts +49 -49
  568. package/icon/icon.module.d.ts +7 -7
  569. package/icon/icon.service.d.ts +13 -13
  570. package/icon/index.d.ts +5 -5
  571. package/icon/public-api.d.ts +6 -6
  572. package/image/image.component.d.ts +66 -66
  573. package/image/image.module.d.ts +20 -20
  574. package/image/image.service.d.ts +14 -14
  575. package/image/index.d.ts +5 -5
  576. package/image/public-api.d.ts +3 -3
  577. package/images-filmstrip/images-filmstrip.component.d.ts +87 -87
  578. package/images-filmstrip/images-filmstrip.module.d.ts +22 -22
  579. package/images-filmstrip/index.d.ts +5 -5
  580. package/images-filmstrip/public-api.d.ts +2 -2
  581. package/index.d.ts +5 -5
  582. package/link/index.d.ts +5 -5
  583. package/link/link.component.d.ts +133 -133
  584. package/link/link.module.d.ts +22 -22
  585. package/link/link.pipes.d.ts +7 -7
  586. package/link/public-api.d.ts +2 -2
  587. package/list/index.d.ts +5 -5
  588. package/list/list-actions.component.d.ts +18 -18
  589. package/list/list-carousel.component.d.ts +40 -40
  590. package/list/list-chooser.component.d.ts +29 -29
  591. package/list/list-pager.component.d.ts +39 -39
  592. package/list/list-sorting.component.d.ts +30 -30
  593. package/list/list-total.component.d.ts +11 -11
  594. package/list/list-views.component.d.ts +35 -35
  595. package/list/list.component.d.ts +164 -164
  596. package/list/list.model.d.ts +31 -31
  597. package/list/list.module.d.ts +34 -34
  598. package/list/list.pipes.d.ts +16 -16
  599. package/list/public-api.d.ts +10 -10
  600. package/list/virtual-scroller.d.ts +183 -183
  601. package/menu/index.d.ts +5 -5
  602. package/menu/menu-item.component.d.ts +28 -28
  603. package/menu/menu.component.d.ts +46 -46
  604. package/menu/menu.model.d.ts +25 -25
  605. package/menu/menu.module.d.ts +18 -18
  606. package/menu/public-api.d.ts +3 -3
  607. package/ngx-lib.module.d.ts +23 -23
  608. package/package.json +9 -1
  609. package/page-layout/index.d.ts +5 -5
  610. package/page-layout/page-layout.component.d.ts +19 -19
  611. package/page-layout/page-layout.module.d.ts +10 -10
  612. package/page-layout/public-api.d.ts +2 -2
  613. package/plugin/index.d.ts +5 -5
  614. package/plugin/plugin-proxy.component.d.ts +25 -25
  615. package/plugin/plugin.model.d.ts +6 -6
  616. package/plugin/public-api.d.ts +2 -2
  617. package/profile-data-views-list/index.d.ts +5 -5
  618. package/profile-data-views-list/profile-data-view/profile-data-view.component.d.ts +18 -18
  619. package/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.d.ts +24 -24
  620. package/profile-data-views-list/profile-data-views-list.component.d.ts +35 -35
  621. package/profile-data-views-list/profile-data-views-list.model.d.ts +18 -18
  622. package/profile-data-views-list/profile-data-views-list.module.d.ts +23 -23
  623. package/profile-data-views-list/public-api.d.ts +5 -5
  624. package/public-api.d.ts +2 -2
  625. package/quantity-selector/index.d.ts +5 -5
  626. package/quantity-selector/public-api.d.ts +2 -2
  627. package/quantity-selector/quantity-selector-validation.directive.d.ts +16 -16
  628. package/quantity-selector/quantity-selector.component.d.ts +101 -101
  629. package/quantity-selector/quantity-selector.module.d.ts +23 -23
  630. package/quantity-selector/quantity-selector.pipes.d.ts +7 -7
  631. package/query-builder/common/model/field.d.ts +8 -8
  632. package/query-builder/common/model/filter.d.ts +6 -6
  633. package/query-builder/common/model/legacy.d.ts +29 -29
  634. package/query-builder/common/model/operator-unit.d.ts +13 -13
  635. package/query-builder/common/model/operator.d.ts +21 -21
  636. package/query-builder/common/model/structure.d.ts +4 -4
  637. package/query-builder/common/model/type-map.d.ts +12 -12
  638. package/query-builder/common/model/type.d.ts +4 -4
  639. package/query-builder/common/services/output-query.service.d.ts +47 -47
  640. package/query-builder/common/services/query-structure.service.d.ts +82 -82
  641. package/query-builder/common/services/type-convertor.service.d.ts +13 -13
  642. package/query-builder/index.d.ts +5 -5
  643. package/query-builder/public-api.d.ts +5 -5
  644. package/query-builder/query-builder-item/query-builder-item.component.d.ts +41 -41
  645. package/query-builder/query-builder-section/query-builder-section.component.d.ts +30 -30
  646. package/query-builder/query-builder.component.d.ts +39 -39
  647. package/query-builder/query-builder.module.d.ts +16 -16
  648. package/query-builder/query-builder.service.d.ts +30 -30
  649. package/remote-loader/addon-block-loader.component.d.ts +32 -32
  650. package/remote-loader/addon-block-loader.service.d.ts +15 -15
  651. package/remote-loader/index.d.ts +5 -5
  652. package/remote-loader/public-api.d.ts +6 -6
  653. package/remote-loader/remote-loader.component.d.ts +25 -25
  654. package/remote-loader/remote-loader.model.d.ts +37 -37
  655. package/remote-loader/remote-loader.module.d.ts +13 -13
  656. package/remote-loader/remote-loader.service.d.ts +17 -17
  657. package/rich-html-textarea/index.d.ts +5 -5
  658. package/rich-html-textarea/public-api.d.ts +2 -2
  659. package/rich-html-textarea/rich-html-textarea.component.d.ts +78 -78
  660. package/rich-html-textarea/rich-html-textarea.module.d.ts +25 -25
  661. package/search/index.d.ts +5 -5
  662. package/search/public-api.d.ts +3 -3
  663. package/search/search.component.d.ts +65 -65
  664. package/search/search.model.d.ts +14 -14
  665. package/search/search.module.d.ts +20 -20
  666. package/select/index.d.ts +5 -5
  667. package/select/public-api.d.ts +2 -2
  668. package/select/select.component.d.ts +59 -59
  669. package/select/select.module.d.ts +20 -20
  670. package/separator/index.d.ts +5 -5
  671. package/separator/public-api.d.ts +2 -2
  672. package/separator/separator.component.d.ts +22 -22
  673. package/separator/separator.module.d.ts +8 -8
  674. package/side-bar/index.d.ts +5 -5
  675. package/side-bar/public-api.d.ts +3 -3
  676. package/side-bar/side-bar.component.d.ts +42 -42
  677. package/side-bar/side-bar.model.d.ts +4 -4
  678. package/side-bar/side-bar.module.d.ts +16 -16
  679. package/signature/index.d.ts +5 -5
  680. package/signature/public-api.d.ts +2 -2
  681. package/signature/signature.component.d.ts +68 -68
  682. package/signature/signature.module.d.ts +24 -24
  683. package/size-detector/index.d.ts +5 -5
  684. package/size-detector/public-api.d.ts +2 -2
  685. package/size-detector/size-detector.component.d.ts +29 -29
  686. package/size-detector/size-detector.module.d.ts +11 -11
  687. package/slider/index.d.ts +5 -5
  688. package/slider/public-api.d.ts +2 -2
  689. package/slider/slider.component.d.ts +39 -39
  690. package/slider/slider.module.d.ts +12 -12
  691. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +28 -28
  692. package/smart-filters/common/filter-actions.component.d.ts +12 -12
  693. package/smart-filters/common/model/base-filter-component.d.ts +73 -73
  694. package/smart-filters/common/model/creator.d.ts +6 -6
  695. package/smart-filters/common/model/field.d.ts +69 -69
  696. package/smart-filters/common/model/filter.d.ts +11 -11
  697. package/smart-filters/common/model/operator.d.ts +51 -51
  698. package/smart-filters/common/model/type.d.ts +4 -4
  699. package/smart-filters/date-filter/date-filter.component.d.ts +59 -59
  700. package/smart-filters/index.d.ts +5 -5
  701. package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +56 -56
  702. package/smart-filters/number-filter/number-filter.component.d.ts +51 -51
  703. package/smart-filters/public-api.d.ts +14 -14
  704. package/smart-filters/smart-filters.component.d.ts +35 -35
  705. package/smart-filters/smart-filters.module.d.ts +37 -37
  706. package/smart-filters/text-filter/text-filter.component.d.ts +28 -28
  707. package/snack-bar/default-snack-bar.component.d.ts +13 -13
  708. package/snack-bar/index.d.ts +5 -5
  709. package/snack-bar/public-api.d.ts +4 -4
  710. package/snack-bar/snack-bar.component.d.ts +12 -12
  711. package/snack-bar/snack-bar.model.d.ts +8 -8
  712. package/snack-bar/snack-bar.module.d.ts +19 -19
  713. package/snack-bar/snack-bar.service.d.ts +24 -24
  714. package/src/core/style/components/checkbox.scss +1 -1
  715. package/textarea/index.d.ts +5 -5
  716. package/textarea/public-api.d.ts +2 -2
  717. package/textarea/textarea.component.d.ts +54 -54
  718. package/textarea/textarea.module.d.ts +23 -23
  719. package/textbox/index.d.ts +5 -5
  720. package/textbox/public-api.d.ts +2 -2
  721. package/textbox/textbox-validation.directive.d.ts +21 -21
  722. package/textbox/textbox.component.d.ts +145 -143
  723. package/textbox/textbox.module.d.ts +22 -22
  724. package/textbox-icon/index.d.ts +5 -5
  725. package/textbox-icon/public-api.d.ts +2 -2
  726. package/textbox-icon/textbox-icon.component.d.ts +13 -13
  727. package/textbox-icon/textbox-icon.module.d.ts +16 -16
  728. package/top-bar/index.d.ts +5 -5
  729. package/top-bar/public-api.d.ts +3 -3
  730. package/top-bar/top-bar.component.d.ts +39 -39
  731. package/top-bar/top-bar.model.d.ts +4 -4
  732. package/top-bar/top-bar.module.d.ts +18 -18
@@ -16,1140 +16,1140 @@ import { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';
16
16
  import { BehaviorSubject } from 'rxjs';
17
17
  import * as i3$1 from '@angular/flex-layout/flex';
18
18
 
19
- class PepTypeConvertorService {
20
- constructor() {
21
- this._operators = [];
22
- this._booleans = [];
23
- this.initOperators();
24
- this.initBooleans();
25
- }
26
- get operators() {
27
- return this._operators;
28
- }
29
- get booleans() {
30
- return this._booleans;
31
- }
32
- initOperators() {
33
- this._operators.push({
34
- key: 'AND',
35
- value: 'And'
36
- });
37
- this._operators.push({
38
- key: 'OR',
39
- value: 'Or'
40
- });
41
- }
42
- initBooleans() {
43
- this._booleans.push({
44
- key: 'True',
45
- value: 'True'
46
- });
47
- this._booleans.push({
48
- key: 'False',
49
- value: 'False'
50
- });
51
- }
52
- }
53
- PepTypeConvertorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepTypeConvertorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
54
- PepTypeConvertorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepTypeConvertorService });
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepTypeConvertorService, decorators: [{
56
- type: Injectable
19
+ class PepTypeConvertorService {
20
+ constructor() {
21
+ this._operators = [];
22
+ this._booleans = [];
23
+ this.initOperators();
24
+ this.initBooleans();
25
+ }
26
+ get operators() {
27
+ return this._operators;
28
+ }
29
+ get booleans() {
30
+ return this._booleans;
31
+ }
32
+ initOperators() {
33
+ this._operators.push({
34
+ key: 'AND',
35
+ value: 'And'
36
+ });
37
+ this._operators.push({
38
+ key: 'OR',
39
+ value: 'Or'
40
+ });
41
+ }
42
+ initBooleans() {
43
+ this._booleans.push({
44
+ key: 'True',
45
+ value: 'True'
46
+ });
47
+ this._booleans.push({
48
+ key: 'False',
49
+ value: 'False'
50
+ });
51
+ }
52
+ }
53
+ PepTypeConvertorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepTypeConvertorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
54
+ PepTypeConvertorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepTypeConvertorService });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepTypeConvertorService, decorators: [{
56
+ type: Injectable
57
57
  }], ctorParameters: function () { return []; } });
58
58
 
59
- class PepQueryBuilderSectionComponent {
60
- constructor(_typeConvertorService) {
61
- this._typeConvertorService = _typeConvertorService;
62
- this.hasFields = true;
63
- this.createSection = new EventEmitter();
64
- this.createItem = new EventEmitter();
65
- this.remove = new EventEmitter();
66
- this.operatorChange = new EventEmitter();
67
- }
68
- ngOnInit() {
69
- this.initOperators();
70
- }
71
- get f() {
72
- return this.form.controls;
73
- }
74
- initOperators() {
75
- this.toggleButtons = this._typeConvertorService.operators.map((operator) => {
76
- return {
77
- key: operator.key,
78
- value: operator.value,
79
- callback: (event) => this.onOperatorChanged(event)
80
- };
81
- });
82
- }
83
- onOperatorChanged(event) {
84
- if (event?.source?.key) {
85
- this.f.operator.setValue(event.source.key);
86
- this.operatorChange.emit();
87
- }
88
- }
89
- onAddRuleClicked() {
90
- this.createItem.emit();
91
- }
92
- onAddRuleSetClicked() {
93
- this.createSection.emit();
94
- }
95
- onDeleteSectionClicked() {
96
- this.remove.emit();
97
- }
98
- }
99
- PepQueryBuilderSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderSectionComponent, deps: [{ token: PepTypeConvertorService }], target: i0.ɵɵFactoryTarget.Component });
100
- PepQueryBuilderSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderSectionComponent, selector: "pep-query-builder-section", inputs: { form: "form", depth: "depth", hasFields: "hasFields" }, outputs: { createSection: "createSection", createItem: "createItem", remove: "remove", operatorChange: "operatorChange" }, viewQueries: [{ propertyName: "sectionContainer", first: true, predicate: ["sectionContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <div class=\"query-section-container\" fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between\">\n <pep-group-buttons [buttons]=\"toggleButtons\" [selectedButtonKey]=\"f.operator?.value || ''\" styleType=\"weak\"\n sizeType=\"sm\" [viewType]=\"'toggle'\" [buttonsDisabled]=\"!hasFields\">\n </pep-group-buttons>\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-button value=\"Add Filter\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\" classNames=\"\"\n [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleClicked()\"></pep-button>\n <ng-container *ngIf=\"depth.current < depth.max-1\">\n <pep-button value=\"Add Filter Group\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\"\n classNames=\"\" [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleSetClicked()\"></pep-button>\n </ng-container>\n </div>\n </div>\n <ng-container #sectionContainer></ng-container>\n </div>\n <pep-button *ngIf=\"depth.current > 0\" styleType=\"weak\" styleStateType=\"system_bin\" sizeType=\"md\" classNames=\"\"\n [disabled]=\"false\" iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onDeleteSectionClicked()\">\n </pep-button>\n</div>", styles: [".query-section-container{border-radius:var(--pep-border-radius-md, .25rem);padding:.5rem;width:100%}\n", ".query-section-container{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);border:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i4.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i5.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "supportUnselect", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }] });
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderSectionComponent, decorators: [{
102
- type: Component,
103
- args: [{ selector: 'pep-query-builder-section', template: "<div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <div class=\"query-section-container\" fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between\">\n <pep-group-buttons [buttons]=\"toggleButtons\" [selectedButtonKey]=\"f.operator?.value || ''\" styleType=\"weak\"\n sizeType=\"sm\" [viewType]=\"'toggle'\" [buttonsDisabled]=\"!hasFields\">\n </pep-group-buttons>\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-button value=\"Add Filter\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\" classNames=\"\"\n [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleClicked()\"></pep-button>\n <ng-container *ngIf=\"depth.current < depth.max-1\">\n <pep-button value=\"Add Filter Group\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\"\n classNames=\"\" [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleSetClicked()\"></pep-button>\n </ng-container>\n </div>\n </div>\n <ng-container #sectionContainer></ng-container>\n </div>\n <pep-button *ngIf=\"depth.current > 0\" styleType=\"weak\" styleStateType=\"system_bin\" sizeType=\"md\" classNames=\"\"\n [disabled]=\"false\" iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onDeleteSectionClicked()\">\n </pep-button>\n</div>", styles: [".query-section-container{border-radius:var(--pep-border-radius-md, .25rem);padding:.5rem;width:100%}\n", ".query-section-container{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);border:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}\n"] }]
104
- }], ctorParameters: function () { return [{ type: PepTypeConvertorService }]; }, propDecorators: { form: [{
105
- type: Input
106
- }], depth: [{
107
- type: Input
108
- }], hasFields: [{
109
- type: Input
110
- }], createSection: [{
111
- type: Output
112
- }], createItem: [{
113
- type: Output
114
- }], remove: [{
115
- type: Output
116
- }], operatorChange: [{
117
- type: Output
118
- }], sectionContainer: [{
119
- type: ViewChild,
120
- args: ['sectionContainer', { read: ViewContainerRef, static: true }]
59
+ class PepQueryBuilderSectionComponent {
60
+ constructor(_typeConvertorService) {
61
+ this._typeConvertorService = _typeConvertorService;
62
+ this.hasFields = true;
63
+ this.createSection = new EventEmitter();
64
+ this.createItem = new EventEmitter();
65
+ this.remove = new EventEmitter();
66
+ this.operatorChange = new EventEmitter();
67
+ }
68
+ ngOnInit() {
69
+ this.initOperators();
70
+ }
71
+ get f() {
72
+ return this.form.controls;
73
+ }
74
+ initOperators() {
75
+ this.toggleButtons = this._typeConvertorService.operators.map((operator) => {
76
+ return {
77
+ key: operator.key,
78
+ value: operator.value,
79
+ callback: (event) => this.onOperatorChanged(event)
80
+ };
81
+ });
82
+ }
83
+ onOperatorChanged(event) {
84
+ if (event?.source?.key) {
85
+ this.f.operator.setValue(event.source.key);
86
+ this.operatorChange.emit();
87
+ }
88
+ }
89
+ onAddRuleClicked() {
90
+ this.createItem.emit();
91
+ }
92
+ onAddRuleSetClicked() {
93
+ this.createSection.emit();
94
+ }
95
+ onDeleteSectionClicked() {
96
+ this.remove.emit();
97
+ }
98
+ }
99
+ PepQueryBuilderSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderSectionComponent, deps: [{ token: PepTypeConvertorService }], target: i0.ɵɵFactoryTarget.Component });
100
+ PepQueryBuilderSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderSectionComponent, selector: "pep-query-builder-section", inputs: { form: "form", depth: "depth", hasFields: "hasFields" }, outputs: { createSection: "createSection", createItem: "createItem", remove: "remove", operatorChange: "operatorChange" }, viewQueries: [{ propertyName: "sectionContainer", first: true, predicate: ["sectionContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <div class=\"query-section-container\" fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between\">\n <pep-group-buttons [buttons]=\"toggleButtons\" [selectedButtonKey]=\"f.operator?.value || ''\" styleType=\"weak\"\n sizeType=\"sm\" [viewType]=\"'toggle'\" [buttonsDisabled]=\"!hasFields\">\n </pep-group-buttons>\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-button value=\"Add Filter\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\" classNames=\"\"\n [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleClicked()\"></pep-button>\n <ng-container *ngIf=\"depth.current < depth.max-1\">\n <pep-button value=\"Add Filter Group\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\"\n classNames=\"\" [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleSetClicked()\"></pep-button>\n </ng-container>\n </div>\n </div>\n <ng-container #sectionContainer></ng-container>\n </div>\n <pep-button *ngIf=\"depth.current > 0\" styleType=\"weak\" styleStateType=\"system_bin\" sizeType=\"md\" classNames=\"\"\n [disabled]=\"false\" iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onDeleteSectionClicked()\">\n </pep-button>\n</div>", styles: [".query-section-container{border-radius:var(--pep-border-radius-md, .25rem);padding:.5rem;width:100%}\n", ".query-section-container{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);border:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i4.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i5.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "supportUnselect", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }] });
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderSectionComponent, decorators: [{
102
+ type: Component,
103
+ args: [{ selector: 'pep-query-builder-section', template: "<div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <div class=\"query-section-container\" fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between\">\n <pep-group-buttons [buttons]=\"toggleButtons\" [selectedButtonKey]=\"f.operator?.value || ''\" styleType=\"weak\"\n sizeType=\"sm\" [viewType]=\"'toggle'\" [buttonsDisabled]=\"!hasFields\">\n </pep-group-buttons>\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-button value=\"Add Filter\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\" classNames=\"\"\n [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleClicked()\"></pep-button>\n <ng-container *ngIf=\"depth.current < depth.max-1\">\n <pep-button value=\"Add Filter Group\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\"\n classNames=\"\" [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleSetClicked()\"></pep-button>\n </ng-container>\n </div>\n </div>\n <ng-container #sectionContainer></ng-container>\n </div>\n <pep-button *ngIf=\"depth.current > 0\" styleType=\"weak\" styleStateType=\"system_bin\" sizeType=\"md\" classNames=\"\"\n [disabled]=\"false\" iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onDeleteSectionClicked()\">\n </pep-button>\n</div>", styles: [".query-section-container{border-radius:var(--pep-border-radius-md, .25rem);padding:.5rem;width:100%}\n", ".query-section-container{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);border:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}\n"] }]
104
+ }], ctorParameters: function () { return [{ type: PepTypeConvertorService }]; }, propDecorators: { form: [{
105
+ type: Input
106
+ }], depth: [{
107
+ type: Input
108
+ }], hasFields: [{
109
+ type: Input
110
+ }], createSection: [{
111
+ type: Output
112
+ }], createItem: [{
113
+ type: Output
114
+ }], remove: [{
115
+ type: Output
116
+ }], operatorChange: [{
117
+ type: Output
118
+ }], sectionContainer: [{
119
+ type: ViewChild,
120
+ args: ['sectionContainer', { read: ViewContainerRef, static: true }]
121
121
  }] } });
122
122
 
123
- class PepQueryBuilderItemComponent {
124
- constructor(_fb, typeConvertorService) {
125
- this._fb = _fb;
126
- this.typeConvertorService = typeConvertorService;
127
- this._fields = [];
128
- this._options = [];
129
- this._selectedField = null;
130
- this.variableFields = {};
131
- this.filterChange = new EventEmitter();
132
- this.remove = new EventEmitter();
133
- this.setupForm();
134
- }
135
- set fields(list) {
136
- if (list?.length > 0) {
137
- this._fields = list;
138
- this._options = list.map(field => {
139
- return {
140
- key: field.smart.id,
141
- value: field.smart.name
142
- };
143
- });
144
- }
145
- }
146
- set selected(value) {
147
- if (value) {
148
- this._selectedField = value.smart;
149
- this.queryForm.fieldType.setValue(value.query.fieldType);
150
- }
151
- }
152
- set filter(value) {
153
- if (value) {
154
- this._filter = value;
155
- }
156
- }
157
- set parentForm(value) {
158
- if (value) {
159
- this._parentForm = value;
160
- this.addToParentForm();
161
- }
162
- }
163
- ngOnInit() {
164
- //
165
- }
166
- get f() {
167
- return this.form.controls;
168
- }
169
- get queryForm() {
170
- return this.f.query.controls;
171
- }
172
- setupForm() {
173
- this.form = this._fb.group({
174
- smart: this._fb.group({
175
- fieldId: this._fb.control(null),
176
- fieldType: this._fb.control(null),
177
- operator: this._fb.control(null),
178
- operatorUnit: this._fb.control(null),
179
- values: this._fb.group({
180
- first: this._fb.control(null),
181
- second: this._fb.control(null)
182
- })
183
- }),
184
- query: this._fb.group({
185
- fieldType: this._fb.control(null)
186
- })
187
- });
188
- }
189
- addToParentForm() {
190
- this._parentForm.setControl(this.formKey, this.form);
191
- }
192
- onFieldChanged(key) {
193
- const item = this._fields.find(field => field.smart.id === key);
194
- this.setupForm();
195
- this.queryForm.fieldType.setValue(item.query.fieldType);
196
- this.addToParentForm();
197
- /**
198
- * hack due to angular's change detection bug -
199
- * ERROR Error: There is no FormControl instance attached to form control element with name: [formControlName]
200
- */
201
- this._selectedField = null;
202
- setTimeout(() => {
203
- this._selectedField = item ? item.smart : null;
204
- }, 0);
205
- this._filter = null;
206
- }
207
- onFilterChanged() {
208
- if (this.form.valid) {
209
- this.filterChange.emit();
210
- }
211
- }
212
- onDeleteItemClicked() {
213
- this.remove.emit();
214
- }
215
- }
216
- PepQueryBuilderItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderItemComponent, deps: [{ token: i1.FormBuilder }, { token: PepTypeConvertorService }], target: i0.ɵɵFactoryTarget.Component });
217
- PepQueryBuilderItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderItemComponent, selector: "pep-query-builder-item", inputs: { formKey: "formKey", fields: "fields", selected: "selected", filter: "filter", parentForm: "parentForm", variableFields: "variableFields" }, outputs: { filterChange: "filterChange", remove: "remove" }, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-select fxFlex=\"25%\" [value]=\"_selectedField?.id\" xAlignment=\"left\" [options]=\"_options\"\n [renderTitle]=\"false\" (valueChange)=\"onFieldChanged($event)\"></pep-select>\n <ng-container *ngIf=\"_selectedField?.componentType\">\n <ng-container [ngSwitch]=\"_selectedField.componentType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <pep-text-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [variableField]=\"variableFields?.text\"\n [field]=\"_selectedField\" [filter]=\"_filter\" [parentForm]=\"f.smart\" [emitOnChange]=\"true\"\n [inline]=\"true\" [renderTitle]=\"false\" (filterChange)=\"onFilterChanged()\">\n </pep-text-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <pep-boolean-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.boolean\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\"\n [options]=\"typeConvertorService.booleans\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-boolean-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <pep-date-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [showAdditionalOperators]=\"true\"\n [variableField]=\"variableFields?.date\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'multi-select'\">\n <pep-multi-select-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.['multi-select']\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-multi-select-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <pep-number-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.number\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-number-filter>\n </ng-container>\n </ng-container>\n </ng-container>\n <pep-button styleType=\"weak\" styleStateType=\"system_bin\" sizeType=\"md\" classNames=\"\" [disabled]=\"false\"\n iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\" (buttonClick)=\"onDeleteItemClicked()\">\n </pep-button>\n </div>\n</div>", styles: ["::ng-deep .pep-field-no-spacing{min-height:0!important;margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i5$1.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle"], outputs: ["valueChange", "formValidationChange"] }, { kind: "component", type: i4.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i7.PepTextFilterComponent, selector: "pep-text-filter" }, { kind: "component", type: i7.PepBooleanFilterComponent, selector: "pep-boolean-filter", inputs: ["options"] }, { kind: "component", type: i7.PepDateFilterComponent, selector: "pep-date-filter" }, { kind: "component", type: i7.PepMultiSelectFilterComponent, selector: "pep-multi-select-filter" }, { kind: "component", type: i7.PepNumberFilterComponent, selector: "pep-number-filter" }] });
218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderItemComponent, decorators: [{
219
- type: Component,
220
- args: [{ selector: 'pep-query-builder-item', template: "<div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-select fxFlex=\"25%\" [value]=\"_selectedField?.id\" xAlignment=\"left\" [options]=\"_options\"\n [renderTitle]=\"false\" (valueChange)=\"onFieldChanged($event)\"></pep-select>\n <ng-container *ngIf=\"_selectedField?.componentType\">\n <ng-container [ngSwitch]=\"_selectedField.componentType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <pep-text-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [variableField]=\"variableFields?.text\"\n [field]=\"_selectedField\" [filter]=\"_filter\" [parentForm]=\"f.smart\" [emitOnChange]=\"true\"\n [inline]=\"true\" [renderTitle]=\"false\" (filterChange)=\"onFilterChanged()\">\n </pep-text-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <pep-boolean-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.boolean\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\"\n [options]=\"typeConvertorService.booleans\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-boolean-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <pep-date-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [showAdditionalOperators]=\"true\"\n [variableField]=\"variableFields?.date\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'multi-select'\">\n <pep-multi-select-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.['multi-select']\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-multi-select-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <pep-number-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.number\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-number-filter>\n </ng-container>\n </ng-container>\n </ng-container>\n <pep-button styleType=\"weak\" styleStateType=\"system_bin\" sizeType=\"md\" classNames=\"\" [disabled]=\"false\"\n iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\" (buttonClick)=\"onDeleteItemClicked()\">\n </pep-button>\n </div>\n</div>", styles: ["::ng-deep .pep-field-no-spacing{min-height:0!important;margin-bottom:0!important}\n"] }]
221
- }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: PepTypeConvertorService }]; }, propDecorators: { formKey: [{
222
- type: Input
223
- }], fields: [{
224
- type: Input
225
- }], selected: [{
226
- type: Input
227
- }], filter: [{
228
- type: Input
229
- }], parentForm: [{
230
- type: Input
231
- }], variableFields: [{
232
- type: Input
233
- }], filterChange: [{
234
- type: Output
235
- }], remove: [{
236
- type: Output
123
+ class PepQueryBuilderItemComponent {
124
+ constructor(_fb, typeConvertorService) {
125
+ this._fb = _fb;
126
+ this.typeConvertorService = typeConvertorService;
127
+ this._fields = [];
128
+ this._options = [];
129
+ this._selectedField = null;
130
+ this.variableFields = {};
131
+ this.filterChange = new EventEmitter();
132
+ this.remove = new EventEmitter();
133
+ this.setupForm();
134
+ }
135
+ set fields(list) {
136
+ if (list?.length > 0) {
137
+ this._fields = list;
138
+ this._options = list.map(field => {
139
+ return {
140
+ key: field.smart.id,
141
+ value: field.smart.name
142
+ };
143
+ });
144
+ }
145
+ }
146
+ set selected(value) {
147
+ if (value) {
148
+ this._selectedField = value.smart;
149
+ this.queryForm.fieldType.setValue(value.query.fieldType);
150
+ }
151
+ }
152
+ set filter(value) {
153
+ if (value) {
154
+ this._filter = value;
155
+ }
156
+ }
157
+ set parentForm(value) {
158
+ if (value) {
159
+ this._parentForm = value;
160
+ this.addToParentForm();
161
+ }
162
+ }
163
+ ngOnInit() {
164
+ //
165
+ }
166
+ get f() {
167
+ return this.form.controls;
168
+ }
169
+ get queryForm() {
170
+ return this.f.query.controls;
171
+ }
172
+ setupForm() {
173
+ this.form = this._fb.group({
174
+ smart: this._fb.group({
175
+ fieldId: this._fb.control(null),
176
+ fieldType: this._fb.control(null),
177
+ operator: this._fb.control(null),
178
+ operatorUnit: this._fb.control(null),
179
+ values: this._fb.group({
180
+ first: this._fb.control(null),
181
+ second: this._fb.control(null)
182
+ })
183
+ }),
184
+ query: this._fb.group({
185
+ fieldType: this._fb.control(null)
186
+ })
187
+ });
188
+ }
189
+ addToParentForm() {
190
+ this._parentForm.setControl(this.formKey, this.form);
191
+ }
192
+ onFieldChanged(key) {
193
+ const item = this._fields.find(field => field.smart.id === key);
194
+ this.setupForm();
195
+ this.queryForm.fieldType.setValue(item.query.fieldType);
196
+ this.addToParentForm();
197
+ /**
198
+ * hack due to angular's change detection bug -
199
+ * ERROR Error: There is no FormControl instance attached to form control element with name: [formControlName]
200
+ */
201
+ this._selectedField = null;
202
+ setTimeout(() => {
203
+ this._selectedField = item ? item.smart : null;
204
+ }, 0);
205
+ this._filter = null;
206
+ }
207
+ onFilterChanged() {
208
+ if (this.form.valid) {
209
+ this.filterChange.emit();
210
+ }
211
+ }
212
+ onDeleteItemClicked() {
213
+ this.remove.emit();
214
+ }
215
+ }
216
+ PepQueryBuilderItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderItemComponent, deps: [{ token: i1.FormBuilder }, { token: PepTypeConvertorService }], target: i0.ɵɵFactoryTarget.Component });
217
+ PepQueryBuilderItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderItemComponent, selector: "pep-query-builder-item", inputs: { formKey: "formKey", fields: "fields", selected: "selected", filter: "filter", parentForm: "parentForm", variableFields: "variableFields" }, outputs: { filterChange: "filterChange", remove: "remove" }, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-select fxFlex=\"25%\" [value]=\"_selectedField?.id\" xAlignment=\"left\" [options]=\"_options\"\n [renderTitle]=\"false\" (valueChange)=\"onFieldChanged($event)\"></pep-select>\n <ng-container *ngIf=\"_selectedField?.componentType\">\n <ng-container [ngSwitch]=\"_selectedField.componentType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <pep-text-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [variableField]=\"variableFields?.text\"\n [field]=\"_selectedField\" [filter]=\"_filter\" [parentForm]=\"f.smart\" [emitOnChange]=\"true\"\n [inline]=\"true\" [renderTitle]=\"false\" (filterChange)=\"onFilterChanged()\">\n </pep-text-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <pep-boolean-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.boolean\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\"\n [options]=\"typeConvertorService.booleans\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-boolean-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <pep-date-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [showAdditionalOperators]=\"true\"\n [variableField]=\"variableFields?.date\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'multi-select'\">\n <pep-multi-select-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.['multi-select']\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-multi-select-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <pep-number-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.number\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-number-filter>\n </ng-container>\n </ng-container>\n </ng-container>\n <pep-button styleType=\"weak\" styleStateType=\"system_bin\" sizeType=\"md\" classNames=\"\" [disabled]=\"false\"\n iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\" (buttonClick)=\"onDeleteItemClicked()\">\n </pep-button>\n </div>\n</div>", styles: ["::ng-deep .pep-field-no-spacing{min-height:0!important;margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i5$1.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle"], outputs: ["valueChange", "formValidationChange"] }, { kind: "component", type: i4.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i7.PepTextFilterComponent, selector: "pep-text-filter" }, { kind: "component", type: i7.PepBooleanFilterComponent, selector: "pep-boolean-filter", inputs: ["options"] }, { kind: "component", type: i7.PepDateFilterComponent, selector: "pep-date-filter" }, { kind: "component", type: i7.PepMultiSelectFilterComponent, selector: "pep-multi-select-filter" }, { kind: "component", type: i7.PepNumberFilterComponent, selector: "pep-number-filter" }] });
218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderItemComponent, decorators: [{
219
+ type: Component,
220
+ args: [{ selector: 'pep-query-builder-item', template: "<div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-select fxFlex=\"25%\" [value]=\"_selectedField?.id\" xAlignment=\"left\" [options]=\"_options\"\n [renderTitle]=\"false\" (valueChange)=\"onFieldChanged($event)\"></pep-select>\n <ng-container *ngIf=\"_selectedField?.componentType\">\n <ng-container [ngSwitch]=\"_selectedField.componentType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <pep-text-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [variableField]=\"variableFields?.text\"\n [field]=\"_selectedField\" [filter]=\"_filter\" [parentForm]=\"f.smart\" [emitOnChange]=\"true\"\n [inline]=\"true\" [renderTitle]=\"false\" (filterChange)=\"onFilterChanged()\">\n </pep-text-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <pep-boolean-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.boolean\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\"\n [options]=\"typeConvertorService.booleans\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-boolean-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <pep-date-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [showAdditionalOperators]=\"true\"\n [variableField]=\"variableFields?.date\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'multi-select'\">\n <pep-multi-select-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.['multi-select']\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-multi-select-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <pep-number-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.number\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-number-filter>\n </ng-container>\n </ng-container>\n </ng-container>\n <pep-button styleType=\"weak\" styleStateType=\"system_bin\" sizeType=\"md\" classNames=\"\" [disabled]=\"false\"\n iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\" (buttonClick)=\"onDeleteItemClicked()\">\n </pep-button>\n </div>\n</div>", styles: ["::ng-deep .pep-field-no-spacing{min-height:0!important;margin-bottom:0!important}\n"] }]
221
+ }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: PepTypeConvertorService }]; }, propDecorators: { formKey: [{
222
+ type: Input
223
+ }], fields: [{
224
+ type: Input
225
+ }], selected: [{
226
+ type: Input
227
+ }], filter: [{
228
+ type: Input
229
+ }], parentForm: [{
230
+ type: Input
231
+ }], variableFields: [{
232
+ type: Input
233
+ }], filterChange: [{
234
+ type: Output
235
+ }], remove: [{
236
+ type: Output
237
237
  }] } });
238
238
 
239
- class PepQueryBuilderTypeMap {
240
- constructor() {
241
- this.loadTypes();
242
- }
243
- loadTypes() {
244
- this.map = new Map();
245
- this.map.set('Bool', 'boolean');
246
- this.map.set('JsonBool', 'boolean');
247
- this.map.set('Integer', 'int');
248
- this.map.set('Double', 'int');
249
- this.map.set('String', 'text');
250
- this.map.set('Guid', 'text');
251
- this.map.set('Date', 'date');
252
- this.map.set('DateTime', 'date-time');
253
- this.map.set('MultipleStringValues', 'multi-select');
254
- }
255
- /**
256
- * Converts legacy field type to smart filter type
257
- * @param type legacy type
258
- * @returns smart filter field type
259
- */
260
- getSmartFilterType(key) {
261
- const item = this.map.get(key);
262
- return item ? item : null;
263
- }
239
+ class PepQueryBuilderTypeMap {
240
+ constructor() {
241
+ this.loadTypes();
242
+ }
243
+ loadTypes() {
244
+ this.map = new Map();
245
+ this.map.set('Bool', 'boolean');
246
+ this.map.set('JsonBool', 'boolean');
247
+ this.map.set('Integer', 'int');
248
+ this.map.set('Double', 'int');
249
+ this.map.set('String', 'text');
250
+ this.map.set('Guid', 'text');
251
+ this.map.set('Date', 'date');
252
+ this.map.set('DateTime', 'date-time');
253
+ this.map.set('MultipleStringValues', 'multi-select');
254
+ }
255
+ /**
256
+ * Converts legacy field type to smart filter type
257
+ * @param type legacy type
258
+ * @returns smart filter field type
259
+ */
260
+ getSmartFilterType(key) {
261
+ const item = this.map.get(key);
262
+ return item ? item : null;
263
+ }
264
264
  }
265
265
 
266
- var PepOperatorTypes;
267
- (function (PepOperatorTypes) {
268
- PepOperatorTypes["And"] = "AND";
269
- PepOperatorTypes["Or"] = "OR";
266
+ var PepOperatorTypes;
267
+ (function (PepOperatorTypes) {
268
+ PepOperatorTypes["And"] = "AND";
269
+ PepOperatorTypes["Or"] = "OR";
270
270
  })(PepOperatorTypes || (PepOperatorTypes = {}));
271
271
 
272
- const Equals = {
273
- legacy: 'IsEqual',
274
- smartFilter: PepSmartFilterOperators.Equals,
275
- type: ['boolean', 'int', 'text']
276
- };
277
- const EqualsVariable = {
278
- legacy: 'IsEqualVariable',
279
- smartFilter: PepSmartFilterVariableOperators.EqualsToVariable,
280
- type: ['boolean', 'int', 'text', 'multi-select']
281
- };
282
- const NotEqual = {
283
- legacy: 'IsNotEqual',
284
- smartFilter: PepSmartFilterOperators.NotEqual,
285
- type: null
286
- };
287
- const NotEqualsVariable = {
288
- legacy: 'IsNotEqualVariable',
289
- smartFilter: PepSmartFilterVariableOperators.NotEqualsToVariable,
290
- type: ['boolean', 'multi-select']
291
- };
292
- const LessThan = {
293
- legacy: '<',
294
- smartFilter: PepSmartFilterOperators.LessThan,
295
- type: null
296
- };
297
- const LessThanVarible = {
298
- legacy: 'LessThanVarible',
299
- smartFilter: PepSmartFilterVariableOperators.LessThanVariable,
300
- type: null
301
- };
302
- const GreaterThan = {
303
- legacy: '>',
304
- smartFilter: PepSmartFilterOperators.GreaterThan,
305
- type: null
306
- };
307
- const GreaterThanVarible = {
308
- legacy: 'GreaterThanVarible',
309
- smartFilter: PepSmartFilterVariableOperators.GreaterThanVariable,
310
- type: null
311
- };
312
- /*
313
- const GreaterThanOrEquals: IPepQueryBuilderOperator = {
314
- legacy: {
315
- operator: '>=',
316
- type: 'Integer'
317
- },
318
- smartFilter: {
319
- item: PepSmartFilterOperators.GreaterThanOrEquals,
320
- type: 'int'
321
- }
322
- };
323
-
324
- const LessThanOrEquals: IPepQueryBuilderOperator = {
325
- legacy: {
326
- operator: '<=',
327
- type: 'Integer'
328
- },
329
- smartFilter: {
330
- item: PepSmartFilterOperators.LessThanOrEquals,
331
- type: 'int',
332
- type: 'Integer'
333
- }
334
- }; */
335
- const NumberRange = {
336
- legacy: 'Between',
337
- smartFilter: PepSmartFilterOperators.NumberRange,
338
- type: ['int']
339
- };
340
- const Contains = {
341
- legacy: 'Contains',
342
- smartFilter: PepSmartFilterOperators.Contains,
343
- type: null
344
- };
345
- const BeginsWith = {
346
- legacy: 'BeginsWith',
347
- smartFilter: PepSmartFilterOperators.BeginsWith,
348
- type: null
349
- };
350
- const EndsWith = {
351
- legacy: 'EndsWith',
352
- smartFilter: PepSmartFilterOperators.EndsWith,
353
- type: null
354
- };
355
- /*
356
- const BeginsWith: IPepQueryBuilderOperator = {
357
- legacy: {
358
- operator: 'BeginsWith',
359
- type: 'String'
360
- },
361
- smartFilter: {
362
- item: PepSmartFilterOperators.BeginsWith,
363
- type: 'text'
364
- }
365
- };
366
-
367
- const EndsWith: IPepQueryBuilderOperator = {
368
- legacy: {
369
- operator: 'EndsWith',
370
- type: 'String'
371
- },
372
- smartFilter: {
373
- item: PepSmartFilterOperators.EndsWith,
374
- type: 'text'
375
- }
376
- };
377
-
378
- const Before: IPepQueryBuilderOperator = {
379
- legacy: {
380
- operator: 'Before',
381
- type: 'Date'
382
- },
383
- smartFilter: {
384
- item: PepSmartFilterOperators.Before,
385
- type: 'date'
386
- }
387
- };
388
-
389
- const After: IPepQueryBuilderOperator = {
390
- legacy: {
391
- operator: 'After',
392
- type: 'Date'
393
- },
394
- smartFilter: {
395
- item: PepSmartFilterOperators.After,
396
- type: 'date'
397
- }
398
- }; */
399
- const InTheLast = {
400
- legacy: 'InTheLast',
401
- smartFilter: PepSmartFilterOperators.InTheLast,
402
- type: null
403
- };
404
- const InTheLastCalendar = {
405
- legacy: 'InTheLastCalendar',
406
- smartFilter: PepSmartFilterAdditionalOperators.InTheLastCalendar,
407
- type: null
408
- };
409
- /*
410
- const InTheLastVariable: IPepQueryBuilderOperator = {
411
- legacy: 'InTheLastVariable',
412
- smartFilter: PepSmartFilterVariableOperators.InTheLastVariable,
413
- type: null
414
- } */
415
- const NotInTheLast = {
416
- legacy: 'NotInTheLast',
417
- smartFilter: PepSmartFilterOperators.NotInTheLast,
418
- type: null
419
- };
420
- const NotInTheLastCalendar = {
421
- legacy: 'NotInTheLastCalendar',
422
- smartFilter: PepSmartFilterAdditionalOperators.NotInTheLastCalendar,
423
- type: null
424
- };
425
- const Today = {
426
- legacy: 'Today',
427
- smartFilter: PepSmartFilterOperators.Today,
428
- type: null
429
- };
430
- const ThisWeek = {
431
- legacy: 'ThisWeek',
432
- smartFilter: PepSmartFilterOperators.ThisWeek,
433
- type: null
434
- };
435
- const ThisMonth = {
436
- legacy: 'ThisMonth',
437
- smartFilter: PepSmartFilterOperators.ThisMonth,
438
- type: null
439
- };
440
- const DateRange = {
441
- legacy: 'Between',
442
- smartFilter: PepSmartFilterOperators.DateRange,
443
- type: ['date-time']
444
- };
445
- const dateRangeVariable = {
446
- legacy: 'BetweenVariable',
447
- smartFilter: PepSmartFilterVariableOperators.DateRangeVariable,
448
- type: ['date-time']
449
- };
450
- const DueIn = {
451
- legacy: 'DueIn',
452
- smartFilter: PepSmartFilterOperators.DueIn,
453
- type: null
454
- };
455
- const NotDueIn = {
456
- legacy: 'NotDueIn',
457
- smartFilter: PepSmartFilterOperators.NotDueIn,
458
- type: null
459
- };
460
- const On = {
461
- legacy: 'On',
462
- smartFilter: PepSmartFilterOperators.On,
463
- type: null
464
- };
465
- const IsEmpty = {
466
- legacy: 'IsEmpty',
467
- smartFilter: PepSmartFilterOperators.IsEmpty,
468
- type: null
469
- };
470
- const IsNotEmpty = {
471
- legacy: 'IsNotEmpty',
472
- smartFilter: PepSmartFilterOperators.IsNotEmpty,
473
- type: null
474
- };
475
- const In = {
476
- legacy: 'IsEqual',
477
- smartFilter: PepSmartFilterOperators.In,
478
- type: ['multi-select']
479
- };
480
- const PepQueryBuilderOperators = [
481
- Equals,
482
- EqualsVariable,
483
- NotEqual,
484
- NotEqualsVariable,
485
- LessThan,
486
- LessThanVarible,
487
- // LessThanOrEquals,
488
- GreaterThan,
489
- GreaterThanVarible,
490
- // GreaterThanOrEquals,
491
- NumberRange,
492
- Contains,
493
- BeginsWith,
494
- EndsWith,
495
- // After,
496
- // Before,
497
- InTheLast,
498
- // InTheLastVariable,
499
- InTheLastCalendar,
500
- NotInTheLast,
501
- NotInTheLastCalendar,
502
- Today,
503
- ThisWeek,
504
- ThisMonth,
505
- DateRange,
506
- dateRangeVariable,
507
- DueIn,
508
- NotDueIn,
509
- On,
510
- IsEmpty,
511
- IsNotEmpty,
512
- In
513
- ];
514
- /**
515
- * gets a smart filter operator item
516
- * @param operator legacy operator
517
- * @param type smart filter's type
518
- * @returns smart filter operator item
519
- */
520
- function getSmartFilterOperator(operator, type) {
521
- const smartFilterOperator = PepQueryBuilderOperators.find(item => item.legacy === operator &&
522
- (item.type === null || item.type.includes(type)));
523
- return smartFilterOperator ? smartFilterOperator.smartFilter : null;
524
- }
525
- /**
526
- * gets a legacy operator value
527
- * @param operator smart filter operator item
528
- * @param type smart filter's type
529
- * @returns legacy operator value
530
- */
531
- function getLegacyOperator(operator, type) {
532
- const legacyOperator = PepQueryBuilderOperators.find(item => item.smartFilter === operator &&
533
- (item.type === null || item.type.includes(type)));
534
- return legacyOperator ? legacyOperator.legacy : null;
272
+ const Equals = {
273
+ legacy: 'IsEqual',
274
+ smartFilter: PepSmartFilterOperators.Equals,
275
+ type: ['boolean', 'int', 'text']
276
+ };
277
+ const EqualsVariable = {
278
+ legacy: 'IsEqualVariable',
279
+ smartFilter: PepSmartFilterVariableOperators.EqualsToVariable,
280
+ type: ['boolean', 'int', 'text', 'multi-select']
281
+ };
282
+ const NotEqual = {
283
+ legacy: 'IsNotEqual',
284
+ smartFilter: PepSmartFilterOperators.NotEqual,
285
+ type: null
286
+ };
287
+ const NotEqualsVariable = {
288
+ legacy: 'IsNotEqualVariable',
289
+ smartFilter: PepSmartFilterVariableOperators.NotEqualsToVariable,
290
+ type: ['boolean', 'multi-select']
291
+ };
292
+ const LessThan = {
293
+ legacy: '<',
294
+ smartFilter: PepSmartFilterOperators.LessThan,
295
+ type: null
296
+ };
297
+ const LessThanVarible = {
298
+ legacy: 'LessThanVarible',
299
+ smartFilter: PepSmartFilterVariableOperators.LessThanVariable,
300
+ type: null
301
+ };
302
+ const GreaterThan = {
303
+ legacy: '>',
304
+ smartFilter: PepSmartFilterOperators.GreaterThan,
305
+ type: null
306
+ };
307
+ const GreaterThanVarible = {
308
+ legacy: 'GreaterThanVarible',
309
+ smartFilter: PepSmartFilterVariableOperators.GreaterThanVariable,
310
+ type: null
311
+ };
312
+ /*
313
+ const GreaterThanOrEquals: IPepQueryBuilderOperator = {
314
+ legacy: {
315
+ operator: '>=',
316
+ type: 'Integer'
317
+ },
318
+ smartFilter: {
319
+ item: PepSmartFilterOperators.GreaterThanOrEquals,
320
+ type: 'int'
321
+ }
322
+ };
323
+
324
+ const LessThanOrEquals: IPepQueryBuilderOperator = {
325
+ legacy: {
326
+ operator: '<=',
327
+ type: 'Integer'
328
+ },
329
+ smartFilter: {
330
+ item: PepSmartFilterOperators.LessThanOrEquals,
331
+ type: 'int',
332
+ type: 'Integer'
333
+ }
334
+ }; */
335
+ const NumberRange = {
336
+ legacy: 'Between',
337
+ smartFilter: PepSmartFilterOperators.NumberRange,
338
+ type: ['int']
339
+ };
340
+ const Contains = {
341
+ legacy: 'Contains',
342
+ smartFilter: PepSmartFilterOperators.Contains,
343
+ type: null
344
+ };
345
+ const BeginsWith = {
346
+ legacy: 'BeginsWith',
347
+ smartFilter: PepSmartFilterOperators.BeginsWith,
348
+ type: null
349
+ };
350
+ const EndsWith = {
351
+ legacy: 'EndsWith',
352
+ smartFilter: PepSmartFilterOperators.EndsWith,
353
+ type: null
354
+ };
355
+ /*
356
+ const BeginsWith: IPepQueryBuilderOperator = {
357
+ legacy: {
358
+ operator: 'BeginsWith',
359
+ type: 'String'
360
+ },
361
+ smartFilter: {
362
+ item: PepSmartFilterOperators.BeginsWith,
363
+ type: 'text'
364
+ }
365
+ };
366
+
367
+ const EndsWith: IPepQueryBuilderOperator = {
368
+ legacy: {
369
+ operator: 'EndsWith',
370
+ type: 'String'
371
+ },
372
+ smartFilter: {
373
+ item: PepSmartFilterOperators.EndsWith,
374
+ type: 'text'
375
+ }
376
+ };
377
+
378
+ const Before: IPepQueryBuilderOperator = {
379
+ legacy: {
380
+ operator: 'Before',
381
+ type: 'Date'
382
+ },
383
+ smartFilter: {
384
+ item: PepSmartFilterOperators.Before,
385
+ type: 'date'
386
+ }
387
+ };
388
+
389
+ const After: IPepQueryBuilderOperator = {
390
+ legacy: {
391
+ operator: 'After',
392
+ type: 'Date'
393
+ },
394
+ smartFilter: {
395
+ item: PepSmartFilterOperators.After,
396
+ type: 'date'
397
+ }
398
+ }; */
399
+ const InTheLast = {
400
+ legacy: 'InTheLast',
401
+ smartFilter: PepSmartFilterOperators.InTheLast,
402
+ type: null
403
+ };
404
+ const InTheLastCalendar = {
405
+ legacy: 'InTheLastCalendar',
406
+ smartFilter: PepSmartFilterAdditionalOperators.InTheLastCalendar,
407
+ type: null
408
+ };
409
+ /*
410
+ const InTheLastVariable: IPepQueryBuilderOperator = {
411
+ legacy: 'InTheLastVariable',
412
+ smartFilter: PepSmartFilterVariableOperators.InTheLastVariable,
413
+ type: null
414
+ } */
415
+ const NotInTheLast = {
416
+ legacy: 'NotInTheLast',
417
+ smartFilter: PepSmartFilterOperators.NotInTheLast,
418
+ type: null
419
+ };
420
+ const NotInTheLastCalendar = {
421
+ legacy: 'NotInTheLastCalendar',
422
+ smartFilter: PepSmartFilterAdditionalOperators.NotInTheLastCalendar,
423
+ type: null
424
+ };
425
+ const Today = {
426
+ legacy: 'Today',
427
+ smartFilter: PepSmartFilterOperators.Today,
428
+ type: null
429
+ };
430
+ const ThisWeek = {
431
+ legacy: 'ThisWeek',
432
+ smartFilter: PepSmartFilterOperators.ThisWeek,
433
+ type: null
434
+ };
435
+ const ThisMonth = {
436
+ legacy: 'ThisMonth',
437
+ smartFilter: PepSmartFilterOperators.ThisMonth,
438
+ type: null
439
+ };
440
+ const DateRange = {
441
+ legacy: 'Between',
442
+ smartFilter: PepSmartFilterOperators.DateRange,
443
+ type: ['date-time']
444
+ };
445
+ const dateRangeVariable = {
446
+ legacy: 'BetweenVariable',
447
+ smartFilter: PepSmartFilterVariableOperators.DateRangeVariable,
448
+ type: ['date-time']
449
+ };
450
+ const DueIn = {
451
+ legacy: 'DueIn',
452
+ smartFilter: PepSmartFilterOperators.DueIn,
453
+ type: null
454
+ };
455
+ const NotDueIn = {
456
+ legacy: 'NotDueIn',
457
+ smartFilter: PepSmartFilterOperators.NotDueIn,
458
+ type: null
459
+ };
460
+ const On = {
461
+ legacy: 'On',
462
+ smartFilter: PepSmartFilterOperators.On,
463
+ type: null
464
+ };
465
+ const IsEmpty = {
466
+ legacy: 'IsEmpty',
467
+ smartFilter: PepSmartFilterOperators.IsEmpty,
468
+ type: null
469
+ };
470
+ const IsNotEmpty = {
471
+ legacy: 'IsNotEmpty',
472
+ smartFilter: PepSmartFilterOperators.IsNotEmpty,
473
+ type: null
474
+ };
475
+ const In = {
476
+ legacy: 'IsEqual',
477
+ smartFilter: PepSmartFilterOperators.In,
478
+ type: ['multi-select']
479
+ };
480
+ const PepQueryBuilderOperators = [
481
+ Equals,
482
+ EqualsVariable,
483
+ NotEqual,
484
+ NotEqualsVariable,
485
+ LessThan,
486
+ LessThanVarible,
487
+ // LessThanOrEquals,
488
+ GreaterThan,
489
+ GreaterThanVarible,
490
+ // GreaterThanOrEquals,
491
+ NumberRange,
492
+ Contains,
493
+ BeginsWith,
494
+ EndsWith,
495
+ // After,
496
+ // Before,
497
+ InTheLast,
498
+ // InTheLastVariable,
499
+ InTheLastCalendar,
500
+ NotInTheLast,
501
+ NotInTheLastCalendar,
502
+ Today,
503
+ ThisWeek,
504
+ ThisMonth,
505
+ DateRange,
506
+ dateRangeVariable,
507
+ DueIn,
508
+ NotDueIn,
509
+ On,
510
+ IsEmpty,
511
+ IsNotEmpty,
512
+ In
513
+ ];
514
+ /**
515
+ * gets a smart filter operator item
516
+ * @param operator legacy operator
517
+ * @param type smart filter's type
518
+ * @returns smart filter operator item
519
+ */
520
+ function getSmartFilterOperator(operator, type) {
521
+ const smartFilterOperator = PepQueryBuilderOperators.find(item => item.legacy === operator &&
522
+ (item.type === null || item.type.includes(type)));
523
+ return smartFilterOperator ? smartFilterOperator.smartFilter : null;
524
+ }
525
+ /**
526
+ * gets a legacy operator value
527
+ * @param operator smart filter operator item
528
+ * @param type smart filter's type
529
+ * @returns legacy operator value
530
+ */
531
+ function getLegacyOperator(operator, type) {
532
+ const legacyOperator = PepQueryBuilderOperators.find(item => item.smartFilter === operator &&
533
+ (item.type === null || item.type.includes(type)));
534
+ return legacyOperator ? legacyOperator.legacy : null;
535
535
  }
536
536
 
537
- const Days = {
538
- legacy: 'Days',
539
- smartFilter: PepSmartFilterOperatorUnits.Days
540
- };
541
- const Weeks = {
542
- legacy: 'Weeks',
543
- smartFilter: PepSmartFilterOperatorUnits.Weeks
544
- };
545
- const Months = {
546
- legacy: 'Months',
547
- smartFilter: PepSmartFilterOperatorUnits.Months
548
- };
549
- const Years = {
550
- legacy: 'Years',
551
- smartFilter: PepSmartFilterOperatorUnits.Years
552
- };
553
- const PepQueryBuilderOperationUnit = [
554
- Days,
555
- Weeks,
556
- Months,
557
- Years,
558
- ];
559
- /**
560
- * gets a smart filter operation unit item
561
- * @param operationUnit legacy operation unit
562
- * @returns smart filter operation unit item
563
- */
564
- function getSmartFilterOperationUnit(operationUnit) {
565
- const smartFilterOperationUnit = PepQueryBuilderOperationUnit.find(unit => unit.legacy === operationUnit);
566
- return smartFilterOperationUnit ? smartFilterOperationUnit.smartFilter : null;
567
- }
568
- /**
569
- * gets a legacy operation unit value
570
- * @param operationUnit smart filter operation unit item
571
- * @returns legacy operation unit value
572
- */
573
- function getLegacyOperationUnit(operationUnit) {
574
- const legacyOperationUnit = PepQueryBuilderOperationUnit.find(unit => unit.smartFilter === operationUnit);
575
- return legacyOperationUnit ? legacyOperationUnit.legacy : null;
537
+ const Days = {
538
+ legacy: 'Days',
539
+ smartFilter: PepSmartFilterOperatorUnits.Days
540
+ };
541
+ const Weeks = {
542
+ legacy: 'Weeks',
543
+ smartFilter: PepSmartFilterOperatorUnits.Weeks
544
+ };
545
+ const Months = {
546
+ legacy: 'Months',
547
+ smartFilter: PepSmartFilterOperatorUnits.Months
548
+ };
549
+ const Years = {
550
+ legacy: 'Years',
551
+ smartFilter: PepSmartFilterOperatorUnits.Years
552
+ };
553
+ const PepQueryBuilderOperationUnit = [
554
+ Days,
555
+ Weeks,
556
+ Months,
557
+ Years,
558
+ ];
559
+ /**
560
+ * gets a smart filter operation unit item
561
+ * @param operationUnit legacy operation unit
562
+ * @returns smart filter operation unit item
563
+ */
564
+ function getSmartFilterOperationUnit(operationUnit) {
565
+ const smartFilterOperationUnit = PepQueryBuilderOperationUnit.find(unit => unit.legacy === operationUnit);
566
+ return smartFilterOperationUnit ? smartFilterOperationUnit.smartFilter : null;
567
+ }
568
+ /**
569
+ * gets a legacy operation unit value
570
+ * @param operationUnit smart filter operation unit item
571
+ * @returns legacy operation unit value
572
+ */
573
+ function getLegacyOperationUnit(operationUnit) {
574
+ const legacyOperationUnit = PepQueryBuilderOperationUnit.find(unit => unit.smartFilter === operationUnit);
575
+ return legacyOperationUnit ? legacyOperationUnit.legacy : null;
576
576
  }
577
577
 
578
- class PepOutputQueryService {
579
- constructor() {
580
- //
581
- }
582
- /**
583
- * generates a legacy query structure
584
- * @param filters UI smart filters structure
585
- * @returns legacy query
586
- */
587
- generateQuery(filters) {
588
- this.initParams();
589
- return this.sectionWalk(filters);
590
- }
591
- /**
592
- * init params
593
- */
594
- initParams() {
595
- this._complexIdCounter = 1;
596
- this._expressionIdCounter = 1;
597
- }
598
- /**
599
- * a recursive function dynamically builds legacy query structure
600
- * @param current UI object represents either a section or filter component
601
- * @returns section query data
602
- */
603
- sectionWalk(current) {
604
- let section = null;
605
- Object.keys(current).forEach(key => {
606
- if (key.includes('item')) {
607
- section = this.addToSection(section, {
608
- ExpressionId: (this._expressionIdCounter++).toString(),
609
- ApiName: current[key].smart.fieldId,
610
- FieldType: current[key].query.fieldType,
611
- Operation: getLegacyOperator(current[key].smart.operator, current[key].smart.fieldType),
612
- Values: this.getItemValues(current[key].smart)
613
- }, current.operator);
614
- }
615
- else if (key.includes('section')) {
616
- const childSection = this.sectionWalk(current[key]);
617
- if (childSection) {
618
- section = this.addToSection(section, childSection, current.operator);
619
- }
620
- }
621
- });
622
- return section;
623
- }
624
- /**
625
- * adds a legacy filter object to the current query structure
626
- * @param section section query data
627
- * @param item filter item
628
- * @param operator query operator
629
- * @returns
630
- */
631
- addToSection(section, item, operator) {
632
- return section ? this.createSection(section, item, operator) : item;
633
- }
634
- /**
635
- * creates a legacy complex object
636
- * @param left LeftNode object
637
- * @param right RightNode object
638
- * @param operator query operator
639
- * @returns legacy complex object
640
- */
641
- createSection(left, right, operator) {
642
- return {
643
- ComplexId: (this._complexIdCounter++).toString(),
644
- LeftNode: left,
645
- RightNode: right,
646
- Operation: operator
647
- };
648
- }
649
- /**
650
- * gets legacy filter values object
651
- * @param current UI filter object's values
652
- * @returns an array represents legacy values
653
- */
654
- getItemValues(current) {
655
- let values = [];
656
- if (current?.values?.first) {
657
- if (current.operator === PepSmartFilterOperators.In) { //multi select
658
- values = current.values.first;
659
- }
660
- else if (current.operator === PepSmartFilterOperators.InTheLast ||
661
- current.operator === PepSmartFilterAdditionalOperators.InTheLastCalendar ||
662
- current.operator === PepSmartFilterOperators.NotInTheLast ||
663
- current.operator === PepSmartFilterAdditionalOperators.NotInTheLastCalendar ||
664
- current.operator === PepSmartFilterOperators.DueIn ||
665
- current.operator === PepSmartFilterOperators.NotDueIn) { //operation unit
666
- values.push(current.values.first);
667
- if (current.operatorUnit) {
668
- values.push(getLegacyOperationUnit(current.operatorUnit));
669
- }
670
- }
671
- else {
672
- values.push(current.values.first);
673
- if (current.values.second) {
674
- values.push(current.values.second);
675
- }
676
- }
677
- }
678
- return values;
679
- }
680
- }
681
- PepOutputQueryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepOutputQueryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
682
- PepOutputQueryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepOutputQueryService });
683
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepOutputQueryService, decorators: [{
684
- type: Injectable
578
+ class PepOutputQueryService {
579
+ constructor() {
580
+ //
581
+ }
582
+ /**
583
+ * generates a legacy query structure
584
+ * @param filters UI smart filters structure
585
+ * @returns legacy query
586
+ */
587
+ generateQuery(filters) {
588
+ this.initParams();
589
+ return this.sectionWalk(filters);
590
+ }
591
+ /**
592
+ * init params
593
+ */
594
+ initParams() {
595
+ this._complexIdCounter = 1;
596
+ this._expressionIdCounter = 1;
597
+ }
598
+ /**
599
+ * a recursive function dynamically builds legacy query structure
600
+ * @param current UI object represents either a section or filter component
601
+ * @returns section query data
602
+ */
603
+ sectionWalk(current) {
604
+ let section = null;
605
+ Object.keys(current).forEach(key => {
606
+ if (key.includes('item')) {
607
+ section = this.addToSection(section, {
608
+ ExpressionId: (this._expressionIdCounter++).toString(),
609
+ ApiName: current[key].smart.fieldId,
610
+ FieldType: current[key].query.fieldType,
611
+ Operation: getLegacyOperator(current[key].smart.operator, current[key].smart.fieldType),
612
+ Values: this.getItemValues(current[key].smart)
613
+ }, current.operator);
614
+ }
615
+ else if (key.includes('section')) {
616
+ const childSection = this.sectionWalk(current[key]);
617
+ if (childSection) {
618
+ section = this.addToSection(section, childSection, current.operator);
619
+ }
620
+ }
621
+ });
622
+ return section;
623
+ }
624
+ /**
625
+ * adds a legacy filter object to the current query structure
626
+ * @param section section query data
627
+ * @param item filter item
628
+ * @param operator query operator
629
+ * @returns
630
+ */
631
+ addToSection(section, item, operator) {
632
+ return section ? this.createSection(section, item, operator) : item;
633
+ }
634
+ /**
635
+ * creates a legacy complex object
636
+ * @param left LeftNode object
637
+ * @param right RightNode object
638
+ * @param operator query operator
639
+ * @returns legacy complex object
640
+ */
641
+ createSection(left, right, operator) {
642
+ return {
643
+ ComplexId: (this._complexIdCounter++).toString(),
644
+ LeftNode: left,
645
+ RightNode: right,
646
+ Operation: operator
647
+ };
648
+ }
649
+ /**
650
+ * gets legacy filter values object
651
+ * @param current UI filter object's values
652
+ * @returns an array represents legacy values
653
+ */
654
+ getItemValues(current) {
655
+ let values = [];
656
+ if (current?.values?.first) {
657
+ if (current.operator === PepSmartFilterOperators.In) { //multi select
658
+ values = current.values.first;
659
+ }
660
+ else if (current.operator === PepSmartFilterOperators.InTheLast ||
661
+ current.operator === PepSmartFilterAdditionalOperators.InTheLastCalendar ||
662
+ current.operator === PepSmartFilterOperators.NotInTheLast ||
663
+ current.operator === PepSmartFilterAdditionalOperators.NotInTheLastCalendar ||
664
+ current.operator === PepSmartFilterOperators.DueIn ||
665
+ current.operator === PepSmartFilterOperators.NotDueIn) { //operation unit
666
+ values.push(current.values.first);
667
+ if (current.operatorUnit) {
668
+ values.push(getLegacyOperationUnit(current.operatorUnit));
669
+ }
670
+ }
671
+ else {
672
+ values.push(current.values.first);
673
+ if (current.values.second) {
674
+ values.push(current.values.second);
675
+ }
676
+ }
677
+ }
678
+ return values;
679
+ }
680
+ }
681
+ PepOutputQueryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepOutputQueryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
682
+ PepOutputQueryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepOutputQueryService });
683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepOutputQueryService, decorators: [{
684
+ type: Injectable
685
685
  }], ctorParameters: function () { return []; } });
686
686
 
687
- class PepQueryBuilderService {
688
- constructor() {
689
- //
690
- }
691
- /**
692
- * creates a smart filter object
693
- * @param current filter legacy element
694
- * @param field filter's selected field
695
- * @returns smart filter object
696
- */
697
- getFilter(current, field) {
698
- const operator = getSmartFilterOperator(current.Operation, field.type);
699
- if (operator) {
700
- const filterValues = this.getFilterValues(current, operator, field);
701
- return createSmartFilter(current.ApiName, operator, filterValues.first, filterValues.second, filterValues.operationUnit);
702
- }
703
- else {
704
- return null;
705
- }
706
- }
707
- /**
708
- * converts legacy fields to smart filter fields
709
- * @param fields legacy fields array
710
- * @returns smart filter fields array
711
- */
712
- convertToSmartFilterFields(fields) {
713
- if (fields?.length > 0) {
714
- const typeMapper = new PepQueryBuilderTypeMap();
715
- return fields.map((field) => {
716
- return {
717
- smart: createSmartFilterField({
718
- id: field.FieldID,
719
- name: field.Title,
720
- options: field.OptionalValues?.map(option => {
721
- return {
722
- key: option.Key,
723
- value: option.Value
724
- };
725
- })
726
- }, typeMapper.getSmartFilterType(field.FieldType)),
727
- query: {
728
- fieldType: field.FieldType
729
- }
730
- };
731
- });
732
- }
733
- else {
734
- return [];
735
- }
736
- }
737
- /**
738
- * gets smart filter's values data
739
- * @param current filter legacy element
740
- * @param operator smart filter operator
741
- * @param field filter's selected field
742
- * @returns object contains the filter values data
743
- */
744
- getFilterValues(current, operator, field) {
745
- const data = {
746
- first: null,
747
- second: null,
748
- operationUnit: null
749
- };
750
- if (operator === PepSmartFilterOperators.In) { //multi select
751
- //filter keys don't exist on field options
752
- data.first = current?.Values?.length > 0 ? current.Values.filter(item => {
753
- return field.options.find(option => option.key === item);
754
- }) : null;
755
- }
756
- else if (operator === PepSmartFilterOperators.InTheLast ||
757
- operator === PepSmartFilterAdditionalOperators.InTheLastCalendar ||
758
- operator === PepSmartFilterOperators.NotInTheLast ||
759
- operator === PepSmartFilterAdditionalOperators.NotInTheLastCalendar ||
760
- operator === PepSmartFilterOperators.DueIn ||
761
- operator === PepSmartFilterOperators.NotDueIn) { //operation unit
762
- data.first = current?.Values?.length > 0 ? current.Values[0] : null;
763
- if (current?.Values?.length === 2) {
764
- data.operationUnit = getSmartFilterOperationUnit(current.Values[1]);
765
- }
766
- }
767
- else {
768
- data.first = current?.Values?.length > 0 ? current.Values[0] : null;
769
- data.second = current?.Values?.length === 2 ? current.Values[1] : null;
770
- }
771
- return data;
772
- }
773
- }
774
- PepQueryBuilderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
775
- PepQueryBuilderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderService, providedIn: 'root' });
776
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderService, decorators: [{
777
- type: Injectable,
778
- args: [{
779
- providedIn: 'root'
780
- }]
687
+ class PepQueryBuilderService {
688
+ constructor() {
689
+ //
690
+ }
691
+ /**
692
+ * creates a smart filter object
693
+ * @param current filter legacy element
694
+ * @param field filter's selected field
695
+ * @returns smart filter object
696
+ */
697
+ getFilter(current, field) {
698
+ const operator = getSmartFilterOperator(current.Operation, field.type);
699
+ if (operator) {
700
+ const filterValues = this.getFilterValues(current, operator, field);
701
+ return createSmartFilter(current.ApiName, operator, filterValues.first, filterValues.second, filterValues.operationUnit);
702
+ }
703
+ else {
704
+ return null;
705
+ }
706
+ }
707
+ /**
708
+ * converts legacy fields to smart filter fields
709
+ * @param fields legacy fields array
710
+ * @returns smart filter fields array
711
+ */
712
+ convertToSmartFilterFields(fields) {
713
+ if (fields?.length > 0) {
714
+ const typeMapper = new PepQueryBuilderTypeMap();
715
+ return fields.map((field) => {
716
+ return {
717
+ smart: createSmartFilterField({
718
+ id: field.FieldID,
719
+ name: field.Title,
720
+ options: field.OptionalValues?.map(option => {
721
+ return {
722
+ key: option.Key,
723
+ value: option.Value
724
+ };
725
+ })
726
+ }, typeMapper.getSmartFilterType(field.FieldType)),
727
+ query: {
728
+ fieldType: field.FieldType
729
+ }
730
+ };
731
+ });
732
+ }
733
+ else {
734
+ return [];
735
+ }
736
+ }
737
+ /**
738
+ * gets smart filter's values data
739
+ * @param current filter legacy element
740
+ * @param operator smart filter operator
741
+ * @param field filter's selected field
742
+ * @returns object contains the filter values data
743
+ */
744
+ getFilterValues(current, operator, field) {
745
+ const data = {
746
+ first: null,
747
+ second: null,
748
+ operationUnit: null
749
+ };
750
+ if (operator === PepSmartFilterOperators.In) { //multi select
751
+ //filter keys don't exist on field options
752
+ data.first = current?.Values?.length > 0 ? current.Values.filter(item => {
753
+ return field.options.find(option => option.key === item);
754
+ }) : null;
755
+ }
756
+ else if (operator === PepSmartFilterOperators.InTheLast ||
757
+ operator === PepSmartFilterAdditionalOperators.InTheLastCalendar ||
758
+ operator === PepSmartFilterOperators.NotInTheLast ||
759
+ operator === PepSmartFilterAdditionalOperators.NotInTheLastCalendar ||
760
+ operator === PepSmartFilterOperators.DueIn ||
761
+ operator === PepSmartFilterOperators.NotDueIn) { //operation unit
762
+ data.first = current?.Values?.length > 0 ? current.Values[0] : null;
763
+ if (current?.Values?.length === 2) {
764
+ data.operationUnit = getSmartFilterOperationUnit(current.Values[1]);
765
+ }
766
+ }
767
+ else {
768
+ data.first = current?.Values?.length > 0 ? current.Values[0] : null;
769
+ data.second = current?.Values?.length === 2 ? current.Values[1] : null;
770
+ }
771
+ return data;
772
+ }
773
+ }
774
+ PepQueryBuilderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
775
+ PepQueryBuilderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderService, providedIn: 'root' });
776
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderService, decorators: [{
777
+ type: Injectable,
778
+ args: [{
779
+ providedIn: 'root'
780
+ }]
781
781
  }], ctorParameters: function () { return []; } });
782
782
 
783
- const MAX_STRUCTURE_DEPTH = 3;
784
- class PepQueryStructureService {
785
- constructor(_resolver, _outputQueryService, _queryBuilderService) {
786
- this._resolver = _resolver;
787
- this._outputQueryService = _outputQueryService;
788
- this._queryBuilderService = _queryBuilderService;
789
- this._outputQuery$ = new BehaviorSubject(null);
790
- this._variableFields = {};
791
- this._maxStructureDepth = MAX_STRUCTURE_DEPTH;
792
- this.outputQuery$ = this._outputQuery$.asObservable();
793
- }
794
- set maxDepth(value) {
795
- this._maxStructureDepth = value;
796
- }
797
- get maxDepth() {
798
- return this._maxStructureDepth;
799
- }
800
- set fields(list) {
801
- this._smartFilterFields = this._queryBuilderService.convertToSmartFilterFields(list);
802
- }
803
- get hasFields() {
804
- return this._smartFilterFields?.length > 0;
805
- }
806
- set variableFields(list) {
807
- if (list?.length) {
808
- const typeMapper = new PepQueryBuilderTypeMap();
809
- list.forEach(field => {
810
- const fieldType = this.convertSmartFilterComponentType(typeMapper.getSmartFilterType(field.FieldType));
811
- if (this.hasProperty(this._variableFields, fieldType)) {
812
- this._variableFields[fieldType].push(field.FieldID);
813
- }
814
- else {
815
- this._variableFields[fieldType] = [field.FieldID];
816
- }
817
- });
818
- }
819
- }
820
- set form(value) {
821
- this._form = value;
822
- }
823
- get form() {
824
- return this._form;
825
- }
826
- /**
827
- * builds a dynamic UI query structure
828
- * might has a different structure than the query's due to parent-child elements merge
829
- * @param query legacy query
830
- * @param containerRef reference to root element
831
- */
832
- buildQueryStructure(query, containerRef) {
833
- //update root operator
834
- if (this.hasProperty(query, 'ComplexId') &&
835
- query?.Operation &&
836
- query.Operation !== this._form.get('operator').value) {
837
- this._form.get('operator').setValue(query.Operation);
838
- }
839
- this.flatten(this._form.get('operator').value, query, containerRef, this._form, 0);
840
- }
841
- /**
842
- * checks if the object contains property
843
- * @param obj object
844
- * @param prop property name
845
- * @returns true if contains, false otherwise
846
- */
847
- hasProperty(obj, prop) {
848
- return Object.prototype.hasOwnProperty.call(obj, prop);
849
- }
850
- /**
851
- * a recursive function dynamically builds UI filters structure
852
- * @param parentOperator parent legacy complex operator
853
- * @param current child legacy object (either another complex or expression type)
854
- * @param containerRef parent element
855
- * @param parentForm parent form
856
- */
857
- flatten(parentOperator, current, containerRef, parentForm, depth) {
858
- if (this.hasProperty(current, 'ComplexId')) {
859
- const section = current;
860
- if (parentOperator === current.Operation) {
861
- this.flatten(current.Operation, section.LeftNode, containerRef, parentForm, depth);
862
- this.flatten(current.Operation, section.RightNode, containerRef, parentForm, depth);
863
- }
864
- else {
865
- const result = this.createSection(section.Operation, containerRef, parentForm, depth + 1);
866
- this.flatten(section.Operation, section.LeftNode, result.containerRef, result.parentForm, depth + 1);
867
- this.flatten(section.Operation, section.RightNode, result.containerRef, result.parentForm, depth + 1);
868
- }
869
- }
870
- else if (this.hasProperty(current, 'ExpressionId')) {
871
- this.createItem(current, containerRef, parentForm);
872
- }
873
- }
874
- /**
875
- * creates a container object of two or more child filter items
876
- * @param operator AND/OR operator
877
- * @param containerRef parent element
878
- * @param parentForm parent form
879
- * @param depth
880
- * @returns an object containing the current element and current form
881
- */
882
- createSection(operator, containerRef, parentForm, depth) {
883
- const factory = this._resolver.resolveComponentFactory(PepQueryBuilderSectionComponent);
884
- const componentRef = containerRef.createComponent(factory);
885
- // const sectionGroup = this._fb.group({
886
- // operator: this._fb.control(operator)
887
- // });
888
- const sectionGroup = new FormGroup({
889
- operator: new FormControl(operator)
890
- });
891
- let counter = 1;
892
- Object.keys(parentForm.controls).forEach(item => { if (item.includes('section')) {
893
- counter++;
894
- } });
895
- const formKey = `section${counter}`;
896
- parentForm.addControl(formKey, sectionGroup);
897
- componentRef.instance.form = sectionGroup;
898
- componentRef.instance.depth = {
899
- current: depth,
900
- max: this._maxStructureDepth
901
- };
902
- componentRef.instance.createSection.subscribe(() => {
903
- const section = this.createSection(PepOperatorTypes.And, componentRef.instance.sectionContainer, sectionGroup, depth + 1);
904
- this.createItem(null, section.containerRef, section.parentForm);
905
- });
906
- componentRef.instance.createItem.subscribe(() => {
907
- this.createItem(null, componentRef.instance.sectionContainer, sectionGroup);
908
- });
909
- componentRef.instance.remove.subscribe(() => {
910
- parentForm.removeControl(formKey);
911
- componentRef.destroy();
912
- this.createOutputQuery();
913
- });
914
- componentRef.instance.operatorChange.subscribe(() => {
915
- this.createOutputQuery();
916
- });
917
- return {
918
- containerRef: componentRef.instance.sectionContainer,
919
- parentForm: sectionGroup
920
- };
921
- }
922
- /**
923
- * creates a component represents filter item (leaf element - has no childs)
924
- * @param current filter legacy element
925
- * @param containerRef parent element
926
- * @param parentForm parent form
927
- */
928
- createItem(current, containerRef, parentForm) {
929
- const factory = this._resolver.resolveComponentFactory(PepQueryBuilderItemComponent);
930
- const componentRef = containerRef.createComponent(factory);
931
- let counter = 1;
932
- Object.keys(parentForm.controls).forEach(item => { if (item.includes('item')) {
933
- counter++;
934
- } });
935
- const formKey = `item${counter}`;
936
- componentRef.instance.formKey = formKey;
937
- componentRef.instance.fields = this._smartFilterFields;
938
- componentRef.instance.variableFields = this._variableFields;
939
- const selectedField = this.getSelectedField(current);
940
- if (selectedField) {
941
- componentRef.instance.selected = selectedField;
942
- if (current) {
943
- componentRef.instance.filter = this._queryBuilderService.getFilter(current, selectedField.smart);
944
- }
945
- }
946
- componentRef.instance.parentForm = parentForm;
947
- componentRef.instance.filterChange.subscribe(() => {
948
- this.createOutputQuery();
949
- });
950
- componentRef.instance.remove.subscribe(() => {
951
- parentForm.removeControl(formKey);
952
- componentRef.destroy();
953
- this.createOutputQuery();
954
- });
955
- }
956
- /**
957
- * get smart filter field
958
- * @param current filter legacy element
959
- * @returns smart filter field, if not found returns the first field
960
- */
961
- getSelectedField(current) {
962
- if (current) {
963
- const item = this._smartFilterFields.find(field => field.smart.id === current.ApiName);
964
- return item ? item : this._smartFilterFields?.length > 0 ? this._smartFilterFields[0] : null;
965
- }
966
- else {
967
- return this._smartFilterFields?.length > 0 ? this._smartFilterFields[0] : null;
968
- }
969
- }
970
- convertSmartFilterComponentType(type) {
971
- switch (type) {
972
- case 'int':
973
- case 'currency':
974
- case 'real':
975
- case 'percentage':
976
- return 'number';
977
- case 'date-time':
978
- return 'date';
979
- default:
980
- return type;
981
- }
982
- }
983
- /**
984
- * creates a legacy output query
985
- */
986
- createOutputQuery() {
987
- if (this._form.valid) {
988
- const query = this._outputQueryService.generateQuery(this._form.value);
989
- this._outputQuery$.next(query);
990
- }
991
- }
992
- }
993
- PepQueryStructureService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService, deps: [{ token: i0.ComponentFactoryResolver }, { token: PepOutputQueryService }, { token: PepQueryBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
994
- PepQueryStructureService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService });
995
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService, decorators: [{
996
- type: Injectable
783
+ const MAX_STRUCTURE_DEPTH = 3;
784
+ class PepQueryStructureService {
785
+ constructor(_resolver, _outputQueryService, _queryBuilderService) {
786
+ this._resolver = _resolver;
787
+ this._outputQueryService = _outputQueryService;
788
+ this._queryBuilderService = _queryBuilderService;
789
+ this._outputQuery$ = new BehaviorSubject(null);
790
+ this._variableFields = {};
791
+ this._maxStructureDepth = MAX_STRUCTURE_DEPTH;
792
+ this.outputQuery$ = this._outputQuery$.asObservable();
793
+ }
794
+ set maxDepth(value) {
795
+ this._maxStructureDepth = value;
796
+ }
797
+ get maxDepth() {
798
+ return this._maxStructureDepth;
799
+ }
800
+ set fields(list) {
801
+ this._smartFilterFields = this._queryBuilderService.convertToSmartFilterFields(list);
802
+ }
803
+ get hasFields() {
804
+ return this._smartFilterFields?.length > 0;
805
+ }
806
+ set variableFields(list) {
807
+ if (list?.length) {
808
+ const typeMapper = new PepQueryBuilderTypeMap();
809
+ list.forEach(field => {
810
+ const fieldType = this.convertSmartFilterComponentType(typeMapper.getSmartFilterType(field.FieldType));
811
+ if (this.hasProperty(this._variableFields, fieldType)) {
812
+ this._variableFields[fieldType].push(field.FieldID);
813
+ }
814
+ else {
815
+ this._variableFields[fieldType] = [field.FieldID];
816
+ }
817
+ });
818
+ }
819
+ }
820
+ set form(value) {
821
+ this._form = value;
822
+ }
823
+ get form() {
824
+ return this._form;
825
+ }
826
+ /**
827
+ * builds a dynamic UI query structure
828
+ * might has a different structure than the query's due to parent-child elements merge
829
+ * @param query legacy query
830
+ * @param containerRef reference to root element
831
+ */
832
+ buildQueryStructure(query, containerRef) {
833
+ //update root operator
834
+ if (this.hasProperty(query, 'ComplexId') &&
835
+ query?.Operation &&
836
+ query.Operation !== this._form.get('operator').value) {
837
+ this._form.get('operator').setValue(query.Operation);
838
+ }
839
+ this.flatten(this._form.get('operator').value, query, containerRef, this._form, 0);
840
+ }
841
+ /**
842
+ * checks if the object contains property
843
+ * @param obj object
844
+ * @param prop property name
845
+ * @returns true if contains, false otherwise
846
+ */
847
+ hasProperty(obj, prop) {
848
+ return Object.prototype.hasOwnProperty.call(obj, prop);
849
+ }
850
+ /**
851
+ * a recursive function dynamically builds UI filters structure
852
+ * @param parentOperator parent legacy complex operator
853
+ * @param current child legacy object (either another complex or expression type)
854
+ * @param containerRef parent element
855
+ * @param parentForm parent form
856
+ */
857
+ flatten(parentOperator, current, containerRef, parentForm, depth) {
858
+ if (this.hasProperty(current, 'ComplexId')) {
859
+ const section = current;
860
+ if (parentOperator === current.Operation) {
861
+ this.flatten(current.Operation, section.LeftNode, containerRef, parentForm, depth);
862
+ this.flatten(current.Operation, section.RightNode, containerRef, parentForm, depth);
863
+ }
864
+ else {
865
+ const result = this.createSection(section.Operation, containerRef, parentForm, depth + 1);
866
+ this.flatten(section.Operation, section.LeftNode, result.containerRef, result.parentForm, depth + 1);
867
+ this.flatten(section.Operation, section.RightNode, result.containerRef, result.parentForm, depth + 1);
868
+ }
869
+ }
870
+ else if (this.hasProperty(current, 'ExpressionId')) {
871
+ this.createItem(current, containerRef, parentForm);
872
+ }
873
+ }
874
+ /**
875
+ * creates a container object of two or more child filter items
876
+ * @param operator AND/OR operator
877
+ * @param containerRef parent element
878
+ * @param parentForm parent form
879
+ * @param depth
880
+ * @returns an object containing the current element and current form
881
+ */
882
+ createSection(operator, containerRef, parentForm, depth) {
883
+ const factory = this._resolver.resolveComponentFactory(PepQueryBuilderSectionComponent);
884
+ const componentRef = containerRef.createComponent(factory);
885
+ // const sectionGroup = this._fb.group({
886
+ // operator: this._fb.control(operator)
887
+ // });
888
+ const sectionGroup = new FormGroup({
889
+ operator: new FormControl(operator)
890
+ });
891
+ let counter = 1;
892
+ Object.keys(parentForm.controls).forEach(item => { if (item.includes('section')) {
893
+ counter++;
894
+ } });
895
+ const formKey = `section${counter}`;
896
+ parentForm.addControl(formKey, sectionGroup);
897
+ componentRef.instance.form = sectionGroup;
898
+ componentRef.instance.depth = {
899
+ current: depth,
900
+ max: this._maxStructureDepth
901
+ };
902
+ componentRef.instance.createSection.subscribe(() => {
903
+ const section = this.createSection(PepOperatorTypes.And, componentRef.instance.sectionContainer, sectionGroup, depth + 1);
904
+ this.createItem(null, section.containerRef, section.parentForm);
905
+ });
906
+ componentRef.instance.createItem.subscribe(() => {
907
+ this.createItem(null, componentRef.instance.sectionContainer, sectionGroup);
908
+ });
909
+ componentRef.instance.remove.subscribe(() => {
910
+ parentForm.removeControl(formKey);
911
+ componentRef.destroy();
912
+ this.createOutputQuery();
913
+ });
914
+ componentRef.instance.operatorChange.subscribe(() => {
915
+ this.createOutputQuery();
916
+ });
917
+ return {
918
+ containerRef: componentRef.instance.sectionContainer,
919
+ parentForm: sectionGroup
920
+ };
921
+ }
922
+ /**
923
+ * creates a component represents filter item (leaf element - has no childs)
924
+ * @param current filter legacy element
925
+ * @param containerRef parent element
926
+ * @param parentForm parent form
927
+ */
928
+ createItem(current, containerRef, parentForm) {
929
+ const factory = this._resolver.resolveComponentFactory(PepQueryBuilderItemComponent);
930
+ const componentRef = containerRef.createComponent(factory);
931
+ let counter = 1;
932
+ Object.keys(parentForm.controls).forEach(item => { if (item.includes('item')) {
933
+ counter++;
934
+ } });
935
+ const formKey = `item${counter}`;
936
+ componentRef.instance.formKey = formKey;
937
+ componentRef.instance.fields = this._smartFilterFields;
938
+ componentRef.instance.variableFields = this._variableFields;
939
+ const selectedField = this.getSelectedField(current);
940
+ if (selectedField) {
941
+ componentRef.instance.selected = selectedField;
942
+ if (current) {
943
+ componentRef.instance.filter = this._queryBuilderService.getFilter(current, selectedField.smart);
944
+ }
945
+ }
946
+ componentRef.instance.parentForm = parentForm;
947
+ componentRef.instance.filterChange.subscribe(() => {
948
+ this.createOutputQuery();
949
+ });
950
+ componentRef.instance.remove.subscribe(() => {
951
+ parentForm.removeControl(formKey);
952
+ componentRef.destroy();
953
+ this.createOutputQuery();
954
+ });
955
+ }
956
+ /**
957
+ * get smart filter field
958
+ * @param current filter legacy element
959
+ * @returns smart filter field, if not found returns the first field
960
+ */
961
+ getSelectedField(current) {
962
+ if (current) {
963
+ const item = this._smartFilterFields.find(field => field.smart.id === current.ApiName);
964
+ return item ? item : this._smartFilterFields?.length > 0 ? this._smartFilterFields[0] : null;
965
+ }
966
+ else {
967
+ return this._smartFilterFields?.length > 0 ? this._smartFilterFields[0] : null;
968
+ }
969
+ }
970
+ convertSmartFilterComponentType(type) {
971
+ switch (type) {
972
+ case 'int':
973
+ case 'currency':
974
+ case 'real':
975
+ case 'percentage':
976
+ return 'number';
977
+ case 'date-time':
978
+ return 'date';
979
+ default:
980
+ return type;
981
+ }
982
+ }
983
+ /**
984
+ * creates a legacy output query
985
+ */
986
+ createOutputQuery() {
987
+ if (this._form.valid) {
988
+ const query = this._outputQueryService.generateQuery(this._form.value);
989
+ this._outputQuery$.next(query);
990
+ }
991
+ }
992
+ }
993
+ PepQueryStructureService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService, deps: [{ token: i0.ComponentFactoryResolver }, { token: PepOutputQueryService }, { token: PepQueryBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
994
+ PepQueryStructureService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService });
995
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryStructureService, decorators: [{
996
+ type: Injectable
997
997
  }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: PepOutputQueryService }, { type: PepQueryBuilderService }]; } });
998
998
 
999
- class PepQueryBuilderComponent {
1000
- constructor(_fb, queryStructureService) {
1001
- this._fb = _fb;
1002
- this.queryStructureService = queryStructureService;
1003
- this._query = null;
1004
- this.queryChange = new EventEmitter();
1005
- this.formValidationChange = new EventEmitter();
1006
- this._lastFormValidStatus = true;
1007
- this.hasFields = false;
1008
- this.setupForm();
1009
- this.initDepth();
1010
- this._formSubscription$ = this.queryStructureService.form.valueChanges.subscribe((val) => {
1011
- if (this.queryStructureService.form.valid !== this._lastFormValidStatus) {
1012
- this._lastFormValidStatus = this.queryStructureService.form.valid;
1013
- this.formValidationChange.emit(this._lastFormValidStatus);
1014
- }
1015
- });
1016
- this._outputQuerySubscription$ = this.queryStructureService.outputQuery$.subscribe((outputQuery) => {
1017
- this.queryChange.emit(outputQuery);
1018
- });
1019
- }
1020
- set query(object) {
1021
- this._query = object;
1022
- this.loadQuery();
1023
- }
1024
- set fields(list) {
1025
- this.queryStructureService.fields = list;
1026
- this.hasFields = this.queryStructureService.hasFields;
1027
- this.loadQuery();
1028
- }
1029
- set variableFields(list) {
1030
- this.queryStructureService.variableFields = list;
1031
- }
1032
- set maxDepth(value) {
1033
- this.queryStructureService.maxDepth = value;
1034
- }
1035
- ngOnInit() {
1036
- //
1037
- }
1038
- setupForm() {
1039
- this.queryStructureService.form = this._fb.group({
1040
- operator: this._fb.control(PepOperatorTypes.And)
1041
- });
1042
- }
1043
- initDepth() {
1044
- this.depth = {
1045
- current: 0,
1046
- max: this.queryStructureService.maxDepth
1047
- };
1048
- }
1049
- /**
1050
- * builds UI query structure as soon as both the fields and query loads
1051
- */
1052
- loadQuery() {
1053
- if (this._query &&
1054
- this.queryStructureService.hasFields &&
1055
- this.root?.sectionContainer) {
1056
- this.queryStructureService.buildQueryStructure(this._query, this.root.sectionContainer);
1057
- }
1058
- }
1059
- onCreateSection() {
1060
- const section = this.queryStructureService.createSection(PepOperatorTypes.And, this.root.sectionContainer, this.queryStructureService.form, 1);
1061
- this.queryStructureService.createItem(null, section.containerRef, section.parentForm);
1062
- }
1063
- onCreateItem() {
1064
- this.queryStructureService.createItem(null, this.root.sectionContainer, this.queryStructureService.form);
1065
- }
1066
- onOperatorChange() {
1067
- this.queryStructureService.createOutputQuery();
1068
- }
1069
- ngOnDestroy() {
1070
- if (this._formSubscription$) {
1071
- this._formSubscription$.unsubscribe();
1072
- }
1073
- if (this._outputQuerySubscription$) {
1074
- this._outputQuerySubscription$.unsubscribe();
1075
- }
1076
- }
1077
- }
1078
- PepQueryBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderComponent, deps: [{ token: i1.FormBuilder }, { token: PepQueryStructureService }], target: i0.ɵɵFactoryTarget.Component });
1079
- PepQueryBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderComponent, selector: "pep-query-builder", inputs: { query: "query", fields: "fields", variableFields: "variableFields", maxDepth: "maxDepth" }, outputs: { queryChange: "queryChange", formValidationChange: "formValidationChange" }, providers: [PepQueryStructureService, PepTypeConvertorService, PepOutputQueryService], viewQueries: [{ propertyName: "root", first: true, predicate: ["rootContainer"], descendants: true, static: true }], ngImport: i0, template: "<pep-query-builder-section #rootContainer [form]=\"queryStructureService.form\" [depth]=\"depth\" [hasFields]=\"hasFields\"\n (createSection)=\"onCreateSection()\" (createItem)=\"onCreateItem()\" (operatorChange)=\"onOperatorChange()\">\n</pep-query-builder-section>", styles: [""], dependencies: [{ kind: "component", type: PepQueryBuilderSectionComponent, selector: "pep-query-builder-section", inputs: ["form", "depth", "hasFields"], outputs: ["createSection", "createItem", "remove", "operatorChange"] }] });
1080
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderComponent, decorators: [{
1081
- type: Component,
1082
- args: [{ selector: 'pep-query-builder', providers: [PepQueryStructureService, PepTypeConvertorService, PepOutputQueryService], template: "<pep-query-builder-section #rootContainer [form]=\"queryStructureService.form\" [depth]=\"depth\" [hasFields]=\"hasFields\"\n (createSection)=\"onCreateSection()\" (createItem)=\"onCreateItem()\" (operatorChange)=\"onOperatorChange()\">\n</pep-query-builder-section>" }]
1083
- }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: PepQueryStructureService }]; }, propDecorators: { query: [{
1084
- type: Input
1085
- }], fields: [{
1086
- type: Input
1087
- }], variableFields: [{
1088
- type: Input
1089
- }], maxDepth: [{
1090
- type: Input
1091
- }], queryChange: [{
1092
- type: Output
1093
- }], formValidationChange: [{
1094
- type: Output
1095
- }], root: [{
1096
- type: ViewChild,
1097
- args: ['rootContainer', { static: true }]
999
+ class PepQueryBuilderComponent {
1000
+ constructor(_fb, queryStructureService) {
1001
+ this._fb = _fb;
1002
+ this.queryStructureService = queryStructureService;
1003
+ this._query = null;
1004
+ this.queryChange = new EventEmitter();
1005
+ this.formValidationChange = new EventEmitter();
1006
+ this._lastFormValidStatus = true;
1007
+ this.hasFields = false;
1008
+ this.setupForm();
1009
+ this.initDepth();
1010
+ this._formSubscription$ = this.queryStructureService.form.valueChanges.subscribe((val) => {
1011
+ if (this.queryStructureService.form.valid !== this._lastFormValidStatus) {
1012
+ this._lastFormValidStatus = this.queryStructureService.form.valid;
1013
+ this.formValidationChange.emit(this._lastFormValidStatus);
1014
+ }
1015
+ });
1016
+ this._outputQuerySubscription$ = this.queryStructureService.outputQuery$.subscribe((outputQuery) => {
1017
+ this.queryChange.emit(outputQuery);
1018
+ });
1019
+ }
1020
+ set query(object) {
1021
+ this._query = object;
1022
+ this.loadQuery();
1023
+ }
1024
+ set fields(list) {
1025
+ this.queryStructureService.fields = list;
1026
+ this.hasFields = this.queryStructureService.hasFields;
1027
+ this.loadQuery();
1028
+ }
1029
+ set variableFields(list) {
1030
+ this.queryStructureService.variableFields = list;
1031
+ }
1032
+ set maxDepth(value) {
1033
+ this.queryStructureService.maxDepth = value;
1034
+ }
1035
+ ngOnInit() {
1036
+ //
1037
+ }
1038
+ setupForm() {
1039
+ this.queryStructureService.form = this._fb.group({
1040
+ operator: this._fb.control(PepOperatorTypes.And)
1041
+ });
1042
+ }
1043
+ initDepth() {
1044
+ this.depth = {
1045
+ current: 0,
1046
+ max: this.queryStructureService.maxDepth
1047
+ };
1048
+ }
1049
+ /**
1050
+ * builds UI query structure as soon as both the fields and query loads
1051
+ */
1052
+ loadQuery() {
1053
+ if (this._query &&
1054
+ this.queryStructureService.hasFields &&
1055
+ this.root?.sectionContainer) {
1056
+ this.queryStructureService.buildQueryStructure(this._query, this.root.sectionContainer);
1057
+ }
1058
+ }
1059
+ onCreateSection() {
1060
+ const section = this.queryStructureService.createSection(PepOperatorTypes.And, this.root.sectionContainer, this.queryStructureService.form, 1);
1061
+ this.queryStructureService.createItem(null, section.containerRef, section.parentForm);
1062
+ }
1063
+ onCreateItem() {
1064
+ this.queryStructureService.createItem(null, this.root.sectionContainer, this.queryStructureService.form);
1065
+ }
1066
+ onOperatorChange() {
1067
+ this.queryStructureService.createOutputQuery();
1068
+ }
1069
+ ngOnDestroy() {
1070
+ if (this._formSubscription$) {
1071
+ this._formSubscription$.unsubscribe();
1072
+ }
1073
+ if (this._outputQuerySubscription$) {
1074
+ this._outputQuerySubscription$.unsubscribe();
1075
+ }
1076
+ }
1077
+ }
1078
+ PepQueryBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderComponent, deps: [{ token: i1.FormBuilder }, { token: PepQueryStructureService }], target: i0.ɵɵFactoryTarget.Component });
1079
+ PepQueryBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderComponent, selector: "pep-query-builder", inputs: { query: "query", fields: "fields", variableFields: "variableFields", maxDepth: "maxDepth" }, outputs: { queryChange: "queryChange", formValidationChange: "formValidationChange" }, providers: [PepQueryStructureService, PepTypeConvertorService, PepOutputQueryService], viewQueries: [{ propertyName: "root", first: true, predicate: ["rootContainer"], descendants: true, static: true }], ngImport: i0, template: "<pep-query-builder-section #rootContainer [form]=\"queryStructureService.form\" [depth]=\"depth\" [hasFields]=\"hasFields\"\n (createSection)=\"onCreateSection()\" (createItem)=\"onCreateItem()\" (operatorChange)=\"onOperatorChange()\">\n</pep-query-builder-section>", styles: [""], dependencies: [{ kind: "component", type: PepQueryBuilderSectionComponent, selector: "pep-query-builder-section", inputs: ["form", "depth", "hasFields"], outputs: ["createSection", "createItem", "remove", "operatorChange"] }] });
1080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderComponent, decorators: [{
1081
+ type: Component,
1082
+ args: [{ selector: 'pep-query-builder', providers: [PepQueryStructureService, PepTypeConvertorService, PepOutputQueryService], template: "<pep-query-builder-section #rootContainer [form]=\"queryStructureService.form\" [depth]=\"depth\" [hasFields]=\"hasFields\"\n (createSection)=\"onCreateSection()\" (createItem)=\"onCreateItem()\" (operatorChange)=\"onOperatorChange()\">\n</pep-query-builder-section>" }]
1083
+ }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: PepQueryStructureService }]; }, propDecorators: { query: [{
1084
+ type: Input
1085
+ }], fields: [{
1086
+ type: Input
1087
+ }], variableFields: [{
1088
+ type: Input
1089
+ }], maxDepth: [{
1090
+ type: Input
1091
+ }], queryChange: [{
1092
+ type: Output
1093
+ }], formValidationChange: [{
1094
+ type: Output
1095
+ }], root: [{
1096
+ type: ViewChild,
1097
+ args: ['rootContainer', { static: true }]
1098
1098
  }] } });
1099
1099
 
1100
- class PepQueryBuilderModule {
1101
- }
1102
- PepQueryBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1103
- PepQueryBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, declarations: [PepQueryBuilderComponent,
1104
- PepQueryBuilderSectionComponent,
1105
- PepQueryBuilderItemComponent], imports: [CommonModule,
1106
- ReactiveFormsModule,
1107
- FlexLayoutModule,
1108
- PepSelectModule,
1109
- PepButtonModule,
1110
- PepGroupButtonsModule,
1111
- PepSmartFiltersModule], exports: [PepQueryBuilderComponent] });
1112
- PepQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, providers: [
1113
- FormBuilder
1114
- ], imports: [CommonModule,
1115
- ReactiveFormsModule,
1116
- FlexLayoutModule,
1117
- PepSelectModule,
1118
- PepButtonModule,
1119
- PepGroupButtonsModule,
1120
- PepSmartFiltersModule] });
1121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, decorators: [{
1122
- type: NgModule,
1123
- args: [{
1124
- imports: [
1125
- CommonModule,
1126
- ReactiveFormsModule,
1127
- FlexLayoutModule,
1128
- PepSelectModule,
1129
- PepButtonModule,
1130
- PepGroupButtonsModule,
1131
- PepSmartFiltersModule
1132
- ],
1133
- exports: [
1134
- PepQueryBuilderComponent
1135
- ],
1136
- declarations: [
1137
- PepQueryBuilderComponent,
1138
- PepQueryBuilderSectionComponent,
1139
- PepQueryBuilderItemComponent
1140
- ],
1141
- providers: [
1142
- FormBuilder
1143
- ]
1144
- }]
1100
+ class PepQueryBuilderModule {
1101
+ }
1102
+ PepQueryBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1103
+ PepQueryBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, declarations: [PepQueryBuilderComponent,
1104
+ PepQueryBuilderSectionComponent,
1105
+ PepQueryBuilderItemComponent], imports: [CommonModule,
1106
+ ReactiveFormsModule,
1107
+ FlexLayoutModule,
1108
+ PepSelectModule,
1109
+ PepButtonModule,
1110
+ PepGroupButtonsModule,
1111
+ PepSmartFiltersModule], exports: [PepQueryBuilderComponent] });
1112
+ PepQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, providers: [
1113
+ FormBuilder
1114
+ ], imports: [CommonModule,
1115
+ ReactiveFormsModule,
1116
+ FlexLayoutModule,
1117
+ PepSelectModule,
1118
+ PepButtonModule,
1119
+ PepGroupButtonsModule,
1120
+ PepSmartFiltersModule] });
1121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, decorators: [{
1122
+ type: NgModule,
1123
+ args: [{
1124
+ imports: [
1125
+ CommonModule,
1126
+ ReactiveFormsModule,
1127
+ FlexLayoutModule,
1128
+ PepSelectModule,
1129
+ PepButtonModule,
1130
+ PepGroupButtonsModule,
1131
+ PepSmartFiltersModule
1132
+ ],
1133
+ exports: [
1134
+ PepQueryBuilderComponent
1135
+ ],
1136
+ declarations: [
1137
+ PepQueryBuilderComponent,
1138
+ PepQueryBuilderSectionComponent,
1139
+ PepQueryBuilderItemComponent
1140
+ ],
1141
+ providers: [
1142
+ FormBuilder
1143
+ ]
1144
+ }]
1145
1145
  }] });
1146
1146
 
1147
- /*
1148
- * Public API Surface of ngx-lib/query-builder
1147
+ /*
1148
+ * Public API Surface of ngx-lib/query-builder
1149
1149
  */
1150
1150
 
1151
- /**
1152
- * Generated bundle index. Do not edit.
1151
+ /**
1152
+ * Generated bundle index. Do not edit.
1153
1153
  */
1154
1154
 
1155
1155
  export { PepQueryBuilderComponent, PepQueryBuilderModule, PepQueryBuilderService };