@pepperi-addons/ngx-lib 0.3.15-beta.19 → 0.3.15-beta.21

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