@pepperi-addons/ngx-lib 0.4.1-beta.54 → 0.4.1-beta.56

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