@wavemaker/app-ng-runtime 11.8.0-next.24904 → 11.8.0-next.27301

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 (346) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +5 -5
  2. app-ng-runtime/build-task/esm2022/basic/progress/progress-bar/progress-bar.build.mjs +1 -1
  3. app-ng-runtime/build-task/esm2022/page/page.build.mjs +3 -2
  4. app-ng-runtime/build-task/fesm2022/index.mjs +2 -1
  5. app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
  6. app-ng-runtime/components/advanced/carousel/bundles/index.umd.js +5 -5
  7. app-ng-runtime/components/advanced/carousel/esm2022/carousel.animator.mjs +3 -2
  8. app-ng-runtime/components/advanced/carousel/esm2022/carousel.directive.mjs +1 -1
  9. app-ng-runtime/components/advanced/carousel/fesm2022/index.mjs +2 -1
  10. app-ng-runtime/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
  11. app-ng-runtime/components/advanced/login/bundles/index.umd.js +6 -6
  12. app-ng-runtime/components/advanced/login/esm2022/login.component.mjs +4 -3
  13. app-ng-runtime/components/advanced/login/fesm2022/index.mjs +3 -2
  14. app-ng-runtime/components/advanced/login/fesm2022/index.mjs.map +1 -1
  15. app-ng-runtime/components/base/bundles/index.umd.js +203 -171
  16. app-ng-runtime/components/base/esm2022/directives/show-in-device.directive.mjs +1 -1
  17. app-ng-runtime/components/base/esm2022/pipes/custom-pipes.mjs +12 -11
  18. app-ng-runtime/components/base/esm2022/pipes/wm-pipe.mjs +3 -2
  19. app-ng-runtime/components/base/esm2022/utils/data-utils.mjs +30 -29
  20. app-ng-runtime/components/base/esm2022/utils/form-utils.mjs +47 -41
  21. app-ng-runtime/components/base/esm2022/utils/live-utils.mjs +8 -7
  22. app-ng-runtime/components/base/esm2022/utils/widget-utils.mjs +28 -27
  23. app-ng-runtime/components/base/esm2022/widgets/common/base/base-container.component.mjs +4 -3
  24. app-ng-runtime/components/base/esm2022/widgets/common/base/base-field-validations.mjs +24 -21
  25. app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +12 -11
  26. app-ng-runtime/components/base/esm2022/widgets/common/base/dataset-aware-nav.component.mjs +40 -14
  27. app-ng-runtime/components/base/esm2022/widgets/common/base/partial-container.directive.mjs +3 -2
  28. app-ng-runtime/components/base/esm2022/widgets/common/dialog/dialog.service.mjs +3 -2
  29. app-ng-runtime/components/base/esm2022/widgets/common/lazy-load/lazy-load.directive.mjs +1 -1
  30. app-ng-runtime/components/base/esm2022/widgets/common/partial/partial.directive.mjs +3 -2
  31. app-ng-runtime/components/base/esm2022/widgets/common/partial-param/partial-param.directive.mjs +3 -2
  32. app-ng-runtime/components/base/esm2022/widgets/common/smooth-scroll/smooth-scroll.directive.mjs +6 -5
  33. app-ng-runtime/components/base/esm2022/widgets/framework/deviceview.mjs +1 -1
  34. app-ng-runtime/components/base/esm2022/widgets/framework/property-change-handler.mjs +3 -2
  35. app-ng-runtime/components/base/esm2022/widgets/framework/widget-proxy-provider.mjs +4 -3
  36. app-ng-runtime/components/base/fesm2022/index.mjs +206 -173
  37. app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
  38. app-ng-runtime/components/base/pipes/custom-pipes.d.ts +1 -1
  39. app-ng-runtime/components/base/utils/data-utils.d.ts +0 -1
  40. app-ng-runtime/components/base/utils/widget-utils.d.ts +2 -2
  41. app-ng-runtime/components/base/widgets/common/base/base-field-validations.d.ts +1 -1
  42. app-ng-runtime/components/base/widgets/common/base/partial-container.directive.d.ts +1 -1
  43. app-ng-runtime/components/basic/default/bundles/index.umd.js +10 -10
  44. app-ng-runtime/components/basic/default/esm2022/label/label.directive.mjs +4 -3
  45. app-ng-runtime/components/basic/default/esm2022/spinner/spinner.component.mjs +6 -5
  46. app-ng-runtime/components/basic/default/fesm2022/index.mjs +7 -6
  47. app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
  48. app-ng-runtime/components/basic/progress/bundles/index.umd.js +13 -13
  49. app-ng-runtime/components/basic/progress/esm2022/progress-bar/progress-bar.component.mjs +5 -4
  50. app-ng-runtime/components/basic/progress/esm2022/progress-circle/progress-circle.component.mjs +6 -5
  51. app-ng-runtime/components/basic/progress/esm2022/utils.mjs +3 -3
  52. app-ng-runtime/components/basic/progress/fesm2022/index.mjs +10 -9
  53. app-ng-runtime/components/basic/progress/fesm2022/index.mjs.map +1 -1
  54. app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js +15 -10
  55. app-ng-runtime/components/basic/rich-text-editor/esm2022/rich-text-editor.component.mjs +14 -8
  56. app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs +13 -7
  57. app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
  58. app-ng-runtime/components/basic/rich-text-editor/rich-text-editor.component.d.ts +2 -2
  59. app-ng-runtime/components/basic/search/bundles/index.umd.js +67 -65
  60. app-ng-runtime/components/basic/search/esm2022/data-provider/data-provider.mjs +1 -1
  61. app-ng-runtime/components/basic/search/esm2022/data-provider/local-data-provider.mjs +26 -23
  62. app-ng-runtime/components/basic/search/esm2022/data-provider/remote-data-provider.mjs +12 -11
  63. app-ng-runtime/components/basic/search/esm2022/search.component.mjs +31 -30
  64. app-ng-runtime/components/basic/search/fesm2022/index.mjs +66 -63
  65. app-ng-runtime/components/basic/search/fesm2022/index.mjs.map +1 -1
  66. app-ng-runtime/components/basic/tree/bundles/index.umd.js +9 -9
  67. app-ng-runtime/components/basic/tree/esm2022/tree.component.mjs +7 -6
  68. app-ng-runtime/components/basic/tree/fesm2022/index.mjs +6 -5
  69. app-ng-runtime/components/basic/tree/fesm2022/index.mjs.map +1 -1
  70. app-ng-runtime/components/chart/bundles/index.umd.js +72 -63
  71. app-ng-runtime/components/chart/chart.component.d.ts +1 -1
  72. app-ng-runtime/components/chart/chart.utils.d.ts +3 -3
  73. app-ng-runtime/components/chart/esm2022/chart.component.mjs +58 -48
  74. app-ng-runtime/components/chart/esm2022/chart.utils.mjs +14 -13
  75. app-ng-runtime/components/chart/fesm2022/index.mjs +69 -59
  76. app-ng-runtime/components/chart/fesm2022/index.mjs.map +1 -1
  77. app-ng-runtime/components/containers/accordion/bundles/index.umd.js +16 -16
  78. app-ng-runtime/components/containers/accordion/esm2022/accordion.directive.mjs +14 -13
  79. app-ng-runtime/components/containers/accordion/fesm2022/index.mjs +13 -12
  80. app-ng-runtime/components/containers/accordion/fesm2022/index.mjs.map +1 -1
  81. app-ng-runtime/components/containers/panel/bundles/index.umd.js +5 -5
  82. app-ng-runtime/components/containers/panel/esm2022/panel.component.mjs +3 -2
  83. app-ng-runtime/components/containers/panel/fesm2022/index.mjs +2 -1
  84. app-ng-runtime/components/containers/panel/fesm2022/index.mjs.map +1 -1
  85. app-ng-runtime/components/containers/panel/panel.component.d.ts +1 -1
  86. app-ng-runtime/components/containers/tabs/bundles/index.umd.js +17 -17
  87. app-ng-runtime/components/containers/tabs/esm2022/tabs.component.mjs +15 -14
  88. app-ng-runtime/components/containers/tabs/fesm2022/index.mjs +14 -13
  89. app-ng-runtime/components/containers/tabs/fesm2022/index.mjs.map +1 -1
  90. app-ng-runtime/components/data/form/bundles/index.umd.js +75 -75
  91. app-ng-runtime/components/data/form/esm2022/form-action/form-action.directive.mjs +3 -2
  92. app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +10 -9
  93. app-ng-runtime/components/data/form/esm2022/form.component.mjs +54 -53
  94. app-ng-runtime/components/data/form/esm2022/live-filter/live-filter.directive.mjs +3 -2
  95. app-ng-runtime/components/data/form/esm2022/live-form/live-form.directive.mjs +11 -10
  96. app-ng-runtime/components/data/form/fesm2022/index.mjs +77 -76
  97. app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
  98. app-ng-runtime/components/data/form/form.component.d.ts +2 -2
  99. app-ng-runtime/components/data/form/live-form/live-form.directive.d.ts +1 -1
  100. app-ng-runtime/components/data/list/bundles/index.umd.js +692 -687
  101. app-ng-runtime/components/data/list/esm2022/list-item.directive.mjs +1 -1
  102. app-ng-runtime/components/data/list/esm2022/list.animator.mjs +5 -3
  103. app-ng-runtime/components/data/list/esm2022/list.component.mjs +687 -682
  104. app-ng-runtime/components/data/list/fesm2022/index.mjs +690 -684
  105. app-ng-runtime/components/data/list/fesm2022/index.mjs.map +1 -1
  106. app-ng-runtime/components/data/list/list.component.d.ts +53 -53
  107. app-ng-runtime/components/data/live-table/bundles/index.umd.js +1 -1
  108. app-ng-runtime/components/data/live-table/esm2022/live-table.component.mjs +2 -2
  109. app-ng-runtime/components/data/live-table/fesm2022/index.mjs +1 -1
  110. app-ng-runtime/components/data/live-table/fesm2022/index.mjs.map +1 -1
  111. app-ng-runtime/components/data/pagination/bundles/index.umd.js +14 -14
  112. app-ng-runtime/components/data/pagination/esm2022/pagination.component.mjs +12 -11
  113. app-ng-runtime/components/data/pagination/fesm2022/index.mjs +11 -10
  114. app-ng-runtime/components/data/pagination/fesm2022/index.mjs.map +1 -1
  115. app-ng-runtime/components/data/table/bundles/index.umd.js +175 -172
  116. app-ng-runtime/components/data/table/esm2022/table-action/table-action.directive.mjs +3 -2
  117. app-ng-runtime/components/data/table/esm2022/table-column/table-column.directive.mjs +19 -18
  118. app-ng-runtime/components/data/table/esm2022/table-cud.directive.mjs +7 -6
  119. app-ng-runtime/components/data/table/esm2022/table-filter.directive.mjs +53 -55
  120. app-ng-runtime/components/data/table/esm2022/table-row-action/table-row-action.directive.mjs +3 -2
  121. app-ng-runtime/components/data/table/esm2022/table.component.mjs +98 -91
  122. app-ng-runtime/components/data/table/fesm2022/index.mjs +172 -168
  123. app-ng-runtime/components/data/table/fesm2022/index.mjs.map +1 -1
  124. app-ng-runtime/components/data/table/table-column/table-column.directive.d.ts +6 -6
  125. app-ng-runtime/components/data/table/table.component.d.ts +2 -2
  126. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +2 -2
  127. app-ng-runtime/components/dialogs/default/esm2022/base-dialog.mjs +3 -3
  128. app-ng-runtime/components/dialogs/default/esm2022/dialog-body/dialog-body.directive.mjs +1 -1
  129. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs +1 -1
  130. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  131. app-ng-runtime/components/input/calendar/bundles/index.umd.js +33 -31
  132. app-ng-runtime/components/input/calendar/esm2022/calendar.component.mjs +31 -28
  133. app-ng-runtime/components/input/calendar/fesm2022/index.mjs +30 -27
  134. app-ng-runtime/components/input/calendar/fesm2022/index.mjs.map +1 -1
  135. app-ng-runtime/components/input/chips/bundles/index.umd.js +29 -28
  136. app-ng-runtime/components/input/chips/chips.component.d.ts +1 -1
  137. app-ng-runtime/components/input/chips/esm2022/chips.component.mjs +27 -25
  138. app-ng-runtime/components/input/chips/fesm2022/index.mjs +26 -24
  139. app-ng-runtime/components/input/chips/fesm2022/index.mjs.map +1 -1
  140. app-ng-runtime/components/input/default/base-form.component.d.ts +3 -3
  141. app-ng-runtime/components/input/default/bundles/index.umd.js +75 -62
  142. app-ng-runtime/components/input/default/checkbox/checkbox.component.d.ts +1 -0
  143. app-ng-runtime/components/input/default/dataset-aware-form.component.d.ts +4 -4
  144. app-ng-runtime/components/input/default/esm2022/base-form.component.mjs +14 -8
  145. app-ng-runtime/components/input/default/esm2022/caption-position.directive.mjs +3 -2
  146. app-ng-runtime/components/input/default/esm2022/checkbox/checkbox.component.mjs +2 -2
  147. app-ng-runtime/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +6 -4
  148. app-ng-runtime/components/input/default/esm2022/dataset-aware-form.component.mjs +29 -23
  149. app-ng-runtime/components/input/default/esm2022/radioset/radioset.component.mjs +4 -3
  150. app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +4 -3
  151. app-ng-runtime/components/input/default/esm2022/switch/switch.component.mjs +6 -5
  152. app-ng-runtime/components/input/default/esm2022/text/base/base-input.mjs +4 -3
  153. app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +20 -18
  154. app-ng-runtime/components/input/default/esm2022/text/text/input-text.component.mjs +2 -2
  155. app-ng-runtime/components/input/default/fesm2022/index.mjs +75 -62
  156. app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
  157. app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +1 -1
  158. app-ng-runtime/components/input/epoch/bundles/index.umd.js +53 -51
  159. app-ng-runtime/components/input/epoch/esm2022/base-date-time.component.mjs +34 -31
  160. app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +5 -4
  161. app-ng-runtime/components/input/epoch/esm2022/date-time/date-time-picker.component.mjs +5 -4
  162. app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +7 -6
  163. app-ng-runtime/components/input/epoch/esm2022/picker/picker.component.mjs +1 -1
  164. app-ng-runtime/components/input/epoch/esm2022/time/time.component.mjs +6 -5
  165. app-ng-runtime/components/input/epoch/fesm2022/index.mjs +48 -45
  166. app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
  167. app-ng-runtime/components/input/file-upload/bundles/index.umd.js +15 -15
  168. app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +13 -12
  169. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +12 -11
  170. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  171. app-ng-runtime/components/input/rating/bundles/index.umd.js +12 -12
  172. app-ng-runtime/components/input/rating/esm2022/rating.component.mjs +10 -9
  173. app-ng-runtime/components/input/rating/fesm2022/index.mjs +9 -8
  174. app-ng-runtime/components/input/rating/fesm2022/index.mjs.map +1 -1
  175. app-ng-runtime/components/navigation/breadcrumb/bundles/index.umd.js +1 -1
  176. app-ng-runtime/components/navigation/breadcrumb/esm2022/breadcrumb.component.mjs +2 -2
  177. app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs +1 -1
  178. app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
  179. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +23 -22
  180. app-ng-runtime/components/navigation/menu/esm2022/menu-adapator.component.mjs +3 -2
  181. app-ng-runtime/components/navigation/menu/esm2022/menu-dropdown-item/menu-dropdown-item.component.mjs +6 -5
  182. app-ng-runtime/components/navigation/menu/esm2022/menu.component.mjs +8 -7
  183. app-ng-runtime/components/navigation/menu/esm2022/nav/nav.component.mjs +10 -8
  184. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs +20 -18
  185. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  186. app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +12 -1
  187. app-ng-runtime/components/navigation/popover/esm2022/popover.component.mjs +1 -1
  188. app-ng-runtime/components/navigation/popover/fesm2022/index.mjs.map +1 -1
  189. app-ng-runtime/components/prefab/bundles/index.umd.js +6 -6
  190. app-ng-runtime/components/prefab/esm2022/prefab-container/prefab-container.directive.mjs +3 -2
  191. app-ng-runtime/components/prefab/esm2022/prefab.directive.mjs +3 -2
  192. app-ng-runtime/components/prefab/fesm2022/index.mjs +3 -2
  193. app-ng-runtime/components/prefab/fesm2022/index.mjs.map +1 -1
  194. app-ng-runtime/core/bundles/index.umd.js +119 -130
  195. app-ng-runtime/core/esm2022/public_api.mjs +2 -2
  196. app-ng-runtime/core/esm2022/services/field-type.service.mjs +3 -2
  197. app-ng-runtime/core/esm2022/services/field-widget.service.mjs +3 -2
  198. app-ng-runtime/core/esm2022/services/pagination.service.mjs +7 -6
  199. app-ng-runtime/core/esm2022/services/state-persistence.service.mjs +17 -16
  200. app-ng-runtime/core/esm2022/services/utils.service.mjs +3 -2
  201. app-ng-runtime/core/esm2022/services/viewport.service.mjs +3 -2
  202. app-ng-runtime/core/esm2022/utils/build-utils.mjs +5 -4
  203. app-ng-runtime/core/esm2022/utils/expression-parser.mjs +5 -4
  204. app-ng-runtime/core/esm2022/utils/lru-cache.mjs +3 -2
  205. app-ng-runtime/core/esm2022/utils/utils.mjs +79 -82
  206. app-ng-runtime/core/esm2022/utils/watcher.mjs +9 -7
  207. app-ng-runtime/core/fesm2022/index.mjs +117 -123
  208. app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
  209. app-ng-runtime/core/public_api.d.ts +1 -1
  210. app-ng-runtime/core/services/pagination.service.d.ts +1 -1
  211. app-ng-runtime/core/utils/utils.d.ts +5 -9
  212. app-ng-runtime/http/bundles/index.umd.js +7 -7
  213. app-ng-runtime/http/esm2022/http.service.mjs +5 -4
  214. app-ng-runtime/http/esm2022/wm-http-request.mjs +1 -1
  215. app-ng-runtime/http/esm2022/wm-http-response.mjs +1 -1
  216. app-ng-runtime/http/fesm2022/index.mjs +4 -3
  217. app-ng-runtime/http/fesm2022/index.mjs.map +1 -1
  218. app-ng-runtime/mobile/components/basic/default/bundles/index.umd.js +24 -20
  219. app-ng-runtime/mobile/components/basic/default/esm2022/anchor/anchor.directive.mjs +5 -4
  220. app-ng-runtime/mobile/components/basic/default/esm2022/file-browser/file-browser.component.mjs +12 -8
  221. app-ng-runtime/mobile/components/basic/default/esm2022/file-browser/file-selector.service.mjs +5 -3
  222. app-ng-runtime/mobile/components/basic/default/esm2022/image-cache/image-cache.directive.mjs +3 -2
  223. app-ng-runtime/mobile/components/basic/default/esm2022/process-manager/process-manager.component.mjs +5 -4
  224. app-ng-runtime/mobile/components/basic/default/fesm2022/index.mjs +21 -16
  225. app-ng-runtime/mobile/components/basic/default/fesm2022/index.mjs.map +1 -1
  226. app-ng-runtime/mobile/components/containers/segmented-control/bundles/index.umd.js +7 -7
  227. app-ng-runtime/mobile/components/containers/segmented-control/esm2022/segment-content/segment-content.component.mjs +2 -2
  228. app-ng-runtime/mobile/components/containers/segmented-control/esm2022/segmented-control.component.mjs +4 -3
  229. app-ng-runtime/mobile/components/containers/segmented-control/fesm2022/index.mjs +4 -3
  230. app-ng-runtime/mobile/components/containers/segmented-control/fesm2022/index.mjs.map +1 -1
  231. app-ng-runtime/mobile/components/data/media-list/bundles/index.umd.js +8 -8
  232. app-ng-runtime/mobile/components/data/media-list/esm2022/media-list.component.mjs +4 -3
  233. app-ng-runtime/mobile/components/data/media-list/fesm2022/index.mjs +3 -2
  234. app-ng-runtime/mobile/components/data/media-list/fesm2022/index.mjs.map +1 -1
  235. app-ng-runtime/mobile/components/page/default/bundles/index.umd.js +5 -5
  236. app-ng-runtime/mobile/components/page/default/esm2022/page.directive.mjs +3 -2
  237. app-ng-runtime/mobile/components/page/default/fesm2022/index.mjs +2 -1
  238. app-ng-runtime/mobile/components/page/default/fesm2022/index.mjs.map +1 -1
  239. app-ng-runtime/mobile/components/page/tab-bar/bundles/index.umd.js +9 -9
  240. app-ng-runtime/mobile/components/page/tab-bar/esm2022/tabbar.component.mjs +7 -6
  241. app-ng-runtime/mobile/components/page/tab-bar/fesm2022/index.mjs +6 -5
  242. app-ng-runtime/mobile/components/page/tab-bar/fesm2022/index.mjs.map +1 -1
  243. app-ng-runtime/mobile/core/bundles/index.umd.js +25 -25
  244. app-ng-runtime/mobile/core/esm2022/services/device-file-download.service.mjs +5 -4
  245. app-ng-runtime/mobile/core/esm2022/services/device-file-opener.service.mjs +3 -2
  246. app-ng-runtime/mobile/core/esm2022/services/device-file-upload.service.mjs +4 -3
  247. app-ng-runtime/mobile/core/esm2022/services/device-file.service.mjs +6 -5
  248. app-ng-runtime/mobile/core/esm2022/services/device.service.mjs +3 -2
  249. app-ng-runtime/mobile/core/esm2022/services/ext-app-message.service.mjs +5 -4
  250. app-ng-runtime/mobile/core/esm2022/services/network.service.mjs +9 -8
  251. app-ng-runtime/mobile/core/fesm2022/index.mjs +22 -21
  252. app-ng-runtime/mobile/core/fesm2022/index.mjs.map +1 -1
  253. app-ng-runtime/mobile/core/services/ext-app-message.service.d.ts +1 -1
  254. app-ng-runtime/mobile/core/services/network.service.d.ts +7 -1
  255. app-ng-runtime/mobile/offline/bundles/index.umd.js +161 -144
  256. app-ng-runtime/mobile/offline/esm2022/models/local-db-store.mjs +23 -21
  257. app-ng-runtime/mobile/offline/esm2022/services/change-log.service.mjs +7 -6
  258. app-ng-runtime/mobile/offline/esm2022/services/local-db-data-pull.service.mjs +37 -35
  259. app-ng-runtime/mobile/offline/esm2022/services/local-db-management.service.mjs +54 -45
  260. app-ng-runtime/mobile/offline/esm2022/services/local-db.service.mjs +5 -4
  261. app-ng-runtime/mobile/offline/esm2022/services/workers/error-blocker.mjs +4 -3
  262. app-ng-runtime/mobile/offline/esm2022/services/workers/file-handler.mjs +18 -13
  263. app-ng-runtime/mobile/offline/esm2022/services/workers/multi-part-param-transformer.mjs +9 -5
  264. app-ng-runtime/mobile/offline/esm2022/utils/live-variable.utils.mjs +12 -11
  265. app-ng-runtime/mobile/offline/esm2022/utils/query-executor.utils.mjs +5 -4
  266. app-ng-runtime/mobile/offline/esm2022/utils/security.utils.mjs +3 -2
  267. app-ng-runtime/mobile/offline/fesm2022/index.mjs +156 -138
  268. app-ng-runtime/mobile/offline/fesm2022/index.mjs.map +1 -1
  269. app-ng-runtime/mobile/runtime/bundles/index.umd.js +11 -8
  270. app-ng-runtime/mobile/runtime/esm2022/mobile-runtime.module.mjs +3 -2
  271. app-ng-runtime/mobile/runtime/esm2022/services/cookie.service.mjs +6 -2
  272. app-ng-runtime/mobile/runtime/esm2022/services/http-interceptor.service.mjs +4 -3
  273. app-ng-runtime/mobile/runtime/fesm2022/index.mjs +8 -4
  274. app-ng-runtime/mobile/runtime/fesm2022/index.mjs.map +1 -1
  275. app-ng-runtime/mobile/runtime-dynamic/bundles/index.umd.js +2 -2
  276. app-ng-runtime/mobile/runtime-dynamic/esm2022/services/live-sync.service.mjs +3 -3
  277. app-ng-runtime/mobile/runtime-dynamic/fesm2022/index.mjs +2 -2
  278. app-ng-runtime/mobile/runtime-dynamic/fesm2022/index.mjs.map +1 -1
  279. app-ng-runtime/mobile/variables/bundles/index.umd.js +23 -16
  280. app-ng-runtime/mobile/variables/esm2022/services/camera-service.mjs +2 -2
  281. app-ng-runtime/mobile/variables/esm2022/services/datasync-service.mjs +10 -9
  282. app-ng-runtime/mobile/variables/esm2022/services/file-service.mjs +11 -3
  283. app-ng-runtime/mobile/variables/fesm2022/index.mjs +19 -11
  284. app-ng-runtime/mobile/variables/fesm2022/index.mjs.map +1 -1
  285. app-ng-runtime/oAuth/bundles/index.umd.js +12 -12
  286. app-ng-runtime/oAuth/esm2022/oAuth.service.mjs +4 -3
  287. app-ng-runtime/oAuth/esm2022/oAuth.utils.mjs +8 -7
  288. app-ng-runtime/oAuth/fesm2022/index.mjs +9 -8
  289. app-ng-runtime/oAuth/fesm2022/index.mjs.map +1 -1
  290. app-ng-runtime/package.json +1 -1
  291. app-ng-runtime/runtime/base/bundles/index.umd.js +121 -120
  292. app-ng-runtime/runtime/base/esm2022/components/base-layout.component.mjs +4 -3
  293. app-ng-runtime/runtime/base/esm2022/components/base-page.component.mjs +14 -13
  294. app-ng-runtime/runtime/base/esm2022/components/base-partial.component.mjs +13 -12
  295. app-ng-runtime/runtime/base/esm2022/components/base-prefab.component.mjs +15 -14
  296. app-ng-runtime/runtime/base/esm2022/components/base-spa-page.component.mjs +14 -13
  297. app-ng-runtime/runtime/base/esm2022/components/custom-toaster.component.mjs +6 -5
  298. app-ng-runtime/runtime/base/esm2022/directives/accessroles.directive.mjs +11 -10
  299. app-ng-runtime/runtime/base/esm2022/guards/page-not-found.guard.mjs +1 -1
  300. app-ng-runtime/runtime/base/esm2022/guards/role.guard.mjs +3 -2
  301. app-ng-runtime/runtime/base/esm2022/services/app-defaults.service.mjs +1 -1
  302. app-ng-runtime/runtime/base/esm2022/services/app.manager.service.mjs +17 -14
  303. app-ng-runtime/runtime/base/esm2022/services/app.service.mjs +7 -6
  304. app-ng-runtime/runtime/base/esm2022/services/dynamic-component-ref-provider.service.mjs +3 -2
  305. app-ng-runtime/runtime/base/esm2022/services/http-interceptor.services.mjs +4 -3
  306. app-ng-runtime/runtime/base/esm2022/services/i18n.service.mjs +12 -10
  307. app-ng-runtime/runtime/base/esm2022/services/navigation.service.mjs +8 -7
  308. app-ng-runtime/runtime/base/esm2022/services/prefab-manager.service.mjs +3 -2
  309. app-ng-runtime/runtime/base/esm2022/services/spinner.service.mjs +7 -6
  310. app-ng-runtime/runtime/base/esm2022/services/toaster.service.mjs +6 -5
  311. app-ng-runtime/runtime/base/esm2022/util/wm-route-reuse-strategy.mjs +6 -7
  312. app-ng-runtime/runtime/base/fesm2022/index.mjs +119 -117
  313. app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
  314. app-ng-runtime/runtime/base/services/i18n.service.d.ts +1 -1
  315. app-ng-runtime/runtime/dynamic/bundles/index.umd.js +7 -7
  316. app-ng-runtime/runtime/dynamic/esm2022/app/services/component-ref-provider.service.mjs +4 -3
  317. app-ng-runtime/runtime/dynamic/esm2022/main.mjs +3 -2
  318. app-ng-runtime/runtime/dynamic/fesm2022/index.mjs +4 -3
  319. app-ng-runtime/runtime/dynamic/fesm2022/index.mjs.map +1 -1
  320. app-ng-runtime/scripts/jquery-ui/ui/widgets/droppable.js +7 -7
  321. app-ng-runtime/scripts/jquery-ui/ui/widgets/resizable.js +13 -10
  322. app-ng-runtime/scripts/jquery-ui/ui/widgets/sortable.js +7 -7
  323. app-ng-runtime/security/bundles/index.umd.js +14 -14
  324. app-ng-runtime/security/esm2022/security.service.mjs +12 -11
  325. app-ng-runtime/security/fesm2022/index.mjs +11 -10
  326. app-ng-runtime/security/fesm2022/index.mjs.map +1 -1
  327. app-ng-runtime/security/security.service.d.ts +1 -1
  328. app-ng-runtime/swipey/esm2022/swipe.animation.mjs +1 -1
  329. app-ng-runtime/swipey/fesm2022/index.mjs.map +1 -1
  330. app-ng-runtime/transpiler/bundles/index.umd.js +10 -9
  331. app-ng-runtime/transpiler/esm2022/build.mjs +8 -6
  332. app-ng-runtime/transpiler/fesm2022/index.mjs +7 -5
  333. app-ng-runtime/transpiler/fesm2022/index.mjs.map +1 -1
  334. app-ng-runtime/variables/bundles/index.umd.js +155 -145
  335. app-ng-runtime/variables/esm2022/manager/action/login-action.manager.mjs +15 -14
  336. app-ng-runtime/variables/esm2022/manager/action/notification-action.manager.mjs +9 -8
  337. app-ng-runtime/variables/esm2022/manager/variable/base-variable.manager.mjs +3 -2
  338. app-ng-runtime/variables/esm2022/manager/variable/web-socket-variable.manager.mjs +11 -10
  339. app-ng-runtime/variables/esm2022/service/variables.service.mjs +7 -6
  340. app-ng-runtime/variables/esm2022/util/action/navigation-action.utils.mjs +4 -4
  341. app-ng-runtime/variables/esm2022/util/variable/pagination.utils.mjs +30 -23
  342. app-ng-runtime/variables/esm2022/util/variable/service-variable.utils.mjs +29 -28
  343. app-ng-runtime/variables/esm2022/util/variable/variables.utils.mjs +75 -70
  344. app-ng-runtime/variables/fesm2022/index.mjs +169 -158
  345. app-ng-runtime/variables/fesm2022/index.mjs.map +1 -1
  346. app-ng-runtime/variables/util/variable/service-variable.utils.d.ts +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@awesome-cordova-plugins/file/ngx'), require('@wm/core'), require('@wm/mobile/core'), require('@wm/security'), require('@awesome-cordova-plugins/app-version/ngx'), require('@awesome-cordova-plugins/sqlite/ngx'), require('@wm/variables'), require('rxjs'), require('@wavemaker/variables')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', '@awesome-cordova-plugins/file/ngx', '@wm/core', '@wm/mobile/core', '@wm/security', '@awesome-cordova-plugins/app-version/ngx', '@awesome-cordova-plugins/sqlite/ngx', '@wm/variables', 'rxjs', '@wavemaker/variables'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.mobile = global.wm.mobile || {}, global.wm.mobile.offline = {}), global.ng.core, global.ng.common, global.awesomeCordova.plugins, global.wm.core, global.wm.mobile.core, global.wm.security, global.awesomeCordova.plugins, global.awesomeCordova.plugins, global.wm.variables, global.rxjs, global.wm_common_variables));
5
- })(this, (function (exports, i0, common, i3$1, i1$1, i3, i5, i1, i6, variables, rxjs, variables$1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@awesome-cordova-plugins/file/ngx'), require('@wm/core'), require('@wm/mobile/core'), require('@wm/security'), require('@awesome-cordova-plugins/app-version/ngx'), require('@awesome-cordova-plugins/sqlite/ngx'), require('@wm/variables'), require('lodash-es'), require('rxjs'), require('@wavemaker/variables')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', '@awesome-cordova-plugins/file/ngx', '@wm/core', '@wm/mobile/core', '@wm/security', '@awesome-cordova-plugins/app-version/ngx', '@awesome-cordova-plugins/sqlite/ngx', '@wm/variables', 'lodash-es', 'rxjs', '@wavemaker/variables'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.mobile = global.wm.mobile || {}, global.wm.mobile.offline = {}), global.ng.core, global.ng.common, global.awesomeCordova.plugins, global.wm.core, global.wm.mobile.core, global.wm.security, global.awesomeCordova.plugins, global.awesomeCordova.plugins, global.wm.variables, global._, global.rxjs, global.wm_common_variables));
5
+ })(this, (function (exports, i0, common, i3$1, i1$1, i3, i5, i1, i6, variables, lodashEs, rxjs, variables$1) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -124,7 +124,7 @@
124
124
 
125
125
  const insertRecordSqlTemplate = (schema) => {
126
126
  const columnNames = [], placeHolder = [];
127
- _.forEach(schema.columns, col => {
127
+ lodashEs.forEach(schema.columns, col => {
128
128
  columnNames.push(escapeName(col.name));
129
129
  placeHolder.push('?');
130
130
  });
@@ -132,14 +132,14 @@
132
132
  };
133
133
  const replaceRecordSqlTemplate = (schema) => {
134
134
  const columnNames = [], placeHolder = [];
135
- _.forEach(schema.columns, col => {
135
+ lodashEs.forEach(schema.columns, col => {
136
136
  columnNames.push(escapeName(col.name));
137
137
  placeHolder.push('?');
138
138
  });
139
139
  return `REPLACE INTO ${escapeName(schema.name)} (${columnNames.join(',')}) VALUES (${placeHolder.join(',')})`;
140
140
  };
141
141
  const deleteRecordTemplate = (schema) => {
142
- const primaryKeyField = _.find(schema.columns, 'primaryKey');
142
+ const primaryKeyField = lodashEs.find(schema.columns, 'primaryKey');
143
143
  if (primaryKeyField) {
144
144
  return `DELETE FROM ${escapeName(schema.name)} WHERE ${escapeName(primaryKeyField.name)} = ?`;
145
145
  }
@@ -153,7 +153,7 @@
153
153
  if (col.foreignRelations) {
154
154
  col.foreignRelations.forEach(foreignRelation => {
155
155
  childTableName = foreignRelation.sourceFieldName;
156
- _.forEach(foreignRelation.dataMapper, (childCol, childFiledName) => {
156
+ lodashEs.forEach(foreignRelation.dataMapper, (childCol, childFiledName) => {
157
157
  columns.push(childTableName + '.' + escapeName(childCol.name) + ' as \'' + childFiledName + '\'');
158
158
  });
159
159
  joins.push(` LEFT JOIN ${escapeName(foreignRelation.targetTable)} ${childTableName}
@@ -180,7 +180,7 @@
180
180
  const generateWherClause = (store, filterCriteria) => {
181
181
  let conditions;
182
182
  const fieldToColumnMapping = store.fieldToColumnMapping, tableName = store.entitySchema.name;
183
- if (!_.isEmpty(filterCriteria) && _.isString(filterCriteria)) {
183
+ if (!lodashEs.isEmpty(filterCriteria) && lodashEs.isString(filterCriteria)) {
184
184
  return ' WHERE ' + filterCriteria;
185
185
  }
186
186
  if (filterCriteria) {
@@ -212,8 +212,8 @@
212
212
  };
213
213
  const generateOrderByClause = (store, sort) => {
214
214
  if (sort) {
215
- return ' ORDER BY ' + _.map(sort.split(','), field => {
216
- const splits = _.trim(field).split(' ');
215
+ return ' ORDER BY ' + lodashEs.map(sort.split(','), field => {
216
+ const splits = lodashEs.trim(field).split(' ');
217
217
  splits[0] = escapeName(store.entitySchema.name) + '.' + escapeName(store.fieldToColumnMapping[splits[0]]);
218
218
  return splits.join(' ');
219
219
  }).join(',');
@@ -230,7 +230,7 @@
230
230
  if (col.foreignRelations) {
231
231
  col.foreignRelations.forEach(foreignRelation => {
232
232
  let childEntity = null;
233
- _.forEach(foreignRelation.dataMapper, function (childCol, childFieldName) {
233
+ lodashEs.forEach(foreignRelation.dataMapper, function (childCol, childFieldName) {
234
234
  const fieldValue = dataObj[childFieldName];
235
235
  if (i1$1.isDefined(fieldValue) && fieldValue !== null && fieldValue !== '') {
236
236
  childEntity = childEntity || {};
@@ -241,7 +241,7 @@
241
241
  dataObj[foreignRelation.sourceFieldName] = childEntity;
242
242
  });
243
243
  }
244
- else if (col.sqlType === 'boolean' && !_.isNil(val)) {
244
+ else if (col.sqlType === 'boolean' && !lodashEs.isNil(val)) {
245
245
  dataObj[col.fieldName] = (val === 1);
246
246
  }
247
247
  });
@@ -258,7 +258,7 @@
258
258
  return false;
259
259
  });
260
260
  }
261
- if (_.isNil(value)) {
261
+ if (lodashEs.isNil(value)) {
262
262
  return col.defaultValue;
263
263
  }
264
264
  else if (col.sqlType === 'boolean') {
@@ -281,14 +281,14 @@
281
281
  this.localDbManagementService = localDbManagementService;
282
282
  this.sqliteObject = sqliteObject;
283
283
  this.fieldToColumnMapping = {};
284
- this.primaryKeyField = _.find(this.entitySchema.columns, 'primaryKey');
284
+ this.primaryKeyField = lodashEs.find(this.entitySchema.columns, 'primaryKey');
285
285
  this.primaryKeyName = this.primaryKeyField ? this.primaryKeyField.fieldName : undefined;
286
286
  this.entitySchema.columns.forEach(c => {
287
287
  this.fieldToColumnMapping[c.fieldName] = c.name;
288
288
  if (c.foreignRelations) {
289
289
  c.foreignRelations.forEach(foreignRelation => {
290
290
  this.fieldToColumnMapping[foreignRelation.targetPath] = c.name;
291
- _.forEach(foreignRelation.dataMapper, (childCol, childFieldName) => {
291
+ lodashEs.forEach(foreignRelation.dataMapper, (childCol, childFieldName) => {
292
292
  this.fieldToColumnMapping[childFieldName] = foreignRelation.sourceFieldName + '.' + childCol.name;
293
293
  });
294
294
  });
@@ -304,7 +304,7 @@
304
304
  if (this.primaryKeyName) {
305
305
  const idValue = entity[this.primaryKeyName];
306
306
  if (this.primaryKeyField.sqlType === 'number'
307
- && (!i1$1.isDefined(idValue) || (_.isString(idValue) && _.isEmpty(_.trim(idValue))))) {
307
+ && (!i1$1.isDefined(idValue) || (lodashEs.isString(idValue) && lodashEs.isEmpty(lodashEs.trim(idValue))))) {
308
308
  if (this.primaryKeyField.generatorType === 'identity') {
309
309
  // updating the id with the latest id obtained from nextId.
310
310
  entity[this.primaryKeyName] = this.localDbManagementService.nextIdCount();
@@ -433,8 +433,8 @@
433
433
  */
434
434
  saveAll(entities) {
435
435
  // filtering the null entities
436
- entities = _.filter(entities, null);
437
- const queries = _.map(entities, entity => {
436
+ entities = lodashEs.filter(entities, null);
437
+ const queries = lodashEs.map(entities, entity => {
438
438
  const rowData = mapObjToRow(this, entity);
439
439
  const params = this.entitySchema.columns.map(f => rowData[f.name]);
440
440
  return [this.replaceRecordSqlTemplate, params];
@@ -473,13 +473,13 @@
473
473
  * Converts form data object to map for storing request in local database..
474
474
  */
475
475
  serializeFormDataToMap(formData) {
476
- const blobColumns = _.filter(this.entitySchema.columns, {
476
+ const blobColumns = lodashEs.filter(this.entitySchema.columns, {
477
477
  'sqlType': 'blob'
478
478
  }), promises = [];
479
479
  let map = {};
480
480
  if (formData && typeof formData.append === 'function' && formData.rowData) {
481
- _.forEach(formData.rowData, (fieldData, fieldName) => {
482
- if (fieldData && _.find(blobColumns, { 'fieldName': fieldName })) {
481
+ lodashEs.forEach(formData.rowData, (fieldData, fieldName) => {
482
+ if (fieldData && lodashEs.find(blobColumns, { 'fieldName': fieldName })) {
483
483
  promises.push(this.saveBlobToFile(fieldData).then(localFile => {
484
484
  map[fieldName] = localFile;
485
485
  }));
@@ -499,7 +499,7 @@
499
499
  */
500
500
  deserializeMapToFormData(map) {
501
501
  const formData = new FormData(), blobColumns = this.entitySchema.columns.filter(c => c.sqlType === 'blob'), promises = [];
502
- _.forEach(blobColumns, column => {
502
+ lodashEs.forEach(blobColumns, column => {
503
503
  const value = map[column.fieldName];
504
504
  if (value && value.wmLocalPath) {
505
505
  promises.push(i1$1.convertToBlob(value.wmLocalPath)
@@ -513,7 +513,8 @@
513
513
  return Promise.all(promises).then(() => formData);
514
514
  }
515
515
  createTableSql(schema) {
516
- const fieldStr = _.reduce(schema.columns, (result, f) => {
516
+ // @ts-ignore
517
+ const fieldStr = lodashEs.reduce(schema.columns, (result, f) => {
517
518
  let str = escapeName(f.name);
518
519
  if (f.primaryKey) {
519
520
  if (f.sqlType === 'number' && f.generatorType === 'databaseIdentity') {
@@ -655,7 +656,8 @@
655
656
  return new Promise((resolve, reject) => {
656
657
  // Before closing databases, give some time for the pending transactions (if any).
657
658
  setTimeout(() => {
658
- const closePromises = _.map(_.values(this.databases), db => db.sqliteObject.close());
659
+ // @ts-ignore
660
+ const closePromises = lodashEs.map(lodashEs.values(this.databases), db => db.sqliteObject.close());
659
661
  Promise.all(closePromises).then(resolve, reject);
660
662
  }, 1000);
661
663
  });
@@ -679,14 +681,14 @@
679
681
  return Promise.reject(`Query by name ' ${queryName} ' Not Found`);
680
682
  }
681
683
  queryData = this.databases[dbName].queries[queryName];
682
- paramPromises = _.chain(queryData.params)
684
+ paramPromises = lodashEs.chain(queryData.params)
683
685
  .filter(p => p.variableType !== 'PROMPT')
684
686
  .forEach(p => {
685
687
  const paramValue = this.systemProperties[p.variableType].value(p.name, params);
686
688
  return i1$1.toPromise(paramValue).then(v => params[p.name] = v);
687
689
  }).value();
688
690
  return Promise.all(paramPromises).then(() => {
689
- params = _.map(queryData.params, p => {
691
+ params = lodashEs.map(queryData.params, p => {
690
692
  // Sqlite will accept DateTime value as below format.
691
693
  if (typeof params[p.name] !== 'string'
692
694
  && (p.type === i1$1.DataType.DATETIME || p.type === i1$1.DataType.LOCALDATETIME)) {
@@ -701,18 +703,18 @@
701
703
  return this.executeSQLQuery(dbName, queryData.query, params)
702
704
  .then(result => {
703
705
  let firstRow, needTransform;
704
- if (!_.isEmpty(result.rows)) {
706
+ if (!lodashEs.isEmpty(result.rows)) {
705
707
  firstRow = result.rows[0];
706
- needTransform = _.find(queryData.response.properties, p => !firstRow.hasOwnProperty(p.fieldName));
707
- if (!_.isUndefined(needTransform)) {
708
- result.rows = _.map(result.rows, row => {
708
+ needTransform = lodashEs.find(queryData.response.properties, p => !firstRow.hasOwnProperty(p.fieldName));
709
+ if (!lodashEs.isUndefined(needTransform)) {
710
+ result.rows = lodashEs.map(result.rows, row => {
709
711
  const transformedRow = {}, rowWithUpperKeys = {};
710
712
  // This is to make search for data as case-insensitive
711
- _.forEach(row, (v, k) => rowWithUpperKeys[k.toUpperCase()] = v);
712
- _.forEach(queryData.response.properties, p => {
713
+ lodashEs.forEach(row, (v, k) => rowWithUpperKeys[k.toUpperCase()] = v);
714
+ lodashEs.forEach(queryData.response.properties, p => {
713
715
  // format the value depending on the typeRef specified in properties.
714
716
  const propType = i1$1.extractType(p.fieldType.typeRef);
715
- i1$1.DEFAULT_FORMATS[_.toUpper(propType)];
717
+ i1$1.DEFAULT_FORMATS[lodashEs.toUpper(propType)];
716
718
  const fieldVal = row[p.name];
717
719
  if (fieldVal && typeof fieldVal !== 'string'
718
720
  && (propType === i1$1.DataType.DATETIME || propType === i1$1.DataType.LOCALDATETIME || propType === i1$1.DataType.DATE)) {
@@ -746,7 +748,7 @@
746
748
  */
747
749
  exportDB() {
748
750
  return new Promise((resolve, reject) => {
749
- const folderToExport = 'offline_temp_' + _.now(), folderToExportFullPath = cordova.file.cacheDirectory + folderToExport + '/', zipFileName = '_offline_data.zip', metaInfo = {
751
+ const folderToExport = 'offline_temp_' + lodashEs.now(), folderToExportFullPath = cordova.file.cacheDirectory + folderToExport + '/', zipFileName = '_offline_data.zip', metaInfo = {
750
752
  app: null,
751
753
  OS: '',
752
754
  createdOn: 0
@@ -776,7 +778,7 @@
776
778
  else if (i1$1.isAndroid()) {
777
779
  metaInfo.OS = 'ANDROID';
778
780
  }
779
- metaInfo.createdOn = _.now();
781
+ metaInfo.createdOn = lodashEs.now();
780
782
  return metaInfo;
781
783
  }).then(() => i1$1.executePromiseChain(this.getCallbacksFor('preExport'), [folderToExportFullPath, metaInfo]))
782
784
  .then(() => {
@@ -829,7 +831,7 @@
829
831
  */
830
832
  importDB(zipPath, revertIfFails) {
831
833
  return new Promise((resolve, reject) => {
832
- const importFolder = 'offline_temp_' + _.now(), importFolderFullPath = cordova.file.cacheDirectory + importFolder + '/';
834
+ const importFolder = 'offline_temp_' + lodashEs.now(), importFolderFullPath = cordova.file.cacheDirectory + importFolder + '/';
833
835
  let zipMeta;
834
836
  // Create a temporary folder to unzip the contents of the zip.
835
837
  this.file.createDir(cordova.file.cacheDirectory, importFolder, false)
@@ -949,7 +951,7 @@
949
951
  .then(metadata => this.loadNamedQueries(metadata))
950
952
  .then(metadata => this.loadOfflineConfig(metadata))
951
953
  .then(metadata => {
952
- return Promise.all(_.map(metadata, dbMetadata => {
954
+ return Promise.all(lodashEs.map(metadata, dbMetadata => {
953
955
  return this.openDatabase(dbMetadata)
954
956
  .then(database => {
955
957
  this.databases[dbMetadata.schema.name] = database;
@@ -968,9 +970,9 @@
968
970
  .then(() => this.disableForeignKeys())
969
971
  .then(() => this.deviceService.getAppBuildTime())
970
972
  .then(dbSeedCreationTime => {
971
- return i1$1.executePromiseChain(_.map(this.callbacks, 'onDbCreate'), [{
973
+ return i1$1.executePromiseChain(lodashEs.map(this.callbacks, 'onDbCreate'), [{
972
974
  'databases': this.databases,
973
- 'dbCreatedOn': _.now(),
975
+ 'dbCreatedOn': lodashEs.now(),
974
976
  'dbSeedCreatedOn': dbSeedCreationTime
975
977
  }]);
976
978
  }).then(() => this.databases);
@@ -1030,13 +1032,13 @@
1030
1032
  let defaultValue = col.columnValue ? col.columnValue.defaultValue : '';
1031
1033
  const type = col.sqlType;
1032
1034
  if (type === 'number' && !col.primaryKey) {
1033
- defaultValue = _.isEmpty(defaultValue) ? null : _.parseInt(defaultValue);
1035
+ defaultValue = lodashEs.isEmpty(defaultValue) ? null : lodashEs.parseInt(defaultValue);
1034
1036
  }
1035
1037
  else if (type === 'boolean') {
1036
- defaultValue = _.isEmpty(defaultValue) ? null : (defaultValue === 'true' ? 1 : 0);
1038
+ defaultValue = lodashEs.isEmpty(defaultValue) ? null : (defaultValue === 'true' ? 1 : 0);
1037
1039
  }
1038
1040
  else {
1039
- defaultValue = _.isEmpty(defaultValue) ? null : defaultValue;
1041
+ defaultValue = lodashEs.isEmpty(defaultValue) ? null : defaultValue;
1040
1042
  }
1041
1043
  reqEntity.columns.push({
1042
1044
  name: col['name'],
@@ -1047,10 +1049,10 @@
1047
1049
  defaultValue: defaultValue
1048
1050
  });
1049
1051
  });
1050
- _.forEach(entity.relations, r => {
1052
+ lodashEs.forEach(entity.relations, r => {
1051
1053
  let targetEntitySchema, targetEntity, col, sourceColumn, mapping;
1052
1054
  if (r.cardinality === 'ManyToOne' || r.cardinality === 'OneToOne') {
1053
- targetEntity = _.find(schema.tables, t => t.name === r.targetTable);
1055
+ targetEntity = lodashEs.find(schema.tables, t => t.name === r.targetTable);
1054
1056
  mapping = r.mappings[0];
1055
1057
  if (targetEntity) {
1056
1058
  targetEntity = targetEntity.entityName;
@@ -1067,7 +1069,8 @@
1067
1069
  targetFieldName: targetEntitySchema.columns.find(column => column.name === mapping.targetColumn).fieldName
1068
1070
  };
1069
1071
  foreignRelation.targetPath = foreignRelation.sourceFieldName + '.' + foreignRelation.targetFieldName;
1070
- foreignRelation.dataMapper = _.chain(targetEntitySchema.columns)
1072
+ // @ts-ignore
1073
+ foreignRelation.dataMapper = lodashEs.chain(targetEntitySchema.columns)
1071
1074
  .keyBy(childCol => foreignRelation.sourceFieldName + '.' + childCol.fieldName)
1072
1075
  .mapValues(childCol => new ColumnInfo(childCol.name, childCol.fieldName)).value();
1073
1076
  col.foreignRelations = col.foreignRelations || [];
@@ -1080,25 +1083,25 @@
1080
1083
  // Loads necessary details of queries
1081
1084
  compactQueries(queriesByDB) {
1082
1085
  const queries = new Map();
1083
- _.forEach(queriesByDB.queries, queryData => {
1086
+ lodashEs.forEach(queriesByDB.queries, queryData => {
1084
1087
  let query, params;
1085
1088
  if (queryData.nativeSql && queryData.type === 'SELECT') {
1086
- query = _.isEmpty(queryData.offlineQueryString) ? queryData.queryString : queryData.offlineQueryString;
1087
- params = _.map(this.extractQueryParams(query), p => {
1088
- const paramObj = _.find(queryData.parameters, { 'name': p });
1089
+ query = lodashEs.isEmpty(queryData.offlineQueryString) ? queryData.queryString : queryData.offlineQueryString;
1090
+ params = lodashEs.map(this.extractQueryParams(query), p => {
1091
+ const paramObj = lodashEs.find(queryData.parameters, { 'name': p });
1089
1092
  return {
1090
1093
  name: paramObj.name,
1091
1094
  type: paramObj.type,
1092
1095
  variableType: paramObj.variableType
1093
1096
  };
1094
1097
  });
1095
- params.forEach(p => query = _.replace(query, ':' + p.name, '?'));
1098
+ params.forEach(p => query = lodashEs.replace(query, ':' + p.name, '?'));
1096
1099
  queries[queryData.name] = {
1097
1100
  name: queryData.name,
1098
1101
  query: query,
1099
1102
  params: params,
1100
1103
  response: {
1101
- properties: _.map(queryData.response.properties, p => {
1104
+ properties: lodashEs.map(queryData.response.properties, p => {
1102
1105
  p.nameInUpperCase = p.name.toUpperCase();
1103
1106
  return p;
1104
1107
  })
@@ -1124,7 +1127,7 @@
1124
1127
  return dbInfo;
1125
1128
  }
1126
1129
  convertBoolToInt(bool) {
1127
- return _.toString(bool) === 'true' ? 1 : 0;
1130
+ return lodashEs.toString(bool) === 'true' ? 1 : 0;
1128
1131
  }
1129
1132
  convertIntToBool(int) {
1130
1133
  return int ? true : false;
@@ -1134,7 +1137,8 @@
1134
1137
  * @returns {*}
1135
1138
  */
1136
1139
  disableForeignKeys() {
1137
- return Promise.all(_.map(this.databases, db => this.executeSQLQuery(db.schema.name, 'PRAGMA foreign_keys = OFF')));
1140
+ // @ts-ignore
1141
+ return Promise.all(lodashEs.map(this.databases, db => this.executeSQLQuery(db.schema.name, 'PRAGMA foreign_keys = OFF')));
1138
1142
  }
1139
1143
  /**
1140
1144
  * Executes SQL query;
@@ -1217,7 +1221,7 @@
1217
1221
  getMetaInfo(fileNameRegex) {
1218
1222
  const folder = cordova.file.applicationDirectory + META_LOCATION + '/';
1219
1223
  return this.deviceFileService.listFiles(folder, fileNameRegex)
1220
- .then(files => Promise.all(_.map(files, f => {
1224
+ .then(files => Promise.all(lodashEs.map(files, f => {
1221
1225
  return new Promise((resolve, reject) => {
1222
1226
  // Cordova File reader has buffer issues with large files.
1223
1227
  // so, using ajax to retrieve local json
@@ -1245,7 +1249,7 @@
1245
1249
  return this.getMetaInfo(/.+_dataModel\.json$/)
1246
1250
  .then((schemas) => {
1247
1251
  const metadata = new Map();
1248
- schemas = i1$1.isArray(schemas) ? schemas : [schemas];
1252
+ schemas = lodashEs.isArray(schemas) ? schemas : [schemas];
1249
1253
  schemas.push(OFFLINE_WAVEMAKER_DATABASE_SCHEMA);
1250
1254
  schemas.map(s => this.compactSchema(s))
1251
1255
  .forEach(s => {
@@ -1263,7 +1267,7 @@
1263
1267
  loadNamedQueries(metadata) {
1264
1268
  return this.getMetaInfo(/.+_query\.json$/)
1265
1269
  .then((queriesByDBs) => {
1266
- queriesByDBs = _.isArray(queriesByDBs) ? queriesByDBs : [queriesByDBs];
1270
+ queriesByDBs = lodashEs.isArray(queriesByDBs) ? queriesByDBs : [queriesByDBs];
1267
1271
  queriesByDBs.map(e => metadata[e.name].queries = this.compactQueries(e));
1268
1272
  return metadata;
1269
1273
  });
@@ -1277,10 +1281,12 @@
1277
1281
  loadOfflineConfig(metadata) {
1278
1282
  return this.getMetaInfo(/.+_offline\.json$/)
1279
1283
  .then(configs => {
1280
- _.forEach(configs, config => {
1281
- _.forEach(config.entities, entityConfig => {
1282
- const entitySchema = _.find(metadata[config.name].schema.entities, schema => schema.name === entityConfig.name);
1283
- _.assignIn(entitySchema, entityConfig);
1284
+ lodashEs.forEach(configs, config => {
1285
+ // @ts-ignore
1286
+ lodashEs.forEach(config.entities, entityConfig => {
1287
+ // @ts-ignore
1288
+ const entitySchema = lodashEs.find(metadata[config.name].schema.entities, schema => schema.name === entityConfig.name);
1289
+ lodashEs.assignIn(entitySchema, entityConfig);
1284
1290
  });
1285
1291
  });
1286
1292
  return metadata;
@@ -1289,14 +1295,14 @@
1289
1295
  logSql(sqliteObject) {
1290
1296
  const logger = console, originalExecuteSql = sqliteObject.executeSql;
1291
1297
  sqliteObject.executeSql = (sql, params, logOutput) => {
1292
- const startTime = _.now();
1298
+ const startTime = lodashEs.now();
1293
1299
  return originalExecuteSql.call(sqliteObject, sql, params).then(result => {
1294
1300
  if (logOutput || this._logSql) {
1295
1301
  const objArr = [], rowCount = result.rows.length;
1296
1302
  for (let i = 0; i < rowCount; i++) {
1297
1303
  objArr.push(result.rows.item(i));
1298
1304
  }
1299
- logger.debug('SQL "%s" with params %O took [%d ms]. And the result is %O', sql, params, _.now() - startTime, objArr);
1305
+ logger.debug('SQL "%s" with params %O took [%d ms]. And the result is %O', sql, params, lodashEs.now() - startTime, objArr);
1300
1306
  }
1301
1307
  return result;
1302
1308
  }, error => {
@@ -1324,10 +1330,12 @@
1324
1330
  * @returns {*}
1325
1331
  */
1326
1332
  normalizeData() {
1327
- return Promise.all(_.map(this.databases, database => {
1328
- return Promise.all(_.map(database.schema.entities, entitySchema => {
1329
- return Promise.all(_.map(entitySchema.columns, column => {
1333
+ return Promise.all(lodashEs.map(this.databases, database => {
1334
+ // @ts-ignore
1335
+ return Promise.all(lodashEs.map(database.schema.entities, entitySchema => {
1336
+ return Promise.all(lodashEs.map(entitySchema.columns, column => {
1330
1337
  if (column.sqlType === 'boolean') {
1338
+ // @ts-ignore
1331
1339
  return this.normalizeBooleanData(database.schema.name, entitySchema.name, column.name);
1332
1340
  }
1333
1341
  }));
@@ -1341,12 +1349,13 @@
1341
1349
  }).then(sqliteObject => {
1342
1350
  database.sqliteObject = sqliteObject;
1343
1351
  this.logSql(sqliteObject);
1344
- const storePromises = _.map(database.schema.entities, entitySchema => {
1352
+ const storePromises = lodashEs.map(database.schema.entities, entitySchema => {
1353
+ // @ts-ignore
1345
1354
  const store = new LocalDBStore(this.deviceFileService, entitySchema, this.file, this, sqliteObject);
1346
1355
  return store.create();
1347
1356
  });
1348
1357
  return Promise.all(storePromises).then(stores => {
1349
- _.forEach(stores, store => {
1358
+ lodashEs.forEach(stores, store => {
1350
1359
  database.stores[store.entitySchema.entityName] = store;
1351
1360
  });
1352
1361
  return database;
@@ -1493,10 +1502,10 @@
1493
1502
  getLastPushInfo() {
1494
1503
  return this.localKeyValueService.get(LAST_PUSH_INFO_KEY)
1495
1504
  .then(info => {
1496
- if (i1$1.isString(info.startTime)) {
1505
+ if (lodashEs.isString(info.startTime)) {
1497
1506
  info.startTime = new Date(info.startTime);
1498
1507
  }
1499
- if (i1$1.isString(info.endTime)) {
1508
+ if (lodashEs.isString(info.endTime)) {
1500
1509
  info.endTime = new Date(info.endTime);
1501
1510
  }
1502
1511
  return info;
@@ -1525,7 +1534,7 @@
1525
1534
  * @returns {boolean} returns true, if a flush process is in progress. Otherwise, returns false.
1526
1535
  */
1527
1536
  isFlushInProgress() {
1528
- return !(_.isUndefined(this.deferredFlush) || _.isNull(this.deferredFlush));
1537
+ return !(lodashEs.isUndefined(this.deferredFlush) || lodashEs.isNull(this.deferredFlush));
1529
1538
  }
1530
1539
  /**
1531
1540
  * Stops the ongoing flush process.
@@ -1617,11 +1626,11 @@
1617
1626
  .then(() => i1$1.executePromiseChain(this.getWorkers('transformParamsFromMap'), [change]))
1618
1627
  .then(() => this.pushService.push(change))
1619
1628
  .then(function () {
1620
- return i1$1.executePromiseChain(_.reverse(self.getWorkers('postCallSuccess')), [change, arguments])
1629
+ return i1$1.executePromiseChain(lodashEs.reverse(self.getWorkers('postCallSuccess')), [change, arguments])
1621
1630
  .then(() => change);
1622
1631
  }).catch(function () {
1623
1632
  if (self.networkService.isConnected()) {
1624
- return i1$1.executePromiseChain(_.reverse(self.getWorkers('postCallError')), [change, arguments])
1633
+ return i1$1.executePromiseChain(lodashEs.reverse(self.getWorkers('postCallError')), [change, arguments])
1625
1634
  .catch(i1$1.noop).then(() => Promise.reject(change));
1626
1635
  }
1627
1636
  return Promise.reject(change);
@@ -1643,7 +1652,7 @@
1643
1652
  });
1644
1653
  }
1645
1654
  getWorkers(type) {
1646
- return _.map(this.workers, w => w[type] && w[type].bind(w));
1655
+ return lodashEs.map(this.workers, w => w[type] && w[type].bind(w));
1647
1656
  }
1648
1657
  static { this.ɵfac = function ChangeLogService_Factory(t) { return new (t || ChangeLogService)(i0__namespace.ɵɵinject(LocalDBManagementService), i0__namespace.ɵɵinject(LocalKeyValueService), i0__namespace.ɵɵinject(PushService), i0__namespace.ɵɵinject(i3__namespace.NetworkService)); }; }
1649
1658
  static { this.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ChangeLogService, factory: ChangeLogService.ɵfac, providedIn: 'root' }); }
@@ -1728,7 +1737,7 @@
1728
1737
  insertTableData(params, successCallback, failureCallback, options = {}) {
1729
1738
  this.getStore(params).then(store => {
1730
1739
  const isPKAutoIncremented = (store.primaryKeyField && store.primaryKeyField.generatorType === 'identity');
1731
- if (_.get(options, 'resetPrimaryKey') !== false && isPKAutoIncremented && params.data[store.primaryKeyName]) {
1740
+ if (lodashEs.get(options, 'resetPrimaryKey') !== false && isPKAutoIncremented && params.data[store.primaryKeyName]) {
1732
1741
  delete params.data[store.primaryKeyName];
1733
1742
  }
1734
1743
  return store.add(params.data).then(() => {
@@ -1869,7 +1878,7 @@
1869
1878
  return fieldName;
1870
1879
  }
1871
1880
  convertFieldNameToColumnName(store, filterGroup, options) {
1872
- _.forEach(filterGroup.rules, rule => {
1881
+ lodashEs.forEach(filterGroup.rules, rule => {
1873
1882
  if (rule.rules) {
1874
1883
  this.convertFieldNameToColumnName(store, rule);
1875
1884
  }
@@ -1879,7 +1888,7 @@
1879
1888
  });
1880
1889
  // handling the scenario where variable options can have filterField. For example: search filter query
1881
1890
  if (options && options.filterFields) {
1882
- options.filterFields = _.mapKeys(options.filterFields, (v, k) => {
1891
+ options.filterFields = lodashEs.mapKeys(options.filterFields, (v, k) => {
1883
1892
  return this.getColumnName(store, k);
1884
1893
  });
1885
1894
  }
@@ -1905,7 +1914,7 @@
1905
1914
  */
1906
1915
  preCall(change) {
1907
1916
  if (change.service === 'DatabaseService') {
1908
- change.params.data = _.mapValues(change.params.data, v => {
1917
+ change.params.data = lodashEs.mapValues(change.params.data, v => {
1909
1918
  const remoteUrl = this.fileStore[v];
1910
1919
  if (remoteUrl) {
1911
1920
  this.logger.debug('swapped file path from %s -> %s', v, remoteUrl);
@@ -1976,23 +1985,27 @@
1976
1985
  */
1977
1986
  updateDBChange(change, oldUploadDir, uploadDir) {
1978
1987
  const modifiedProperties = {}, entityName = change.params.entityName, dataModelName = change.params.dataModelName;
1979
- change.params.data = _.mapValues(change.params.data, function (v, k) {
1988
+ change.params.data = lodashEs.mapValues(change.params.data, function (v, k) {
1980
1989
  let mv = v, isModified = false;
1981
- if (_.isString(v)) {
1982
- mv = _.replace(v, oldUploadDir, uploadDir);
1983
- isModified = !_.isEqual(mv, v);
1984
- }
1985
- else if (_.isObject(v) && v.wmLocalPath) {
1986
- // insertMultiPartData and updateMultiPartData
1987
- mv = _.replace(v.wmLocalPath, oldUploadDir, uploadDir);
1988
- isModified = !_.isEqual(mv, v.wmLocalPath);
1990
+ if (lodashEs.isString(v)) {
1991
+ mv = lodashEs.replace(v, oldUploadDir, uploadDir);
1992
+ isModified = !lodashEs.isEqual(mv, v);
1993
+ }
1994
+ else { // @ts-ignore
1995
+ if (lodashEs.isObject(v) && v.wmLocalPath) {
1996
+ // insertMultiPartData and updateMultiPartData
1997
+ // @ts-ignore
1998
+ mv = lodashEs.replace(v.wmLocalPath, oldUploadDir, uploadDir);
1999
+ // @ts-ignore
2000
+ isModified = !lodashEs.isEqual(mv, v.wmLocalPath);
2001
+ }
1989
2002
  }
1990
2003
  if (isModified) {
1991
2004
  modifiedProperties[k] = mv;
1992
2005
  }
1993
2006
  return mv;
1994
2007
  });
1995
- if (!_.isEmpty(modifiedProperties)) {
2008
+ if (!lodashEs.isEmpty(modifiedProperties)) {
1996
2009
  this.localDBManagementService.getStore(dataModelName, entityName)
1997
2010
  .then(store => {
1998
2011
  // If there is a primary for the entity, then update actual row with the modifications
@@ -2000,7 +2013,7 @@
2000
2013
  const primaryKeyName = store.primaryKeyName;
2001
2014
  const primaryKey = change.params.data[primaryKeyName];
2002
2015
  return store.get(primaryKey)
2003
- .then(obj => store.save(_.assignIn(obj, modifiedProperties)));
2016
+ .then(obj => store.save(lodashEs.assignIn(obj, modifiedProperties)));
2004
2017
  }
2005
2018
  }).then(() => {
2006
2019
  change.params = JSON.stringify(change.params);
@@ -2019,7 +2032,7 @@
2019
2032
  change.params = JSON.parse(change.params);
2020
2033
  if (change.service === 'OfflineFileUploadService'
2021
2034
  && change.operation === 'uploadToServer') {
2022
- change.params.file = _.replace(change.params.file, metaInfo.uploadDir, this.uploadDir);
2035
+ change.params.file = lodashEs.replace(change.params.file, metaInfo.uploadDir, this.uploadDir);
2023
2036
  change.params = JSON.stringify(change.params);
2024
2037
  return this.changeLogService.getStore().then(store => store.save(change));
2025
2038
  }
@@ -2083,7 +2096,7 @@
2083
2096
  const dataModelName = change.params.dataModelName;
2084
2097
  return this.localDBManagementService.getStore(dataModelName, entityName).then(store => {
2085
2098
  const id = change['dataLocalId'] || change.params.data[store.primaryKeyName];
2086
- if (!(_.isUndefined(id) || _.isNull(id))) {
2099
+ if (!(lodashEs.isUndefined(id) || lodashEs.isNull(id))) {
2087
2100
  this.removeError(dataModelName, entityName, id);
2088
2101
  }
2089
2102
  });
@@ -2096,7 +2109,7 @@
2096
2109
  const dataModelName = change.params.dataModelName;
2097
2110
  return this.localDBManagementService.getStore(dataModelName, entityName).then(store => {
2098
2111
  const id = change['dataLocalId'] || (change.params.data && change.params.data[store.primaryKeyName]) || change.params[store.primaryKeyName] || change.params.id;
2099
- if (!(_.isUndefined(id) || _.isNull(id))) {
2112
+ if (!(lodashEs.isUndefined(id) || lodashEs.isNull(id))) {
2100
2113
  this.recordError(dataModelName, entityName, id);
2101
2114
  }
2102
2115
  });
@@ -2322,8 +2335,10 @@
2322
2335
  case 'insertMultiPartTableData':
2323
2336
  case 'updateMultiPartTableData':
2324
2337
  // clean up files
2325
- _.forEach(change.params.data, v => {
2326
- if (_.isObject(v) && v.wmLocalPath) {
2338
+ lodashEs.forEach(change.params.data, v => {
2339
+ // @ts-ignore
2340
+ if (lodashEs.isObject(v) && v.wmLocalPath) {
2341
+ // @ts-ignore
2327
2342
  this.deviceFileService.removeFile(v.wmLocalPath);
2328
2343
  }
2329
2344
  });
@@ -2359,8 +2374,9 @@
2359
2374
  * As save method called with FormData object, empty row is inserted.
2360
2375
  * Since FormData is converted to map, update the record details now.
2361
2376
  */
2362
- store.save(_.mapValues(map, function (v) {
2363
- return (_.isObject(v) && v.wmLocalPath) || v;
2377
+ store.save(lodashEs.mapValues(map, function (v) {
2378
+ // @ts-ignore
2379
+ return (lodashEs.isObject(v) && v.wmLocalPath) || v;
2364
2380
  }));
2365
2381
  return map;
2366
2382
  });
@@ -2418,15 +2434,15 @@
2418
2434
  const onlineHandler = this.httpService.sendCallAsObservable;
2419
2435
  if (onlineHandler) {
2420
2436
  this.httpService.sendCallAsObservable = (reqParams, params) => {
2421
- if (!params && _.get(reqParams, 'url')) {
2437
+ if (!params && lodashEs.get(reqParams, 'url')) {
2422
2438
  params = { url: reqParams.url };
2423
2439
  }
2424
2440
  // reqParams will contain the full path of insert/update call which will be processed again in parseConfig method
2425
2441
  // and will be appended again with '/services/./.' which will result in deployedUrl + '/service/./.' + '/service/./.' which is wrong.
2426
2442
  // Hence passing url in params
2427
- const clonedParamsUrl = _.clone(params.url);
2428
- params = _.extend(params, reqParams);
2429
- const operation = _.find(apiConfiguration, { name: _.get(params, 'operation') });
2443
+ const clonedParamsUrl = lodashEs.clone(params.url);
2444
+ params = lodashEs.extend(params, reqParams);
2445
+ const operation = lodashEs.find(apiConfiguration, { name: lodashEs.get(params, 'operation') });
2430
2446
  if (this.networkService.isConnected() || params.onlyOnline || !operation || !params.dataModelName) {
2431
2447
  return rxjs.from(this.remoteDBcall(operation, onlineHandler, params));
2432
2448
  }
@@ -2475,7 +2491,7 @@
2475
2491
  }
2476
2492
  // set hasBlob flag on params when blob field is present
2477
2493
  hasBlob(store) {
2478
- const blobColumns = _.filter(store.entitySchema.columns, {
2494
+ const blobColumns = lodashEs.filter(store.entitySchema.columns, {
2479
2495
  'sqlType': 'blob'
2480
2496
  });
2481
2497
  return !!blobColumns.length;
@@ -2518,8 +2534,8 @@
2518
2534
  store.saveAll(response.body.content);
2519
2535
  }
2520
2536
  else if (operation.type === 'INSERT') {
2521
- params = _.clone(params);
2522
- params.data = _.clone(response.body);
2537
+ params = lodashEs.clone(params);
2538
+ params.data = lodashEs.clone(response.body);
2523
2539
  this.offlineDBService[operation.name](params, i1$1.noop, i1$1.noop, {
2524
2540
  resetPrimaryKey: false
2525
2541
  });
@@ -2542,10 +2558,10 @@
2542
2558
  prepareToCascade(params) {
2543
2559
  return this.getStore(params).then(store => {
2544
2560
  const childObjectPromises = [];
2545
- _.forEach(params.data, (v, k) => {
2561
+ lodashEs.forEach(params.data, (v, k) => {
2546
2562
  let column, foreignRelation, childParams;
2547
2563
  // NOTE: Save only one-to-one relations for cascade
2548
- if (_.isObject(v) && !_.isArray(v)) {
2564
+ if (lodashEs.isObject(v) && !lodashEs.isArray(v)) {
2549
2565
  column = store.entitySchema.columns.find(c => {
2550
2566
  if (c.primaryKey && c.foreignRelations) {
2551
2567
  foreignRelation = c.foreignRelations.find(f => f.sourceFieldName === k);
@@ -2554,7 +2570,7 @@
2554
2570
  });
2555
2571
  }
2556
2572
  if (column) {
2557
- childParams = _.cloneDeep(params);
2573
+ childParams = lodashEs.cloneDeep(params);
2558
2574
  childParams.entityName = foreignRelation.targetEntity;
2559
2575
  childParams.data = v;
2560
2576
  const childPromise = this.getStore(childParams).then(childStore => {
@@ -2672,7 +2688,7 @@
2672
2688
  isOfflineBehaviourAdded$1 = true;
2673
2689
  const orig = this.httpService.sendCallAsObservable;
2674
2690
  this.httpService.sendCallAsObservable = (reqParams, params) => {
2675
- if (!params && _.get(reqParams, 'url')) {
2691
+ if (!params && lodashEs.get(reqParams, 'url')) {
2676
2692
  params = { url: reqParams.url };
2677
2693
  }
2678
2694
  if (!this.networkService.isConnected() && params.url.indexOf('/queryExecutor/') > 0) {
@@ -2684,7 +2700,7 @@
2684
2700
  };
2685
2701
  }
2686
2702
  executeLocally(params) {
2687
- const url = params.url, hasUrlParams = url.indexOf('?') > 0, dbName = this.substring(url, 'services/', '/queryExecutor'), queryName = this.substring(url, 'queries/', hasUrlParams ? '?' : undefined), urlParams = hasUrlParams ? this.getHttpParamMap(this.substring(url, '?', undefined)) : {}, dataParams = this.getHttpParamMap(params.dataParams), queryParams = _.extend(urlParams, dataParams);
2703
+ const url = params.url, hasUrlParams = url.indexOf('?') > 0, dbName = this.substring(url, 'services/', '/queryExecutor'), queryName = this.substring(url, 'queries/', hasUrlParams ? '?' : undefined), urlParams = hasUrlParams ? this.getHttpParamMap(this.substring(url, '?', undefined)) : {}, dataParams = this.getHttpParamMap(params.dataParams), queryParams = lodashEs.extend(urlParams, dataParams);
2688
2704
  return this.localDBManagementService.executeNamedQuery(dbName, queryName, queryParams)
2689
2705
  .then(result => {
2690
2706
  const rows = result.rows;
@@ -2723,7 +2739,7 @@
2723
2739
  str = decodeURIComponent(str);
2724
2740
  str.split('&').forEach(c => {
2725
2741
  const csplits = c.split('=');
2726
- if (_.isEmpty(_.trim(csplits[1])) || !NUMBER_REGEX.test(csplits[1])) {
2742
+ if (lodashEs.isEmpty(lodashEs.trim(csplits[1])) || !NUMBER_REGEX.test(csplits[1])) {
2727
2743
  result[csplits[0]] = csplits[1];
2728
2744
  }
2729
2745
  else {
@@ -2744,7 +2760,7 @@
2744
2760
  this.deviceService = deviceService;
2745
2761
  this.networkService = networkService;
2746
2762
  this.securityService = securityService;
2747
- this.saveSecurityConfigLocally = _.debounce((config) => {
2763
+ this.saveSecurityConfigLocally = lodashEs.debounce((config) => {
2748
2764
  this._saveSecurityConfigLocally(config);
2749
2765
  }, 1000);
2750
2766
  }
@@ -2981,7 +2997,7 @@
2981
2997
  const promises = {};
2982
2998
  return {
2983
2999
  start: promise => {
2984
- promise.$$pullProcessId = 'PULL_' + _.now();
3000
+ promise.$$pullProcessId = 'PULL_' + lodashEs.now();
2985
3001
  },
2986
3002
  add: (pullPromise, promise) => {
2987
3003
  const pullProcessId = pullPromise.$$pullProcessId;
@@ -2992,15 +3008,15 @@
2992
3008
  },
2993
3009
  remove: (pullPromise, promise) => {
2994
3010
  const pullProcessId = pullPromise.$$pullProcessId;
2995
- _.remove(promises[pullProcessId], promise);
2996
- if (_.isEmpty(promises[pullProcessId])) {
3011
+ lodashEs.remove(promises[pullProcessId], promise);
3012
+ if (lodashEs.isEmpty(promises[pullProcessId])) {
2997
3013
  delete promises[pullProcessId];
2998
3014
  }
2999
3015
  },
3000
3016
  abort: (pullPromise) => {
3001
3017
  const pullProcessId = pullPromise.$$pullProcessId;
3002
3018
  if (promises[pullProcessId]) {
3003
- _.forEach(promises[pullProcessId], function (p) {
3019
+ lodashEs.forEach(promises[pullProcessId], function (p) {
3004
3020
  if (p && p.abort) {
3005
3021
  p.abort();
3006
3022
  }
@@ -3047,22 +3063,22 @@
3047
3063
  * @returns {any}
3048
3064
  */
3049
3065
  addDeltaCriteria(db, entityName, query) {
3050
- const entitySchema = db.schema.entities[entityName], deltaFieldName = entitySchema.pullConfig.deltaFieldName, deltaField = _.find(entitySchema.columns, { 'fieldName': deltaFieldName }) || {};
3066
+ const entitySchema = db.schema.entities[entityName], deltaFieldName = entitySchema.pullConfig.deltaFieldName, deltaField = lodashEs.find(entitySchema.columns, { 'fieldName': deltaFieldName }) || {};
3051
3067
  let isBundledEntity;
3052
- if (!_.isEmpty(deltaFieldName)) {
3068
+ if (!lodashEs.isEmpty(deltaFieldName)) {
3053
3069
  return this.localDBManagementService.isBundled(db.schema.name, entityName)
3054
3070
  .then(flag => isBundledEntity = flag)
3055
3071
  .then(() => this.getLastPullInfo())
3056
3072
  .then(lastPullInfo => {
3057
3073
  let lastPullTime = (lastPullInfo && lastPullInfo.startTime && lastPullInfo.startTime.getTime());
3058
- const lastPullDBInfo = _.find(lastPullInfo && lastPullInfo.databases, { 'name': db.schema.name }), lastPullEntityInfo = _.find(lastPullDBInfo && lastPullDBInfo.entities, { 'entityName': entityName }) || {};
3074
+ const lastPullDBInfo = lodashEs.find(lastPullInfo && lastPullInfo.databases, { 'name': db.schema.name }), lastPullEntityInfo = lodashEs.find(lastPullDBInfo && lastPullDBInfo.entities, { 'entityName': entityName }) || {};
3059
3075
  if (!lastPullTime && isBundledEntity) {
3060
3076
  // For bundled entity when there is no last pull, fetch records that got modified after db creation.
3061
3077
  lastPullTime = (lastPullInfo && lastPullInfo.endTime && lastPullInfo.endTime.getTime());
3062
3078
  lastPullEntityInfo.query = query;
3063
3079
  }
3064
3080
  if (lastPullEntityInfo.query === query && lastPullTime > 0) {
3065
- if (_.isEmpty(query)) {
3081
+ if (lodashEs.isEmpty(query)) {
3066
3082
  query = '';
3067
3083
  }
3068
3084
  else {
@@ -3111,17 +3127,17 @@
3111
3127
  }
3112
3128
  return query;
3113
3129
  }).then(query => {
3114
- filter = _.isEmpty(query) ? '' : 'q=' + query;
3130
+ filter = lodashEs.isEmpty(query) ? '' : 'q=' + query;
3115
3131
  return this.getTotalRecordsToPull(db, entitySchema, filter, pullPromise);
3116
3132
  }).then(maxNoOfRecords => {
3117
3133
  const pageSize = entitySchema.pullConfig.size || 100, maxNoOfPages = Math.ceil(maxNoOfRecords / pageSize);
3118
3134
  result.totalRecordsToPull = maxNoOfRecords;
3119
3135
  let sort = entitySchema.pullConfig.orderBy;
3120
- sort = (_.isEmpty(sort) ? '' : sort + ',') + store.primaryKeyName;
3136
+ sort = (lodashEs.isEmpty(sort) ? '' : sort + ',') + store.primaryKeyName;
3121
3137
  progressObserver.next(result);
3122
3138
  const _progressObserver = { next: data => {
3123
3139
  inProgress++;
3124
- data = _.slice(data, 0, result.totalRecordsToPull - result.pulledRecordCount);
3140
+ data = lodashEs.slice(data, 0, result.totalRecordsToPull - result.pulledRecordCount);
3125
3141
  store.saveAll(data).then(() => {
3126
3142
  result.pulledRecordCount += data ? data.length : 0;
3127
3143
  progressObserver.next(result);
@@ -3147,7 +3163,7 @@
3147
3163
  }
3148
3164
  // If expression starts with 'bind:', then expression is evaluated and result is returned.
3149
3165
  evalIfBind(expression) {
3150
- if (_.startsWith(expression, 'bind:')) {
3166
+ if (lodashEs.startsWith(expression, 'bind:')) {
3151
3167
  expression = expression.replace(/\[\$\i\]/g, '[0]');
3152
3168
  return i1$1.$parseExpr(expression.replace('bind:', ''))(this.app);
3153
3169
  }
@@ -3190,8 +3206,8 @@
3190
3206
  };
3191
3207
  return this.retryIfNetworkFails(() => {
3192
3208
  return this.executeDatabaseCountQuery(params).then(function (response) {
3193
- const totalRecordCount = response, maxRecordsToPull = _.parseInt(entitySchema.pullConfig.maxNumberOfRecords);
3194
- if (_.isNaN(maxRecordsToPull) || maxRecordsToPull <= 0 || totalRecordCount < maxRecordsToPull) {
3209
+ const totalRecordCount = response, maxRecordsToPull = parseInt(entitySchema.pullConfig.maxNumberOfRecords);
3210
+ if (lodashEs.isNaN(maxRecordsToPull) || maxRecordsToPull <= 0 || totalRecordCount < maxRecordsToPull) {
3195
3211
  return totalRecordCount;
3196
3212
  }
3197
3213
  return maxRecordsToPull;
@@ -3204,23 +3220,23 @@
3204
3220
  return this.localDBManagementService.isBundled(db.schema.name, entityName)
3205
3221
  .then(isBundledEntity => {
3206
3222
  let hasNullAttributeValue = false;
3207
- if (isBundledEntity || _.isEmpty(entitySchema.pullConfig.query)) {
3208
- query = _.cloneDeep(entitySchema.pullConfig.filter);
3209
- query = _.map(query, v => {
3223
+ if (isBundledEntity || lodashEs.isEmpty(entitySchema.pullConfig.query)) {
3224
+ query = lodashEs.cloneDeep(entitySchema.pullConfig.filter);
3225
+ query = lodashEs.map(query, v => {
3210
3226
  v.attributeValue = this.evalIfBind(v.attributeValue);
3211
- hasNullAttributeValue = hasNullAttributeValue || _.isNil(v.attributeValue);
3227
+ hasNullAttributeValue = hasNullAttributeValue || lodashEs.isNil(v.attributeValue);
3212
3228
  return v;
3213
3229
  });
3214
3230
  if (hasNullAttributeValue) {
3215
3231
  return Promise.reject('Null criteria values are present');
3216
3232
  }
3217
- query = _.sortBy(query, 'attributeName');
3233
+ query = lodashEs.sortBy(query, 'attributeName');
3218
3234
  query = variables$1.LiveVariableUtils.getSearchQuery(query, ' AND ', true);
3219
3235
  }
3220
3236
  else {
3221
3237
  query = this.evalIfBind(entitySchema.pullConfig.query);
3222
3238
  }
3223
- if (_.isNil(query)) {
3239
+ if (lodashEs.isNil(query)) {
3224
3240
  return Promise.resolve(null);
3225
3241
  }
3226
3242
  return Promise.resolve(encodeURIComponent(query));
@@ -3244,7 +3260,8 @@
3244
3260
  totalTaskCount: 0
3245
3261
  };
3246
3262
  const storePromises = [];
3247
- _.forEach(db.schema.entities, entity => {
3263
+ lodashEs.forEach(db.schema.entities, entity => {
3264
+ // @ts-ignore
3248
3265
  storePromises.push(this.localDBManagementService.getStore(datamodelName, entity.entityName));
3249
3266
  });
3250
3267
  return new Promise((resolve, reject) => {
@@ -3258,21 +3275,21 @@
3258
3275
  entities.push(store.entitySchema);
3259
3276
  }
3260
3277
  });
3261
- const pullPromises = _.chain(entities)
3278
+ const pullPromises = lodashEs.chain(entities)
3262
3279
  .map(entity => {
3263
3280
  const _progressObserver = {
3264
3281
  next: info => {
3265
- const i = _.findIndex(result.entities, { 'entityName': info.entityName });
3282
+ const i = lodashEs.findIndex(result.entities, { 'entityName': info.entityName });
3266
3283
  if (i >= 0) {
3267
3284
  result.entities[i] = info;
3268
3285
  }
3269
3286
  else {
3270
3287
  result.entities.push(info);
3271
3288
  }
3272
- result.pulledRecordCount = _.reduce(result.entities, function (sum, entityPullInfo) {
3289
+ result.pulledRecordCount = lodashEs.reduce(result.entities, function (sum, entityPullInfo) {
3273
3290
  return sum + entityPullInfo.pulledRecordCount;
3274
3291
  }, 0);
3275
- result.totalRecordsToPull = _.reduce(result.entities, function (sum, entityPullInfo) {
3292
+ result.totalRecordsToPull = lodashEs.reduce(result.entities, function (sum, entityPullInfo) {
3276
3293
  return sum + entityPullInfo.totalRecordsToPull;
3277
3294
  }, 0);
3278
3295
  progressObserver.next(result);
@@ -3364,7 +3381,7 @@
3364
3381
  getDb(dbName) {
3365
3382
  return this.localDBManagementService.loadDatabases()
3366
3383
  .then(databases => {
3367
- const db = _.find(databases, { 'name': dbName });
3384
+ const db = lodashEs.find(databases, { 'name': dbName });
3368
3385
  return db || Promise.reject('Local database (' + dbName + ') not found');
3369
3386
  });
3370
3387
  }
@@ -3374,10 +3391,10 @@
3374
3391
  */
3375
3392
  getLastPullInfo() {
3376
3393
  return this.localKeyValueService.get(LAST_PULL_INFO_KEY).then(info => {
3377
- if (_.isString(info.startTime)) {
3394
+ if (lodashEs.isString(info.startTime)) {
3378
3395
  info.startTime = new Date(info.startTime);
3379
3396
  }
3380
- if (_.isString(info.endTime)) {
3397
+ if (lodashEs.isString(info.endTime)) {
3381
3398
  info.endTime = new Date(info.endTime);
3382
3399
  }
3383
3400
  return info;
@@ -3404,28 +3421,28 @@
3404
3421
  };
3405
3422
  this.localDBManagementService.loadDatabases()
3406
3423
  .then(databases => {
3407
- const dataPullPromises = _.chain(databases).filter(function (db) {
3424
+ const dataPullPromises = lodashEs.chain(databases).filter(function (db) {
3408
3425
  return !db.schema.isInternal;
3409
3426
  }).map(db => {
3410
3427
  pullProcessManager.start(deferred.promise);
3411
3428
  const _progressObserver = { next: data => {
3412
- const i = _.findIndex(pullInfo.databases, { 'name': data.name });
3429
+ const i = lodashEs.findIndex(pullInfo.databases, { 'name': data.name });
3413
3430
  if (i >= 0) {
3414
3431
  pullInfo.databases[i] = data;
3415
3432
  }
3416
3433
  else {
3417
3434
  pullInfo.databases.push(data);
3418
3435
  }
3419
- pullInfo.totalTaskCount = _.reduce(pullInfo.databases, function (sum, dbPullInfo) {
3436
+ pullInfo.totalTaskCount = lodashEs.reduce(pullInfo.databases, function (sum, dbPullInfo) {
3420
3437
  return sum + dbPullInfo.totalTaskCount;
3421
3438
  }, 0);
3422
- pullInfo.completedTaskCount = _.reduce(pullInfo.databases, function (sum, dbPullInfo) {
3439
+ pullInfo.completedTaskCount = lodashEs.reduce(pullInfo.databases, function (sum, dbPullInfo) {
3423
3440
  return sum + dbPullInfo.completedTaskCount;
3424
3441
  }, 0);
3425
- pullInfo.totalPulledRecordCount = _.reduce(pullInfo.databases, function (sum, dbPullInfo) {
3442
+ pullInfo.totalPulledRecordCount = lodashEs.reduce(pullInfo.databases, function (sum, dbPullInfo) {
3426
3443
  return sum + dbPullInfo.pulledRecordCount;
3427
3444
  }, 0);
3428
- pullInfo.totalRecordsToPull = _.reduce(pullInfo.databases, function (sum, dbPullInfo) {
3445
+ pullInfo.totalRecordsToPull = lodashEs.reduce(pullInfo.databases, function (sum, dbPullInfo) {
3429
3446
  return sum + dbPullInfo.totalRecordsToPull;
3430
3447
  }, 0);
3431
3448
  progressObserver.next(pullInfo);