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

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