@pepperi-addons/ngx-lib 0.3.15-beta.12 → 0.3.15-beta.15

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