@wavemaker/app-rn-runtime 11.9.3-1.5990 → 11.9.3-2.6002

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 (261) hide show
  1. app-rn-runtime/actions/notification-action.js +1 -1
  2. app-rn-runtime/actions/timer-action.js +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js +1 -1
  4. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.component.js +7 -8
  6. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel.styles.js +4 -2
  9. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  10. app-rn-runtime/components/advanced/login/login.component.js +2 -2
  11. app-rn-runtime/components/advanced/login/login.props.js +1 -1
  12. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +2 -2
  13. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js +1 -1
  14. app-rn-runtime/components/advanced/webview/webview.component.js +2 -2
  15. app-rn-runtime/components/advanced/webview/webview.props.js +1 -1
  16. app-rn-runtime/components/basic/anchor/anchor.component.js +1 -1
  17. app-rn-runtime/components/basic/anchor/anchor.props.js +1 -1
  18. app-rn-runtime/components/basic/animatedview.component.js +2 -2
  19. app-rn-runtime/components/basic/audio/audio.component.js +1 -1
  20. app-rn-runtime/components/basic/audio/audio.props.js +1 -1
  21. app-rn-runtime/components/basic/button/button.component.js +1 -1
  22. app-rn-runtime/components/basic/button/button.props.js +1 -1
  23. app-rn-runtime/components/basic/buttongroup/buttongroup.props.js +1 -1
  24. app-rn-runtime/components/basic/custom/custom.props.js +1 -1
  25. app-rn-runtime/components/basic/icon/icon.component.js +2 -2
  26. app-rn-runtime/components/basic/icon/icon.props.js +1 -1
  27. app-rn-runtime/components/basic/label/label.component.js +2 -2
  28. app-rn-runtime/components/basic/label/label.props.js +1 -1
  29. app-rn-runtime/components/basic/lottie/lottie.component.js +1 -1
  30. app-rn-runtime/components/basic/lottie/lottie.props.js +1 -1
  31. app-rn-runtime/components/basic/message/message.component.js +2 -2
  32. app-rn-runtime/components/basic/message/message.props.js +1 -1
  33. app-rn-runtime/components/basic/modal/modal.props.js +1 -1
  34. app-rn-runtime/components/basic/picture/picture.component.js +2 -2
  35. app-rn-runtime/components/basic/picture/picture.props.js +1 -1
  36. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  37. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  38. app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +1 -1
  39. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js +0 -8
  40. app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
  41. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +2 -2
  42. app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +1 -1
  43. app-rn-runtime/components/basic/search/local-data-provider.js +1 -1
  44. app-rn-runtime/components/basic/search/search.component.js +3 -3
  45. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  46. app-rn-runtime/components/basic/search/search.props.js +1 -1
  47. app-rn-runtime/components/basic/skeleton/skeleton.component.js +1 -1
  48. app-rn-runtime/components/basic/skeleton/skeleton.props.js +1 -1
  49. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -2
  50. app-rn-runtime/components/basic/spinner/spinner.props.js +1 -1
  51. app-rn-runtime/components/basic/tooltip/tooltip.props.js +1 -1
  52. app-rn-runtime/components/basic/video/video.component.js +29 -105
  53. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  54. app-rn-runtime/components/basic/video/video.props.js +1 -8
  55. app-rn-runtime/components/basic/video/video.props.js.map +1 -1
  56. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -2
  57. app-rn-runtime/components/chart/area-chart/area-chart.props.js +1 -1
  58. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +1 -1
  59. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -1
  60. app-rn-runtime/components/chart/basechart.component.js +1 -1
  61. app-rn-runtime/components/chart/basechart.props.js +1 -1
  62. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
  63. app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +1 -1
  64. app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +1 -1
  65. app-rn-runtime/components/chart/line-chart/line-chart.component.js +1 -1
  66. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -1
  67. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -2
  68. app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -1
  69. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +2 -2
  70. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +1 -1
  71. app-rn-runtime/components/container/accordion/accordion.component.js +2 -2
  72. app-rn-runtime/components/container/accordion/accordion.props.js +1 -1
  73. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
  74. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js +1 -1
  75. app-rn-runtime/components/container/container.component.js +2 -2
  76. app-rn-runtime/components/container/container.props.js +1 -1
  77. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js +1 -1
  78. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js +1 -1
  79. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js +1 -1
  80. app-rn-runtime/components/container/linearlayout/linearlayout.props.js +1 -1
  81. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +1 -1
  82. app-rn-runtime/components/container/panel/panel-content/panel-content.props.js +1 -1
  83. app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js +1 -1
  84. app-rn-runtime/components/container/panel/panel.component.js +4 -4
  85. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  86. app-rn-runtime/components/container/panel/panel.props.js +1 -1
  87. app-rn-runtime/components/container/partial-host.component.js +1 -1
  88. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -2
  89. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js +1 -1
  90. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
  91. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -1
  92. app-rn-runtime/components/container/tabs/tabs.component.js +3 -3
  93. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  94. app-rn-runtime/components/container/tabs/tabs.props.js +1 -1
  95. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  96. app-rn-runtime/components/container/tile/tile.component.js +1 -1
  97. app-rn-runtime/components/container/tile/tile.props.js +1 -1
  98. app-rn-runtime/components/container/wizard/wizard.component.js +2 -2
  99. app-rn-runtime/components/container/wizard/wizard.props.js +1 -1
  100. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
  101. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +1 -1
  102. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  103. app-rn-runtime/components/data/card/card-content/card-content.props.js +1 -1
  104. app-rn-runtime/components/data/card/card-footer/card-footer.props.js +1 -1
  105. app-rn-runtime/components/data/card/card.component.js +1 -1
  106. app-rn-runtime/components/data/card/card.props.js +1 -1
  107. app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -1
  108. app-rn-runtime/components/data/form/form-action/form-action.props.js +1 -1
  109. app-rn-runtime/components/data/form/form-body/form-body.props.js +1 -1
  110. app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -2
  111. app-rn-runtime/components/data/form/form-field/form-field.props.js +1 -1
  112. app-rn-runtime/components/data/form/form-footer/form-footer.props.js +1 -1
  113. app-rn-runtime/components/data/form/form.component.js +1 -1
  114. app-rn-runtime/components/data/form/form.props.js +1 -1
  115. app-rn-runtime/components/data/list/list-action-template/list-action-template.props.js +1 -1
  116. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -1
  117. app-rn-runtime/components/data/list/list.component.js +2 -2
  118. app-rn-runtime/components/data/list/list.props.js +1 -1
  119. app-rn-runtime/components/data/liveform/liveform.component.js +1 -1
  120. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -1
  121. app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +1 -1
  122. app-rn-runtime/components/device/camera/camera.component.js +1 -1
  123. app-rn-runtime/components/device/camera/camera.props.js +1 -1
  124. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +1 -1
  125. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +1 -1
  126. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +1 -1
  127. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +1 -1
  128. app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -2
  129. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  130. app-rn-runtime/components/dialogs/dialog/dialog.props.js +1 -1
  131. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
  132. app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js +1 -1
  133. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js +1 -1
  134. app-rn-runtime/components/input/basedataset/basedataset.component.js +1 -1
  135. app-rn-runtime/components/input/basedataset/basedataset.props.js +1 -1
  136. app-rn-runtime/components/input/baseinput/baseinput.component.js +1 -1
  137. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -1
  138. app-rn-runtime/components/input/basenumber/basenumber.component.js +1 -1
  139. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -1
  140. app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
  141. app-rn-runtime/components/input/calendar/calendar.props.js +1 -1
  142. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  143. app-rn-runtime/components/input/calendar/views/month-view.js +2 -2
  144. app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
  145. app-rn-runtime/components/input/checkbox/checkbox.component.js +2 -2
  146. app-rn-runtime/components/input/checkbox/checkbox.props.js +1 -1
  147. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +2 -2
  148. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -1
  149. app-rn-runtime/components/input/chips/chips.component.js +25 -21
  150. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  151. app-rn-runtime/components/input/chips/chips.props.js +1 -1
  152. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  153. app-rn-runtime/components/input/currency/currency.component.js +2 -2
  154. app-rn-runtime/components/input/currency/currency.props.js +1 -1
  155. app-rn-runtime/components/input/epoch/base-datetime.component.js +2 -2
  156. app-rn-runtime/components/input/epoch/date-picker.component.js +2 -2
  157. app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
  158. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -1
  159. app-rn-runtime/components/input/epoch/time/time.props.js +1 -1
  160. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +1 -1
  161. app-rn-runtime/components/input/epoch/wheel-time-picker.component.js +1 -1
  162. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js +1 -1
  163. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.props.js +1 -1
  164. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +1 -1
  165. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +1 -1
  166. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +1 -1
  167. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +1 -1
  168. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
  169. app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -1
  170. app-rn-runtime/components/input/number/number.component.js +2 -2
  171. app-rn-runtime/components/input/number/number.props.js +1 -1
  172. app-rn-runtime/components/input/radioset/radioset.component.js +2 -2
  173. app-rn-runtime/components/input/radioset/radioset.props.js +1 -1
  174. app-rn-runtime/components/input/rating/rating.component.js +1 -1
  175. app-rn-runtime/components/input/rating/rating.props.js +1 -1
  176. app-rn-runtime/components/input/select/select.component.js +3 -3
  177. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  178. app-rn-runtime/components/input/select/select.props.js +1 -1
  179. app-rn-runtime/components/input/slider/slider.component.js +2 -2
  180. app-rn-runtime/components/input/slider/slider.props.js +1 -1
  181. app-rn-runtime/components/input/switch/switch.component.js +1 -1
  182. app-rn-runtime/components/input/switch/switch.props.js +1 -1
  183. app-rn-runtime/components/input/text/text.component.js +1 -1
  184. app-rn-runtime/components/input/text/text.props.js +1 -1
  185. app-rn-runtime/components/input/textarea/textarea.component.js +1 -1
  186. app-rn-runtime/components/input/textarea/textarea.props.js +1 -1
  187. app-rn-runtime/components/input/toggle/toggle.component.js +3 -4
  188. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  189. app-rn-runtime/components/input/toggle/toggle.props.js +1 -1
  190. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  191. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +1 -1
  192. app-rn-runtime/components/navigation/basenav/basenav.component.js +1 -1
  193. app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -1
  194. app-rn-runtime/components/navigation/menu/menu.component.js +1 -1
  195. app-rn-runtime/components/navigation/menu/menu.props.js +1 -1
  196. app-rn-runtime/components/navigation/navbar/navbar.props.js +1 -1
  197. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -2
  198. app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -1
  199. app-rn-runtime/components/navigation/popover/popover.component.js +2 -2
  200. app-rn-runtime/components/navigation/popover/popover.props.js +1 -1
  201. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  202. app-rn-runtime/components/page/left-panel/left-panel.props.js +1 -1
  203. app-rn-runtime/components/page/page-content/page-content.props.js +1 -1
  204. app-rn-runtime/components/page/page.component.js +2 -2
  205. app-rn-runtime/components/page/partial-container/partial-container.props.js +1 -1
  206. app-rn-runtime/components/page/tabbar/tabbar.component.js +3 -3
  207. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  208. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -1
  209. app-rn-runtime/core/AppConfig.js.map +1 -1
  210. app-rn-runtime/core/base.component.js +2 -2
  211. app-rn-runtime/core/components/textinput.component.js +1 -1
  212. app-rn-runtime/core/constant.service.js +1 -1
  213. app-rn-runtime/core/event-notifier.js +1 -1
  214. app-rn-runtime/core/fixed-view.component.js +1 -1
  215. app-rn-runtime/core/imageSizeEstimator.js +1 -1
  216. app-rn-runtime/core/key.extractor.js +1 -1
  217. app-rn-runtime/core/logger.js +1 -1
  218. app-rn-runtime/core/network.service.js +1 -1
  219. app-rn-runtime/core/props.provider.js +1 -1
  220. app-rn-runtime/core/scroll-view.component.js +2 -2
  221. app-rn-runtime/core/storage.service.js +1 -1
  222. app-rn-runtime/core/tappable.component.js +2 -2
  223. app-rn-runtime/core/viewport.js +1 -1
  224. app-rn-runtime/core/wm-component-tree.js +1 -1
  225. app-rn-runtime/gestures/swipe.animation.js +1 -1
  226. app-rn-runtime/package.json +46 -45
  227. app-rn-runtime/runtime/App.js +3 -3
  228. app-rn-runtime/runtime/App.js.map +1 -1
  229. app-rn-runtime/runtime/base-fragment.component.js +1 -1
  230. app-rn-runtime/runtime/base-page.component.js +2 -2
  231. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  232. app-rn-runtime/runtime/base-partial.component.js +1 -1
  233. app-rn-runtime/runtime/base-prefab.component.js +1 -1
  234. app-rn-runtime/runtime/memo.component.js +1 -1
  235. app-rn-runtime/runtime/navigator/stack.navigator.js +1 -1
  236. app-rn-runtime/runtime/services/app-display-manager.service.js +1 -1
  237. app-rn-runtime/runtime/services/app-i18n.service.js +1 -1
  238. app-rn-runtime/runtime/services/app-modal.service.js +1 -1
  239. app-rn-runtime/runtime/services/app-security.service.js +1 -1
  240. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  241. app-rn-runtime/runtime/services/app-toast.service.js +1 -1
  242. app-rn-runtime/runtime/services/device/camera-service.js +10 -10
  243. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  244. app-rn-runtime/runtime/services/device/permissions.js +2 -2
  245. app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
  246. app-rn-runtime/runtime/services/device/scan-service.js +9 -35
  247. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  248. app-rn-runtime/runtime/services/webprocess.service.js +1 -1
  249. app-rn-runtime/runtime/watcher.js +1 -1
  250. app-rn-runtime/styles/background.component.js +2 -2
  251. app-rn-runtime/styles/background.component.js.map +1 -1
  252. app-rn-runtime/styles/style-props.js +1 -1
  253. app-rn-runtime/styles/theme.js +2 -42
  254. app-rn-runtime/styles/theme.js.map +1 -1
  255. app-rn-runtime/styles/theme.variables.js +1 -1
  256. app-rn-runtime/variables/base-variable.js +1 -1
  257. app-rn-runtime/variables/device/device/network-info.operation.js +1 -1
  258. app-rn-runtime/variables/live-variable.js +1 -1
  259. app-rn-runtime/variables/model-variable.js +1 -1
  260. app-rn-runtime/variables/service-variable.js +1 -1
  261. app-rn-runtime/variables/utils/inflight-queue.js +1 -1
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { DEFAULT_CLASS } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { includes, intersection, isNaN, isFinite, toArray, isNil } from 'lodash';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","minHeight","minWidth","text","color","calendarDateColor","calendar","backgroundColor","calendarBgColor","borderColor","calendarHeaderBgColor","borderWidth","borderStyle","marginTop","paddingTop","paddingBottom","elevation","calendarHeader","borderBottomWidth","weekDay","padding","weekDayText","calendarWeekDayTextColor","fontWeight","fontFamily","baseFont","fontSize","day","dayWrapper","height","borderRadius","notDayOfCurrentMonth","calendarNotCurrentMonthDateColor","opacity","monthText","calendarHeaderTextColor","yearText","today","primaryColor","todayText","calendarSelectedDayBgColor","eventDay1","calendarEventDay1Color","eventDay2","calendarEventDay2Color","eventDay3","calendarEventDay3Color","selectedDay","selectedDayText","calendarSelectedDayTextColor","prevMonthBtn","calendarPrevMonthIconColor","nextMonthBtn","calendarNextMonthIconColor","prevYearBtn","calendarPrevYearIconColor","nextYearBtn","calendarNextYearIconColor","skeleton","display","justifyContent","paddingHorizontal","alignItems","headerSkeleton","flexDirection","marginBottom","transform","rotateY"],"sources":["calendar.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { TextStyle } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmCalendarStyles = BaseStyles & {\n calendar: AllStyle,\n calendarHeader: AllStyle,\n day: AllStyle,\n dayWrapper: AllStyle,\n notDayOfCurrentMonth: AllStyle,\n monthText: TextStyle,\n yearText: TextStyle,\n weekDay: AllStyle,\n today: AllStyle,\n todayText: AllStyle,\n prevMonthBtn: WmIconStyles,\n nextMonthBtn: WmIconStyles,\n prevYearBtn: WmIconStyles,\n nextYearBtn: WmIconStyles,\n selectedDay: AllStyle,\n selectedDayText: AllStyle\n eventDay1: AllStyle,\n eventDay2: AllStyle,\n eventDay3: AllStyle,\n skeleton: WmSkeletonStyles;\n headerSkeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-calendar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCalendarStyles = defineStyles<WmCalendarStyles>({\n root: {\n width: '100%',\n minHeight: 456,\n minWidth: 360\n },\n text: {\n color: themeVariables.calendarDateColor\n },\n calendar : {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderWidth: 1,\n borderStyle: 'solid',\n marginTop: 0, \n paddingTop: 0,\n paddingBottom: 0,\n elevation: 6\n },\n calendarHeader : {\n backgroundColor: themeVariables.calendarHeaderBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n paddingTop: 8,\n paddingBottom: 8\n },\n weekDay: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n padding: 2,\n },\n weekDayText: {\n color: themeVariables.calendarWeekDayTextColor,\n fontWeight: '400',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n },\n day: {\n borderColor: 'transparent',\n color: themeVariables.calendarDateColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400'\n },\n dayWrapper: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: 'transparent',\n width: 38,\n height: 38,\n borderRadius: 26\n },\n notDayOfCurrentMonth: {\n color: themeVariables.calendarNotCurrentMonthDateColor,\n fontWeight: 'normal',\n opacity: 0\n },\n monthText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n yearText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n today: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.primaryColor\n },\n todayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n eventDay1 : {\n color: themeVariables.calendarEventDay1Color\n },\n eventDay2 : {\n color: themeVariables.calendarEventDay2Color\n },\n eventDay3 : {\n color: themeVariables.calendarEventDay3Color\n },\n selectedDay: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n selectedDayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor,\n color: themeVariables.calendarSelectedDayTextColor,\n fontWeight: 'bold'\n },\n prevMonthBtn: {\n root: {\n color: themeVariables.calendarPrevMonthIconColor\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n color: themeVariables.calendarNextMonthIconColor\n }\n } as WmIconStyles,\n prevYearBtn: {\n root: {\n color: themeVariables.calendarPrevYearIconColor\n }\n } as WmIconStyles,\n nextYearBtn: {\n root: {\n color: themeVariables.calendarNextYearIconColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n display:'flex', \n justifyContent: 'center',\n backgroundColor:'#fff',\n paddingHorizontal: 8,\n alignItems: 'center',\n },\n } as any as WmSkeletonStyles ,\n headerSkeleton: {\n root: {\n width: '100%',\n display:'flex', \n flexDirection:'row', \n alignItems: 'center',\n justifyContent: 'space-around',\n marginBottom: 16\n } \n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}]\n }\n } as any as WmIconStyles,\n nextMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}] \n },\n } as any as WmIconStyles,\n monthText: {\n padding: 2\n },\n yearText: {\n padding: 2\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA6BxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGL,YAAY,CAAmB;IACnEM,IAAI,EAAE;MACFC,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE,GAAG;MACdC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,KAAK,EAAER,cAAc,CAACS;IAC1B,CAAC;IACDC,QAAQ,EAAG;MACPC,eAAe,EAAEX,cAAc,CAACY,eAAe;MAC/CC,WAAW,EAAEb,cAAc,CAACc,qBAAqB;MACjDC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE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AE,CAAC;QACpBC,UAAU,EAAE;MAChB;IACF,CAA6B;IAC/BC,cAAc,EAAE;MACZhE,IAAI,EAAE;QACFC,KAAK,EAAE,MAAM;QACb2D,OAAO,EAAC,MAAM;QACdK,aAAa,EAAC,KAAK;QACnBF,UAAU,EAAE,QAAQ;QACpBF,cAAc,EAAE,cAAc;QAC9BK,YAAY,EAAE;MAClB;IACJ;EACJ,CAAC,CAAC;EAEFpE,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCwD,YAAY,EAAE;MACVnD,IAAI,EAAE;QACFmE,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAwB;IACxBf,YAAY,EAAE;MACVrD,IAAI,EAAE;QACFmE,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAwB;IACxBjC,SAAS,EAAE;MACPd,OAAO,EAAE;IACb,CAAC;IACDgB,QAAQ,EAAE;MACNhB,OAAO,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","minHeight","minWidth","text","color","calendarDateColor","calendar","backgroundColor","calendarBgColor","borderColor","calendarHeaderBgColor","borderWidth","borderStyle","marginTop","paddingTop","paddingBottom","elevation","calendarHeader","borderBottomWidth","weekDay","padding","weekDayText","calendarWeekDayTextColor","fontWeight","fontFamily","baseFont","fontSize","day","dayWrapper","height","borderRadius","notDayOfCurrentMonth","calendarNotCurrentMonthDateColor","opacity","monthText","calendarHeaderTextColor","yearText","today","primaryColor","todayText","calendarSelectedDayBgColor","eventDay1","calendarEventDay1Color","eventDay2","calendarEventDay2Color","eventDay3","calendarEventDay3Color","selectedDay","selectedDayText","calendarSelectedDayTextColor","prevMonthBtn","calendarPrevMonthIconColor","nextMonthBtn","calendarNextMonthIconColor","prevYearBtn","calendarPrevYearIconColor","nextYearBtn","calendarNextYearIconColor","skeleton","display","justifyContent","paddingHorizontal","alignItems","headerSkeleton","flexDirection","marginBottom","transform","rotateY"],"sources":["calendar.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { TextStyle } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmCalendarStyles = BaseStyles & {\n calendar: AllStyle,\n calendarHeader: AllStyle,\n day: AllStyle,\n dayWrapper: AllStyle,\n notDayOfCurrentMonth: AllStyle,\n monthText: TextStyle,\n yearText: TextStyle,\n weekDay: AllStyle,\n today: AllStyle,\n todayText: AllStyle,\n prevMonthBtn: WmIconStyles,\n nextMonthBtn: WmIconStyles,\n prevYearBtn: WmIconStyles,\n nextYearBtn: WmIconStyles,\n selectedDay: AllStyle,\n selectedDayText: AllStyle\n eventDay1: AllStyle,\n eventDay2: AllStyle,\n eventDay3: AllStyle,\n skeleton: WmSkeletonStyles;\n headerSkeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-calendar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCalendarStyles = defineStyles<WmCalendarStyles>({\n root: {\n width: '100%',\n minHeight: 456,\n minWidth: 360\n },\n text: {\n color: themeVariables.calendarDateColor\n },\n calendar : {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderWidth: 1,\n borderStyle: 'solid',\n marginTop: 0, \n paddingTop: 0,\n paddingBottom: 0,\n elevation: 6\n },\n calendarHeader : {\n backgroundColor: themeVariables.calendarHeaderBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n paddingTop: 8,\n paddingBottom: 8\n },\n weekDay: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n padding: 2,\n },\n weekDayText: {\n color: themeVariables.calendarWeekDayTextColor,\n fontWeight: '400',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n },\n day: {\n borderColor: 'transparent',\n color: themeVariables.calendarDateColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400'\n },\n dayWrapper: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: 'transparent',\n width: 38,\n height: 38,\n borderRadius: 26\n },\n notDayOfCurrentMonth: {\n color: themeVariables.calendarNotCurrentMonthDateColor,\n fontWeight: 'normal',\n opacity: 0\n },\n monthText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n yearText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n today: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.primaryColor\n },\n todayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n eventDay1 : {\n color: themeVariables.calendarEventDay1Color\n },\n eventDay2 : {\n color: themeVariables.calendarEventDay2Color\n },\n eventDay3 : {\n color: themeVariables.calendarEventDay3Color\n },\n selectedDay: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n selectedDayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor,\n color: themeVariables.calendarSelectedDayTextColor,\n fontWeight: 'bold'\n },\n prevMonthBtn: {\n root: {\n color: themeVariables.calendarPrevMonthIconColor\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n color: themeVariables.calendarNextMonthIconColor\n }\n } as WmIconStyles,\n prevYearBtn: {\n root: {\n color: themeVariables.calendarPrevYearIconColor\n }\n } as WmIconStyles,\n nextYearBtn: {\n root: {\n color: themeVariables.calendarNextYearIconColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n display:'flex', \n justifyContent: 'center',\n backgroundColor:'#fff',\n paddingHorizontal: 8,\n alignItems: 'center',\n },\n } as any as WmSkeletonStyles ,\n headerSkeleton: {\n root: {\n width: '100%',\n display:'flex', \n flexDirection:'row', \n alignItems: 'center',\n justifyContent: 'space-around',\n marginBottom: 16\n } \n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}]\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}] \n }\n } as WmIconStyles,\n monthText: {\n padding: 2\n },\n yearText: {\n padding: 2\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA6BxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGL,YAAY,CAAmB;IACnEM,IAAI,EAAE;MACFC,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE,GAAG;MACdC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE;MACFC,KAAK,EAAER,cAAc,CAACS;IAC1B,CAAC;IACDC,QAAQ,EAAG;MACPC,eAAe,EAAEX,cAAc,CAACY,eAAe;MAC/CC,WAAW,EAAEb,cAAc,CAACc,qBAAqB;MACjDC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,SAAS,EAAE,CAAC;MACZC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,SAAS,EAAE;IACf,CAAC;IACDC,cAAc,EAAG;MACbV,eA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ACdK,aAAa,EAAC,KAAK;QACnBF,UAAU,EAAE,QAAQ;QACpBF,cAAc,EAAE,cAAc;QAC9BK,YAAY,EAAE;MAClB;IACJ;EACJ,CAAC,CAAC;EAEFpE,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCwD,YAAY,EAAE;MACVnD,IAAI,EAAE;QACFmE,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAiB;IACjBf,YAAY,EAAE;MACVrD,IAAI,EAAE;QACFmE,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAiB;IACjBjC,SAAS,EAAE;MACPd,OAAO,EAAE;IACb,CAAC;IACDgB,QAAQ,EAAE;MACNhB,OAAO,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  /****
@@ -140,7 +140,7 @@ export class MonthView extends Component {
140
140
  const month = this.props.customMonth ? this.props.customMonth[((_this$props$date3 = this.props.date) === null || _this$props$date3 === void 0 ? void 0 : _this$props$date3.get('month')) || 0] : 'Jan';
141
141
  const year = ((_this$props$date4 = this.props.date) === null || _this$props$date4 === void 0 ? void 0 : _this$props$date4.get('year')) || 1;
142
142
  _.forEach(weekdays, element => {
143
- dayOfWeek.push(/*#__PURE__*/React.createElement(Text, {
143
+ dayOfWeek.push( /*#__PURE__*/React.createElement(Text, {
144
144
  key: element,
145
145
  style: [styles.weekdays, weekdayStyle]
146
146
  }, element));
@@ -1 +1 @@
1
- {"version":3,"names":["React","Component","Text","View","FlatList","TouchableOpacity","moment","styles","_","MonthViewProps","constructor","_defineProperty","day","createElement","Fragment","date","MonthViewState","selectedDate","MonthView","props","state","calendarArray","dates","currDate","clone","startOf","i","add","renderDay","_this$props$date","_this$props$date2","warpDayStyle","dateSelectedWarpDayStyle","renderChildDay","textDayStyle","currentDayStyle","currentDayTextStyle","notDayOfCurrentMonthStyle","selectedDayTextStyle","dateSelected","isSame","isCurrent","notCurrentMonth","dateStyle","getDayStyle","testID","format","accessibilityLabel","onPress","selectDate","style","warpDay","backgroundColor","containerStyle","flexDirection","justifyContent","alignItems","color","textStyle","get","isDateEnable","yearMonthChange","unit","type","minDate","maxDate","isSameOrBefore","isSameOrAfter","render","_this$props$date3","_this$props$date4","renderPrevYearButton","renderPrevMonthButton","renderNextYearButton","renderNextMonthButton","weekdayStyle","customWeekdays","warpRowWeekdays","warpRowControlMonthYear","monthTextStyle","yearTextStyle","weekdays","data","dayOfWeek","month","customMonth","year","forEach","element","push","key","container","txtHeaderDate","keyExtractor","item","toDate","getTime","renderItem","extraData","columnWrapperStyle","numColumns","padding"],"sources":["month-view.tsx"],"sourcesContent":["/****\n * Copied code from a repo with no active maintenance.\n * https://github.com/hungdev/react-native-customize-selected-date\n * That js lib was converted to ts and fixed bugs. \n */\nimport React, { Component } from 'react';\nimport {\n Text,\n View,\n FlatList,\n TouchableOpacity,\n ViewStyle,\n TextStyle\n} from 'react-native';\nimport moment, { Moment } from 'moment';\nimport styles from './month-view.styles'\nimport _ from 'lodash';\n\nexport class MonthViewProps {\n testID?: string = null as any;\n accessibilityLabel?: string = null as any;\n date?: Moment = null as any;\n minDate? = moment('1990-01-01', 'YYYY-MM-DD');\n maxDate? = moment('2100-01-01', 'YYYY-MM-DD');\n customMonth?: string[] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n customWeekdays?: string[] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n renderPrevYearButton?: () => React.ReactNode = null as any;\n format?='YYYY-MM-DD';\n renderPrevMonthButton?: () => React.ReactNode = null as any;\n renderNextYearButton?: () => React.ReactNode = null as any;\n renderNextMonthButton?: () => React.ReactNode = null as any;\n renderChildDay? = (day: Moment) => (<></>);\n selectDate? = (day: Moment) => {}; \n //style\n getDayStyle? = (date: Moment) => ({});\n containerStyle?: ViewStyle = null as any;\n warpRowControlMonthYear?: ViewStyle = null as any;\n warpRowWeekdays?: ViewStyle = null as any;\n weekdayStyle?: ViewStyle = null as any;\n textDayStyle?: TextStyle = null as any;\n currentDayStyle?: ViewStyle = null as any;\n currentDayTextStyle?: TextStyle = null as any;\n notDayOfCurrentMonthStyle?: ViewStyle = null as any;\n warpDayStyle?: ViewStyle = null as any;\n dateSelectedWarpDayStyle?: ViewStyle = null as any;\n selectedDayTextStyle?: TextStyle = null as any;\n monthTextStyle?: TextStyle = null as any;\n yearTextStyle?: TextStyle = null as any;\n}\n\nexport class MonthViewState {\n viewMode = 'day';\n currentYear: string = null as any;\n constructor(public selectedDate: Moment = moment()) {\n\n }\n}\n\nexport class MonthView extends Component<MonthViewProps, MonthViewState> {\n\n static defaultProps = new MonthViewProps();\n\n constructor(props: MonthViewProps) {\n super(props);\n this.state = new MonthViewState(this.props.date);\n }\n\n calendarArray (date: Moment): Moment[] {\n const dates: Moment[] = [];\n const currDate = date.clone().startOf('month').startOf('week');\n for (let i = 0; i < 42; i += 1) {\n dates[i] = currDate.clone();\n currDate.add(1, 'day');\n }\n return dates;\n }\n\n renderDay(day: Moment) {\n const { warpDayStyle, dateSelectedWarpDayStyle,\n renderChildDay, textDayStyle, currentDayStyle, currentDayTextStyle, notDayOfCurrentMonthStyle, selectedDayTextStyle } = this.props;\n const dateSelected = this.props.date?.isSame(day);\n const isCurrent = moment().isSame(day, 'date');\n const notCurrentMonth = !this.props.date?.isSame(day, 'month');\n const dateStyle = ((this.props.getDayStyle ? this.props.getDayStyle(day) : null) || {}) as any;\n return (\n <TouchableOpacity \n testID={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n accessibilityLabel={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n onPress={() => this.selectDate(day)}\n style={[styles.warpDay, warpDayStyle,\n isCurrent ? currentDayStyle : {},\n dateSelected ? { backgroundColor: '#2C1F23', ...dateSelectedWarpDayStyle } : {},\n dateStyle.containerStyle]}\n >\n <View style={{flexDirection: 'column', justifyContent: 'center', alignItems: 'center'}}>\n <Text style={[styles.day, textDayStyle,\n isCurrent ? currentDayTextStyle : {},\n notCurrentMonth ? { color: '#493D40', ...notDayOfCurrentMonthStyle } : {},\n dateSelected ? { color: '#000', ...selectedDayTextStyle } : {},\n dateStyle.textStyle]}>\n {day.get('date')}\n </Text>\n {renderChildDay && renderChildDay(day)}\n </View>\n </TouchableOpacity>\n )\n }\n\n selectDate(date: Moment) {\n if (this.isDateEnable(date)) {\n this.props.selectDate && this.props.selectDate(date)\n }\n }\n\n yearMonthChange(unit: number, type: string) {\n this.selectDate((this.props.date || moment()).clone().add(unit, type as any).startOf('month'));\n }\n\n isDateEnable(date: Moment) {\n const { minDate, maxDate } = this.props;\n return minDate?.isSameOrBefore(date) && maxDate?.isSameOrAfter(date);\n }\n\n render() {\n const {\n renderPrevYearButton, renderPrevMonthButton,\n renderNextYearButton, renderNextMonthButton,\n weekdayStyle, customWeekdays, warpRowWeekdays,\n warpRowControlMonthYear, monthTextStyle, yearTextStyle\n } = this.props\n const weekdays = customWeekdays || ['Sun', 'Mon', 'Tus', 'Wes', 'Thu', 'Fri', 'Sat']\n const data = this.calendarArray(this.props.date || moment())\n const dayOfWeek: React.ReactNode[] = [];\n const month = this.props.customMonth ? this.props.customMonth[this.props.date?.get('month') || 0]: 'Jan';\n const year = this.props.date?.get('year') || 1;\n _.forEach(weekdays, element => {\n dayOfWeek.push(<Text key={element} style={[styles.weekdays, weekdayStyle]}>{element}</Text>)\n })\n\n return (\n <View style={[styles.container, this.props.containerStyle]}>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }, warpRowControlMonthYear]}>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(-1, 'year')}>\n {renderPrevYearButton ? renderPrevYearButton() : <Text>{'<<'}</Text>}\n </TouchableOpacity>*/}\n <TouchableOpacity onPress={() => this.yearMonthChange(-1, 'month')}>\n {renderPrevMonthButton ? renderPrevMonthButton() : <Text>{'<'}</Text>}\n </TouchableOpacity>\n <View style={{flexDirection: 'row'}}>\n <Text style={[styles.txtHeaderDate, monthTextStyle]} >{month + ' '}</Text>\n <Text style={[styles.txtHeaderDate, yearTextStyle]} >{year}</Text>\n </View>\n <TouchableOpacity onPress={() => this.yearMonthChange(1, 'month')}>\n {renderNextMonthButton ? renderNextMonthButton() : <Text>{'>'}</Text>}\n </TouchableOpacity>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(1, 'year')}>\n {renderNextYearButton ? renderNextYearButton() : <Text>{'>>'}</Text>}\n </TouchableOpacity>*/}\n </View>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-around' }, warpRowWeekdays]}>\n {dayOfWeek}\n </View>\n <FlatList\n data={data}\n keyExtractor={(item) => '' + item.toDate().getTime()}\n renderItem={({ item }) => this.renderDay(item)}\n extraData={this.state}\n columnWrapperStyle={{justifyContent: 'space-between'}}\n numColumns={7}\n style={{\n padding: 4\n }}\n />\n </View>\n )\n }\n}"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,QAA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,eAAe;IAAE,GACtFM,SACG,CAAC,eACPnF,KAAA,CAAAa,aAAA,CAACT,QAAQ;MACP8E,IAAI,EAAEA,IAAK;MACXW,YAAY,EAAGC,IAAI,IAAK,EAAE,GAAGA,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,CAAE;MACrDC,UAAU,EAAEA,CAAC;QAAEH;MAAK,CAAC,KAAK,IAAI,CAAClE,SAAS,CAACkE,IAAI,CAAE;MAC/CI,SAAS,EAAE,IAAI,CAAC9E,KAAM;MACtB+E,kBAAkB,EAAE;QAAC5C,cAAc,EAAE;MAAe,CAAE;MACtD6C,UAAU,EAAE,CAAE;MACdlD,KAAK,EAAE;QACLmD,OAAO,EAAE;MACX;IAAE,CACH,CACG,CAAC;EAEX;AACF;AAAC1F,eAAA,CAtHYO,SAAS,kBAEE,IAAIT,cAAc,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Component","Text","View","FlatList","TouchableOpacity","moment","styles","_","MonthViewProps","constructor","_defineProperty","day","createElement","Fragment","date","MonthViewState","selectedDate","MonthView","props","state","calendarArray","dates","currDate","clone","startOf","i","add","renderDay","_this$props$date","_this$props$date2","warpDayStyle","dateSelectedWarpDayStyle","renderChildDay","textDayStyle","currentDayStyle","currentDayTextStyle","notDayOfCurrentMonthStyle","selectedDayTextStyle","dateSelected","isSame","isCurrent","notCurrentMonth","dateStyle","getDayStyle","testID","format","accessibilityLabel","onPress","selectDate","style","warpDay","backgroundColor","containerStyle","flexDirection","justifyContent","alignItems","color","textStyle","get","isDateEnable","yearMonthChange","unit","type","minDate","maxDate","isSameOrBefore","isSameOrAfter","render","_this$props$date3","_this$props$date4","renderPrevYearButton","renderPrevMonthButton","renderNextYearButton","renderNextMonthButton","weekdayStyle","customWeekdays","warpRowWeekdays","warpRowControlMonthYear","monthTextStyle","yearTextStyle","weekdays","data","dayOfWeek","month","customMonth","year","forEach","element","push","key","container","txtHeaderDate","keyExtractor","item","toDate","getTime","renderItem","extraData","columnWrapperStyle","numColumns","padding"],"sources":["month-view.tsx"],"sourcesContent":["/****\n * Copied code from a repo with no active maintenance.\n * https://github.com/hungdev/react-native-customize-selected-date\n * That js lib was converted to ts and fixed bugs. \n */\nimport React, { Component } from 'react';\nimport {\n Text,\n View,\n FlatList,\n TouchableOpacity,\n ViewStyle,\n TextStyle\n} from 'react-native';\nimport moment, { Moment } from 'moment';\nimport styles from './month-view.styles'\nimport _ from 'lodash';\n\nexport class MonthViewProps {\n testID?: string = null as any;\n accessibilityLabel?: string = null as any;\n date?: Moment = null as any;\n minDate? = moment('1990-01-01', 'YYYY-MM-DD');\n maxDate? = moment('2100-01-01', 'YYYY-MM-DD');\n customMonth?: string[] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n customWeekdays?: string[] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n renderPrevYearButton?: () => React.ReactNode = null as any;\n format?='YYYY-MM-DD';\n renderPrevMonthButton?: () => React.ReactNode = null as any;\n renderNextYearButton?: () => React.ReactNode = null as any;\n renderNextMonthButton?: () => React.ReactNode = null as any;\n renderChildDay? = (day: Moment) => (<></>);\n selectDate? = (day: Moment) => {}; \n //style\n getDayStyle? = (date: Moment) => ({});\n containerStyle?: ViewStyle = null as any;\n warpRowControlMonthYear?: ViewStyle = null as any;\n warpRowWeekdays?: ViewStyle = null as any;\n weekdayStyle?: ViewStyle = null as any;\n textDayStyle?: TextStyle = null as any;\n currentDayStyle?: ViewStyle = null as any;\n currentDayTextStyle?: TextStyle = null as any;\n notDayOfCurrentMonthStyle?: ViewStyle = null as any;\n warpDayStyle?: ViewStyle = null as any;\n dateSelectedWarpDayStyle?: ViewStyle = null as any;\n selectedDayTextStyle?: TextStyle = null as any;\n monthTextStyle?: TextStyle = null as any;\n yearTextStyle?: TextStyle = null as any;\n}\n\nexport class MonthViewState {\n viewMode = 'day';\n currentYear: string = null as any;\n constructor(public selectedDate: Moment = moment()) {\n\n }\n}\n\nexport class MonthView extends Component<MonthViewProps, MonthViewState> {\n\n static defaultProps = new MonthViewProps();\n\n constructor(props: MonthViewProps) {\n super(props);\n this.state = new MonthViewState(this.props.date);\n }\n\n calendarArray (date: Moment): Moment[] {\n const dates: Moment[] = [];\n const currDate = date.clone().startOf('month').startOf('week');\n for (let i = 0; i < 42; i += 1) {\n dates[i] = currDate.clone();\n currDate.add(1, 'day');\n }\n return dates;\n }\n\n renderDay(day: Moment) {\n const { warpDayStyle, dateSelectedWarpDayStyle,\n renderChildDay, textDayStyle, currentDayStyle, currentDayTextStyle, notDayOfCurrentMonthStyle, selectedDayTextStyle } = this.props;\n const dateSelected = this.props.date?.isSame(day);\n const isCurrent = moment().isSame(day, 'date');\n const notCurrentMonth = !this.props.date?.isSame(day, 'month');\n const dateStyle = ((this.props.getDayStyle ? this.props.getDayStyle(day) : null) || {}) as any;\n return (\n <TouchableOpacity \n testID={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n accessibilityLabel={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n onPress={() => this.selectDate(day)}\n style={[styles.warpDay, warpDayStyle,\n isCurrent ? currentDayStyle : {},\n dateSelected ? { backgroundColor: '#2C1F23', ...dateSelectedWarpDayStyle } : {},\n dateStyle.containerStyle]}\n >\n <View style={{flexDirection: 'column', justifyContent: 'center', alignItems: 'center'}}>\n <Text style={[styles.day, textDayStyle,\n isCurrent ? currentDayTextStyle : {},\n notCurrentMonth ? { color: '#493D40', ...notDayOfCurrentMonthStyle } : {},\n dateSelected ? { color: '#000', ...selectedDayTextStyle } : {},\n dateStyle.textStyle]}>\n {day.get('date')}\n </Text>\n {renderChildDay && renderChildDay(day)}\n </View>\n </TouchableOpacity>\n )\n }\n\n selectDate(date: Moment) {\n if (this.isDateEnable(date)) {\n this.props.selectDate && this.props.selectDate(date)\n }\n }\n\n yearMonthChange(unit: number, type: string) {\n this.selectDate((this.props.date || moment()).clone().add(unit, type as any).startOf('month'));\n }\n\n isDateEnable(date: Moment) {\n const { minDate, maxDate } = this.props;\n return minDate?.isSameOrBefore(date) && maxDate?.isSameOrAfter(date);\n }\n\n render() {\n const {\n renderPrevYearButton, renderPrevMonthButton,\n renderNextYearButton, renderNextMonthButton,\n weekdayStyle, customWeekdays, warpRowWeekdays,\n warpRowControlMonthYear, monthTextStyle, yearTextStyle\n } = this.props\n const weekdays = customWeekdays || ['Sun', 'Mon', 'Tus', 'Wes', 'Thu', 'Fri', 'Sat']\n const data = this.calendarArray(this.props.date || moment())\n const dayOfWeek: React.ReactNode[] = [];\n const month = this.props.customMonth ? this.props.customMonth[this.props.date?.get('month') || 0]: 'Jan';\n const year = this.props.date?.get('year') || 1;\n _.forEach(weekdays, element => {\n dayOfWeek.push(<Text key={element} style={[styles.weekdays, weekdayStyle]}>{element}</Text>)\n })\n\n return (\n <View style={[styles.container, this.props.containerStyle]}>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }, warpRowControlMonthYear]}>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(-1, 'year')}>\n {renderPrevYearButton ? renderPrevYearButton() : <Text>{'<<'}</Text>}\n </TouchableOpacity>*/}\n <TouchableOpacity onPress={() => this.yearMonthChange(-1, 'month')}>\n {renderPrevMonthButton ? renderPrevMonthButton() : <Text>{'<'}</Text>}\n </TouchableOpacity>\n <View style={{flexDirection: 'row'}}>\n <Text style={[styles.txtHeaderDate, monthTextStyle]} >{month + ' '}</Text>\n <Text style={[styles.txtHeaderDate, yearTextStyle]} >{year}</Text>\n </View>\n <TouchableOpacity onPress={() => this.yearMonthChange(1, 'month')}>\n {renderNextMonthButton ? renderNextMonthButton() : <Text>{'>'}</Text>}\n </TouchableOpacity>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(1, 'year')}>\n {renderNextYearButton ? renderNextYearButton() : <Text>{'>>'}</Text>}\n </TouchableOpacity>*/}\n </View>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-around' }, warpRowWeekdays]}>\n {dayOfWeek}\n </View>\n <FlatList\n data={data}\n keyExtractor={(item) => '' + item.toDate().getTime()}\n renderItem={({ item }) => this.renderDay(item)}\n extraData={this.state}\n columnWrapperStyle={{justifyContent: 'space-between'}}\n numColumns={7}\n style={{\n padding: 4\n }}\n />\n </View>\n )\n }\n}"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACEC,IAAI,EACJC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,QAGX,cAAc;AACrB,OAAOC,MAAM,MAAkB,QAAQ;AACvC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,CAAC,MAAM,QAAQ;AAEtB,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACR,IAAI;IAAAA,eAAA,6BACQ,IAAI;IAAAA,eAAA,eAClB,IAAI;IAAAA,eAAA,kBACTL,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC;IAAAK,eAAA,kBAClCL,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC;IAAAK,eAAA,sBACpB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAAAA,eAAA,yBACjF,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAAAA,eAAA,+BAC9B,IAAI;IAAAA,eAAA,iBAC3C,YAAY;IAAAA,eAAA,gCAC4B,IAAI;IAAAA,eAAA,+BACL,IAAI;IAAAA,eAAA,gCACH,IAAI;IAAAA,eAAA,yBACjCC,GAAW,iBAAMZ,KAAA,CAAAa,aAAA,CAAAb,KAAA,CAAAc,QAAA,MAAI,CAAE;IAAAH,eAAA,qB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IAAI,CAACa,eAAe,CAAC,CAAC,EAAE,OAAO;IAAE,GAC/Da,qBAAqB,GAAGA,qBAAqB,CAAC,CAAC,gBAAG1E,KAAA,CAAAa,aAAA,CAACX,IAAI,QAAE,GAAU,CACpD,CAId,CAAC,eACPF,KAAA,CAAAa,aAAA,CAACV,IAAI;MAAC+C,KAAK,EAAE,CAAC;QAAEI,aAAa,EAAE,KAAK;QAAEC,cAAc,EAAE;MAAe,CAAC,EAAEsB,eAAe;IAAE,GACtFM,SACG,CAAC,eACPnF,KAAA,CAAAa,aAAA,CAACT,QAAQ;MACP8E,IAAI,EAAEA,IAAK;MACXW,YAAY,EAAGC,IAAI,IAAK,EAAE,GAAGA,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,CAAE;MACrDC,UAAU,EAAEA,CAAC;QAAEH;MAAK,CAAC,KAAK,IAAI,CAAClE,SAAS,CAACkE,IAAI,CAAE;MAC/CI,SAAS,EAAE,IAAI,CAAC9E,KAAM;MACtB+E,kBAAkB,EAAE;QAAC5C,cAAc,EAAE;MAAe,CAAE;MACtD6C,UAAU,EAAE,CAAE;MACdlD,KAAK,EAAE;QACLmD,OAAO,EAAE;MACX;IAAE,CACH,CACG,CAAC;EAEX;AACF;AAAC1F,eAAA,CAtHYO,SAAS,kBAEE,IAAIT,cAAc,CAAC,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,5 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';
@@ -1,10 +1,10 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
6
6
  import { View, TouchableOpacity, Text } from 'react-native';
7
- import { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge } from 'lodash';
7
+ import { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge, isArray, isString } from 'lodash';
8
8
  import WmChipsProps from './chips.props';
9
9
  import { DEFAULT_CLASS } from './chips.styles';
10
10
  import WmSearch from '@wavemaker/app-rn-runtime/components/basic/search/search.component';
@@ -13,6 +13,7 @@ import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.compone
13
13
  import WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';
14
14
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
15
15
  import WmLabel from '../../basic/label/label.component';
16
+ import { isDefined } from '@wavemaker/app-rn-runtime/core/utils';
16
17
  export class WmChipsState extends BaseDatasetState {
17
18
  constructor(...args) {
18
19
  super(...args);
@@ -47,26 +48,29 @@ export default class WmChips extends BaseDatasetComponent {
47
48
  }
48
49
  break;
49
50
  case 'maxsize':
50
- if ($new) {
51
- const {
52
- datavalue
53
- } = this.state.props;
54
- const {
55
- dataItems
56
- } = this.state;
57
- let dataValueItems = Array.isArray(datavalue) ? datavalue : typeof datavalue === 'string' ? datavalue.split(',').map(item => item.trim()) : datavalue != null ? [datavalue] : [];
58
- if (dataValueItems.length >= $new) {
59
- dataValueItems = dataValueItems.slice(0, $new);
60
- const updatedItems = dataItems.map(item => ({
61
- ...item,
62
- selected: dataValueItems.includes(item.datafield)
63
- }));
64
- this.updateState({
65
- dataItems: updatedItems
66
- });
51
+ let datavalue = this.state.props.datavalue;
52
+ let dataValueItems;
53
+ if (typeof datavalue === 'string') {
54
+ dataValueItems = datavalue.split(',');
55
+ } else if (isArray(datavalue)) {
56
+ dataValueItems = datavalue;
57
+ } else {
58
+ if (isDefined(datavalue)) {
59
+ dataValueItems = [datavalue];
67
60
  }
68
- break;
69
61
  }
62
+ dataValueItems = dataValueItems.map(item => isString(item) ? item.trim() : item);
63
+ if (dataValueItems.length >= $new) {
64
+ dataValueItems = dataValueItems.slice(0, $new);
65
+ let updatedItems = this.state.dataItems.map(item => ({
66
+ ...item,
67
+ selected: dataValueItems.includes(item.datafield)
68
+ }));
69
+ this.updateState({
70
+ dataItems: updatedItems
71
+ });
72
+ }
73
+ break;
70
74
  }
71
75
  }
72
76
  reset() {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","TouchableOpacity","Text","clone","findIndex","get","isUndefined","pull","forEach","filter","find","isEqual","merge","WmChipsProps","DEFAULT_CLASS","WmSearch","BaseDatasetComponent","BaseDatasetState","WmIcon","WmPicture","AccessibilityWidgetType","getAccessibilityProps","WmLabel","WmChipsState","constructor","args","_defineProperty","WmChips","props","onComponentInit","c","searchRef","val","onPropertyChange","name","$new","$old","length","updateState","chipsList","datavalue","state","dataItems","dataValueItems","Array","isArray","split","map","item","trim","slice","updatedItems","selected","includes","datafield","reset","_this$searchRef","query","onDataItemsUpdate","isDefaultQuery","updateDefaultQueryModel","addItem","$event","widget","_this$props","_this$props2","newChipList","allowAdd","push","queryModel","isFormFieldWidget","isDuplicate","resetSearchModel","invokeEvent","invokeEventCallback","toBoolean","setDatavalue","computeDisplayValue","displayValue","displayexp","displayfield","selectChip","chipItem","maxsize","selectedItem","d","key","dataValue","updateDatavalue","updateMaxSize","prevDatavalue","createCustomDataModel","dataObject","isCustom","clearSearch","chipListLength","saturate","removeItem","index","allowRemove","isDefaultView","_this$state$dataItems","searchable","renderChip","isSelected","createElement","_extends","getTestPropsForAction","CHIPS","style","styles","chip","activeChip","onPress","disabled","readonly","id","getTestId","iconclass","iconsize","doneIcon","icon","color","activeChipLabel","_showSkeleton","imageStyles","picturesource","imgSrc","shape","root","width","chipLabel","clearIcon","onTap","selectedItems","componentDidMount","componentDidUpdate","prevProps","prevState","_this$searchRef2","computePosition","renderSkeleton","chipsWrapper","renderWidget","chips","searchContainer","flexDirection","inputposition","search","placeholder","maxSizeReached","listener","dataset","searchkey","minchars","autofocus","displayexpression","getDisplayExpression","displayimagesrc","onSubmit","bind","onChange","_this$props$listener","_this$props$listener2","onComponentChange","showSearchIcon","showclear","type","flexWrap"],"sources":["chips.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, TouchableOpacity, Text, DimensionValue } from 'react-native';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge, isArray, isString } from 'lodash';\nimport WmChipsProps from './chips.props';\nimport { DEFAULT_CLASS, WmChipsStyles } from './chips.styles';\nimport WmSearch from '@wavemaker/app-rn-runtime/components/basic/search/search.component';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport WmLabel from '../../basic/label/label.component';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmChipsState extends BaseDatasetState<WmChipsProps> {\n chipsList: any = [];\n saturate: any;\n}\n\nexport default class WmChips extends BaseDatasetComponent<WmChipsProps, WmChipsState, WmChipsStyles> {\n constructor(props: WmChipsProps) {\n super(props, DEFAULT_CLASS, new WmChipsProps(), new WmChipsState());\n }\n\n private searchRef: WmSearch = null as any;\n private maxSizeReached = 'Max size reached';\n private isDefaultQuery: boolean = true;\n private prevDatavalue: any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmSearch) {\n this.searchRef = c;\n }\n }\n };\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'datavalue':\n if (!$new || $new.length === 0) {\n this.updateState({\n chipsList: [],\n } as WmChipsState);\n }\n break;\n case 'maxsize':\n if ($new) {\n const { datavalue } = this.state.props;\n const { dataItems } = this.state;\n \n let dataValueItems = Array.isArray(datavalue)\n ? datavalue\n : typeof datavalue === 'string'\n ? datavalue.split(',').map((item) => item.trim())\n : datavalue != null\n ? [datavalue]\n : [];\n\n if (dataValueItems.length >= $new) {\n dataValueItems = dataValueItems.slice(0, $new);\n const updatedItems = dataItems.map((item:any) => ({\n ...item,\n selected: dataValueItems.includes(item.datafield),\n }));\n this.updateState({ dataItems: updatedItems } as WmChipsState);\n }\n\n break;\n }\n }\n }\n\n reset() {\n if (this.searchRef?.state.props.query) {\n this.searchRef.reset();\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isDefaultQuery = true;\n this.updateDefaultQueryModel();\n }\n\n addItem($event: any, widget: any) {\n let newChipList = clone(this.state.chipsList),\n allowAdd;\n newChipList.push(widget.queryModel);\n const isFormFieldWidget = get(this.props, 'formfield');\n if (this.isDuplicate(widget.queryModel)) {\n this.resetSearchModel();\n return;\n }\n\n // @ts-ignore\n allowAdd = isFormFieldWidget ? this.props?.invokeEvent('onBeforeadd', [null, this, widget.queryModel]) : this.invokeEventCallback('onBeforeadd', [null, this, widget.queryModel]);\n\n if (!isUndefined(allowAdd) && !this.toBoolean(allowAdd)) {\n return;\n }\n\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n\n // @ts-ignore\n isFormFieldWidget ? this.props?.invokeEvent('onAdd', [null, this, widget.queryModel]) : this.invokeEventCallback('onAdd', [null, this, widget.queryModel]);\n this.resetSearchModel();\n }\n\n computeDisplayValue() {\n this.updateState({\n props: {\n displayValue: ((this.state.dataItems || [] as any)\n .filter((item: any) => item.selected)\n .map((item: any) => item.displayexp || item.displayfield)) || ''\n }\n } as WmChipsState);\n }\n\n selectChip(chipItem: any) {\n if (!chipItem.selected && this.state.props.maxsize > 0 && (this.state.chipsList.length === this.state.props.maxsize)) {\n return;\n }\n chipItem.selected = !chipItem.selected;\n const newChipList: any = [];\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, chipItem.key));\n selectedItem.selected = chipItem.selected;\n forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n newChipList.push(item);\n }\n });\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n }\n\n setDatavalue(newChipList: any) {\n const dataValue = newChipList.map((item: any) => item.datafield);\n this.updateDatavalue(dataValue);\n this.updateMaxSize(newChipList.length);\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [null, this, dataValue, this.prevDatavalue])\n }\n this.prevDatavalue = dataValue;\n }\n\n toBoolean = (val: any) => ((val && val !== 'false') ? true : false);\n\n // Prepare datavalue object from a string(junk) value when datafield is allFields.\n createCustomDataModel(val: string) {\n return {\n key: `${this.state.props.name}_item${this.state.chipsList.length}`,\n dataObject: val,\n displayfield: val,\n datafield: val,\n isCustom: true\n }\n }\n\n resetSearchModel() {\n (this as any).searchRef.isDefaultQuery = false;\n this.searchRef.clearSearch();\n }\n\n isDuplicate(item: any) {\n return findIndex(this.state.chipsList, {datafield: item.datafield}) > -1;\n }\n\n // Check if max size is reached\n private updateMaxSize(chipListLength: number) {\n const saturate = this.state.props.maxsize > 0 && (chipListLength || this.state.chipsList.length) === this.state.props.maxsize;\n \n this.updateState({\n saturate: saturate\n } as WmChipsState);\n }\n\n removeItem(item: any, index: any) {\n let newChipList = clone(this.state.chipsList);\n const isFormFieldWidget = get(this.props, 'formfield');\n newChipList = pull(newChipList, item);\n // prevent deletion if the before-remove event callback returns false\n // @ts-ignore\n const allowRemove = isFormFieldWidget ? this.props.invokeEvent('onBeforeremove',[null, this, item]) : this.invokeEventCallback('onBeforeremove',[null, this, item]);\n if (!isUndefined(allowRemove) && !this.toBoolean(allowRemove)) {\n return;\n }\n\n this.updateState({\n chipsList: newChipList\n } as WmChipsState,()=>{\n this.setDatavalue(newChipList);\n });\n // @ts-ignore\n isFormFieldWidget ? this.props.invokeEvent('onRemove', [null, this, item]) : this.invokeEventCallback('onRemove', [null, this, item]);\n }\n\n private isDefaultView() {\n return !this.state.props.searchable && this.state.dataItems?.length <= 10;\n }\n\n renderChip(item: any, index: any) {\n const isSelected = this.isDefaultView() ? item.selected : true;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction('chip'+ index)}\n {...getAccessibilityProps(AccessibilityWidgetType.CHIPS, {...this.state.props, selected: isSelected})}\n style={[this.styles.chip, isSelected ? this.styles.activeChip : null]}\n key={'chipitem_'+ index}\n onPress={() => {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n if (this.isDefaultView()) {\n this.selectChip(item);\n }\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onChipclick', [null, this, item]);\n // @ts-ignore\n this.props.invokeEvent('onChipselect', [null, this, item]);\n } else {\n this.invokeEventCallback('onChipclick', [null, this, item]);\n this.invokeEventCallback('onChipselect', [null, this, item]);\n }\n }}>\n {isSelected && this.isDefaultView() ? <WmIcon id={this.getTestId('checkicon')} iconclass={'wm-sl-l sl-check'} iconsize={16} styles={merge({}, this.styles.doneIcon, {icon: {color: isSelected ? this.styles.activeChipLabel.color : null}})}></WmIcon> : null}\n { this._showSkeleton ? null : <WmPicture id={this.getTestId('chip'+ index + 'picture')} styles={this.styles.imageStyles} picturesource={item.imgSrc} shape='circle'></WmPicture>}\n { this._showSkeleton ? <WmLabel styles={{root: {width: 50}}}/> : <Text {...this.getTestPropsForAction('chip'+ index+'label')}style={[this.styles.chipLabel, isSelected ? this.styles.activeChipLabel : null]}>{item.displayexp || item.displayfield}</Text>}\n {!this.isDefaultView() && !(this.state.props.disabled||this.state.props.readonly) ? <WmIcon id={this.getTestId('clearbtn')} iconclass={'wi wi-clear'} iconsize={16} styles={this.styles.clearIcon} onTap={() => this.removeItem(item, index)}></WmIcon> : null}\n </TouchableOpacity>\n )\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItems = filter(this.state.dataItems, (item) => item.selected);\n if (selectedItems.length) {\n this.updateState({\n chipsList: selectedItems\n } as WmChipsState);\n this.updateMaxSize(selectedItems.length);\n }\n this.isDefaultQuery = false;\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n componentDidUpdate(prevProps: WmChipsProps, prevState: WmChipsState) {\n super.componentDidUpdate(prevProps, prevState);\n if (prevState.chipsList !== this.state.chipsList) {\n this.searchRef?.computePosition();\n }\n } \n renderSkeleton(): React.ReactNode {\n return (<View style={this.styles.root}>\n <View style={this.styles.chipsWrapper}>{ \n [{}, {}, {}].map((item: any, index: any) => this.renderChip(item, index)) }\n </View>\n </View>)\n }\n\n renderWidget(props: WmChipsProps) {\n const chips = this.state.chipsList;\n return (<View style={this.styles.root}>\n\n <View style={this.styles.chipsWrapper}>\n {\n this.isDefaultView() ? this.state.dataItems.map((item: any, index: any) => this.renderChip(item, index)) : null\n }\n { props.searchable || !this.isDefaultView() ?\n <View style={[this.styles.searchContainer, {flexDirection: props.inputposition === 'first' ? 'column' : 'column-reverse'}]}>\n <WmSearch\n id={this.getTestId('search')}\n name=\"app-chip-search\"\n styles={this.styles.search}\n placeholder={this.state.saturate ? this.maxSizeReached : props.placeholder}\n listener={this.listener}\n dataset={props.dataset}\n searchkey={props.searchkey}\n minchars={props.minchars}\n autofocus={props.autofocus}\n disabled={props.disabled || props.readonly || this.state.saturate}\n readonly={props.readonly}\n displayexpression={props.displayexpression}\n getDisplayExpression={props.getDisplayExpression}\n displayimagesrc={props.displayimagesrc}\n displayfield={props.displayfield}\n datafield={props.datafield}\n onSubmit={this.addItem.bind(this)}\n onChange={() => {\n this.isDefaultQuery = false;\n this.props.listener?.onComponentChange && this.props.listener?.onComponentChange(this)\n }}\n showSearchIcon={false}\n showclear={false}\n type={props.minchars === 0 ? 'autocomplete' : 'search'}/>\n <View style={{ flexDirection: 'row', flexWrap: 'wrap'}}>\n {chips && chips.length ?\n chips.map((item: any, index: any) => this.renderChip(item, index))\n : null}\n </View>\n </View>\n : null }\n </View>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAwB,cAAc;AAE3E,SAASC,KAAK,EAAEC,SAAS,EAAEC,GAAG,EAAEC,WAAW,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,QAA2B,QAAQ;AAC3H,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,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AA,IAAAC,oBAAA,EAAAC,qBAAA;QACd,IAAI,CAACxG,cAAc,GAAG,KAAK;QAC3B,EAAAuG,oBAAA,OAAI,CAACtI,KAAK,CAAC2H,QAAQ,cAAAW,oBAAA,uBAAnBA,oBAAA,CAAqBE,iBAAiB,OAAAD,qBAAA,GAAI,IAAI,CAACvI,KAAK,CAAC2H,QAAQ,cAAAY,qBAAA,uBAAnBA,qBAAA,CAAqBC,iBAAiB,CAAC,IAAI,CAAC;MACxF,CAAE;MACFC,cAAc,EAAE,KAAM;MACtBC,SAAS,EAAE,KAAM;MACjBC,IAAI,EAAE3I,KAAK,CAAC8H,QAAQ,KAAK,CAAC,GAAG,cAAc,GAAG;IAAS,CAAC,CAAC,eACzD3J,KAAA,CAAA0G,aAAA,CAACzG,IAAI;MAAC6G,KAAK,EAAE;QAAEqC,aAAa,EAAE,KAAK;QAAEsB,QAAQ,EAAE;MAAM;IAAE,GACpDxB,KAAK,IAAIA,KAAK,CAAC3G,MAAM,GACtB2G,KAAK,CAACjG,GAAG,CAAC,CAACC,IAAS,EAAEkD,KAAU,KAAK,IAAI,CAACK,UAAU,CAACvD,IAAI,EAAEkD,KAAK,CAAC,CAAC,GAChE,IACE,CACJ,CAAC,GACJ,IACD,CACF,CAAC;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","TouchableOpacity","Text","clone","findIndex","get","isUndefined","pull","forEach","filter","find","isEqual","merge","isArray","isString","WmChipsProps","DEFAULT_CLASS","WmSearch","BaseDatasetComponent","BaseDatasetState","WmIcon","WmPicture","AccessibilityWidgetType","getAccessibilityProps","WmLabel","isDefined","WmChipsState","constructor","args","_defineProperty","WmChips","props","onComponentInit","c","searchRef","val","onPropertyChange","name","$new","$old","length","updateState","chipsList","datavalue","state","dataValueItems","split","map","item","trim","slice","updatedItems","dataItems","selected","includes","datafield","reset","_this$searchRef","query","onDataItemsUpdate","isDefaultQuery","updateDefaultQueryModel","addItem","$event","widget","_this$props","_this$props2","newChipList","allowAdd","push","queryModel","isFormFieldWidget","isDuplicate","resetSearchModel","invokeEvent","invokeEventCallback","toBoolean","setDatavalue","computeDisplayValue","displayValue","displayexp","displayfield","selectChip","chipItem","maxsize","selectedItem","d","key","dataValue","updateDatavalue","updateMaxSize","prevDatavalue","createCustomDataModel","dataObject","isCustom","clearSearch","chipListLength","saturate","removeItem","index","allowRemove","isDefaultView","_this$state$dataItems","searchable","renderChip","isSelected","createElement","_extends","getTestPropsForAction","CHIPS","style","styles","chip","activeChip","onPress","disabled","readonly","id","getTestId","iconclass","iconsize","doneIcon","icon","color","activeChipLabel","_showSkeleton","imageStyles","picturesource","imgSrc","shape","root","width","chipLabel","clearIcon","onTap","selectedItems","componentDidMount","componentDidUpdate","prevProps","prevState","_this$searchRef2","computePosition","renderSkeleton","chipsWrapper","renderWidget","chips","searchContainer","flexDirection","inputposition","search","placeholder","maxSizeReached","listener","dataset","searchkey","minchars","autofocus","displayexpression","getDisplayExpression","displayimagesrc","onSubmit","bind","onChange","_this$props$listener","_this$props$listener2","onComponentChange","showSearchIcon","showclear","type","flexWrap"],"sources":["chips.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, TouchableOpacity, Text, DimensionValue } from 'react-native';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge, isArray, isString } from 'lodash';\nimport WmChipsProps from './chips.props';\nimport { DEFAULT_CLASS, WmChipsStyles } from './chips.styles';\nimport WmSearch from '@wavemaker/app-rn-runtime/components/basic/search/search.component';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport WmLabel from '../../basic/label/label.component';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmChipsState extends BaseDatasetState<WmChipsProps> {\n chipsList: any = [];\n saturate: any;\n}\n\nexport default class WmChips extends BaseDatasetComponent<WmChipsProps, WmChipsState, WmChipsStyles> {\n constructor(props: WmChipsProps) {\n super(props, DEFAULT_CLASS, new WmChipsProps(), new WmChipsState());\n }\n\n private searchRef: WmSearch = null as any;\n private maxSizeReached = 'Max size reached';\n private isDefaultQuery: boolean = true;\n private prevDatavalue: any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmSearch) {\n this.searchRef = c;\n }\n }\n };\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'datavalue':\n if (!$new || $new.length === 0) {\n this.updateState({\n chipsList: [],\n } as WmChipsState);\n }\n break;\n case 'maxsize':\n let datavalue = this.state.props.datavalue;\n let dataValueItems: any;\n if (typeof datavalue === 'string') {\n dataValueItems = datavalue.split(',');\n } else if (isArray(datavalue)) {\n dataValueItems = datavalue;\n } else {\n if (isDefined(datavalue)) {\n dataValueItems = [datavalue];\n }\n }\n dataValueItems = dataValueItems.map((item: any) =>\n isString(item) ? item.trim() : item\n );\n if (dataValueItems.length >= $new) {\n dataValueItems = dataValueItems.slice(0, $new);\n let updatedItems = this.state.dataItems.map((item: any) => ({\n ...item,\n selected: dataValueItems.includes(item.datafield),\n }));\n this.updateState({ dataItems: updatedItems } as WmChipsState);\n }\n break;\n }\n }\n\n reset() {\n if (this.searchRef?.state.props.query) {\n this.searchRef.reset();\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isDefaultQuery = true;\n this.updateDefaultQueryModel();\n }\n\n addItem($event: any, widget: any) {\n let newChipList = clone(this.state.chipsList),\n allowAdd;\n newChipList.push(widget.queryModel);\n const isFormFieldWidget = get(this.props, 'formfield');\n if (this.isDuplicate(widget.queryModel)) {\n this.resetSearchModel();\n return;\n }\n\n // @ts-ignore\n allowAdd = isFormFieldWidget ? this.props?.invokeEvent('onBeforeadd', [null, this, widget.queryModel]) : this.invokeEventCallback('onBeforeadd', [null, this, widget.queryModel]);\n\n if (!isUndefined(allowAdd) && !this.toBoolean(allowAdd)) {\n return;\n }\n\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n\n // @ts-ignore\n isFormFieldWidget ? this.props?.invokeEvent('onAdd', [null, this, widget.queryModel]) : this.invokeEventCallback('onAdd', [null, this, widget.queryModel]);\n this.resetSearchModel();\n }\n\n computeDisplayValue() {\n this.updateState({\n props: {\n displayValue: ((this.state.dataItems || [] as any)\n .filter((item: any) => item.selected)\n .map((item: any) => item.displayexp || item.displayfield)) || ''\n }\n } as WmChipsState);\n }\n\n selectChip(chipItem: any) {\n if (!chipItem.selected && this.state.props.maxsize > 0 && (this.state.chipsList.length === this.state.props.maxsize)) {\n return;\n }\n chipItem.selected = !chipItem.selected;\n const newChipList: any = [];\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, chipItem.key));\n selectedItem.selected = chipItem.selected;\n forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n newChipList.push(item);\n }\n });\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n }\n\n setDatavalue(newChipList: any) {\n const dataValue = newChipList.map((item: any) => item.datafield);\n this.updateDatavalue(dataValue);\n this.updateMaxSize(newChipList.length);\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [null, this, dataValue, this.prevDatavalue])\n }\n this.prevDatavalue = dataValue;\n }\n\n toBoolean = (val: any) => ((val && val !== 'false') ? true : false);\n\n // Prepare datavalue object from a string(junk) value when datafield is allFields.\n createCustomDataModel(val: string) {\n return {\n key: `${this.state.props.name}_item${this.state.chipsList.length}`,\n dataObject: val,\n displayfield: val,\n datafield: val,\n isCustom: true\n }\n }\n\n resetSearchModel() {\n (this as any).searchRef.isDefaultQuery = false;\n this.searchRef.clearSearch();\n }\n\n isDuplicate(item: any) {\n return findIndex(this.state.chipsList, {datafield: item.datafield}) > -1;\n }\n\n // Check if max size is reached\n private updateMaxSize(chipListLength: number) {\n const saturate = this.state.props.maxsize > 0 && (chipListLength || this.state.chipsList.length) === this.state.props.maxsize;\n \n this.updateState({\n saturate: saturate\n } as WmChipsState);\n }\n\n removeItem(item: any, index: any) {\n let newChipList = clone(this.state.chipsList);\n const isFormFieldWidget = get(this.props, 'formfield');\n newChipList = pull(newChipList, item);\n // prevent deletion if the before-remove event callback returns false\n // @ts-ignore\n const allowRemove = isFormFieldWidget ? this.props.invokeEvent('onBeforeremove',[null, this, item]) : this.invokeEventCallback('onBeforeremove',[null, this, item]);\n if (!isUndefined(allowRemove) && !this.toBoolean(allowRemove)) {\n return;\n }\n\n this.updateState({\n chipsList: newChipList\n } as WmChipsState,()=>{\n this.setDatavalue(newChipList);\n });\n // @ts-ignore\n isFormFieldWidget ? this.props.invokeEvent('onRemove', [null, this, item]) : this.invokeEventCallback('onRemove', [null, this, item]);\n }\n\n private isDefaultView() {\n return !this.state.props.searchable && this.state.dataItems?.length <= 10;\n }\n\n renderChip(item: any, index: any) {\n const isSelected = this.isDefaultView() ? item.selected : true;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction('chip'+ index)}\n {...getAccessibilityProps(AccessibilityWidgetType.CHIPS, {...this.state.props, selected: isSelected})}\n style={[this.styles.chip, isSelected ? this.styles.activeChip : null]}\n key={'chipitem_'+ index}\n onPress={() => {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n if (this.isDefaultView()) {\n this.selectChip(item);\n }\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onChipclick', [null, this, item]);\n // @ts-ignore\n this.props.invokeEvent('onChipselect', [null, this, item]);\n } else {\n this.invokeEventCallback('onChipclick', [null, this, item]);\n this.invokeEventCallback('onChipselect', [null, this, item]);\n }\n }}>\n {isSelected && this.isDefaultView() ? <WmIcon id={this.getTestId('checkicon')} iconclass={'wm-sl-l sl-check'} iconsize={16} styles={merge({}, this.styles.doneIcon, {icon: {color: isSelected ? this.styles.activeChipLabel.color : null}})}></WmIcon> : null}\n { this._showSkeleton ? null : <WmPicture id={this.getTestId('chip'+ index + 'picture')} styles={this.styles.imageStyles} picturesource={item.imgSrc} shape='circle'></WmPicture>}\n { this._showSkeleton ? <WmLabel styles={{root: {width: 50}}}/> : <Text {...this.getTestPropsForAction('chip'+ index+'label')}style={[this.styles.chipLabel, isSelected ? this.styles.activeChipLabel : null]}>{item.displayexp || item.displayfield}</Text>}\n {!this.isDefaultView() && !(this.state.props.disabled||this.state.props.readonly) ? <WmIcon id={this.getTestId('clearbtn')} iconclass={'wi wi-clear'} iconsize={16} styles={this.styles.clearIcon} onTap={() => this.removeItem(item, index)}></WmIcon> : null}\n </TouchableOpacity>\n )\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItems = filter(this.state.dataItems, (item) => item.selected);\n if (selectedItems.length) {\n this.updateState({\n chipsList: selectedItems\n } as WmChipsState);\n this.updateMaxSize(selectedItems.length);\n }\n this.isDefaultQuery = false;\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n componentDidUpdate(prevProps: WmChipsProps, prevState: WmChipsState) {\n super.componentDidUpdate(prevProps, prevState);\n if (prevState.chipsList !== this.state.chipsList) {\n this.searchRef?.computePosition();\n }\n } \n renderSkeleton(): React.ReactNode {\n return (<View style={this.styles.root}>\n <View style={this.styles.chipsWrapper}>{ \n [{}, {}, {}].map((item: any, index: any) => this.renderChip(item, index)) }\n </View>\n </View>)\n }\n\n renderWidget(props: WmChipsProps) {\n const chips = this.state.chipsList;\n return (<View style={this.styles.root}>\n\n <View style={this.styles.chipsWrapper}>\n {\n this.isDefaultView() ? this.state.dataItems.map((item: any, index: any) => this.renderChip(item, index)) : null\n }\n { props.searchable || !this.isDefaultView() ?\n <View style={[this.styles.searchContainer, {flexDirection: props.inputposition === 'first' ? 'column' : 'column-reverse'}]}>\n <WmSearch\n id={this.getTestId('search')}\n name=\"app-chip-search\"\n styles={this.styles.search}\n placeholder={this.state.saturate ? this.maxSizeReached : props.placeholder}\n listener={this.listener}\n dataset={props.dataset}\n searchkey={props.searchkey}\n minchars={props.minchars}\n autofocus={props.autofocus}\n disabled={props.disabled || props.readonly || this.state.saturate}\n readonly={props.readonly}\n displayexpression={props.displayexpression}\n getDisplayExpression={props.getDisplayExpression}\n displayimagesrc={props.displayimagesrc}\n displayfield={props.displayfield}\n datafield={props.datafield}\n onSubmit={this.addItem.bind(this)}\n onChange={() => {\n this.isDefaultQuery = false;\n this.props.listener?.onComponentChange && this.props.listener?.onComponentChange(this)\n }}\n showSearchIcon={false}\n showclear={false}\n type={props.minchars === 0 ? 'autocomplete' : 'search'}/>\n <View style={{ flexDirection: 'row', flexWrap: 'wrap'}}>\n {chips && chips.length ?\n chips.map((item: any, index: any) => this.renderChip(item, index))\n : null}\n </View>\n </View>\n : null }\n </View>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAwB,cAAc;AAE3E,SAASC,KAAK,EAAEC,SAAS,EAAEC,GAAG,EAAEC,WAAW,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,QAAQ;AAC3H,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,sEAAsE;AAC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Aa;MACjC1B,SAAS,EAAExB,KAAK,CAACwB,SAAU;MAC3ByG,QAAQ,EAAE,IAAI,CAAClG,OAAO,CAACmG,IAAI,CAAC,IAAI,CAAE;MAClCC,QAAQ,EAAEA,CAAA,KAAM;QAAA,IAAAC,oBAAA,EAAAC,qBAAA;QACd,IAAI,CAACxG,cAAc,GAAG,KAAK;QAC3B,EAAAuG,oBAAA,OAAI,CAACpI,KAAK,CAACyH,QAAQ,cAAAW,oBAAA,uBAAnBA,oBAAA,CAAqBE,iBAAiB,OAAAD,qBAAA,GAAI,IAAI,CAACrI,KAAK,CAACyH,QAAQ,cAAAY,qBAAA,uBAAnBA,qBAAA,CAAqBC,iBAAiB,CAAC,IAAI,CAAC;MACxF,CAAE;MACFC,cAAc,EAAE,KAAM;MACtBC,SAAS,EAAE,KAAM;MACjBC,IAAI,EAAEzI,KAAK,CAAC4H,QAAQ,KAAK,CAAC,GAAG,cAAc,GAAG;IAAS,CAAC,CAAC,eACzD5J,KAAA,CAAA2G,aAAA,CAAC1G,IAAI;MAAC8G,KAAK,EAAE;QAAEqC,aAAa,EAAE,KAAK;QAAEsB,QAAQ,EAAE;MAAM;IAAE,GACpDxB,KAAK,IAAIA,KAAK,CAACzG,MAAM,GACtByG,KAAK,CAAClG,GAAG,CAAC,CAACC,IAAS,EAAEmD,KAAU,KAAK,IAAI,CAACK,UAAU,CAACxD,IAAI,EAAEmD,KAAK,CAAC,CAAC,GAChE,IACE,CACJ,CAAC,GACJ,IACD,CACF,CAAC;EACT;AACF","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -1,5 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';
@@ -1,5 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import React from 'react';
@@ -116,7 +116,7 @@ export default class DatePickerComponnent extends React.Component {
116
116
  }
117
117
  render() {
118
118
  return this.state.showDatePicker || this.state.showTimePicker ? /*#__PURE__*/React.createElement(ModalConsumer, null, modalService => {
119
- modalService.showModal(this.prepareModalOptions(/*#__PURE__*/React.createElement(View, {
119
+ modalService.showModal(this.prepareModalOptions( /*#__PURE__*/React.createElement(View, {
120
120
  style: this.state.showDatePicker ? styles.content : {}
121
121
  }, this.state.showDatePicker && /*#__PURE__*/React.createElement(DatePickerModalContent, {
122
122
  mode: "single",