@wavemaker/app-rn-runtime 11.4.0-next.1417013 → 11.4.0-next.1417014

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 (223) hide show
  1. app-rn-runtime/actions/notification-action.js +5 -4
  2. app-rn-runtime/actions/notification-action.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
  4. app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
  6. app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
  7. app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -1
  8. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  9. app-rn-runtime/components/advanced/login/login.component.js +1 -1
  10. app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
  11. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +5 -5
  12. app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
  13. app-rn-runtime/components/advanced/webview/webview.component.js +1 -1
  14. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  15. app-rn-runtime/components/basic/anchor/anchor.component.js +1 -1
  16. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  17. app-rn-runtime/components/basic/button/button.component.js +1 -1
  18. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  19. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
  20. app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
  21. app-rn-runtime/components/basic/icon/icon.component.js +1 -1
  22. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  23. app-rn-runtime/components/basic/label/label.component.js +1 -1
  24. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  25. app-rn-runtime/components/basic/message/message.component.js +1 -1
  26. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  27. app-rn-runtime/components/basic/picture/picture.component.js +37 -26
  28. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  29. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -2
  30. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  31. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +1 -1
  32. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  33. app-rn-runtime/components/basic/search/search.component.js +4 -1
  34. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  35. app-rn-runtime/components/basic/spinner/spinner.component.js +1 -1
  36. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  37. app-rn-runtime/components/basic/video/video.component.js +56 -0
  38. app-rn-runtime/components/basic/video/video.component.js.map +1 -0
  39. app-rn-runtime/components/basic/video/video.props.js +22 -0
  40. app-rn-runtime/components/basic/video/video.props.js.map +1 -0
  41. app-rn-runtime/components/basic/video/video.styles.js +11 -0
  42. app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
  43. app-rn-runtime/components/container/accordion/accordion.component.js +1 -1
  44. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  45. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
  46. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  47. app-rn-runtime/components/container/container.component.js +1 -1
  48. app-rn-runtime/components/container/container.component.js.map +1 -1
  49. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
  50. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  51. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
  52. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  53. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
  54. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  55. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
  56. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  57. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
  58. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  59. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
  60. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
  61. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
  62. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
  63. app-rn-runtime/components/container/panel/panel.component.js +1 -1
  64. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  65. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +12 -4
  66. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  67. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +2 -1
  68. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  69. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +5 -2
  70. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  71. app-rn-runtime/components/container/tabs/tabs.component.js +80 -64
  72. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  73. app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
  74. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  75. app-rn-runtime/components/container/tabs/tabs.styles.js +1 -1
  76. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  77. app-rn-runtime/components/container/tile/tile.component.js +1 -1
  78. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  79. app-rn-runtime/components/container/wizard/wizard.component.js +1 -1
  80. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  81. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
  82. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  83. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  84. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  85. app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
  86. app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
  87. app-rn-runtime/components/data/card/card.component.js +1 -1
  88. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  89. app-rn-runtime/components/data/form/form-action/form-action.component.js +0 -6
  90. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  91. app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
  92. app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
  93. app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -1
  94. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  95. app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
  96. app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
  97. app-rn-runtime/components/data/form/form.component.js +2 -31
  98. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  99. app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
  100. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  101. app-rn-runtime/components/data/list/list.component.js +17 -8
  102. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  103. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +3 -2
  104. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  105. app-rn-runtime/components/device/camera/camera.component.js +9 -4
  106. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  107. app-rn-runtime/components/device/camera/camera.props.js +0 -1
  108. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  109. app-rn-runtime/components/dialogs/dialog/dialog.component.js +1 -1
  110. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  111. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
  112. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
  113. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
  114. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  115. app-rn-runtime/components/input/baseinput/baseinput.component.js +7 -0
  116. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  117. app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
  118. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  119. app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
  120. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  121. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
  122. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  123. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  124. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  125. app-rn-runtime/components/input/epoch/base-datetime.component.js +1 -1
  126. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  127. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
  128. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  129. app-rn-runtime/components/input/number/number.component.js +0 -9
  130. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  131. app-rn-runtime/components/input/radioset/radioset.component.js +0 -40
  132. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  133. app-rn-runtime/components/input/rating/rating.component.js +1 -1
  134. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  135. app-rn-runtime/components/input/slider/slider.component.js +1 -1
  136. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  137. app-rn-runtime/components/input/switch/switch.component.js +19 -22
  138. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  139. app-rn-runtime/components/input/switch/switch.styles.js +7 -7
  140. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  141. app-rn-runtime/components/input/text/text.component.js +1 -10
  142. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  143. app-rn-runtime/components/input/textarea/textarea.component.js +0 -10
  144. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  145. app-rn-runtime/components/input/toggle/toggle.component.js +1 -1
  146. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  147. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
  148. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  149. app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
  150. app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
  151. app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
  152. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  153. app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
  154. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  155. app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
  156. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  157. app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
  158. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  159. app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
  160. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  161. app-rn-runtime/components/page/content/content.component.js +1 -1
  162. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  163. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  164. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  165. app-rn-runtime/components/page/page-content/page-content.component.js +2 -2
  166. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  167. app-rn-runtime/components/page/page.component.js +1 -1
  168. app-rn-runtime/components/page/page.component.js.map +1 -1
  169. app-rn-runtime/components/page/partial/partial.component.js +1 -1
  170. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  171. app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
  172. app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
  173. app-rn-runtime/components/page/partial-container/partial-container.styles.js +2 -1
  174. app-rn-runtime/components/page/partial-container/partial-container.styles.js.map +1 -1
  175. app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
  176. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  177. app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
  178. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  179. app-rn-runtime/core/asset.provider.js +5 -0
  180. app-rn-runtime/core/asset.provider.js.map +1 -0
  181. app-rn-runtime/core/base.component.js +113 -41
  182. app-rn-runtime/core/base.component.js.map +1 -1
  183. app-rn-runtime/core/imageSizeEstimator.js +1 -0
  184. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  185. app-rn-runtime/core/injector.js +15 -1
  186. app-rn-runtime/core/injector.js.map +1 -1
  187. app-rn-runtime/core/tappable.component.js +9 -2
  188. app-rn-runtime/core/tappable.component.js.map +1 -1
  189. app-rn-runtime/core/utils.js +6 -0
  190. app-rn-runtime/core/utils.js.map +1 -1
  191. app-rn-runtime/gestures/swipe.animation.js +105 -0
  192. app-rn-runtime/gestures/swipe.animation.js.map +1 -0
  193. app-rn-runtime/package.json +5 -5
  194. app-rn-runtime/runtime/App.js +20 -15
  195. app-rn-runtime/runtime/App.js.map +1 -1
  196. app-rn-runtime/runtime/App.navigator.js +2 -12
  197. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  198. app-rn-runtime/runtime/base-fragment.component.js +6 -4
  199. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  200. app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
  201. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  202. app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
  203. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  204. app-rn-runtime/runtime/services/device/camera-service.js +28 -6
  205. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  206. app-rn-runtime/runtime/services/device/scan-service.js +15 -14
  207. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  208. app-rn-runtime/styles/background.component.js +259 -0
  209. app-rn-runtime/styles/background.component.js.map +1 -0
  210. app-rn-runtime/styles/style-prop.validator.js +11 -6
  211. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  212. app-rn-runtime/styles/style-props.js +93 -0
  213. app-rn-runtime/styles/style-props.js.map +1 -0
  214. app-rn-runtime/styles/theme.js +5 -36
  215. app-rn-runtime/styles/theme.js.map +1 -1
  216. app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
  217. app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
  218. app-rn-runtime/variables/device/file/upload-file.operation.js +43 -21
  219. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  220. app-rn-runtime/variables/http.service.js +3 -12
  221. app-rn-runtime/variables/http.service.js.map +1 -1
  222. app-rn-runtime/variables/service-variable.js +19 -8
  223. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","isString","TouchableOpacity","Text","View","ScrollView","Dimensions","BaseComponent","BaseComponentState","ModalConsumer","WmAnchor","WmPopoverProps","DEFAULT_CLASS","WmContainer","WmPopoverState","WmPopover","constructor","props","e","position","state","type","windowDimensions","get","view","measure","x","y","width","height","px","py","popoverwidth","parseInt","left","top","updateState","setState","isOpened","invokeEventCallback","stopPropagation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","autoclose","centered","animation","contentanimation","onClose","hide","isPartialLoaded","hideModal","renderWidget","dimensions","theme","mergeStyle","getStyle","popoverheight","root","computePosition","ref","caption","badgevalue","iconclass","iconposition","link","showPopover","showModal","popover","title","popoverContent","renderPartial","children"],"sources":["popover.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isString } from 'lodash-es';\nimport { LayoutChangeEvent, TouchableOpacity, Text, View, ScrollView, Dimensions } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { TapEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\n\nimport WmPopoverProps from './popover.props';\nimport { DEFAULT_CLASS, WmPopoverStyles } from './popover.styles';\nimport WmContainer from '../../container/container.component';\n\nexport class WmPopoverState extends BaseComponentState<WmPopoverProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {} as PopoverPosition;\n isPartialLoaded = false;\n}\n\nexport interface PopoverPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmPopover extends BaseComponent<WmPopoverProps, WmPopoverState, WmPopoverStyles> {\n\n view: View = null as any;\n\n constructor(props: WmPopoverProps) {\n super(props, DEFAULT_CLASS, new WmPopoverProps(), new WmPopoverState());\n }\n\n private computePosition = (e: LayoutChangeEvent) => {\n const position = {} as PopoverPosition;\n if (this.state.props.type === 'dropdown') {\n const windowDimensions = Dimensions.get('window');\n this.view.measure((x, y, width, height, px, py) => {\n let popoverwidth = this.state.props.popoverwidth as any;\n if (popoverwidth && isString(popoverwidth)) {\n popoverwidth = parseInt(popoverwidth);\n }\n position.left = px;\n if (px + popoverwidth > windowDimensions.width) {\n position.left = px + width - popoverwidth;\n }\n position.top = py + height;\n this.updateState({position: position} as WmPopoverState);\n });\n }\n };\n\n public showPopover = (e?: TapEvent) => {\n this.setState({ isOpened: true });\n this.invokeEventCallback('onShow', [e, this]);\n e?.stopPropagation();\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmPopoverStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent, ...this.state.position};\n o.content = content;\n o.isModal = this.state.props.autoclose !== 'disabled';\n o.centered = true;\n o.animation = this.state.props.contentanimation || 'slideInUp';\n o.onClose = () => {\n this.hide = () => {};\n this.setState({ isOpened: false, isPartialLoaded: false, modalOptions: {} as ModalOptions });\n this.invokeEventCallback('onHide', [null, this]);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmPopoverProps) {\n let dimensions = {} as any;\n const styles = this.theme.mergeStyle(this.theme.getStyle('popover-' + props.type), this.styles);\n if (props.type === 'dropdown') {\n if (props.popoverwidth) {\n dimensions.width = props.popoverwidth;\n styles.modalContent.width = props.popoverwidth;\n }\n if (props.popoverheight) {\n dimensions.height = props.popoverheight;\n }\n }\n return (\n <View style={styles.root} onLayout={this.computePosition} ref={ref => {this.view = ref as View}}>\n <WmAnchor\n animation={props.animation}\n caption={props.caption}\n badgevalue={props.badgevalue}\n iconclass={props.iconclass}\n iconposition={props.iconposition}\n styles={styles.link}\n onTap={this.showPopover}></WmAnchor>\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={this.theme.mergeStyle(styles.popover, dimensions)}>\n {props.title ? (<Text style={styles.title}>{props.title}</Text>): null}\n <TouchableOpacity activeOpacity={1} onPress={() => {\n props.autoclose === 'always' && this.hide()\n }} style={styles.popoverContent.root}>\n <WmContainer\n styles={styles.popoverContent}\n onLoad={() => this.invokeEventCallback('onLoad', [this])}\n renderPartial={props.renderPartial}>\n {props.renderPartial ? null : props.children}\n </WmContainer>\n </TouchableOpacity>\n </ScrollView>\n ), styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAA4BC,gBAAgB,EAAEC,IAAI,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AAU;MAC3B,YAAY,EAAEtD,KAAK,CAACuD,YAAa;MACjC,MAAM,EAAE7B,MAAM,CAAC8B,IAAK;MACpB,KAAK,EAAE,IAAI,CAACC;IAAY,EAAY,EACrC,IAAI,CAACtD,KAAK,CAACkB,QAAQ,gBAClB,oBAAC,aAAa,QACVM,YAA0B,IAAK;MAC/BA,YAAY,CAAC+B,SAAS,CAAC,IAAI,CAAClC,mBAAmB,eAC3C,oBAAC,UAAU;QAAC,KAAK,EAAE,IAAI,CAACqB,KAAK,CAACC,UAAU,CAACpB,MAAM,CAACiC,OAAO,EAAEf,UAAU;MAAE,GAClE5C,KAAK,CAAC4D,KAAK,gBAAI,oBAAC,IAAI;QAAC,KAAK,EAAElC,MAAM,CAACkC;MAAM,GAAE5D,KAAK,CAAC4D,KAAK,CAAQ,GAAG,IAAI,eACtE,oBAAC,gBAAgB;QAAC,aAAa,EAAE,CAAE;QAAC,OAAO,EAAE,MAAM;UACjD5D,KAAK,CAACmC,SAAS,KAAK,QAAQ,IAAI,IAAI,CAACK,IAAI,EAAE;QAC7C,CAAE;QAAC,KAAK,EAAEd,MAAM,CAACmC,cAAc,CAACZ;MAAK,gBACnC,oBAAC,WAAW;QACV,MAAM,EAAEvB,MAAM,CAACmC,cAAe;QAC9B,MAAM,EAAE,MAAM,IAAI,CAACvC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAE;QACzD,aAAa,EAAEtB,KAAK,CAAC8D;MAAc,GAChC9D,KAAK,CAAC8D,aAAa,GAAG,IAAI,GAAG9D,KAAK,CAAC+D,QAAQ,CAClC,CACG,CACR,EACdrC,MAAM,EAAEC,YAAY,CAAC,CAAC;MACzB,OAAO,IAAI;IACb,CAAC,CACa,GAAI,IAAI,CACrB;EACX;AACF"}
1
+ {"version":3,"names":["React","isString","TouchableOpacity","Text","View","ScrollView","Dimensions","BaseComponent","BaseComponentState","ModalConsumer","WmAnchor","WmPopoverProps","DEFAULT_CLASS","WmContainer","WmPopoverState","WmPopover","constructor","props","e","position","state","type","windowDimensions","get","view","measure","x","y","width","height","px","py","popoverwidth","parseInt","left","top","updateState","setState","isOpened","invokeEventCallback","stopPropagation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","autoclose","centered","animation","contentanimation","onClose","hide","isPartialLoaded","hideModal","renderWidget","dimensions","theme","mergeStyle","getStyle","popoverheight","root","computePosition","ref","_background","caption","badgevalue","iconclass","iconposition","link","showPopover","showModal","popover","title","popoverContent","renderPartial","children"],"sources":["popover.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isString } from 'lodash-es';\nimport { LayoutChangeEvent, TouchableOpacity, Text, View, ScrollView, Dimensions } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { TapEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\n\nimport WmPopoverProps from './popover.props';\nimport { DEFAULT_CLASS, WmPopoverStyles } from './popover.styles';\nimport WmContainer from '../../container/container.component';\n\nexport class WmPopoverState extends BaseComponentState<WmPopoverProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {} as PopoverPosition;\n isPartialLoaded = false;\n}\n\nexport interface PopoverPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmPopover extends BaseComponent<WmPopoverProps, WmPopoverState, WmPopoverStyles> {\n\n view: View = null as any;\n\n constructor(props: WmPopoverProps) {\n super(props, DEFAULT_CLASS, new WmPopoverProps(), new WmPopoverState());\n }\n\n private computePosition = (e: LayoutChangeEvent) => {\n const position = {} as PopoverPosition;\n if (this.state.props.type === 'dropdown') {\n const windowDimensions = Dimensions.get('window');\n this.view.measure((x, y, width, height, px, py) => {\n let popoverwidth = this.state.props.popoverwidth as any;\n if (popoverwidth && isString(popoverwidth)) {\n popoverwidth = parseInt(popoverwidth);\n }\n position.left = px;\n if (px + popoverwidth > windowDimensions.width) {\n position.left = px + width - popoverwidth;\n }\n position.top = py + height;\n this.updateState({position: position} as WmPopoverState);\n });\n }\n };\n\n public showPopover = (e?: TapEvent) => {\n this.setState({ isOpened: true });\n this.invokeEventCallback('onShow', [e, this]);\n e?.stopPropagation();\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmPopoverStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent, ...this.state.position};\n o.content = content;\n o.isModal = this.state.props.autoclose !== 'disabled';\n o.centered = true;\n o.animation = this.state.props.contentanimation || 'slideInUp';\n o.onClose = () => {\n this.hide = () => {};\n this.setState({ isOpened: false, isPartialLoaded: false, modalOptions: {} as ModalOptions });\n this.invokeEventCallback('onHide', [null, this]);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmPopoverProps) {\n let dimensions = {} as any;\n const styles = this.theme.mergeStyle(this.theme.getStyle('popover-' + props.type), this.styles);\n if (props.type === 'dropdown') {\n if (props.popoverwidth) {\n dimensions.width = props.popoverwidth;\n styles.modalContent.width = props.popoverwidth;\n }\n if (props.popoverheight) {\n dimensions.height = props.popoverheight;\n }\n }\n return (\n <View style={styles.root} onLayout={this.computePosition} ref={ref => {this.view = ref as View}}>\n {this._background}\n <WmAnchor\n animation={props.animation}\n caption={props.caption}\n badgevalue={props.badgevalue}\n iconclass={props.iconclass}\n iconposition={props.iconposition}\n styles={styles.link}\n onTap={this.showPopover}></WmAnchor>\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={this.theme.mergeStyle(styles.popover, dimensions)}>\n {props.title ? (<Text style={styles.title}>{props.title}</Text>): null}\n <TouchableOpacity activeOpacity={1} onPress={() => {\n props.autoclose === 'always' && this.hide()\n }} style={styles.popoverContent.root}>\n <WmContainer\n styles={styles.popoverContent}\n onLoad={() => this.invokeEventCallback('onLoad', [this])}\n renderPartial={props.renderPartial}>\n {props.renderPartial ? null : props.children}\n </WmContainer>\n </TouchableOpacity>\n </ScrollView>\n ), styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAA4BC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AACtG,SAASC,aAAa,EAAEC,kBAAkB,QAAmB,+CAA+C;AAG5G,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,WAAW,MAAM,qCAAqC;AAE7D,OAAO,MAAMC,cAAc,SAASN,kBAAkB,CAAiB;EAAA;IAAA;IAAA,kCACjD,KAAK;IAAA,sCACV,CAAC,CAAC;IAAA,kCACN,CAAC,CAAC;IAAA,yCACK,KAAK;EAAA;AACzB;AASA,eAAe,MAAMO,SAAS,SAASR,aAAa,CAAkD;EAIpGS,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,cAAc,EAAE,EAAE,IAAIG,cAAc,EAAE,CAAC;IAAC,8BAH7D,IAAI;IAAA,yCAMUI,CAAoB,IAAK;MAClD,MAAMC,QAAQ,GAAG,CAAC,CAAoB;MACtC,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,IAAI,KAAK,UAAU,EAAE;QACxC,MAAMC,gBAAgB,GAAGhB,UAAU,CAACiB,GAAG,CAAC,QAAQ,CAAC;QACjD,IAAI,CAACC,IAAI,CAACC,OAAO,CAAC,CAAC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AAI,CAAC,CAAE;QACzD,aAAa,EAAEtB,KAAK,CAAC+D;MAAc,GAChC/D,KAAK,CAAC+D,aAAa,GAAG,IAAI,GAAG/D,KAAK,CAACgE,QAAQ,CAClC,CACG,CACR,EACdtC,MAAM,EAAEC,YAAY,CAAC,CAAC;MACzB,OAAO,IAAI;IACb,CAAC,CACa,GAAI,IAAI,CACrB;EACX;AACF"}
@@ -10,7 +10,7 @@ export default class WmContent extends BaseComponent {
10
10
  renderWidget(props) {
11
11
  return /*#__PURE__*/React.createElement(View, {
12
12
  style: this.styles.root
13
- }, props.children);
13
+ }, this._background, props.children);
14
14
  }
15
15
  }
16
16
  //# sourceMappingURL=content.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmContentState","WmContent","constructor","props","renderWidget","styles","root","children"],"sources":["content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmContentProps from './content.props';\nimport { DEFAULT_CLASS, WmContentStyles } from './content.styles';\n\nexport class WmContentState extends BaseComponentState<WmContentProps> {\n\n}\n\nexport default class WmContent extends BaseComponent<WmContentProps, WmContentState, WmContentStyles> {\n\n constructor(props: WmContentProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmContentProps) {\n return (\n <View style={this.styles.root}>\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASF,kBAAkB,CAAiB;AAIvE,eAAe,MAAMG,SAAS,SAASJ,aAAa,CAAkD;EAEpGK,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAAqB,EAAE;IAClC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3BH,KAAK,CAACI,QAAQ,CACV;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmContentState","WmContent","constructor","props","renderWidget","styles","root","_background","children"],"sources":["content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmContentProps from './content.props';\nimport { DEFAULT_CLASS, WmContentStyles } from './content.styles';\n\nexport class WmContentState extends BaseComponentState<WmContentProps> {\n\n}\n\nexport default class WmContent extends BaseComponent<WmContentProps, WmContentState, WmContentStyles> {\n\n constructor(props: WmContentProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmContentProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASF,kBAAkB,CAAiB;AAIvE,eAAe,MAAMG,SAAS,SAASJ,aAAa,CAAkD;EAEpGK,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAAqB,EAAE;IAClC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBJ,KAAK,CAACK,QAAQ,CACV;EAEX;AACF"}
@@ -35,7 +35,7 @@ export default class WmLeftPanel extends BaseComponent {
35
35
  renderWidget(props) {
36
36
  return /*#__PURE__*/React.createElement(ScrollView, {
37
37
  contentContainerStyle: this.styles.root
38
- }, this.renderContent(props));
38
+ }, this._background, this.renderContent(props));
39
39
  }
40
40
  }
41
41
  //# sourceMappingURL=left-panel.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","BaseComponent","BaseComponentState","WmLeftPanelProps","DEFAULT_CLASS","ScrollView","WmLeftPanelState","WmLeftPanel","constructor","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","styles","root"],"sources":["left-panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLeftPanelProps from './left-panel.props';\nimport { DEFAULT_CLASS, WmLeftPanelStyles } from './left-panel.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nexport class WmLeftPanelState extends BaseComponentState<WmLeftPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmLeftPanel extends BaseComponent<WmLeftPanelProps, WmLeftPanelState, WmLeftPanelStyles> {\n\n constructor(props: WmLeftPanelProps) {\n super(props, DEFAULT_CLASS, new WmLeftPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmLeftPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmLeftPanelState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmLeftPanelProps) {\n return (\n <ScrollView contentContainerStyle={this.styles.root}>\n {this.renderContent(props)}\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAO,MAAMC,gBAAgB,SAASJ,kBAAkB,CAAmB;EAAA;IAAA;IAAA,yCACvD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMK,WAAW,SAASN,aAAa,CAAwD;EAE5GO,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,gBAAgB,EAAE,CAAC;EACrD;EAEAO,aAAa,GAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAa,CAACH,KAAuB,EAAE;IACrC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAC,CAAqB;QACxB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAAC,IAAI,CAACH,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,YAAY,CAACX,KAAuB,EAAE;IACpC,oBACE,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACY,MAAM,CAACC;IAAK,GACjD,IAAI,CAACV,aAAa,CAACH,KAAK,CAAC,CACf;EAEjB;AACF"}
1
+ {"version":3,"names":["React","BaseComponent","BaseComponentState","WmLeftPanelProps","DEFAULT_CLASS","ScrollView","WmLeftPanelState","WmLeftPanel","constructor","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","styles","root","_background"],"sources":["left-panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLeftPanelProps from './left-panel.props';\nimport { DEFAULT_CLASS, WmLeftPanelStyles } from './left-panel.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nexport class WmLeftPanelState extends BaseComponentState<WmLeftPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmLeftPanel extends BaseComponent<WmLeftPanelProps, WmLeftPanelState, WmLeftPanelStyles> {\n\n constructor(props: WmLeftPanelProps) {\n super(props, DEFAULT_CLASS, new WmLeftPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmLeftPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmLeftPanelState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmLeftPanelProps) {\n return (\n <ScrollView contentContainerStyle={this.styles.root}>\n {this._background}\n {this.renderContent(props)}\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAO,MAAMC,gBAAgB,SAASJ,kBAAkB,CAAmB;EAAA;IAAA;IAAA,yCACvD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMK,WAAW,SAASN,aAAa,CAAwD;EAE5GO,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,gBAAgB,EAAE,CAAC;EACrD;EAEAO,aAAa,GAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAa,CAACH,KAAuB,EAAE;IACrC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAC,CAAqB;QACxB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAAC,IAAI,CAACH,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,YAAY,CAACX,KAAuB,EAAE;IACpC,oBACE,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACY,MAAM,CAACC;IAAK,GACjD,IAAI,CAACC,WAAW,EAChB,IAAI,CAACX,aAAa,CAACH,KAAK,CAAC,CACf;EAEjB;AACF"}
@@ -14,9 +14,9 @@ export default class WmPageContent extends BaseComponent {
14
14
  renderWidget(props) {
15
15
  return props.scrollable || isWebPreviewMode() ? /*#__PURE__*/React.createElement(ScrollView, {
16
16
  contentContainerStyle: this.styles.root
17
- }, props.children) : /*#__PURE__*/React.createElement(View, {
17
+ }, this._background, props.children) : /*#__PURE__*/React.createElement(View, {
18
18
  style: this.styles.root
19
- }, props.children);
19
+ }, this._background, props.children);
20
20
  }
21
21
  }
22
22
  //# sourceMappingURL=page-content.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","ScrollView","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","WmPageContentState","WmPageContent","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderWidget","scrollable","styles","root","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n\n}\n\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n renderWidget(props: WmPageContentProps) {\n return props.scrollable || isWebPreviewMode() ? (\n <ScrollView contentContainerStyle={this.styles.root}>\n {props.children}\n </ScrollView>\n ) : (\n <View style={this.styles.root}>\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAE1E,OAAO,MAAMC,kBAAkB,SAASH,kBAAkB,CAAqB;AAI/E,eAAe,MAAMI,aAAa,SAASL,aAAa,CAA8D;EAEpHM,WAAW,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,kBAAkB,EAAE,CAAC;IACrD,IAAI,CAACM,QAAQ,GAAGT,QAAQ,CAACU,gBAAgB;EAC3C;EAEAC,YAAY,CAACH,KAAyB,EAAE;IACtC,OAAOA,KAAK,CAACI,UAAU,IAAIb,gBAAgB,EAAE,gBAC3C,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACc,MAAM,CAACC;IAAK,GACjDN,KAAK,CAACO,QAAQ,CACJ,gBAEb,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACF,MAAM,CAACC;IAAK,GAC3BN,KAAK,CAACO,QAAQ,CAElB;EACH;AACF"}
1
+ {"version":3,"names":["React","ScrollView","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","WmPageContentState","WmPageContent","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderWidget","scrollable","styles","root","_background","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n\n}\n\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n renderWidget(props: WmPageContentProps) {\n return props.scrollable || isWebPreviewMode() ? (\n <ScrollView contentContainerStyle={this.styles.root}>\n {this._background}\n {props.children}\n </ScrollView>\n ) : (\n <View style={this.styles.root}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAE1E,OAAO,MAAMC,kBAAkB,SAASH,kBAAkB,CAAqB;AAI/E,eAAe,MAAMI,aAAa,SAASL,aAAa,CAA8D;EAEpHM,WAAW,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,kBAAkB,EAAE,CAAC;IACrD,IAAI,CAACM,QAAQ,GAAGT,QAAQ,CAACU,gBAAgB;EAC3C;EAEAC,YAAY,CAACH,KAAyB,EAAE;IACtC,OAAOA,KAAK,CAACI,UAAU,IAAIb,gBAAgB,EAAE,gBAC3C,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACc,MAAM,CAACC;IAAK,GACjD,IAAI,CAACC,WAAW,EAChBP,KAAK,CAACQ,QAAQ,CACJ,gBAEb,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACH,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBP,KAAK,CAACQ,QAAQ,CAElB;EACH;AACF"}
@@ -10,7 +10,7 @@ export default class WmPage extends BaseComponent {
10
10
  renderWidget(props) {
11
11
  return /*#__PURE__*/React.createElement(View, {
12
12
  style: this.styles.root
13
- }, props.children);
13
+ }, this._background, props.children);
14
14
  }
15
15
  }
16
16
  //# sourceMappingURL=page.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPageState","WmPage","constructor","props","renderWidget","styles","root","children"],"sources":["page.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageProps from './page.props';\nimport { DEFAULT_CLASS, WmPageStyles } from './page.styles';\n\nexport class WmPageState extends BaseComponentState<WmPageProps> {}\n\nexport default class WmPage extends BaseComponent<WmPageProps, WmPageState, WmPageStyles> {\n\n constructor(props: WmPageProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmPageProps) {\n return (\n <View style={this.styles.root}>\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAsB,eAAe;AAE3D,OAAO,MAAMC,WAAW,SAASF,kBAAkB,CAAc;AAEjE,eAAe,MAAMG,MAAM,SAASJ,aAAa,CAAyC;EAExFK,WAAW,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAAkB,EAAE;IAC/B,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3BH,KAAK,CAACI,QAAQ,CACV;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPageState","WmPage","constructor","props","renderWidget","styles","root","_background","children"],"sources":["page.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageProps from './page.props';\nimport { DEFAULT_CLASS, WmPageStyles } from './page.styles';\n\nexport class WmPageState extends BaseComponentState<WmPageProps> {}\n\nexport default class WmPage extends BaseComponent<WmPageProps, WmPageState, WmPageStyles> {\n\n constructor(props: WmPageProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmPageProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAsB,eAAe;AAE3D,OAAO,MAAMC,WAAW,SAASF,kBAAkB,CAAc;AAEjE,eAAe,MAAMG,MAAM,SAASJ,aAAa,CAAyC;EAExFK,WAAW,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAAkB,EAAE;IAC/B,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBJ,KAAK,CAACK,QAAQ,CACV;EAEX;AACF"}
@@ -10,7 +10,7 @@ export default class WmPartial extends BaseComponent {
10
10
  renderWidget(props) {
11
11
  return /*#__PURE__*/React.createElement(View, {
12
12
  style: this.styles.root
13
- }, props.children);
13
+ }, this._background, props.children);
14
14
  }
15
15
  }
16
16
  //# sourceMappingURL=partial.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPartialState","WmPartial","constructor","props","renderWidget","styles","root","children"],"sources":["partial.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPartialProps from './partial.props';\nimport { DEFAULT_CLASS, WmPartialStyles } from './partial.styles';\n\nexport class WmPartialState extends BaseComponentState<WmPartialProps> {\n\n}\n\nexport default class WmPartial extends BaseComponent<WmPartialProps, WmPartialState, WmPartialStyles> {\n\n constructor(props: WmPartialProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmPartialProps) {\n return (\n <View style={this.styles.root}>\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASF,kBAAkB,CAAiB;AAIvE,eAAe,MAAMG,SAAS,SAASJ,aAAa,CAAkD;EAEpGK,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAAqB,EAAE;IAClC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3BH,KAAK,CAACI,QAAQ,CACV;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPartialState","WmPartial","constructor","props","renderWidget","styles","root","_background","children"],"sources":["partial.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPartialProps from './partial.props';\nimport { DEFAULT_CLASS, WmPartialStyles } from './partial.styles';\n\nexport class WmPartialState extends BaseComponentState<WmPartialProps> {\n\n}\n\nexport default class WmPartial extends BaseComponent<WmPartialProps, WmPartialState, WmPartialStyles> {\n\n constructor(props: WmPartialProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmPartialProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASF,kBAAkB,CAAiB;AAIvE,eAAe,MAAMG,SAAS,SAASJ,aAAa,CAAkD;EAEpGK,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAAqB,EAAE;IAClC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBJ,KAAK,CAACK,QAAQ,CACV;EAEX;AACF"}
@@ -22,7 +22,7 @@ export default class WmPartialContainer extends BaseComponent {
22
22
  delete params['partial_name'];
23
23
  return /*#__PURE__*/React.createElement(View, {
24
24
  style: this.styles.root
25
- }, /*#__PURE__*/React.createElement(PartialConsumer, null, partialService => {
25
+ }, this._background, /*#__PURE__*/React.createElement(PartialConsumer, null, partialService => {
26
26
  const partial = partialService.get(props.content);
27
27
  return partial ? /*#__PURE__*/React.createElement(partial, params) : null;
28
28
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmPartialContainerProps","DEFAULT_CLASS","HideMode","PartialConsumer","WmPartialContainerState","WmPartialContainer","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderWidget","params","Object","keys","forEach","k","parent","styles","root","partialService","partial","get","content","createElement"],"sources":["partial-container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPartialContainerProps from './partial-container.props';\nimport { DEFAULT_CLASS, WmPartialContainerStyles } from './partial-container.styles';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport PartialService, { PartialConsumer } from '@wavemaker/app-rn-runtime/core/partial.service';\n\nexport class WmPartialContainerState extends BaseComponentState<WmPartialContainerProps> {}\n\nexport default class WmPartialContainer extends BaseComponent<WmPartialContainerProps, WmPartialContainerState, WmPartialContainerStyles> {\n\n constructor(props: WmPartialContainerProps) {\n super(props, DEFAULT_CLASS, new WmPartialContainerProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n renderWidget(props: WmPartialContainerProps) {\n const params = {} as any;\n Object.keys(this.props).forEach((k: string) => {\n //@ts-ignore\n params[k] = props[k];\n });\n params.parent = this.parent;\n params['name'] = params['partial_name'];\n delete params['partial_name'];\n return (\n <View style={this.styles.root}>\n <PartialConsumer>\n {(partialService: PartialService) => {\n const partial = partialService.get(props.content);\n return partial ? React.createElement(partial, params) : null;\n }}\n </PartialConsumer>\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM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React","View","BaseComponent","BaseComponentState","WmPartialContainerProps","DEFAULT_CLASS","HideMode","PartialConsumer","WmPartialContainerState","WmPartialContainer","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderWidget","params","Object","keys","forEach","k","parent","styles","root","_background","partialService","partial","get","content","createElement"],"sources":["partial-container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPartialContainerProps from './partial-container.props';\nimport { DEFAULT_CLASS, WmPartialContainerStyles } from './partial-container.styles';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport PartialService, { PartialConsumer } from '@wavemaker/app-rn-runtime/core/partial.service';\n\nexport class WmPartialContainerState extends BaseComponentState<WmPartialContainerProps> {}\n\nexport default class WmPartialContainer extends BaseComponent<WmPartialContainerProps, WmPartialContainerState, WmPartialContainerStyles> {\n\n constructor(props: WmPartialContainerProps) {\n super(props, DEFAULT_CLASS, new WmPartialContainerProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n renderWidget(props: WmPartialContainerProps) {\n const params = {} as any;\n Object.keys(this.props).forEach((k: string) => {\n //@ts-ignore\n params[k] = props[k];\n });\n params.parent = this.parent;\n params['name'] = params['partial_name'];\n delete params['partial_name'];\n return (\n <View style={this.styles.root}>\n {this._background}\n <PartialConsumer>\n {(partialService: PartialService) => {\n const partial = partialService.get(props.content);\n return partial ? React.createElement(partial, params) : null;\n }}\n </PartialConsumer>\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,SAASC,aAAa,QAAkC,4BAA4B;AACpF,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAAyBC,eAAe,QAAQ,gDAAgD;AAEhG,OAAO,MAAMC,uBAAuB,SAASL,kBAAkB,CAA0B;AAEzF,eAAe,MAAMM,kBAAkB,SAASP,aAAa,CAA6E;EAExIQ,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,uBAAuB,EAAE,CAAC;IAC1D,IAAI,CAACQ,QAAQ,GAAGN,QAAQ,CAACO,gBAAgB;EAC3C;EAEAC,YAAY,CAACH,KAA8B,EAAE;IAC3C,MAAMI,MAAM,GAAG,CAAC,CAAQ;IACxBC,MAAM,CAACC,IAAI,CAAC,IAAI,CAACN,KAAK,CAAC,CAACO,OAAO,CAAEC,CAAS,IAAK;MAC7C;MACAJ,MAAM,CAACI,CAAC,CAAC,GAAGR,KAAK,CAACQ,CAAC,CAAC;IACtB,CAAC,CAAC;IACFJ,MAAM,CAACK,MAAM,GAAG,IAAI,CAACA,MAAM;IAC3BL,MAAM,CAAC,MAAM,CAAC,GAAGA,MAAM,CAAC,cAAc,CAAC;IACvC,OAAOA,MAAM,CAAC,cAAc,CAAC;IAC7B,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACM,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,eACjB,oBAAC,eAAe,QACZC,cAA8B,IAAK;MACnC,MAAMC,OAAO,GAAGD,cAAc,CAACE,GAAG,CAACf,KAAK,CAACgB,OAAO,CAAC;MACjD,OAAOF,OAAO,gBAAGzB,KAAK,CAAC4B,aAAa,CAACH,OAAO,EAAEV,MAAM,CAAC,GAAG,IAAI;IAC9D,CAAC,CACe,CACb;EAEX;AACF"}
@@ -4,7 +4,8 @@ export const DEFAULT_CLASS = 'app-partial-container';
4
4
  BASE_THEME.registerStyle((themeVariables, addStyle) => {
5
5
  const defaultStyles = defineStyles({
6
6
  root: {
7
- width: '100%'
7
+ width: '100%',
8
+ backgroundColor: themeVariables.pageContentBgColor
8
9
  },
9
10
  text: {}
10
11
  });
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","text"],"sources":["partial-container.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmPartialContainerStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-partial-container';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPartialContainerStyles = defineStyles({\n root: {\n width: '100%'\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,uBAAuB;AACpDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAuC,GAAGL,YAAY,CAAC;IACzDM,IAAI,EAAE;MACFC,KAAK,EAAE;IACX,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EAEFJ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","backgroundColor","pageContentBgColor","text"],"sources":["partial-container.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmPartialContainerStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-partial-container';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPartialContainerStyles = defineStyles({\n root: {\n width: '100%',\n backgroundColor: themeVariables.pageContentBgColor\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,uBAAuB;AACpDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAuC,GAAGL,YAAY,CAAC;IACzDM,IAAI,EAAE;MACFC,KAAK,EAAE,MAAM;MACbC,eAAe,EAAEL,cAAc,CAACM;IACpC,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EAEFN,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -24,6 +24,7 @@ export default class WmTabbar extends BaseNavComponent {
24
24
  }
25
25
  renderTabItem(item, props, onSelect) {
26
26
  const isActive = props.isActive && props.isActive(item);
27
+ const getDisplayLabel = this.props.getDisplayExpression || (label => label);
27
28
  return /*#__PURE__*/React.createElement(TouchableOpacity, {
28
29
  onPress: () => onSelect && onSelect(),
29
30
  key: item.key
@@ -34,7 +35,7 @@ export default class WmTabbar extends BaseNavComponent {
34
35
  iconclass: item.icon
35
36
  }), /*#__PURE__*/React.createElement(Text, {
36
37
  style: [this.styles.tabLabel, isActive ? this.styles.activeTabLabel : {}]
37
- }, item.label)));
38
+ }, getDisplayLabel(item.label))));
38
39
  }
39
40
  onItemSelect(item, navigationService) {
40
41
  item.link && navigationService.openUrl(item.link);
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","TouchableOpacity","ThemeProvider","ModalConsumer","WmIcon","NavigationServiceConsumer","BaseNavComponent","BaseNavState","WmTabbarProps","DEFAULT_CLASS","WmTabbarState","WmTabbar","constructor","props","renderTabItem","item","onSelect","isActive","key","styles","tabItem","activeTabItem","theme","mergeStyle","tabIcon","activeTabIcon","icon","tabLabel","activeTabLabel","label","onItemSelect","navigationService","link","openUrl","invokeEventCallback","proxy","prepareModalOptions","content","o","state","modalOptions","modalStyle","bottom","tabbarHeight","contentStyle","modalContent","renderWidget","max","tabItems","dataItems","moreItems","length","moreItemsCount","Math","ceil","j","i","row","push","root","modalService","showMore","showModal","moreMenu","map","a","moreMenuRow","hideModal","menu","e","nativeEvent","layout","height","filter","morebuttonlabel","morebuttoniconclass","updateState"],"sources":["tabbar.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\n\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\n\nimport WmTabbarProps from './tabbar.props';\nimport { DEFAULT_CLASS, WmTabbarStyles } from './tabbar.styles';\n\nclass WmTabbarState<T extends BaseNavProps> extends BaseNavState<T>{\n showMore = false;\n modalOptions = {} as ModalOptions;\n}\n\nexport default class WmTabbar extends BaseNavComponent<WmTabbarProps, WmTabbarState<WmTabbarProps>, WmTabbarStyles> {\n\n private tabbarHeight = 0;\n\n constructor(props: WmTabbarProps) {\n super(props, DEFAULT_CLASS, new WmTabbarProps(), new WmTabbarState());\n }\n\n renderTabItem(item: NavigationDataItem, props: WmTabbarProps, onSelect: Function) {\n const isActive = props.isActive && props.isActive(item);\n return (\n <TouchableOpacity onPress={() => onSelect && onSelect()} key={item.key}>\n <View style={[this.styles.tabItem, isActive ? this.styles.activeTabItem: {}]}>\n <WmIcon styles={this.theme.mergeStyle({}, this.styles.tabIcon, isActive ? this.styles.activeTabIcon: {})} iconclass={item.icon}></WmIcon>\n <Text style={[this.styles.tabLabel, isActive ? this.styles.activeTabLabel: {}]}>{item.label}</Text>\n </View>\n </TouchableOpacity>\n );\n }\n\n onItemSelect(item: NavigationDataItem, navigationService: NavigationService) {\n item.link && navigationService.openUrl(item.link);\n this.invokeEventCallback('onSelect', [null, this.proxy, item]);\n }\n\n prepareModalOptions(content: ReactNode) {\n const o = this.state.modalOptions;\n o.content = content;\n o.modalStyle = {\n bottom: this.tabbarHeight\n };\n o.contentStyle = this.styles.modalContent; \n return o;\n }\n\n renderWidget(props: WmTabbarProps) {\n let max = 5;\n const tabItems = this.state.dataItems;\n const moreItems = [] as any[][];\n if (tabItems.length > max) {\n const moreItemsCount = Math.ceil((tabItems.length + 1 - max)/ max) * max;\n let j = 0;\n for (let i = max-1; i < moreItemsCount;) {\n const row = [];\n for (let j = 0; j < max; j++) {\n row[j] = tabItems[i++] || {key: 'tabItem' + i} as NavigationDataItem;\n }\n moreItems.push(row);\n }\n max = max - 1;\n }\n return (\n <NavigationServiceConsumer>\n {(navigationService) =>\n (<View style={this.styles.root}>\n <ModalConsumer>\n {(modalService: ModalService) => {\n if (this.state.showMore) {\n modalService.showModal(this.prepareModalOptions((\n <ThemeProvider value={this.theme} >\n <View style={this.styles.moreMenu}>\n {moreItems.map((a, i) =>\n (<View key={i} style={this.styles.moreMenuRow}>\n {a.map(item => this.renderTabItem(item, props, () => this.onItemSelect(item, navigationService)))}\n </View>)\n )}\n </View>\n </ThemeProvider>)));\n } else {\n modalService.hideModal(this.state.modalOptions);\n }\n return null;\n }}\n </ModalConsumer>\n <View style={this.styles.menu}\n onLayout={e => { this.tabbarHeight = e.nativeEvent.layout.height}}>\n {tabItems.filter((item, i) => i < max)\n .map((item, i) => this.renderTabItem(item, props, () => this.onItemSelect(item, navigationService)))}\n {tabItems.length > max && (\n this.renderTabItem({\n label: props.morebuttonlabel,\n icon: props.morebuttoniconclass\n } as NavigationDataItem, props, () => {\n this.updateState({showMore: !this.state.showMore} as WmTabbarState<WmTabbarProps>);\n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M;QACL6B,YAAY,CAACO,SAAS,CAAC,IAAI,CAAC5B,KAAK,CAACC,YAAY,CAAC;MACjD;MACA,OAAO,IAAI;IACb,CAAC,CACa,eAChB,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACrB,MAAM,CAACiD,IAAK;MAC5B,QAAQ,EAAEC,CAAC,IAAI;QAAE,IAAI,CAAC1B,YAAY,GAAG0B,CAAC,CAACC,WAAW,CAACC,MAAM,CAACC,MAAM;MAAA;IAAE,GACjExB,QAAQ,CAACyB,MAAM,CAAC,CAAC1D,IAAI,EAAEyC,CAAC,KAAKA,CAAC,GAAGT,GAAG,CAAC,CACnCiB,GAAG,CAAC,CAACjD,IAAI,EAAEyC,CAAC,KAAK,IAAI,CAAC1C,aAAa,CAACC,IAAI,EAAEF,KAAK,EAAE,MAAM,IAAI,CAACiB,YAAY,CAACf,IAAI,EAAEgB,iBAAiB,CAAC,CAAC,CAAC,EACrGiB,QAAQ,CAACG,MAAM,GAAGJ,GAAG,IACpB,IAAI,CAACjC,aAAa,CAAC;MACjBe,KAAK,EAAEhB,KAAK,CAAC6D,eAAe;MAC5BhD,IAAI,EAAEb,KAAK,CAAC8D;IACd,CAAC,EAAwB9D,KAAK,EAAG,MAAM;MACrC,IAAI,CAAC+D,WAAW,CAAC;QAACf,QAAQ,EAAE,CAAC,IAAI,CAACtB,KAAK,CAACsB;MAAQ,CAAC,CAAiC;IACpF,CAAC,CACF,CACI,CACD,CACkB;EAEhC;AACF"}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","ThemeProvider","ModalConsumer","WmIcon","NavigationServiceConsumer","BaseNavComponent","BaseNavState","WmTabbarProps","DEFAULT_CLASS","WmTabbarState","WmTabbar","constructor","props","renderTabItem","item","onSelect","isActive","getDisplayLabel","getDisplayExpression","label","key","styles","tabItem","activeTabItem","theme","mergeStyle","tabIcon","activeTabIcon","icon","tabLabel","activeTabLabel","onItemSelect","navigationService","link","openUrl","invokeEventCallback","proxy","prepareModalOptions","content","o","state","modalOptions","modalStyle","bottom","tabbarHeight","contentStyle","modalContent","renderWidget","max","tabItems","dataItems","moreItems","length","moreItemsCount","Math","ceil","j","i","row","push","root","modalService","showMore","showModal","moreMenu","map","a","moreMenuRow","hideModal","menu","e","nativeEvent","layout","height","filter","morebuttonlabel","morebuttoniconclass","updateState"],"sources":["tabbar.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\n\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\n\nimport WmTabbarProps from './tabbar.props';\nimport { DEFAULT_CLASS, WmTabbarStyles } from './tabbar.styles';\n\nclass WmTabbarState<T extends BaseNavProps> extends BaseNavState<T>{\n showMore = false;\n modalOptions = {} as ModalOptions;\n}\n\nexport default class WmTabbar extends BaseNavComponent<WmTabbarProps, WmTabbarState<WmTabbarProps>, WmTabbarStyles> {\n\n private tabbarHeight = 0;\n\n constructor(props: WmTabbarProps) {\n super(props, DEFAULT_CLASS, new WmTabbarProps(), new WmTabbarState());\n }\n\n renderTabItem(item: NavigationDataItem, props: WmTabbarProps, onSelect: Function) {\n const isActive = props.isActive && props.isActive(item);\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n return (\n <TouchableOpacity onPress={() => onSelect && onSelect()} key={item.key}>\n <View style={[this.styles.tabItem, isActive ? this.styles.activeTabItem: {}]}>\n <WmIcon styles={this.theme.mergeStyle({}, this.styles.tabIcon, isActive ? this.styles.activeTabIcon: {})} iconclass={item.icon}></WmIcon>\n <Text style={[this.styles.tabLabel, isActive ? this.styles.activeTabLabel: {}]}>{getDisplayLabel(item.label)}</Text>\n </View>\n </TouchableOpacity>\n );\n }\n\n onItemSelect(item: NavigationDataItem, navigationService: NavigationService) {\n item.link && navigationService.openUrl(item.link);\n this.invokeEventCallback('onSelect', [null, this.proxy, item]);\n }\n\n prepareModalOptions(content: ReactNode) {\n const o = this.state.modalOptions;\n o.content = content;\n o.modalStyle = {\n bottom: this.tabbarHeight\n };\n o.contentStyle = this.styles.modalContent; \n return o;\n }\n\n renderWidget(props: WmTabbarProps) {\n let max = 5;\n const tabItems = this.state.dataItems;\n const moreItems = [] as any[][];\n if (tabItems.length > max) {\n const moreItemsCount = Math.ceil((tabItems.length + 1 - max)/ max) * max;\n let j = 0;\n for (let i = max-1; i < moreItemsCount;) {\n const row = [];\n for (let j = 0; j < max; j++) {\n row[j] = tabItems[i++] || {key: 'tabItem' + i} as NavigationDataItem;\n }\n moreItems.push(row);\n }\n max = max - 1;\n }\n return (\n <NavigationServiceConsumer>\n {(navigationService) =>\n (<View style={this.styles.root}>\n <ModalConsumer>\n {(modalService: ModalService) => {\n if (this.state.showMore) {\n modalService.showModal(this.prepareModalOptions((\n <ThemeProvider value={this.theme} >\n <View style={this.styles.moreMenu}>\n {moreItems.map((a, i) =>\n (<View key={i} style={this.styles.moreMenuRow}>\n {a.map(item => this.renderTabItem(item, props, () => this.onItemSelect(item, navigationService)))}\n </View>)\n )}\n </View>\n </ThemeProvider>)));\n } else {\n modalService.hideModal(this.state.modalOptions);\n }\n return null;\n }}\n </ModalConsumer>\n <View style={this.styles.menu}\n onLayout={e => { this.tabbarHeight = e.nativeEvent.layout.height}}>\n {tabItems.filter((item, i) => i < max)\n .map((item, i) => this.renderTabItem(item, props, () => this.onItemSelect(item, navigationService)))}\n {tabItems.length > max && (\n this.renderTabItem({\n label: props.morebuttonlabel,\n icon: props.morebuttoniconclass\n } as NavigationDataItem, props, () => {\n this.updateState({showM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IAAI,EAAEF,KAAK,EAAG,MAAM,IAAI,CAACmB,YAAY,CAACjB,IAAI,EAAEkB,iBAAiB,CAAC,CAAC,CAAC,CAC5F,CACT,CACI,CACO,CAAE,CAAC;MACrB,CAAC,MAAM;QACL6B,YAAY,CAACO,SAAS,CAAC,IAAI,CAAC5B,KAAK,CAACC,YAAY,CAAC;MACjD;MACA,OAAO,IAAI;IACb,CAAC,CACa,eAChB,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACpB,MAAM,CAACgD,IAAK;MAC5B,QAAQ,EAAEC,CAAC,IAAI;QAAE,IAAI,CAAC1B,YAAY,GAAG0B,CAAC,CAACC,WAAW,CAACC,MAAM,CAACC,MAAM;MAAA;IAAE,GACjExB,QAAQ,CAACyB,MAAM,CAAC,CAAC5D,IAAI,EAAE2C,CAAC,KAAKA,CAAC,GAAGT,GAAG,CAAC,CACnCiB,GAAG,CAAC,CAACnD,IAAI,EAAE2C,CAAC,KAAK,IAAI,CAAC5C,aAAa,CAACC,IAAI,EAAEF,KAAK,EAAE,MAAM,IAAI,CAACmB,YAAY,CAACjB,IAAI,EAAEkB,iBAAiB,CAAC,CAAC,CAAC,EACrGiB,QAAQ,CAACG,MAAM,GAAGJ,GAAG,IACpB,IAAI,CAACnC,aAAa,CAAC;MACjBM,KAAK,EAAEP,KAAK,CAAC+D,eAAe;MAC5B/C,IAAI,EAAEhB,KAAK,CAACgE;IACd,CAAC,EAAwBhE,KAAK,EAAG,MAAM;MACrC,IAAI,CAACiE,WAAW,CAAC;QAACf,QAAQ,EAAE,CAAC,IAAI,CAACtB,KAAK,CAACsB;MAAQ,CAAC,CAAiC;IACpF,CAAC,CACF,CACI,CACD,CACkB;EAEhC;AACF"}
@@ -10,7 +10,7 @@ export default class WmPrefabContainer extends BaseComponent {
10
10
  renderWidget(props) {
11
11
  return /*#__PURE__*/React.createElement(View, {
12
12
  style: this.styles.root
13
- }, props.children);
13
+ }, this._background, props.children);
14
14
  }
15
15
  }
16
16
  //# sourceMappingURL=prefab-container.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPrefabContainerState","WmPrefabContainer","constructor","props","renderWidget","styles","root","children"],"sources":["prefab-container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPrefabContainerProps from './prefab-container.props';\nimport { DEFAULT_CLASS, WmPrefabContainerStyles } from './prefab-container.styles';\n\nexport class WmPrefabContainerState extends BaseComponentState<WmPrefabContainerProps> {\n\n}\n\nexport default class WmPrefabContainer extends BaseComponent<WmPrefabContainerProps, WmPrefabContainerState, WmPrefabContainerStyles> {\n\n constructor(props: WmPrefabContainerProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmPrefabContainerProps) {\n return (\n <View style={this.styles.root}>\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAiC,2BAA2B;AAElF,OAAO,MAAMC,sBAAsB,SAASF,kBAAkB,CAAyB;AAIvF,eAAe,MAAMG,iBAAiB,SAASJ,aAAa,CAA0E;EAEpIK,WAAW,CAACC,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAA6B,EAAE;IAC1C,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3BH,KAAK,CAACI,QAAQ,CACV;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPrefabContainerState","WmPrefabContainer","constructor","props","renderWidget","styles","root","_background","children"],"sources":["prefab-container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPrefabContainerProps from './prefab-container.props';\nimport { DEFAULT_CLASS, WmPrefabContainerStyles } from './prefab-container.styles';\n\nexport class WmPrefabContainerState extends BaseComponentState<WmPrefabContainerProps> {\n\n}\n\nexport default class WmPrefabContainer extends BaseComponent<WmPrefabContainerProps, WmPrefabContainerState, WmPrefabContainerStyles> {\n\n constructor(props: WmPrefabContainerProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmPrefabContainerProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAiC,2BAA2B;AAElF,OAAO,MAAMC,sBAAsB,SAASF,kBAAkB,CAAyB;AAIvF,eAAe,MAAMG,iBAAiB,SAASJ,aAAa,CAA0E;EAEpIK,WAAW,CAACC,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAA6B,EAAE;IAC1C,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBJ,KAAK,CAACK,QAAQ,CACV;EAEX;AACF"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ const AssetContext = /*#__PURE__*/React.createContext(null);
3
+ export const AssetProvider = AssetContext.Provider;
4
+ export const AssetConsumer = AssetContext.Consumer;
5
+ //# sourceMappingURL=asset.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","AssetContext","createContext","AssetProvider","Provider","AssetConsumer","Consumer"],"sources":["asset.provider.ts"],"sourcesContent":["import React from 'react';\n\nconst AssetContext = React.createContext<(path: string) => number | string>(null as any);\n\nexport const AssetProvider = AssetContext.Provider;\nexport const AssetConsumer = AssetContext.Consumer;"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,YAAY,gBAAGD,KAAK,CAACE,aAAa,CAAoC,IAAI,CAAQ;AAExF,OAAO,MAAMC,aAAa,GAAGF,YAAY,CAACG,QAAQ;AAClD,OAAO,MAAMC,aAAa,GAAGJ,YAAY,CAACK,QAAQ"}
@@ -1,20 +1,28 @@
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); }
1
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; }
2
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
4
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
5
  import { assign, isUndefined } from 'lodash';
5
6
  import React from 'react';
7
+ import * as Animatable from 'react-native-animatable';
6
8
  import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
9
+ import { StyleProps, getStyleName } from '@wavemaker/app-rn-runtime/styles/style-props';
10
+ import { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';
7
11
  import { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';
8
12
  import { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';
9
- import BASE_THEME, { ThemeConsumer, attachBackground, ThemeEvent } from '../styles/theme';
13
+ import BASE_THEME, { ThemeConsumer, ThemeEvent } from '../styles/theme';
14
+ import EventNotifier from './event-notifier';
10
15
  import { PropsProvider } from './props.provider';
11
16
  import { assignIn } from 'lodash-es';
12
17
  import { HideMode } from './if.component';
18
+ import { AssetConsumer } from './asset.provider';
13
19
  import { FixedView } from './fixed-view.component';
14
20
  export const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');
15
21
  export const ParentContext = /*#__PURE__*/React.createContext(null);
16
22
  export class BaseComponentState {
17
23
  constructor() {
24
+ _defineProperty(this, "animationId", 0);
25
+ _defineProperty(this, "animatableProps", undefined);
18
26
  _defineProperty(this, "props", {});
19
27
  _defineProperty(this, "hide", false);
20
28
  }
@@ -26,8 +34,9 @@ export function defineStyles(styles) {
26
34
  }
27
35
  }, styles);
28
36
  }
29
- export class BaseProps {
37
+ export class BaseProps extends StyleProps {
30
38
  constructor() {
39
+ super(...arguments);
31
40
  _defineProperty(this, "id", null);
32
41
  _defineProperty(this, "name", null);
33
42
  _defineProperty(this, "key", null);
@@ -56,9 +65,24 @@ export class BaseComponent extends React.Component {
56
65
  _defineProperty(this, "destroyed", false);
57
66
  _defineProperty(this, "_showSkeleton", false);
58
67
  _defineProperty(this, "isFixed", false);
68
+ _defineProperty(this, "notifier", new EventNotifier());
69
+ _defineProperty(this, "parentListenerDestroyers", []);
70
+ _defineProperty(this, "_background", /*#__PURE__*/React.createElement(React.Fragment, null));
71
+ _defineProperty(this, "styleOverrides", {});
72
+ _defineProperty(this, "loadAsset", null);
59
73
  this.state = defaultState || {};
60
74
  this.propertyProvider = new PropsProvider(assign({}, defaultProps), assign({}, markupProps), (name, $new, $old) => {
61
75
  WIDGET_LOGGER.debug(() => `${this.props.name ?? this.constructor.name}: ${name} changed from ${$old} to ${$new}`);
76
+ if (this.initialized) {
77
+ const styleName = getStyleName(name);
78
+ if (styleName) {
79
+ if ($new === undefined) {
80
+ delete this.styleOverrides[styleName];
81
+ } else {
82
+ this.styleOverrides[styleName] = $new;
83
+ }
84
+ }
85
+ }
62
86
  this.onPropertyChange(name, $new, $old);
63
87
  });
64
88
  //@ts-ignore
@@ -95,6 +119,18 @@ export class BaseComponent extends React.Component {
95
119
  this.cleanup.push(this.theme.subscribe(ThemeEvent.CHANGE, () => {
96
120
  this.forceUpdate();
97
121
  }));
122
+ this.cleanup.push(() => {
123
+ this.destroyParentListeners();
124
+ });
125
+ }
126
+ subscribe(event, fn) {
127
+ return this.notifier.subscribe(event, fn);
128
+ }
129
+ animate(props) {
130
+ this.setState({
131
+ animationId: Date.now(),
132
+ animatableProps: props
133
+ });
98
134
  }
99
135
  setProp(propName, value) {
100
136
  this.propertyProvider.set(propName, value);
@@ -193,6 +229,7 @@ export class BaseComponent extends React.Component {
193
229
  this.props.listener.onComponentDestroy(this.proxy);
194
230
  }
195
231
  this.cleanup.forEach(f => f && f());
232
+ this.notifier.notify('destroy', []);
196
233
  }
197
234
  invokeEventCallback(eventName, args) {
198
235
  //@ts-ignore
@@ -214,19 +251,24 @@ export class BaseComponent extends React.Component {
214
251
  this.forceUpdate();
215
252
  }
216
253
  cleanRefresh() {
217
- this.setState({
218
- hide: true
219
- }, () => {
220
- setTimeout(() => {
221
- this.setState({
222
- hide: false
223
- });
224
- }, 100);
225
- });
254
+ this.forceUpdate(() => this.notifier.notify('forceUpdate', []));
226
255
  }
227
256
  renderSkeleton(props) {
228
257
  return null;
229
258
  }
259
+ destroyParentListeners() {
260
+ this.parentListenerDestroyers.map(fn => fn());
261
+ }
262
+ setParent(parent) {
263
+ if (parent && this.parent !== parent) {
264
+ this.parent = parent;
265
+ this.parentListenerDestroyers = [this.parent.subscribe('forceUpdate', () => {
266
+ this.cleanRefresh();
267
+ }), this.parent.subscribe('destroy', () => {
268
+ this.destroyParentListeners();
269
+ })];
270
+ }
271
+ }
230
272
  copyStyles(property, from, to) {
231
273
  if (!isUndefined(from[property])) {
232
274
  to[property] = from[property];
@@ -254,7 +296,33 @@ export class BaseComponent extends React.Component {
254
296
  return /*#__PURE__*/React.createElement(FixedView, {
255
297
  style: style,
256
298
  theme: this.theme
257
- }, this.renderWidget(props));
299
+ }, this.addAnimation(this.renderWidget(props)));
300
+ }
301
+ addAnimation(n) {
302
+ if (!this.state.animatableProps) {
303
+ return n;
304
+ }
305
+ return /*#__PURE__*/React.createElement(Animatable.View, _extends({
306
+ key: this.state.animationId
307
+ }, this.state.animatableProps), n);
308
+ }
309
+ setBackground() {
310
+ const bgStyle = this.styles.root;
311
+ this._background = /*#__PURE__*/React.createElement(BackgroundComponent, {
312
+ image: bgStyle.backgroundImage,
313
+ position: bgStyle.backgroundPosition,
314
+ size: bgStyle.backgroundSize,
315
+ repeat: bgStyle.backgroundRepeat,
316
+ resizeMode: bgStyle.backgroundResizeMode,
317
+ style: {
318
+ borderRadius: this.styles.root.borderRadius
319
+ }
320
+ });
321
+ delete this.styles.root['backgroundImage'];
322
+ delete this.styles.root['backgroundPosition'];
323
+ delete this.styles.root['backgroundResizeMode'];
324
+ delete this.styles.root['backgroundSize'];
325
+ delete this.styles.root['backgroundRepeat'];
258
326
  }
259
327
  render() {
260
328
  WIDGET_LOGGER.info(() => `${this.props.name ?? this.constructor.name} is rendering.`);
@@ -263,35 +331,39 @@ export class BaseComponent extends React.Component {
263
331
  return null;
264
332
  }
265
333
  this.isFixed = false;
266
- return /*#__PURE__*/React.createElement(ParentContext.Consumer, null, parent => {
267
- var _this$parent;
268
- this.parent = parent;
269
- this._showSkeleton = ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent._showSkeleton) || !!this.state.props.showskeleton;
270
- return /*#__PURE__*/React.createElement(ParentContext.Provider, {
271
- value: this
272
- }, /*#__PURE__*/React.createElement(ThemeConsumer, null, theme => {
273
- this.theme = theme || BASE_THEME;
274
- this.styles = this.theme.mergeStyle(this.getDefaultStyles(), props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null, props.classname && this.theme.getStyle(props.classname), props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')), this.props.styles);
275
- if (this.styles.root.hasOwnProperty('_background')) {
276
- delete this.styles.root.backgroundColor;
277
- }
278
- if (!this.isVisible()) {
279
- assign(this.styles, this.theme.getStyle('hidden'));
280
- }
281
- let eleToRender = this._showSkeleton && this.renderSkeleton(props);
282
- if (eleToRender) {
283
- return eleToRender;
284
- }
285
- let widgetElement = null;
286
- this.isFixed = this.styles.root.position === 'fixed';
287
- if (this.isFixed) {
288
- this.styles.root.position = undefined;
289
- widgetElement = this.renderFixedContainer(props);
290
- } else {
291
- widgetElement = this.renderWidget(this.state.props);
292
- }
293
- return attachBackground(widgetElement, this.styles.root);
294
- }));
334
+ return /*#__PURE__*/React.createElement(AssetConsumer, null, loadAsset => {
335
+ this.loadAsset = loadAsset;
336
+ return /*#__PURE__*/React.createElement(ParentContext.Consumer, null, parent => {
337
+ var _this$parent;
338
+ this.setParent(parent);
339
+ this._showSkeleton = ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent._showSkeleton) || !!this.state.props.showskeleton;
340
+ return /*#__PURE__*/React.createElement(ParentContext.Provider, {
341
+ value: this
342
+ }, /*#__PURE__*/React.createElement(ThemeConsumer, null, theme => {
343
+ this.theme = theme || BASE_THEME;
344
+ this.styles = this.theme.mergeStyle(this.getDefaultStyles(), props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null, props.classname && this.theme.getStyle(props.classname), props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')), this.props.styles, {
345
+ root: this.styleOverrides,
346
+ text: this.styleOverrides
347
+ });
348
+ if (this.styles.root.hasOwnProperty('_background')) {
349
+ delete this.styles.root.backgroundColor;
350
+ }
351
+ if (!this.isVisible()) {
352
+ assign(this.styles, this.theme.getStyle('hidden'));
353
+ }
354
+ let eleToRender = this._showSkeleton && this.renderSkeleton(props);
355
+ if (eleToRender) {
356
+ return eleToRender;
357
+ }
358
+ this.setBackground();
359
+ this.isFixed = this.styles.root.position === 'fixed';
360
+ if (this.isFixed) {
361
+ this.styles.root.position = undefined;
362
+ return this.renderFixedContainer(props);
363
+ }
364
+ return this.addAnimation(this.renderWidget(this.state.props));
365
+ }));
366
+ });
295
367
  });
296
368
  }
297
369
  }