@wavemaker/app-rn-runtime 11.3.2-rc.5253 → 11.4.0-next.1417012

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 (221) hide show
  1. app-rn-runtime/actions/notification-action.js +4 -5
  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 +26 -37
  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 +2 -3
  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 +1 -4
  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/container/accordion/accordion.component.js +1 -1
  38. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  39. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
  40. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  41. app-rn-runtime/components/container/container.component.js +1 -1
  42. app-rn-runtime/components/container/container.component.js.map +1 -1
  43. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
  44. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  45. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
  46. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  47. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
  48. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  49. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
  50. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  51. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
  52. app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  53. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
  54. app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
  55. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
  56. app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
  57. app-rn-runtime/components/container/panel/panel.component.js +1 -1
  58. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  59. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +4 -12
  60. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  61. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -2
  62. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  63. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +2 -5
  64. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  65. app-rn-runtime/components/container/tabs/tabs.component.js +64 -80
  66. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  67. app-rn-runtime/components/container/tabs/tabs.props.js +0 -1
  68. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  69. app-rn-runtime/components/container/tabs/tabs.styles.js +1 -1
  70. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  71. app-rn-runtime/components/container/tile/tile.component.js +1 -1
  72. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  73. app-rn-runtime/components/container/wizard/wizard.component.js +1 -1
  74. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  75. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
  76. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  77. app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
  78. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  79. app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
  80. app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
  81. app-rn-runtime/components/data/card/card.component.js +1 -1
  82. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  83. app-rn-runtime/components/data/form/form-action/form-action.component.js +6 -0
  84. app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
  85. app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
  86. app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
  87. app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -1
  88. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  89. app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
  90. app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
  91. app-rn-runtime/components/data/form/form.component.js +31 -2
  92. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  93. app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
  94. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  95. app-rn-runtime/components/data/list/list.component.js +8 -17
  96. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  97. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +2 -3
  98. app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
  99. app-rn-runtime/components/device/camera/camera.component.js +4 -9
  100. app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
  101. app-rn-runtime/components/device/camera/camera.props.js +1 -0
  102. app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
  103. app-rn-runtime/components/dialogs/dialog/dialog.component.js +1 -1
  104. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  105. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
  106. app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
  107. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
  108. app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  109. app-rn-runtime/components/input/baseinput/baseinput.component.js +0 -7
  110. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  111. app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
  112. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  113. app-rn-runtime/components/input/checkbox/checkbox.component.js +16 -1
  114. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  115. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +38 -0
  116. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  117. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  118. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  119. app-rn-runtime/components/input/epoch/base-datetime.component.js +1 -1
  120. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  121. app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
  122. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  123. app-rn-runtime/components/input/number/number.component.js +9 -0
  124. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  125. app-rn-runtime/components/input/radioset/radioset.component.js +40 -0
  126. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  127. app-rn-runtime/components/input/rating/rating.component.js +1 -1
  128. app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
  129. app-rn-runtime/components/input/slider/slider.component.js +1 -1
  130. app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
  131. app-rn-runtime/components/input/switch/switch.component.js +22 -19
  132. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  133. app-rn-runtime/components/input/switch/switch.styles.js +7 -7
  134. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  135. app-rn-runtime/components/input/text/text.component.js +10 -1
  136. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  137. app-rn-runtime/components/input/textarea/textarea.component.js +10 -0
  138. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  139. app-rn-runtime/components/input/toggle/toggle.component.js +1 -1
  140. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  141. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
  142. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  143. app-rn-runtime/components/navigation/basenav/basenav.props.js +0 -1
  144. app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
  145. app-rn-runtime/components/navigation/menu/menu.component.js +1 -2
  146. app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
  147. app-rn-runtime/components/navigation/navbar/navbar.component.js +0 -2
  148. app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
  149. app-rn-runtime/components/navigation/navitem/navitem.component.js +3 -4
  150. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  151. app-rn-runtime/components/navigation/navitem/navitem.props.js +0 -1
  152. app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
  153. app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
  154. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  155. app-rn-runtime/components/page/content/content.component.js +1 -1
  156. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  157. app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
  158. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  159. app-rn-runtime/components/page/page-content/page-content.component.js +2 -2
  160. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  161. app-rn-runtime/components/page/page.component.js +1 -1
  162. app-rn-runtime/components/page/page.component.js.map +1 -1
  163. app-rn-runtime/components/page/partial/partial.component.js +1 -1
  164. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  165. app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
  166. app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
  167. app-rn-runtime/components/page/partial-container/partial-container.styles.js +1 -2
  168. app-rn-runtime/components/page/partial-container/partial-container.styles.js.map +1 -1
  169. app-rn-runtime/components/page/tabbar/tabbar.component.js +1 -2
  170. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  171. app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
  172. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  173. app-rn-runtime/core/base.component.js +41 -113
  174. app-rn-runtime/core/base.component.js.map +1 -1
  175. app-rn-runtime/core/imageSizeEstimator.js +0 -1
  176. app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
  177. app-rn-runtime/core/injector.js +1 -15
  178. app-rn-runtime/core/injector.js.map +1 -1
  179. app-rn-runtime/core/tappable.component.js +2 -9
  180. app-rn-runtime/core/tappable.component.js.map +1 -1
  181. app-rn-runtime/core/utils.js +0 -6
  182. app-rn-runtime/core/utils.js.map +1 -1
  183. app-rn-runtime/package.json +5 -5
  184. app-rn-runtime/runtime/App.js +14 -13
  185. app-rn-runtime/runtime/App.js.map +1 -1
  186. app-rn-runtime/runtime/App.navigator.js +12 -2
  187. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  188. app-rn-runtime/runtime/base-fragment.component.js +4 -6
  189. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  190. app-rn-runtime/runtime/navigator/drawer.navigator.js +0 -4
  191. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  192. app-rn-runtime/runtime/navigator/stack.navigator.js +1 -5
  193. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  194. app-rn-runtime/runtime/services/device/camera-service.js +6 -28
  195. app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
  196. app-rn-runtime/runtime/services/device/scan-service.js +14 -15
  197. app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
  198. app-rn-runtime/styles/style-prop.validator.js +6 -11
  199. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  200. app-rn-runtime/styles/theme.js +36 -5
  201. app-rn-runtime/styles/theme.js.map +1 -1
  202. app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
  203. app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
  204. app-rn-runtime/variables/device/file/upload-file.operation.js +21 -43
  205. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  206. app-rn-runtime/variables/service-variable.js +7 -18
  207. app-rn-runtime/variables/service-variable.js.map +1 -1
  208. app-rn-runtime/components/basic/video/video.component.js +0 -56
  209. app-rn-runtime/components/basic/video/video.component.js.map +0 -1
  210. app-rn-runtime/components/basic/video/video.props.js +0 -22
  211. app-rn-runtime/components/basic/video/video.props.js.map +0 -1
  212. app-rn-runtime/components/basic/video/video.styles.js +0 -11
  213. app-rn-runtime/components/basic/video/video.styles.js.map +0 -1
  214. app-rn-runtime/core/asset.provider.js +0 -5
  215. app-rn-runtime/core/asset.provider.js.map +0 -1
  216. app-rn-runtime/gestures/swipe.animation.js +0 -105
  217. app-rn-runtime/gestures/swipe.animation.js.map +0 -1
  218. app-rn-runtime/styles/background.component.js +0 -259
  219. app-rn-runtime/styles/background.component.js.map +0 -1
  220. app-rn-runtime/styles/style-props.js +0 -93
  221. app-rn-runtime/styles/style-props.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["isNumber","isString","Font","isColor","c","isStringOrNumber","v","isIn","obj","arr","forEach","k","STYLE_PROP_TYPE_INFO","alignContent","isValid","ref","alignItems","alignSelf","aspectRatio","backfaceVisibility","backgroundColor","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderCurve","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopWidth","borderWidth","bottom","color","columnGap","direction","display","elevation","end","flex","flexBasis","flexDirection","flexGrow","flexShrink","flexWrap","fontFamily","isLoaded","errorMsg","fontSize","fontStyle","fontVariant","fontWeight","gap","height","justifyContent","left","letterSpacing","lineHeight","margin","marginBottom","marginEnd","marginHorizontal","marginLeft","marginRight","marginStart","marginTop","marginVertical","maxHeight","maxWidth","minHeight","minWidth","opacity","overflow","overlayColor","padding","paddingBottom","paddingEnd","paddingHorizontal","paddingLeft","paddingRight","paddingStart","paddingTop","paddingVertical","pointerEvents","position","resizeMode","right","rowGap","shadowColor","shadowOpacity","shadowRadius","start","textAlign","textAlignVertical","textDecorationColor","textDecorationLine","textDecorationStyle","textShadowColor","textShadowRadius","textTransform","tintColor","top","verticalAlign","width","writingDirection","zIndex","getStyleReference","name","info","isValidStyleProp","value","getErrorMessage"],"sources":["style-prop.validator.ts"],"sourcesContent":["import {isNumber, isNil, isString } from 'lodash-es';\nimport * as Font from 'expo-font';\n\nconst isColor = (c: string) => true;\nconst isStringOrNumber = (v: any) => isNumber(v) || isString(v);\nconst isIn = (...arr: any) => {\n const obj = {};\n arr.forEach((v: any) => {\n (obj as any)[v] = true;\n })\n return (k: any) => (obj as any)[k] === true ;\n};\n\nconst STYLE_PROP_TYPE_INFO = {\n alignContent: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'stretch', 'space-between', 'space-around'),\n ref: 'https://reactnative.dev/docs/layout-props#aligncontent'\n },\n alignItems: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'stretch', 'baseline'),\n ref: 'https://reactnative.dev/docs/layout-props#alignitems'\n },\n alignSelf: {\n isValid: isIn('auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline'),\n ref: 'https://reactnative.dev/docs/layout-props#alignself'\n },\n aspectRatio: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#aspectratio'\n },\n backfaceVisibility: {\n isValid: isIn('visible', 'hidden'),\n ref: 'https://reactnative.dev/docs/image-style-props#backfacevisibility'\n },\n backgroundColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#backgroundcolor'\n },\n borderBottomColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomcolor'\n },\n borderBottomEndRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomendradius'\n },\n borderBottomLeftRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderbottomleftradius'\n },\n borderBottomRightRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderbottomrightradius'\n },\n borderBottomStartRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomstartradius'\n },\n borderBottomWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderbottomwidth'\n },\n borderColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#bordercolor'\n },\n borderCurve: {\n isValid: isIn('circular', 'continuous'),\n ref: 'https://reactnative.dev/docs/view-style-props#bordercurve-ios'\n },\n borderEndColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderendcolor'\n },\n borderEndWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderendwidth'\n },\n borderLeftColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderleftcolor'\n },\n borderLeftWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderleftwidth'\n },\n borderRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderradius'\n },\n borderRightColor: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderrightcolor'\n },\n borderRightWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderrightwidth'\n },\n borderStartColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderstartcolor'\n },\n borderStartWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderstartwidth'\n },\n borderStyle: {\n isValid: isIn('solid', 'dotted', 'dashed'),\n ref: 'https://reactnative.dev/docs/view-style-props#borderstyle'\n },\n borderTopEndRadius: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopendradius'\n },\n borderTopLeftRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#bordertopleftradius'\n },\n borderTopRightRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#bordertoprightradius'\n },\n borderTopStartRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopstartradius'\n },\n borderTopWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#bordertopwidth'\n },\n borderWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderwidth'\n },\n bottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#bottom'\n },\n color: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#color'\n },\n columnGap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#columngap'\n },\n direction: {\n isValid: isIn('inherit', 'LTR', 'RTL'),\n ref: 'https://reactnative.dev/docs/layout-props#direction'\n },\n display: {\n isValid: isIn('none', 'flex'),\n ref: 'https://reactnative.dev/docs/layout-props#display'\n },\n elevation: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#elevation-android'\n },\n end: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#end'\n },\n flex: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flex'\n },\n flexBasis: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexbasis'\n },\n flexDirection: {\n isValid: isIn('column', 'row', 'column-reverse', 'row-reverse'),\n ref: 'https://reactnative.dev/docs/layout-props#flexdirection'\n },\n flexGrow: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexgrow'\n },\n flexShrink: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexshrink'\n },\n flexWrap: {\n isValid: isIn('wrap', 'nowrap', 'wrap-reverse'),\n ref: 'https://reactnative.dev/docs/layout-props#flexwrap'\n },\n fontFamily: {\n isValid: (v: string) => Font.isLoaded(v),\n errorMsg: (v: string) => `Font '${v}' is not loaded. Font family names are case-sensitive. Please add font either in theme or app.`,\n ref: 'https://reactnative.dev/docs/text-style-props#fontfamily'\n },\n fontSize: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#fontsize'\n },\n fontStyle: {\n isValid: isIn('normal', 'italic'),\n ref: 'https://reactnative.dev/docs/text-style-props#fontstyle'\n },\n fontVariant: {\n isValid: (v: any) => isIn('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') || isString(v),\n ref: 'https://reactnative.dev/docs/text-style-props#fontvariant'\n },\n fontWeight: {\n isValid: (v: any) => isIn('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') || isNumber(v),\n ref: 'https://reactnative.dev/docs/text-style-props#fontweight'\n },\n gap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#gap'\n },\n height: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#height'\n },\n justifyContent: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly'),\n ref: 'https://reactnative.dev/docs/layout-props#justifycontent'\n },\n left: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#left'\n },\n letterSpacing: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#letterspacing'\n },\n lineHeight: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#lineheight'\n },\n margin: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#margin'\n },\n marginBottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginbottom'\n },\n marginEnd: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginend'\n },\n marginHorizontal: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginhorizontal'\n },\n marginLeft: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginleft'\n },\n marginRight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginright'\n },\n marginStart: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginstart'\n },\n marginTop: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#margintop'\n },\n marginVertical: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginvertical'\n },\n maxHeight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#maxheight'\n },\n maxWidth: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#maxwidth'\n },\n minHeight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#minheight'\n },\n minWidth: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#minwidth'\n },\n opacity: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#opacity'\n },\n overflow: {\n isValid: isIn('visible', 'hidden', 'scroll'),\n ref: 'https://reactnative.dev/docs/image-style-props#overflow'\n },\n overlayColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#overlaycolor-android'\n },\n padding: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#padding'\n },\n paddingBottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingbottom'\n },\n paddingEnd: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingend'\n },\n paddingHorizontal: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddinghorizontal'\n },\n paddingLeft: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingleft'\n },\n paddingRight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingright'\n },\n paddingStart: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingstart'\n },\n paddingTop: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingtop'\n },\n paddingVertical: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingvertical'\n },\n pointerEvents: {\n isValid: isIn('auto', 'box-none', 'box-only', 'none' ),\n ref: 'https://reactnative.dev/docs/view-style-props#pointerevents'\n },\n position: {\n isValid: isIn('absolute', 'relative', 'fixed'),\n ref: 'https://reactnative.dev/docs/layout-props#position'\n },\n resizeMode: {\n isValid: isIn('cover', 'contain', 'stretch', 'repeat', 'center'),\n ref: 'https://reactnative.dev/docs/image-style-props#resizemode'\n },\n right: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#right'\n },\n rowGap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#rowgap'\n },\n shadowColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowcolor'\n },\n shadowOpacity: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowopacity-ios'\n },\n shadowRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowradius-ios'\n },\n start: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#start'\n },\n textAlign: {\n isValid: isIn('auto', 'left', 'right', 'center', 'justify'),\n ref: 'https://reactnative.dev/docs/text-style-props#textalign'\n },\n textAlignVertical: {\n isValid: isIn('auto', 'top', 'bottom', 'center'),\n ref: 'https://reactnative.dev/docs/text-style-props#textalignvertical-android'\n },\n textDecorationColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationcolor-ios'\n },\n textDecorationLine: {\n isValid: isIn('none', 'underline', 'line-through', 'underline line-through'),\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationline'\n },\n textDecorationStyle: {\n isValid: isIn('solid', 'double', 'dotted', 'dashed'),\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationstyle-ios'\n },\n textShadowColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#textshadowcolor'\n },\n textShadowRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#textshadowoffset'\n },\n textTransform: {\n isValid: isIn('none', 'uppercase', 'lowercase', 'capitalize'),\n ref: 'https://reactnative.dev/docs/text-style-props#texttransform'\n },\n tintColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#tintcolor'\n },\n top: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#top'\n },\n verticalAlign: {\n isValid: isIn('auto', 'top', 'bottom', 'middle'),\n ref: 'https://reactnative.dev/docs/text-style-props#verticalalign-android'\n },\n width: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#width'\n },\n writingDirection: {\n isValid: isIn('auto', 'ltr', 'rtl'),\n ref: 'https://reactnative.dev/docs/text-style-props#writingdirection-ios'\n },\n zIndex: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#zindex'\n },\n};\n\nexport const getStyleReference = (name: string) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n return !info || info.ref;\n};\n\nexport const isValidStyleProp = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n return !info || info.isValid(value);\n};\n\nexport const getErrorMessage = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n if (info && info.errorMsg) {\n return info.errorMsg(value);\n }\n return `'${value}' is not a valid value to '${name}'.`;\n};"],"mappings":"AAAA,SAAQA,QAAQ,EAASC,QAAQ,QAAQ,WAAW;AACpD,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,MAAM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K,CAAC;IACnCQ,GAAG,EAAE;EACT,CAAC;EACDuG,MAAM,EAAG;IACLxG,OAAO,EAAEd,QAAQ;IACjBe,GAAG,EAAE;EACT;AACJ,CAAC;AAED,OAAO,MAAMwG,iBAAiB,GAAIC,IAAY,IAAK;EAC/C,MAAMC,IAAI,GAAI7G,oBAAoB,CAAS4G,IAAI,CAAC;EAChD,OAAO,CAACC,IAAI,IAAIA,IAAI,CAAC1G,GAAG;AAC5B,CAAC;AAED,OAAO,MAAM2G,gBAAgB,GAAG,CAACF,IAAY,EAAEG,KAAU,KAAK;EAC1D,MAAMF,IAAI,GAAI7G,oBAAoB,CAAS4G,IAAI,CAAC;EAChD,OAAO,CAACC,IAAI,IAAIA,IAAI,CAAC3G,OAAO,CAAC6G,KAAK,CAAC;AACvC,CAAC;AAED,OAAO,MAAMC,eAAe,GAAG,CAACJ,IAAY,EAAEG,KAAU,KAAK;EACzD,MAAMF,IAAI,GAAI7G,oBAAoB,CAAS4G,IAAI,CAAC;EAChD,IAAIC,IAAI,IAAIA,IAAI,CAAC7D,QAAQ,EAAE;IACvB,OAAO6D,IAAI,CAAC7D,QAAQ,CAAC+D,KAAK,CAAC;EAC/B;EACA,OAAQ,IAAGA,KAAM,8BAA6BH,IAAK,IAAG;AAC1D,CAAC"}
1
+ {"version":3,"names":["isNumber","isString","isColor","c","isStringOrNumber","v","isIn","obj","arr","forEach","k","STYLE_PROP_TYPE_INFO","alignContent","isValid","ref","alignItems","alignSelf","aspectRatio","backfaceVisibility","backgroundColor","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderCurve","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopColor","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopWidth","borderWidth","bottom","color","columnGap","direction","display","elevation","end","flex","flexBasis","flexDirection","flexGrow","flexShrink","flexWrap","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","gap","height","justifyContent","left","letterSpacing","lineHeight","margin","marginBottom","marginEnd","marginHorizontal","marginLeft","marginRight","marginStart","marginTop","marginVertical","maxHeight","maxWidth","minHeight","minWidth","opacity","overflow","overlayColor","padding","paddingBottom","paddingEnd","paddingHorizontal","paddingLeft","paddingRight","paddingStart","paddingTop","paddingVertical","pointerEvents","position","resizeMode","right","rowGap","shadowColor","shadowOpacity","shadowRadius","start","textAlign","textAlignVertical","textDecorationColor","textDecorationLine","textDecorationStyle","textShadowColor","textShadowRadius","textTransform","tintColor","top","verticalAlign","width","writingDirection","zIndex","getStyleReference","name","info","isValidStyleProp","value"],"sources":["style-prop.validator.ts"],"sourcesContent":["import {isNumber, isNil, isString } from 'lodash-es';\n\nconst isColor = (c: string) => true;\nconst isStringOrNumber = (v: any) => isNumber(v) || isString(v);\nconst isIn = (...arr: any) => {\n const obj = {};\n arr.forEach((v: any) => {\n (obj as any)[v] = true;\n })\n return (k: any) => (obj as any)[k] === true ;\n};\n\nconst STYLE_PROP_TYPE_INFO = {\n alignContent: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'stretch', 'space-between', 'space-around'),\n ref: 'https://reactnative.dev/docs/layout-props#aligncontent'\n },\n alignItems: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'stretch', 'baseline'),\n ref: 'https://reactnative.dev/docs/layout-props#alignitems'\n },\n alignSelf: {\n isValid: isIn('auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline'),\n ref: 'https://reactnative.dev/docs/layout-props#alignself'\n },\n aspectRatio: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#aspectratio'\n },\n backfaceVisibility: {\n isValid: isIn('visible', 'hidden'),\n ref: 'https://reactnative.dev/docs/image-style-props#backfacevisibility'\n },\n backgroundColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#backgroundcolor'\n },\n borderBottomColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomcolor'\n },\n borderBottomEndRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomendradius'\n },\n borderBottomLeftRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderbottomleftradius'\n },\n borderBottomRightRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderbottomrightradius'\n },\n borderBottomStartRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomstartradius'\n },\n borderBottomWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderbottomwidth'\n },\n borderColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#bordercolor'\n },\n borderCurve: {\n isValid: isIn('circular', 'continuous'),\n ref: 'https://reactnative.dev/docs/view-style-props#bordercurve-ios'\n },\n borderEndColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderendcolor'\n },\n borderEndWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderendwidth'\n },\n borderLeftColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderleftcolor'\n },\n borderLeftWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderleftwidth'\n },\n borderRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderradius'\n },\n borderRightColor: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderrightcolor'\n },\n borderRightWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderrightwidth'\n },\n borderStartColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderstartcolor'\n },\n borderStartWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderstartwidth'\n },\n borderStyle: {\n isValid: isIn('solid', 'dotted', 'dashed'),\n ref: 'https://reactnative.dev/docs/view-style-props#borderstyle'\n },\n borderTopColor: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopcolor'\n },\n borderTopEndRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopendradius'\n },\n borderTopLeftRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#bordertopleftradius'\n },\n borderTopRightRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#bordertoprightradius'\n },\n borderTopStartRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopstartradius'\n },\n borderTopWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#bordertopwidth'\n },\n borderWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderwidth'\n },\n bottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#bottom'\n },\n color: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#color'\n },\n columnGap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#columngap'\n },\n direction: {\n isValid: isIn('inherit', 'LTR', 'RTL'),\n ref: 'https://reactnative.dev/docs/layout-props#direction'\n },\n display: {\n isValid: isIn('none', 'flex'),\n ref: 'https://reactnative.dev/docs/layout-props#display'\n },\n elevation: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#elevation-android'\n },\n end: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#end'\n },\n flex: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flex'\n },\n flexBasis: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexbasis'\n },\n flexDirection: {\n isValid: isIn('column', 'row', 'column-reverse', 'row-reverse'),\n ref: 'https://reactnative.dev/docs/layout-props#flexdirection'\n },\n flexGrow: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexgrow'\n },\n flexShrink: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexshrink'\n },\n flexWrap: {\n isValid: isIn('wrap', 'nowrap', 'wrap-reverse'),\n ref: 'https://reactnative.dev/docs/layout-props#flexwrap'\n },\n fontFamily: {\n isValid: isString,\n ref: 'https://reactnative.dev/docs/text-style-props#fontfamily'\n },\n fontSize: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#fontsize'\n },\n fontStyle: {\n isValid: isIn('normal', 'italic'),\n ref: 'https://reactnative.dev/docs/text-style-props#fontstyle'\n },\n fontVariant: {\n isValid: (v: any) => isIn('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') || isString(v),\n ref: 'https://reactnative.dev/docs/text-style-props#fontvariant'\n },\n fontWeight: {\n isValid: (v: any) => isIn('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') || isNumber(v),\n ref: 'https://reactnative.dev/docs/text-style-props#fontweight'\n },\n gap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#gap'\n },\n height: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#height'\n },\n justifyContent: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly'),\n ref: 'https://reactnative.dev/docs/layout-props#justifycontent'\n },\n left: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#left'\n },\n letterSpacing: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#letterspacing'\n },\n lineHeight: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#lineheight'\n },\n margin: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#margin'\n },\n marginBottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginbottom'\n },\n marginEnd: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginend'\n },\n marginHorizontal: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginhorizontal'\n },\n marginLeft: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginleft'\n },\n marginRight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginright'\n },\n marginStart: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginstart'\n },\n marginTop: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#margintop'\n },\n marginVertical: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginvertical'\n },\n maxHeight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#maxheight'\n },\n maxWidth: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#maxwidth'\n },\n minHeight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#minheight'\n },\n minWidth: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#minwidth'\n },\n opacity: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#opacity'\n },\n overflow: {\n isValid: isIn('visible', 'hidden', 'scroll'),\n ref: 'https://reactnative.dev/docs/image-style-props#overflow'\n },\n overlayColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#overlaycolor-android'\n },\n padding: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#padding'\n },\n paddingBottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingbottom'\n },\n paddingEnd: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingend'\n },\n paddingHorizontal: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddinghorizontal'\n },\n paddingLeft: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingleft'\n },\n paddingRight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingright'\n },\n paddingStart: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingstart'\n },\n paddingTop: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingtop'\n },\n paddingVertical: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingvertical'\n },\n pointerEvents: {\n isValid: isIn('auto', 'box-none', 'box-only', 'none' ),\n ref: 'https://reactnative.dev/docs/view-style-props#pointerevents'\n },\n position: {\n isValid: isIn('absolute', 'relative', 'fixed'),\n ref: 'https://reactnative.dev/docs/layout-props#position'\n },\n resizeMode: {\n isValid: isIn('cover', 'contain', 'stretch', 'repeat', 'center'),\n ref: 'https://reactnative.dev/docs/image-style-props#resizemode'\n },\n right: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#right'\n },\n rowGap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#rowgap'\n },\n shadowColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowcolor'\n },\n shadowOpacity: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowopacity-ios'\n },\n shadowRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowradius-ios'\n },\n start: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#start'\n },\n textAlign: {\n isValid: isIn('auto', 'left', 'right', 'center', 'justify'),\n ref: 'https://reactnative.dev/docs/text-style-props#textalign'\n },\n textAlignVertical: {\n isValid: isIn('auto', 'top', 'bottom', 'center'),\n ref: 'https://reactnative.dev/docs/text-style-props#textalignvertical-android'\n },\n textDecorationColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationcolor-ios'\n },\n textDecorationLine: {\n isValid: isIn('none', 'underline', 'line-through', 'underline line-through'),\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationline'\n },\n textDecorationStyle: {\n isValid: isIn('solid', 'double', 'dotted', 'dashed'),\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationstyle-ios'\n },\n textShadowColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#textshadowcolor'\n },\n textShadowRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#textshadowoffset'\n },\n textTransform: {\n isValid: isIn('none', 'uppercase', 'lowercase', 'capitalize'),\n ref: 'https://reactnative.dev/docs/text-style-props#texttransform'\n },\n tintColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#tintcolor'\n },\n top: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#top'\n },\n verticalAlign: {\n isValid: isIn('auto', 'top', 'bottom', 'middle'),\n ref: 'https://reactnative.dev/docs/text-style-props#verticalalign-android'\n },\n width: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#width'\n },\n writingDirection: {\n isValid: isIn('auto', 'ltr', 'rtl'),\n ref: 'https://reactnative.dev/docs/text-style-props#writingdirection-ios'\n },\n zIndex: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#zindex'\n },\n};\n\nexport const getStyleReference = (name: string) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n return !info || info.ref;\n};\n\nexport const isValidStyleProp = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n return !info || info.isValid(value);\n};"],"mappings":"AAAA,SAAQA,QAAQ,EAASC,QAAQ,QAAQ,WAAW;AAEpD,MAAMC,OAAO,GAAIC,CAAS,IAAK,IAAI;AACnC,MAAMC,gBAAgB,GAAIC,CAAM,IAAKL,QAAQ,CAACK,CAAC,CAAC,IAAIJ,QAAQ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iBAAiB,GAAIC,IAAY,IAAK;EAC/C,MAAMC,IAAI,GAAI5G,oBAAoB,CAAS2G,IAAI,CAAC;EAChD,OAAO,CAACC,IAAI,IAAIA,IAAI,CAACzG,GAAG;AAC5B,CAAC;AAED,OAAO,MAAM0G,gBAAgB,GAAG,CAACF,IAAY,EAAEG,KAAU,KAAK;EAC1D,MAAMF,IAAI,GAAI5G,oBAAoB,CAAS2G,IAAI,CAAC;EAChD,OAAO,CAACC,IAAI,IAAIA,IAAI,CAAC1G,OAAO,CAAC4G,KAAK,CAAC;AACvC,CAAC"}
@@ -3,12 +3,13 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
3
3
  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
4
  import { cloneDeep, forEach, flatten, isArray, isEmpty, isObject, isString, get, reverse } from 'lodash';
5
5
  import React from 'react';
6
+ import { ImageBackground } from 'react-native';
6
7
  import { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
7
8
  import EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';
8
9
  import ViewPort, { EVENTS as ViewPortEvents } from '@wavemaker/app-rn-runtime/core/viewport';
9
10
  import MediaQueryList from './MediaQueryList';
10
11
  import ThemeVariables from './theme.variables';
11
- import { getErrorMessage, getStyleReference, isValidStyleProp } from './style-prop.validator';
12
+ import { getStyleReference, isValidStyleProp } from './style-prop.validator';
12
13
  export const DEFAULT_CLASS = 'DEFAULT_CLASS';
13
14
  if (typeof window !== "undefined") {
14
15
  // @ts-ignore: does not properly extend MediaQueryList
@@ -64,11 +65,14 @@ export class Theme {
64
65
  if (isObject(value)) {
65
66
  Object.keys(value).map(k => this.checkStyleProperties(k, value[k]));
66
67
  } else if (!isValidStyleProp(name, value)) {
67
- console.log(`%cInvalid Style property in ${this.name}: ${getErrorMessage(name, value)}`, 'background-color: #FF0000;font-weight: bold; color: #fff');
68
+ console.log(`%cInvalid Style property: '${value}' is not a valid value to '${name}' in ${this.name}.`, 'background-color: #FF0000;font-weight: bold; color: #fff');
68
69
  console.log(`Refer: ${getStyleReference(name)}`);
69
70
  }
70
71
  }
71
72
  addStyle(name, extend, style) {
73
+ if (this !== Theme.BASE && isWebPreviewMode()) {
74
+ this.checkStyleProperties(name, style);
75
+ }
72
76
  this.styles[name] = deepCopy(this.getStyle(extend), this.styles[name], style);
73
77
  }
74
78
  addTrace(styleName, mergedChildstyle, childStyle, parentStyle) {
@@ -143,9 +147,6 @@ export class Theme {
143
147
  if (!mediaQuery || matchMedia(mediaQuery).matches) {
144
148
  clonedStyle = cloneDeep(this.styles[name]);
145
149
  }
146
- if (this !== Theme.BASE && isWebPreviewMode()) {
147
- this.checkStyleProperties('', clonedStyle);
148
- }
149
150
  style = deepCopy(parentStyle, clonedStyle);
150
151
  this.addTrace(`@${this.name}:${name}`, style, clonedStyle, parentStyle);
151
152
  }
@@ -186,6 +187,36 @@ ViewPort.subscribe(ViewPortEvents.SIZE_CHANGE, () => {
186
187
  Theme.BASE.reset();
187
188
  });
188
189
  export default Theme.BASE;
190
+ export const attachBackground = (c, style) => {
191
+ const background = style._background;
192
+ if (background) {
193
+ const backgroundStyle = {
194
+ width: style.width || '100%',
195
+ height: style.height || '100%'
196
+ };
197
+ Object.keys(background).forEach(k => {
198
+ if (k !== 'imageStyle') {
199
+ backgroundStyle[k] = background[k];
200
+ }
201
+ });
202
+ const imgSrc = background.uri;
203
+ let source;
204
+ if (isString(imgSrc) && (imgSrc.startsWith('http') || imgSrc.startsWith('file:'))) {
205
+ source = {
206
+ uri: imgSrc
207
+ };
208
+ } else {
209
+ source = imgSrc;
210
+ }
211
+ return /*#__PURE__*/React.createElement(ImageBackground, {
212
+ source: source,
213
+ resizeMode: background.resizeMode || 'repeat',
214
+ imageStyle: background.imageStyle,
215
+ style: backgroundStyle
216
+ }, c);
217
+ }
218
+ return c;
219
+ };
189
220
  const ThemeContext = /*#__PURE__*/React.createContext(null);
190
221
  export const ThemeProvider = ThemeContext.Provider;
191
222
  export const ThemeConsumer = ThemeContext.Consumer;
@@ -1 +1 @@
1
- {"version":3,"names":["cloneDeep","forEach","flatten","isArray","isEmpty","isObject","isString","get","reverse","React","deepCopy","isWebPreviewMode","EventNotifier","ViewPort","EVENTS","ViewPortEvents","MediaQueryList","ThemeVariables","getErrorMessage","getStyleReference","isValidStyleProp","DEFAULT_CLASS","window","matchMedia","query","DEVICE_BREAK_POINTS","ThemeEvent","Theme","constructor","parent","name","traceEnabled","subscribe","event","fn","eventNotifer","notify","children","t","clearCache","cache","registerStyle","styleGenerators","push","INSTANCE","addStyle","bind","checkStyleProperties","value","Object","keys","map","k","console","log","extend","style","styles","getStyle","addTrace","styleName","mergedChildstyle","childStyle","parentStyle","v","__trace","prefix","result","collect","mergeStyle","flattenStyles","s","cs","filter","length","indexOf","split","c","mediaQuery","clonedStyle","matches","BASE","$new","newTheme","reset","destroy","i","splice","themeVariables","CHANGE","SIZE_CHANGE","ThemeContext","createContext","ThemeProvider","Provider","ThemeConsumer","Consumer","addColStyles","device","minWidth","root","width","MIN_EXTRA_SMALL_DEVICE","MIN_SMALL_DEVICE","MIN_MEDIUM_DEVICE","MIN_LARGE_DEVICE","display","addDisplayStyles","maxWidth","MAX_LARGE_DEVICE","MAX_EXTRA_SMALL_DEVICE","MAX_SMALL_DEVICE","MAX_MEDIUM_DEVICE","addElevationClasses","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","elevation","zIndex","transform","scale","backgroundColor","dangerColor","infoColor","primaryColor","successColor","warningColor","borderColor"],"sources":["theme.tsx"],"sourcesContent":["import { cloneDeep, forEach, flatten, isArray, isEmpty, isObject, isString, isFunction, get, reverse } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { TextStyle, ViewStyle, ImageStyle, ImageBackground } from 'react-native';\nimport { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';\nimport ViewPort, {EVENTS as ViewPortEvents} from '@wavemaker/app-rn-runtime/core/viewport';\nimport MediaQueryList from './MediaQueryList';\nimport ThemeVariables from './theme.variables';\nimport { getErrorMessage, getStyleReference, isValidStyleProp } from './style-prop.validator';\nexport const DEFAULT_CLASS = 'DEFAULT_CLASS';\n\ndeclare const matchMedia: any, window: any;\n\nif (typeof window !== \"undefined\") {\n // @ts-ignore: does not properly extend MediaQueryList\n window.matchMedia = (query: string) => new MediaQueryList(query);\n}\n\nexport const DEVICE_BREAK_POINTS = {\n 'MIN_EXTRA_SMALL_DEVICE' : '0px',\n 'MAX_EXTRA_SMALL_DEVICE' : '767px',\n 'MIN_SMALL_DEVICE' : '768px',\n 'MAX_SMALL_DEVICE' : '991px',\n 'MIN_MEDIUM_DEVICE' : '992px',\n 'MAX_MEDIUM_DEVICE' : '1199px',\n 'MIN_LARGE_DEVICE' : '1200px',\n 'MAX_LARGE_DEVICE' : '1000000px',\n};\n\nexport type styleGeneratorFn<T extends NamedStyles<any>> = (\n themeVariables: ThemeVariables,\n addStyle: (name: string, extend: string, style: T) => void) => void\n\nexport enum ThemeEvent {\n CHANGE ='change'\n};\n\nexport class Theme {\n public static BASE = new Theme(null as any, 'default');\n\n static {\n ViewPort.subscribe(ViewPortEvents.SIZE_CHANGE, () => {\n Theme.BASE.reset();\n });\n }\n\n\n private eventNotifer = new EventNotifier();\n\n private children: Theme[] = [];\n\n private styles: any = {};\n\n private cache: any = {};\n\n private traceEnabled = false;\n\n private styleGenerators: styleGeneratorFn<any>[] = [];\n\n private constructor(private parent:Theme, public readonly name: string) {\n if (parent) {\n this.traceEnabled = parent.traceEnabled;\n } else {\n this.traceEnabled = isWebPreviewMode();\n }\n }\n\n public subscribe(event: ThemeEvent, fn: Function) {\n return this.eventNotifer.subscribe(event, fn);\n }\n\n public notify(event: ThemeEvent): void {\n this.eventNotifer.notify(event, []);\n this.children.forEach(t => t.notify(event));\n }\n\n clearCache() {\n this.cache = {};\n this.children.forEach((t) => t.clearCache());\n }\n\n registerStyle<T extends NamedStyles<any>>(fn: styleGeneratorFn<T>) {\n this.styleGenerators.push(fn);\n fn(ThemeVariables.INSTANCE, this.addStyle.bind(this));\n }\n\n checkStyleProperties(name: string, value : any) {\n if (isObject(value)) {\n Object.keys(value).map((k) => this.checkStyleProperties(k, (value as any)[k]));\n } else if(!isValidStyleProp(name, value)) {\n console.log(\n `%cInvalid Style property in ${this.name}: ${getErrorMessage(name, value)}`,\n 'background-color: #FF0000;font-weight: bold; color: #fff'\n );\n console.log(`Refer: ${getStyleReference(name)}`);\n }\n }\n\n private addStyle<T extends NamedStyles<any>>(name: string, extend: string, style: T) {\n this.styles[name] = deepCopy(this.getStyle(extend), this.styles[name], style);\n }\n\n private addTrace(styleName: string, mergedChildstyle: any, childStyle: any, parentStyle?: any) {\n if (!this.traceEnabled) {\n return;\n }\n let addTrace = !isEmpty(childStyle);\n forEach(mergedChildstyle, (v: any, k: string) => {\n if (v && !isString(v) && !isArray(v) && isObject(v)) {\n addTrace = false;\n this.addTrace(styleName + '.' + k, v, childStyle && childStyle[k], parentStyle && parentStyle[k])\n }\n });\n if (addTrace) {\n mergedChildstyle['__trace'] = [\n {\n name: styleName,\n value: childStyle\n },\n ...(parentStyle?.__trace|| [])\n ];\n } else {\n mergedChildstyle['__trace'] = [...(parentStyle?.__trace|| [])];\n }\n }\n\n private flatten(style: any, prefix = \"\", result = {} as any) {\n let collect = !isEmpty(style);\n forEach(style, (v: any, k: string) => {\n if (v && !isString(v) && !isArray(v) && isObject(v)) {\n collect = false;\n this.flatten(v, (prefix ? prefix + '.' : '') + k, result)\n }\n });\n if (collect) {\n result[prefix] = style;\n }\n return result;\n }\n\n mergeStyle(...styles: any) {\n const style = deepCopy(...styles);\n if (this.traceEnabled) {\n const flattenStyles = this.flatten(style);\n Object.keys(flattenStyles).forEach(k => {\n const s = flattenStyles[k];\n s['__trace'] = flatten(reverse(styles.map((v: any) => {\n const cs = get(v, k);\n if (cs && cs.__trace) {\n return [...cs.__trace];\n }\n return [];\n }).filter((t: any) => t.length > 0)));\n });\n }\n return style;\n }\n\n getStyle(name: string) {\n let style = this.cache[name];\n if (style) {\n return style;\n }\n if (!name) {\n return {};\n }\n if (name.indexOf(' ') > 0) {\n style = this.mergeStyle(...(name.split(' ').map(c => this.getStyle(c))));\n } else {\n const parentStyle = this.parent && this.parent.getStyle(name);\n const mediaQuery = (this.styles[name] || {})['@media'];\n let clonedStyle = {};\n if (!mediaQuery || matchMedia(mediaQuery).matches) {\n clonedStyle = cloneDeep(this.styles[name]);\n }\n if (this !== Theme.BASE && isWebPreviewMode()) {\n this.checkStyleProperties('', clonedStyle);\n }\n style = deepCopy(parentStyle, clonedStyle);\n this.addTrace(`@${this.name}:${name}`, style, clonedStyle, parentStyle);\n }\n this.cache[name] = style;\n return style;\n }\n\n $new(name = \"\", styles = {} as NamedStyles<any>) {\n const newTheme = new Theme(this, name);\n newTheme.reset(styles);\n this.children.push(newTheme);\n return newTheme;\n }\n\n destroy() {\n const i = this.parent.children.indexOf(this);\n if (i >= 0) {\n this.parent.children.splice(i, 1);\n }\n }\n\n reset(styles?: NamedStyles<any>) {\n this.styles = {};\n this.clearCache();\n if (styles) {\n this.registerStyle((themeVariables, addStyle) => {\n Object.keys(styles).forEach(k => {\n addStyle(k, '', styles[k] as any);\n });\n });\n } else {\n this.styleGenerators.forEach(fn => \n fn(ThemeVariables.INSTANCE, this.addStyle.bind(this)));\n }\n this.notify(ThemeEvent.CHANGE);\n }\n}\nexport default Theme.BASE;\nexport type NamedStyles<T> = { [P in keyof T]: ViewStyle | TextStyle | ImageStyle | NamedStyles<T>};\nexport type BackgroundImageStyle = {\n backgroundImage: string,\n backgroundPosition: string,\n backgroundRepeat: string,\n backgroundSize: string | number\n};\n\nexport type AllStyle = (ViewStyle & TextStyle & ImageStyle);\n\nconst ThemeContext = React.createContext<Theme>(null as any);\n\nexport const ThemeProvider = ThemeContext.Provider;\nexport const ThemeConsumer = ThemeContext.Consumer;\n/**\n * Common styles\n */\n Theme.BASE.registerStyle((themeVariables, addStyle) => {\n const addColStyles = (device: string, minWidth: string) => {\n for(let i = 1; i <= 12; i++) {\n addStyle(`col-${device}-${i}`, '', {\n \"@media\": `(min-width: ${minWidth})`,\n root: {\n width: (100 * i / 12) + '%'\n }\n } as any)\n }\n };\n addColStyles('xs', DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE);\n addColStyles('sm', DEVICE_BREAK_POINTS.MIN_SMALL_DEVICE);\n addColStyles('md', DEVICE_BREAK_POINTS.MIN_MEDIUM_DEVICE);\n addColStyles('lg', DEVICE_BREAK_POINTS.MIN_LARGE_DEVICE);\n\n addStyle('d-none', '', {\n root: {\n display: 'none'\n }\n } as any);\n addStyle('d-flex', '', {\n root: {\n display: 'flex'\n }\n } as any);\n\n const addDisplayStyles = (device: string, minWidth: string, maxWidth: string) => {\n addStyle(`d-${device}-none`, '', {\n \"@media\": `(min-width: ${minWidth}) and (max-width: ${maxWidth})`,\n root: {\n display: 'none'\n }\n } as any);\n addStyle(`d-${device}-flex`, '', {\n \"@media\": `(min-width: ${minWidth}) and (max-width: ${maxWidth})`,\n root: {\n display: 'flex'\n }\n } as any);\n };\n addDisplayStyles('all', \n DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_LARGE_DEVICE);\n addDisplayStyles('xs', \n DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_EXTRA_SMALL_DEVICE);\n addDisplayStyles('sm', \n DEVICE_BREAK_POINTS.MIN_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_SMALL_DEVICE);\n addDisplayStyles('md', \n DEVICE_BREAK_POINTS.MIN_MEDIUM_DEVICE,\n DEVICE_BREAK_POINTS.MAX_MEDIUM_DEVICE);\n addDisplayStyles('lg', \n DEVICE_BREAK_POINTS.MIN_LARGE_DEVICE,\n DEVICE_BREAK_POINTS.MAX_LARGE_DEVICE);\n\n const addElevationClasses = () => {\n for(let i = 1; i <= 10; i++) {\n addStyle(`elevate${i}`, '', {\n root : {\n shadowColor: \"#000000\",\n shadowOffset: {\n width: i,\n height: i,\n },\n shadowOpacity: 0.27,\n shadowRadius: i,\n elevation: i,\n zIndex: 1\n }\n });\n }\n };\n addElevationClasses();\n addStyle('hidden', '', {\n root: {\n width: 0,\n height: 0,\n transform: [{ scale: 0 }]\n }\n });\n addStyle('bg-danger', '', { root: { backgroundColor: themeVariables.dangerColor }});\n addStyle('bg-info', '', { root: { backgroundColor: themeVariables.infoColor }});\n addStyle('bg-primary', '', { root: { backgroundColor: themeVariables.primaryColor }});\n addStyle('bg-success', '', { root: { backgroundColor: themeVariables.successColor }});\n addStyle('bg-warning', '', { root: { backgroundColor: themeVariables.warningColor }});\n\n addStyle('border-danger', '', { root: { borderColor: themeVariables.dangerColor }});\n addStyle('border-info', '', { root: { borderColor: themeVariables.infoColor }});\n addStyle('border-primary', '', { root: { borderColor: themeVariables.primaryColor }});\n addStyle('border-success', '', { root: { borderColor: themeVariables.successColor }});\n addStyle('border-warning', '', { root: { borderColor: themeVariables.warningColor }});\n});\n\n"],"mappings":";;;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAcC,GAAG,EAAEC,OAAO,QAAQ,QAAQ;AACpH,OAAOC,KAAK,MAAqB,OAAO;AAExC,SAASC,QAAQ,EAAEC,gBAAgB,QAAQ,sCAAsC;AACjF,OAAOC,aAAa,MAAM,+CAA+C;AACzE,OAAOC,QAAQ,IAAGC,MAAM,IAAIC,cAAc,QAAO,yCAAyC;AAC1F,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,S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eAAe,EAAE,EAAE,EAAE;IAAEuD,IAAI,EAAE;MAAE6B,WAAW,EAAEzC,cAAc,CAACoC;IAAY;EAAC,CAAC,CAAC;EACnF/E,QAAQ,CAAC,aAAa,EAAE,EAAE,EAAE;IAAEuD,IAAI,EAAE;MAAE6B,WAAW,EAAEzC,cAAc,CAACqC;IAAU;EAAC,CAAC,CAAC;EAC/EhF,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAAEuD,IAAI,EAAE;MAAE6B,WAAW,EAAEzC,cAAc,CAACsC;IAAa;EAAC,CAAC,CAAC;EACrFjF,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAAEuD,IAAI,EAAE;MAAE6B,WAAW,EAAEzC,cAAc,CAACuC;IAAa;EAAC,CAAC,CAAC;EACrFlF,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAAEuD,IAAI,EAAE;MAAE6B,WAAW,EAAEzC,cAAc,CAACwC;IAAa;EAAC,CAAC,CAAC;AACzF,CAAC,CAAC"}
1
+ {"version":3,"names":["cloneDeep","forEach","flatten","isArray","isEmpty","isObject","isString","get","reverse","React","ImageBackground","deepCopy","isWebPreviewMode","EventNotifier","ViewPort","EVENTS","ViewPortEvents","MediaQueryList","ThemeVariables","getStyleReference","isValidStyleProp","DEFAULT_CLASS","window","matchMedia","query","DEVICE_BREAK_POINTS","ThemeEvent","Theme","constructor","parent","name","traceEnabled","subscribe","event","fn","eventNotifer","notify","children","t","clearCache","cache","registerStyle","styleGenerators","push","INSTANCE","addStyle","bind","checkStyleProperties","value","Object","keys","map","k","console","log","extend","style","BASE","styles","getStyle","addTrace","styleName","mergedChildstyle","childStyle","parentStyle","v","__trace","prefix","result","collect","mergeStyle","flattenStyles","s","cs","filter","length","indexOf","split","c","mediaQuery","clonedStyle","matches","$new","newTheme","reset","destroy","i","splice","themeVariables","CHANGE","SIZE_CHANGE","attachBackground","background","_background","backgroundStyle","width","height","imgSrc","uri","source","startsWith","resizeMode","imageStyle","ThemeContext","createContext","ThemeProvider","Provider","ThemeConsumer","Consumer","addColStyles","device","minWidth","root","MIN_EXTRA_SMALL_DEVICE","MIN_SMALL_DEVICE","MIN_MEDIUM_DEVICE","MIN_LARGE_DEVICE","display","addDisplayStyles","maxWidth","MAX_LARGE_DEVICE","MAX_EXTRA_SMALL_DEVICE","MAX_SMALL_DEVICE","MAX_MEDIUM_DEVICE","addElevationClasses","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","zIndex","transform","scale","backgroundColor","dangerColor","infoColor","primaryColor","successColor","warningColor","borderColor"],"sources":["theme.tsx"],"sourcesContent":["import { cloneDeep, forEach, flatten, isArray, isEmpty, isObject, isString, isFunction, get, reverse } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { TextStyle, ViewStyle, ImageStyle, ImageBackground } from 'react-native';\nimport { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';\nimport ViewPort, {EVENTS as ViewPortEvents} from '@wavemaker/app-rn-runtime/core/viewport';\nimport MediaQueryList from './MediaQueryList';\nimport ThemeVariables from './theme.variables';\nimport { getStyleReference, isValidStyleProp } from './style-prop.validator';\nexport const DEFAULT_CLASS = 'DEFAULT_CLASS';\n\ndeclare const matchMedia: any, window: any;\n\nif (typeof window !== \"undefined\") {\n // @ts-ignore: does not properly extend MediaQueryList\n window.matchMedia = (query: string) => new MediaQueryList(query);\n}\n\nexport const DEVICE_BREAK_POINTS = {\n 'MIN_EXTRA_SMALL_DEVICE' : '0px',\n 'MAX_EXTRA_SMALL_DEVICE' : '767px',\n 'MIN_SMALL_DEVICE' : '768px',\n 'MAX_SMALL_DEVICE' : '991px',\n 'MIN_MEDIUM_DEVICE' : '992px',\n 'MAX_MEDIUM_DEVICE' : '1199px',\n 'MIN_LARGE_DEVICE' : '1200px',\n 'MAX_LARGE_DEVICE' : '1000000px',\n};\n\nexport type styleGeneratorFn<T extends NamedStyles<any>> = (\n themeVariables: ThemeVariables,\n addStyle: (name: string, extend: string, style: T) => void) => void\n\nexport enum ThemeEvent {\n CHANGE ='change'\n};\n\nexport class Theme {\n public static BASE = new Theme(null as any, 'default');\n\n static {\n ViewPort.subscribe(ViewPortEvents.SIZE_CHANGE, () => {\n Theme.BASE.reset();\n });\n }\n\n\n private eventNotifer = new EventNotifier();\n\n private children: Theme[] = [];\n\n private styles: any = {};\n\n private cache: any = {};\n\n private traceEnabled = false;\n\n private styleGenerators: styleGeneratorFn<any>[] = [];\n\n private constructor(private parent:Theme, public readonly name: string) {\n if (parent) {\n this.traceEnabled = parent.traceEnabled;\n } else {\n this.traceEnabled = isWebPreviewMode();\n }\n }\n\n public subscribe(event: ThemeEvent, fn: Function) {\n return this.eventNotifer.subscribe(event, fn);\n }\n\n public notify(event: ThemeEvent): void {\n this.eventNotifer.notify(event, []);\n this.children.forEach(t => t.notify(event));\n }\n\n clearCache() {\n this.cache = {};\n this.children.forEach((t) => t.clearCache());\n }\n\n registerStyle<T extends NamedStyles<any>>(fn: styleGeneratorFn<T>) {\n this.styleGenerators.push(fn);\n fn(ThemeVariables.INSTANCE, this.addStyle.bind(this));\n }\n\n checkStyleProperties(name: string, value : any) {\n if (isObject(value)) {\n Object.keys(value).map((k) => this.checkStyleProperties(k, (value as any)[k]));\n } else if(!isValidStyleProp(name, value)) {\n console.log(\n `%cInvalid Style property: '${value}' is not a valid value to '${name}' in ${this.name}.`,\n 'background-color: #FF0000;font-weight: bold; color: #fff'\n );\n console.log(`Refer: ${getStyleReference(name)}`);\n }\n }\n\n private addStyle<T extends NamedStyles<any>>(name: string, extend: string, style: T) {\n if (this !== Theme.BASE && isWebPreviewMode()) {\n this.checkStyleProperties(name, style);\n }\n this.styles[name] = deepCopy(this.getStyle(extend), this.styles[name], style);\n }\n\n private addTrace(styleName: string, mergedChildstyle: any, childStyle: any, parentStyle?: any) {\n if (!this.traceEnabled) {\n return;\n }\n let addTrace = !isEmpty(childStyle);\n forEach(mergedChildstyle, (v: any, k: string) => {\n if (v && !isString(v) && !isArray(v) && isObject(v)) {\n addTrace = false;\n this.addTrace(styleName + '.' + k, v, childStyle && childStyle[k], parentStyle && parentStyle[k])\n }\n });\n if (addTrace) {\n mergedChildstyle['__trace'] = [\n {\n name: styleName,\n value: childStyle\n },\n ...(parentStyle?.__trace|| [])\n ];\n } else {\n mergedChildstyle['__trace'] = [...(parentStyle?.__trace|| [])];\n }\n }\n\n private flatten(style: any, prefix = \"\", result = {} as any) {\n let collect = !isEmpty(style);\n forEach(style, (v: any, k: string) => {\n if (v && !isString(v) && !isArray(v) && isObject(v)) {\n collect = false;\n this.flatten(v, (prefix ? prefix + '.' : '') + k, result)\n }\n });\n if (collect) {\n result[prefix] = style;\n }\n return result;\n }\n\n mergeStyle(...styles: any) {\n const style = deepCopy(...styles);\n if (this.traceEnabled) {\n const flattenStyles = this.flatten(style);\n Object.keys(flattenStyles).forEach(k => {\n const s = flattenStyles[k];\n s['__trace'] = flatten(reverse(styles.map((v: any) => {\n const cs = get(v, k);\n if (cs && cs.__trace) {\n return [...cs.__trace];\n }\n return [];\n }).filter((t: any) => t.length > 0)));\n });\n }\n return style;\n }\n\n getStyle(name: string) {\n let style = this.cache[name];\n if (style) {\n return style;\n }\n if (!name) {\n return {};\n }\n if (name.indexOf(' ') > 0) {\n style = this.mergeStyle(...(name.split(' ').map(c => this.getStyle(c))));\n } else {\n const parentStyle = this.parent && this.parent.getStyle(name);\n const mediaQuery = (this.styles[name] || {})['@media'];\n let clonedStyle = {};\n if (!mediaQuery || matchMedia(mediaQuery).matches) {\n clonedStyle = cloneDeep(this.styles[name]);\n }\n style = deepCopy(parentStyle, clonedStyle);\n this.addTrace(`@${this.name}:${name}`, style, clonedStyle, parentStyle);\n }\n this.cache[name] = style;\n return style;\n }\n\n $new(name = \"\", styles = {} as NamedStyles<any>) {\n const newTheme = new Theme(this, name);\n newTheme.reset(styles);\n this.children.push(newTheme);\n return newTheme;\n }\n\n destroy() {\n const i = this.parent.children.indexOf(this);\n if (i >= 0) {\n this.parent.children.splice(i, 1);\n }\n }\n\n reset(styles?: NamedStyles<any>) {\n this.styles = {};\n this.clearCache();\n if (styles) {\n this.registerStyle((themeVariables, addStyle) => {\n Object.keys(styles).forEach(k => {\n addStyle(k, '', styles[k] as any);\n });\n });\n } else {\n this.styleGenerators.forEach(fn => \n fn(ThemeVariables.INSTANCE, this.addStyle.bind(this)));\n }\n this.notify(ThemeEvent.CHANGE);\n }\n}\nexport default Theme.BASE;\nexport type NamedStyles<T> = { [P in keyof T]: ViewStyle | TextStyle | ImageStyle | NamedStyles<T>};\nexport type BackgroundImageStyle = {\n backgroundImage: string,\n backgroundPosition: string,\n backgroundRepeat: string,\n backgroundSize: string | number\n};\nexport const attachBackground = (c: ReactNode, style: ViewStyle) => {\n const background = (style as any)._background;\n if (background) {\n const backgroundStyle = {\n width: style.width || '100%',\n height: style.height || '100%'\n } as any;\n Object.keys(background).forEach(k => {\n if (k !== 'imageStyle') {\n backgroundStyle[k] = background[k];\n }\n });\n const imgSrc = background.uri;\n let source;\n if (isString(imgSrc) && (imgSrc.startsWith('http') || imgSrc.startsWith('file:'))) {\n source = {\n uri: imgSrc\n };\n } else {\n source = imgSrc;\n }\n return (\n <ImageBackground\n source={source}\n resizeMode={background.resizeMode || 'repeat'}\n imageStyle={background.imageStyle}\n style={backgroundStyle}>\n {c}\n </ImageBackground>);\n }\n return c;\n};\nexport type AllStyle = (ViewStyle & TextStyle & ImageStyle);\n\nconst ThemeContext = React.createContext<Theme>(null as any);\n\nexport const ThemeProvider = ThemeContext.Provider;\nexport const ThemeConsumer = ThemeContext.Consumer;\n/**\n * Common styles\n */\n Theme.BASE.registerStyle((themeVariables, addStyle) => {\n const addColStyles = (device: string, minWidth: string) => {\n for(let i = 1; i <= 12; i++) {\n addStyle(`col-${device}-${i}`, '', {\n \"@media\": `(min-width: ${minWidth})`,\n root: {\n width: (100 * i / 12) + '%'\n }\n } as any)\n }\n };\n addColStyles('xs', DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE);\n addColStyles('sm', DEVICE_BREAK_POINTS.MIN_SMALL_DEVICE);\n addColStyles('md', DEVICE_BREAK_POINTS.MIN_MEDIUM_DEVICE);\n addColStyles('lg', DEVICE_BREAK_POINTS.MIN_LARGE_DEVICE);\n\n addStyle('d-none', '', {\n root: {\n display: 'none'\n }\n } as any);\n addStyle('d-flex', '', {\n root: {\n display: 'flex'\n }\n } as any);\n\n const addDisplayStyles = (device: string, minWidth: string, maxWidth: string) => {\n addStyle(`d-${device}-none`, '', {\n \"@media\": `(min-width: ${minWidth}) and (max-width: ${maxWidth})`,\n root: {\n display: 'none'\n }\n } as any);\n addStyle(`d-${device}-flex`, '', {\n \"@media\": `(min-width: ${minWidth}) and (max-width: ${maxWidth})`,\n root: {\n display: 'flex'\n }\n } as any);\n };\n addDisplayStyles('all', \n DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_LARGE_DEVICE);\n addDisplayStyles('xs', \n DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_EXTRA_SMALL_DEVICE);\n addDisplayStyles('sm', \n DEVICE_BREAK_POINTS.MIN_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_SMALL_DEVICE);\n addDisplayStyles('md', \n DEVICE_BREAK_POINTS.MIN_MEDIUM_DEVICE,\n DEVICE_BREAK_POINTS.MAX_MEDIUM_DEVICE);\n addDisplayStyles('lg', \n DEVICE_BREAK_POINTS.MIN_LARGE_DEVICE,\n DEVICE_BREAK_POINTS.MAX_LARGE_DEVICE);\n\n const addElevationClasses = () => {\n for(let i = 1; i <= 10; i++) {\n addStyle(`elevate${i}`, '', {\n root : {\n shadowColor: \"#000000\",\n shadowOffset: {\n width: i,\n height: i,\n },\n shadowOpacity: 0.27,\n shadowRadius: i,\n elevation: i,\n zIndex: 1\n }\n });\n }\n };\n addElevationClasses();\n addStyle('hidden', '', {\n root: {\n width: 0,\n height: 0,\n transform: [{ scale: 0 }]\n }\n });\n addStyle('bg-danger', '', { root: { backgroundColor: themeVariables.dangerColor }});\n addStyle('bg-info', '', { root: { backgroundColor: themeVariables.infoColor }});\n addStyle('bg-primary', '', { root: { backgroundColor: themeVariables.primaryColor }});\n addStyle('bg-success', '', { root: { backgroundColor: themeVariables.successColor }});\n addStyle('bg-warning', '', { root: { backgroundColor: themeVariables.warningColor }});\n\n addStyle('border-danger', '', { root: { borderColor: themeVariables.dangerColor }});\n addStyle('border-info', '', { root: { borderColor: themeVariables.infoColor }});\n addStyle('border-primary', '', { root: { borderColor: themeVariables.primaryColor }});\n addStyle('border-success', '', { root: { borderColor: themeVariables.successColor }});\n addStyle('border-warning', '', { root: { borderColor: themeVariables.warningColor }});\n});\n\n"],"mappings":";;;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAcC,GAAG,EAAEC,OAAO,QAAQ,QAAQ;AACpH,OAAOC,KAAK,MAAqB,OAAO;AACxC,SAA2CC,eAAe,QAAQ,cAAc;AAChF,SAASC,QAAQ,EAAEC,gBAAgB,QAAQ,sCAAsC;AACjF,OAAOC,aAAa,MAAM,+CAA+C;AACzE,OAAOC,QAAQ,IAAGC,MAAM,IAAIC,cAAc,QAAO,yCAAyC;AAC1F,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,wBAAwB;AAC5E,OAAO,MAAMC,aAAa,GAAG,eAAe;AAI5C,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;EAC/B;EACAA,MAAM,CAACC,UAAU,GAAIC,KAAa,IAAK,IAAIP,cAAc,CAACO,KAAK,CAAC;AACpE;AAEA,OAAO,MAAMC,mBAAmB,GAAG;EAC/B,wBAAwB,EAAG,KAAK;E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,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAAEmE,IAAI,EAAE;MAAE2B,WAAW,EAAEnD,cAAc,CAACkD;IAAa;EAAC,CAAC,CAAC;AACzF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["CaptureImageOperation","constructor","camera","invoke","params","captureImage"],"sources":["capture-image.operation.tsx"],"sourcesContent":["import {CameraInput, CameraService} from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { Operation, Output } from '../operation.provider';\n\nexport interface CaptureImageOutput extends Output {\n imagePath: string;\n content: string;\n}\n\nexport class CaptureImageOperation implements Operation {\n constructor(private camera: CameraService) {}\n\n public invoke(params: CameraInput): Promise<CaptureImageOutput> {\n return this.camera.captureImage(params);\n }\n}\n"],"mappings":"AAQA,OAAO,MAAMA,qBAAqB,CAAsB;EACtDC,WAAW,CAASC,MAAqB,EAAE;IAAA,KAAvBA,MAAqB,GAArBA,MAAqB;EAAG;EAErCC,MAAM,CAACC,MAAmB,EAA+B;IAC9D,OAAO,IAAI,CAACF,MAAM,CAACG,YAAY,CAACD,MAAM,CAAC;EACzC;AACF"}
1
+ {"version":3,"names":["CaptureImageOperation","constructor","camera","invoke","params","captureImage"],"sources":["capture-image.operation.tsx"],"sourcesContent":["import {CameraInput, CameraService} from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { Operation, Output } from '../operation.provider';\n\nexport interface CaptureImageOutput extends Output {\n imagePath: string\n}\n\nexport class CaptureImageOperation implements Operation {\n constructor(private camera: CameraService) {}\n\n public invoke(params: CameraInput): Promise<CaptureImageOutput> {\n return this.camera.captureImage(params);\n }\n}\n"],"mappings":"AAOA,OAAO,MAAMA,qBAAqB,CAAsB;EACtDC,WAAW,CAASC,MAAqB,EAAE;IAAA,KAAvBA,MAAqB,GAArBA,MAAqB;EAAG;EAErCC,MAAM,CAACC,MAAmB,EAA+B;IAC9D,OAAO,IAAI,CAACF,MAAM,CAACG,YAAY,CAACD,MAAM,CAAC;EACzC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["CaptureVideoOperation","constructor","camera","invoke","captureVideo"],"sources":["capture-video.operation.tsx"],"sourcesContent":["import { CameraService } from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { Operation, Output } from '../operation.provider';\n\nexport interface CaptureVideoOutput extends Output {\n videoPath: string;\n content: string;\n}\n\nexport class CaptureVideoOperation implements Operation {\n constructor(private camera: CameraService) {\n }\n\n public invoke(): Promise<CaptureVideoOutput> {\n return this.camera.captureVideo();\n }\n}\n"],"mappings":"AAQA,OAAO,MAAMA,qBAAqB,CAAsB;EACtDC,WAAW,CAASC,MAAqB,EAAE;IAAA,KAAvBA,MAAqB,GAArBA,MAAqB;EACzC;EAEOC,MAAM,GAAgC;IAC3C,OAAO,IAAI,CAACD,MAAM,CAACE,YAAY,EAAE;EACnC;AACF"}
1
+ {"version":3,"names":["CaptureVideoOperation","constructor","camera","invoke","captureVideo"],"sources":["capture-video.operation.tsx"],"sourcesContent":["import { CameraService } from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { Operation, Output } from '../operation.provider';\n\nexport interface CaptureVideoOutput extends Output {\n videoPath: string\n}\n\nexport class CaptureVideoOperation implements Operation {\n constructor(private camera: CameraService) {\n }\n\n public invoke(): Promise<CaptureVideoOutput> {\n return this.camera.captureVideo();\n }\n}\n"],"mappings":"AAOA,OAAO,MAAMA,qBAAqB,CAAsB;EACtDC,WAAW,CAASC,MAAqB,EAAE;IAAA,KAAvBA,MAAqB,GAArBA,MAAqB;EACzC;EAEOC,MAAM,GAAgC;IAC3C,OAAO,IAAI,CAACD,MAAM,CAACE,YAAY,EAAE;EACnC;AACF"}
@@ -1,56 +1,34 @@
1
1
  import axios from 'axios';
2
- import { Platform } from 'react-native';
3
2
  import { endsWith } from 'lodash-es';
4
- import * as DocumentPicker from 'expo-document-picker';
5
3
  import { FileExtensionTypesMap } from '@wavemaker/app-rn-runtime/core/file-extension-types';
6
- const namedParameters = {
7
- copyToCacheDirectory: false,
8
- multiple: false,
9
- type: '*/*'
10
- };
11
4
  export class UploadFileOperation {
12
- chooseFile() {
13
- return DocumentPicker.getDocumentAsync(namedParameters).then(response => {
14
- return Platform.OS === 'web' ? response.file : response.uri;
15
- });
16
- }
17
5
  invoke(params) {
18
6
  params.serverUrl = endsWith(params.serverUrl, '/') ? params.serverUrl : params.serverUrl + '/';
19
7
  let serverUrl = params.serverUrl + 'services/file/uploadFile';
20
8
  if (params.remoteFolder) {
21
9
  serverUrl = serverUrl + '?relativePath=' + params.remoteFolder;
22
10
  }
23
- return Promise.resolve().then(() => {
24
- if (!params.localFile && params.browse) {
25
- return this.chooseFile();
26
- } else {
27
- return params.localFile;
28
- }
29
- }).then(filePath => {
30
- if (!filePath) {
31
- return;
32
- }
33
- const fileName = filePath.split('/').pop() || '';
34
- const arr = fileName.split('.');
35
- const fileExtension = '.' + arr[arr.length - 1];
36
- let fileObj = {
37
- uri: filePath,
38
- type: FileExtensionTypesMap[fileExtension],
39
- name: fileName
40
- };
41
- let formData = new FormData();
42
- formData.append('files', fileObj);
43
- return axios({
44
- url: serverUrl,
45
- method: 'POST',
46
- headers: {
47
- 'Content-Type': 'multipart/form-data'
48
- },
49
- data: formData
50
- }).then(response => {
51
- return response.data[0];
52
- }, error => error);
53
- });
11
+ const filePath = params.localFile;
12
+ const fileName = filePath.split('/').pop() || '';
13
+ const arr = fileName.split('.');
14
+ const fileExtension = '.' + arr[arr.length - 1];
15
+ let fileObj = {
16
+ uri: filePath,
17
+ type: FileExtensionTypesMap[fileExtension],
18
+ name: fileName
19
+ };
20
+ let formData = new FormData();
21
+ formData.append('files', fileObj);
22
+ return axios({
23
+ url: serverUrl,
24
+ method: 'POST',
25
+ headers: {
26
+ 'Content-Type': 'multipart/form-data'
27
+ },
28
+ data: formData
29
+ }).then(response => {
30
+ return response.data[0];
31
+ }, error => error);
54
32
  }
55
33
  }
56
34
  //# sourceMappingURL=upload-file.operation.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["axios","Platform","endsWith","DocumentPicker","FileExtensionTypesMap","namedParameters","copyToCacheDirectory","multiple","type","UploadFileOperation","chooseFile","getDocumentAsync","then","response","OS","file","uri","invoke","params","serverUrl","remoteFolder","Promise","resolve","localFile","browse","filePath","fileName","split","pop","arr","fileExtension","length","fileObj","name","formData","FormData","append","url","method","headers","data","error"],"sources":["upload-file.operation.tsx"],"sourcesContent":["import axios from 'axios';\nimport { Platform } from 'react-native';\nimport { endsWith } from 'lodash-es';\nimport * as DocumentPicker from 'expo-document-picker';\n\nimport { Operation } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport { FileExtensionTypesMap } from '@wavemaker/app-rn-runtime/core/file-extension-types';\n\nexport interface UploadFileInput {\n localFile: string;\n remoteFolder: string;\n serverUrl: string;\n browse: boolean;\n}\n\nexport interface UploadFileOutput {\n fileName: string;\n path: string;\n length: number;\n success: boolean;\n inlinePath: string;\n errorMessage: string;\n}\n\nconst namedParameters = {\n copyToCacheDirectory: false,\n multiple: false,\n type: '*/*'\n};\n\nexport class UploadFileOperation implements Operation {\n\n public chooseFile() {\n return DocumentPicker.getDocumentAsync(namedParameters).then((response: any) => {\n return Platform.OS === 'web' ? response.file : response.uri;\n });\n }\n\n public invoke(params: UploadFileInput): Promise<UploadFileOutput> {\n params.serverUrl = endsWith(params.serverUrl, '/') ? params.serverUrl : params.serverUrl + '/';\n let serverUrl = params.serverUrl + 'services/file/uploadFile';\n if (params.remoteFolder) {\n serverUrl = serverUrl + '?relativePath=' + params.remoteFolder\n }\n return Promise.resolve().then(() => {\n if (!params.localFile && params.browse) {\n return this.chooseFile();\n } else {\n return params.localFile;\n }\n }).then((filePath: string) => {\n if (!filePath) {\n return;\n }\n const fileName: string | undefined = filePath.split('/').pop() || '';\n const arr: any = fileName.split('.');\n const fileExtension: string = '.' + arr[arr.length - 1];\n let fileObj = {\n uri: filePath,\n type: FileExtensionTypesMap[fileExtension],\n name: fileName,\n };\n\n let formData = new FormData();\n formData.append('files', fileObj);\n return axios({\n url: serverUrl,\n method: 'POST',\n headers: {\n 'Content-Type': 'multipart/form-data'\n },\n data: formData\n }).then(\n (response) => {\n return response.data[0];\n }, error => error);\n });\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,QAAQ,QAAQ,WAAW;AACpC,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AAGtD,SAASC,qBAAqB,QAAQ,qDAAqD;AAkB3F,MAAMC,eAAe,GAAG;EACtBC,oBAAoB,EAAE,KAAK;EAC3BC,QAAQ,EAAE,KAAK;EACfC,IAAI,EAAE;AACR,CAAC;AAED,OAAO,MAAMC,mBAAmB,CAAsB;EAE7CC,UAAU,GAAG;IAClB,OAAOP,cAAc,CAACQ,gBAAgB,CAACN,eAAe,CAAC,CAACO,IAAI,CAAEC,QAAa,IAAK;MAC9E,OAAOZ,QAAQ,CAACa,EAAE,KAAK,KAAK,GAAGD,QAAQ,CAACE,IAAI,GAAGF,QAAQ,CAACG,GAAG;IAC7D,CAAC,CAAC;EACJ;EAEOC,MAAM,CAACC,MAAuB,EAA6B;IAChEA,MAAM,CAACC,SAAS,GAAGjB,QAAQ,CAACgB,MAAM,CAACC,SAAS,EAAE,GAAG,CAAC,GAAGD,MAAM,CAACC,SAAS,GAAGD,MAAM,CAACC,SAAS,GAAG,GAAG;IAC9F,IAAIA,SAAS,GAAGD,MAAM,CAACC,SAAS,GAAG,0BAA0B;IAC7D,IAAID,MAAM,CAACE,YAAY,EAAE;MACvBD,SAAS,GAAGA,SAAS,GAAG,gBAAgB,GAAGD,MAAM,CAACE,YAAY;IAChE;IACA,OAAOC,OAAO,CAACC,OAAO,EAAE,CAACV,IAAI,CAAC,MAAM;MAClC,IAAI,CAACM,MAAM,CAACK,SAAS,IAAIL,MAAM,CAACM,MAAM,EAAE;QACtC,OAAO,IAAI,CAACd,UAAU,EAAE;MAC1B,CAAC,MAAM;QACL,OAAOQ,MAAM,CAACK,SAAS;MACzB;IACF,CAAC,CAAC,CAACX,IAAI,CAAEa,QAAgB,IAAK;MAC5B,IAAI,CAACA,QAAQ,EAAE;QACb;MACF;MACA,MAAMC,QAA4B,GAAGD,QAAQ,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,EAAE,IAAI,EAAE;MACpE,MAAMC,GAAQ,GAAGH,QAAQ,CAACC,KAAK,CAAC,GAAG,CAAC;MACpC,MAAMG,aAAqB,GAAG,GAAG,GAAGD,GAAG,CAACA,GAAG,CAACE,MAAM,GAAG,CAAC,CAAC;MACvD,IAAIC,OAAO,GAAG;QACZhB,GAAG,EAAES,QAAQ;QACbjB,IAAI,EAAEJ,qBAAqB,CAAC0B,aAAa,CAAC;QAC1CG,IAAI,EAAEP;MACR,CAAC;MAED,IAAIQ,QAAQ,GAAG,IAAIC,QAAQ,EAAE;MAC7BD,QAAQ,CAACE,MAAM,CAAC,OAAO,EAAEJ,OAAO,CAAC;MACjC,OAAOhC,KAAK,CAAC;QACXqC,GAAG,EAAElB,SAAS;QACdmB,MAAM,EAAE,MAAM;QACdC,OAAO,EAAE;UACP,cAAc,EAAE;QAClB,CAAC;QACDC,IAAI,EAAEN;MACR,CAAC,CAAC,CAACtB,IAAI,CACJC,QAAQ,IAAK;QACd,OAAOA,QAAQ,CAAC2B,IAAI,CAAC,CAAC,CAAC;MACzB,CAAC,EAAEC,KAAK,IAAIA,KAAK,CAAC;IACpB,CAAC,CAAC;EACJ;AACF"}
1
+ {"version":3,"names":["axios","endsWith","FileExtensionTypesMap","UploadFileOperation","invoke","params","serverUrl","remoteFolder","filePath","localFile","fileName","split","pop","arr","fileExtension","length","fileObj","uri","type","name","formData","FormData","append","url","method","headers","data","then","response","error"],"sources":["upload-file.operation.tsx"],"sourcesContent":["import axios from 'axios';\nimport { endsWith } from 'lodash-es';\n\nimport { Operation } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport { FileExtensionTypesMap } from '@wavemaker/app-rn-runtime/core/file-extension-types';\n\nexport interface UploadFileInput {\n localFile: string;\n remoteFolder: string;\n serverUrl: string;\n}\n\nexport interface UploadFileOutput {\n fileName: string;\n path: string;\n length: number;\n success: boolean;\n inlinePath: string;\n errorMessage: string;\n}\n\nexport class UploadFileOperation implements Operation {\n\n public invoke(params: UploadFileInput): Promise<UploadFileOutput> {\n params.serverUrl = endsWith(params.serverUrl, '/') ? params.serverUrl : params.serverUrl + '/';\n let serverUrl = params.serverUrl + 'services/file/uploadFile';\n if (params.remoteFolder) {\n serverUrl = serverUrl + '?relativePath=' + params.remoteFolder\n }\n const filePath = params.localFile;\n const fileName: string | undefined = filePath.split('/').pop() || '';\n const arr: any = fileName.split('.');\n const fileExtension: string = '.' + arr[arr.length - 1];\n let fileObj = {\n uri: filePath,\n type: FileExtensionTypesMap[fileExtension],\n name: fileName,\n };\n\n let formData = new FormData();\n formData.append('files', fileObj);\n return axios({\n url: serverUrl,\n method: 'POST',\n headers: {\n 'Content-Type': 'multipart/form-data'\n },\n data: formData\n }).then(\n (response) => {\n return response.data[0];\n }, error => error);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,WAAW;AAGpC,SAASC,qBAAqB,QAAQ,qDAAqD;AAiB3F,OAAO,MAAMC,mBAAmB,CAAsB;EAE7CC,MAAM,CAACC,MAAuB,EAA6B;IAChEA,MAAM,CAACC,SAAS,GAAGL,QAAQ,CAACI,MAAM,CAACC,SAAS,EAAE,GAAG,CAAC,GAAGD,MAAM,CAACC,SAAS,GAAGD,MAAM,CAACC,SAAS,GAAG,GAAG;IAC9F,IAAIA,SAAS,GAAGD,MAAM,CAACC,SAAS,GAAG,0BAA0B;IAC7D,IAAID,MAAM,CAACE,YAAY,EAAE;MACvBD,SAAS,GAAGA,SAAS,GAAG,gBAAgB,GAAGD,MAAM,CAACE,YAAY;IAChE;IACA,MAAMC,QAAQ,GAAGH,MAAM,CAACI,SAAS;IACjC,MAAMC,QAA4B,GAAGF,QAAQ,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,EAAE,IAAI,EAAE;IACpE,MAAMC,GAAQ,GAAGH,QAAQ,CAACC,KAAK,CAAC,GAAG,CAAC;IACpC,MAAMG,aAAqB,GAAG,GAAG,GAAGD,GAAG,CAACA,GAAG,CAACE,MAAM,GAAG,CAAC,CAAC;IACvD,IAAIC,OAAO,GAAG;MACZC,GAAG,EAAET,QAAQ;MACbU,IAAI,EAAEhB,qBAAqB,CAACY,aAAa,CAAC;MAC1CK,IAAI,EAAET;IACR,CAAC;IAED,IAAIU,QAAQ,GAAG,IAAIC,QAAQ,EAAE;IAC7BD,QAAQ,CAACE,MAAM,CAAC,OAAO,EAAEN,OAAO,CAAC;IACjC,OAAOhB,KAAK,CAAC;MACXuB,GAAG,EAAEjB,SAAS;MACdkB,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE;MAClB,CAAC;MACDC,IAAI,EAAEN;IACR,CAAC,CAAC,CAACO,IAAI,CACJC,QAAQ,IAAK;MACd,OAAOA,QAAQ,CAACF,IAAI,CAAC,CAAC,CAAC;IACzB,CAAC,EAAEG,KAAK,IAAIA,KAAK,CAAC;EACpB;AACF"}
@@ -1,9 +1,7 @@
1
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(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
3
  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
- import { VariableEvents } from './base-variable';
5
4
  import { isEqual } from 'lodash';
6
- import { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';
7
5
  import { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';
8
6
  import httpService from '@wavemaker/app-rn-runtime/variables/http.service';
9
7
  import injector from '@wavemaker/app-rn-runtime/core/injector';
@@ -36,7 +34,7 @@ export class ServiceVariable extends _ServiceVariable {
36
34
  return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);
37
35
  },
38
36
  onBeforeUpdate: (context, args) => {
39
- return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);
37
+ return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.data, args.options);
40
38
  },
41
39
  onResult: (context, args) => {
42
40
  return config.onResult && config.onResult(args.variable, args.data, args.options);
@@ -50,15 +48,12 @@ export class ServiceVariable extends _ServiceVariable {
50
48
  _defineProperty(this, "cancelTokenSource", void 0);
51
49
  _defineProperty(this, "params", {});
52
50
  _defineProperty(this, "appConfig", injector.get('APP_CONFIG'));
53
- this.subscribe(VariableEvents.AFTER_INVOKE, () => {
54
- this.dataBinding = {};
55
- });
56
51
  }
57
52
  invokeOnParamChange() {
58
53
  const last = this.params;
59
54
  const latest = this.config.paramProvider();
60
55
  if (!isEqual(last, latest)) {
61
- this.invoke(latest);
56
+ this.invoke();
62
57
  }
63
58
  return Promise.resolve(this);
64
59
  }
@@ -72,13 +67,7 @@ export class ServiceVariable extends _ServiceVariable {
72
67
  this.appConfig.refresh(false);
73
68
  }
74
69
  invoke(options, onSuccess, onError) {
75
- this.params = this.config.paramProvider();
76
- this.params = deepCopy({}, this.params, this.dataBinding);
77
- if (options) {
78
- this.params = deepCopy({}, this.params, options.inputFields ? options.inputFields : options);
79
- }
80
- options = options || {};
81
- options.inputFields = this.params;
70
+ this.dataBinding = this.params = this.config.paramProvider();
82
71
  // service definitions data depends on whether user logged in or not
83
72
  // Try to get the latest definition
84
73
  this.serviceInfo = this.config.getServiceInfo();
@@ -114,9 +103,9 @@ export class ServiceVariable extends _ServiceVariable {
114
103
  // }
115
104
  // }
116
105
 
117
- // setInput(key: any, val?: any, options?: any) {
118
- // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));
119
- // return this.params;
120
- // }
106
+ setInput(key, val, options) {
107
+ // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));
108
+ // return this.params;
109
+ }
121
110
  }
122
111
  //# sourceMappingURL=service-variable.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["VariableEvents","isEqual","deepCopy","ServiceVariable","_ServiceVariable","httpService","injector","_ServiceVariableEvents","constructor","config","variableConfig","name","dataSet","paramProvider","dataBinding","isList","service","serviceType","maxResults","_context","operation","operationId","serviceInfo","getServiceInfo","httpClientService","onSuccess","context","args","variable","data","options","onError","onCanUpdate","onBeforeUpdate","inputData","onResult","onBeforeDatasetReady","get","subscribe","AFTER_INVOKE","invokeOnParamChange","last","params","latest","invoke","Promise","resolve","doNext","currentPage","reject","onDataUpdated","appConfig","refresh","inputFields","console","error"],"sources":["service-variable.ts"],"sourcesContent":["import { VariableConfig, VariableEvents } from './base-variable';\nimport { isEqual, assignIn } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';\nimport httpService from '@wavemaker/app-rn-runtime/variables/http.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface ServiceVariableConfig extends VariableConfig {\n baseUrl: string;\n maxResults: number;\n _context: any;\n serviceType: string;\n onCanUpdate: any;\n onBeforeUpdate: any;\n onResult: any;\n onBeforeDatasetReady: any;\n inFlightBehavior: string;\n getServiceInfo: Function;\n}\n\nenum _ServiceVariableEvents {\n BEFORE_INVOKE = 'beforeInvoke'\n}\nexport type ServiceVariableEvents = _ServiceVariableEvents | VariableEvents;\n\nexport class ServiceVariable extends _ServiceVariable {\n private cancelTokenSource: any;\n params: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n\n constructor(public config: ServiceVariableConfig) {\n const variableConfig = {\n name: config.name,\n dataSet: config.paramProvider(),\n dataBinding: config.paramProvider(),\n isList: config.isList,\n service: config.service,\n serviceType: config.serviceType,\n maxResults: config.maxResults,\n _context: config._context,\n operation: config.operation,\n operationId: config.operationId,\n serviceInfo: config.getServiceInfo(),\n httpClientService: httpService,\n onSuccess: (context: any, args: any) => {\n return config.onSuccess && config.onSuccess(args.variable, args.data, args.options);\n },\n onError: (context: any, args: any) => {\n return config.onError && config.onError(args.variable, args.data, args.options);\n },\n onCanUpdate: (context: any, args: any) => {\n return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);\n },\n onBeforeUpdate: (context: any, args: any) => {\n return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);\n },\n onResult: (context: any, args: any) => {\n return config.onResult && config.onResult(args.variable, args.data, args.options);\n },\n onBeforeDatasetReady: (context: any, args: any) => {\n return config.onBeforeDatasetReady && config.onBeforeDatasetReady(args.variable, args.data, args.options);\n }\n }\n super(variableConfig);\n this.subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.dataBinding = {};\n });\n }\n\n invokeOnParamChange() {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n this.invoke(latest);\n }\n return Promise.resolve(this);\n }\n\n public doNext(currentPage: number) {\n // this.invoke({\n // page: currentPage\n // });\n return Promise.reject(this);\n }\n\n onDataUpdated() {\n this.appConfig.refresh(false);\n }\n\n invoke(options? : any, onSuccess?: Function, onError?: Function) {\n this.params = this.config.paramProvider();\n this.params = deepCopy({} as any, this.params, this.dataBinding);\n if (options) {\n this.params = deepCopy({} as any, this.params, options.inputFields ? options.inputFields : options);\n }\n options = options || {};\n options.inputFields = this.params;\n // service definitions data depends on whether user logged in or not\n // Try to get the latest definition\n this.serviceInfo = this.config.getServiceInfo();\n if (!this.serviceInfo) {\n console.error(`Service Info is missing for (${this.name}) variable.`)\n }\n return super.invoke(options, onSuccess, onError);\n }\n\n // cancel($file?: any) {\n // // CHecks if there is any pending requests in the queue\n // if ($queue.requestsQueue.has(this)) {\n // // If the request is a File upload request then modify the elements associated with file upload\n // // else unsubscribe from the observable on the variable.\n // if (false) {\n // // $file._uploadProgress.unsubscribe();\n // // $file.status = 'abort';\n // // this.totalFilesCount--;\n // // initiateCallback(VARIABLE_CONSTANTS.EVENT.ABORT, variable, $file);\n // // if (!this.isFileUploadInProgress(variable.dataBinding) && this.totalFilesCount === 0) {\n // // $queue.process(variable);\n // // // notify inflight variable\n // // this.notifyInflight(variable, false);\n // // }\n // } else {\n // if (true) {\n // this.cancelTokenSource.cancel();\n // $queue.process(this);\n // // notify inflight variable\n // //this.notifyInflight(variable, false);\n // }\n // }\n // }\n // }\n\n // setInput(key: any, val?: any, options?: any) {\n // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));\n // return this.params;\n // }\n}\n"],"mappings":";;;AAAA,SAAyBA,cAAc,QAAQ,iBAAiB;AAChE,SAASC,OAAO,QAAkB,QAAQ;AAE1C,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAASC,eAAe,IAAIC,gBAAgB,QAAQ,0DAA0D;AAC9G,OAAOC,WAAW,MAAM,kDAAkD;AAC1E,OAAOC,QAAQ,MAAM,yCAAyC;AAAC,IAe1DC,sBAAsB;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,KAAtBA,sBAAsB;AAK3B,OAAO,MAAMJ,eAAe,SAASC,gBAAgB,CAAC;EAKpDI,WAAW,CAAQC,MAA6B,EAAE;IAChD,MAAMC,cAAc,GAAG;MACrBC,IAAI,EAAEF,MAAM,CAACE,IAAI;MACjBC,OAAO,EAAEH,MAAM,CAACI,aAAa,EAAE;MAC/BC,WAAW,EAAEL,MAAM,CAACI,aAAa,EAAE;MACnCE,MAAM,EAAEN,MAAM,CAACM,MAAM;MACrBC,OAAO,EAAEP,MAAM,CAACO,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,CAAC,CAAC,CAAC,EAAS,IAAI,CAACwC,MAAM,EAAE,IAAI,CAAC5B,WAAW,CAAC;IAChE,IAAIgB,OAAO,EAAE;MACX,IAAI,CAACY,MAAM,GAAGxC,QAAQ,CAAC,CAAC,CAAC,EAAS,IAAI,CAACwC,MAAM,EAAEZ,OAAO,CAACuB,WAAW,GAAGvB,OAAO,CAACuB,WAAW,GAAGvB,OAAO,CAAC;IACrG;IACAA,OAAO,GAAGA,OAAO,IAAI,CAAC,CAAC;IACvBA,OAAO,CAACuB,WAAW,GAAG,IAAI,CAACX,MAAM;IAC/B;IACF;IACA,IAAI,CAACpB,WAAW,GAAG,IAAI,CAACb,MAAM,CAACc,cAAc,EAAE;IAC/C,IAAI,CAAC,IAAI,CAACD,WAAW,EAAE;MACrBgC,OAAO,CAACC,KAAK,CAAE,gCAA+B,IAAI,CAAC5C,IAAK,aAAY,CAAC;IACvE;IACA,OAAO,KAAK,CAACiC,MAAM,CAACd,OAAO,EAAEL,SAAS,EAAEM,OAAO,CAAC;EAClD;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;AACF"}
1
+ {"version":3,"names":["isEqual","ServiceVariable","_ServiceVariable","httpService","injector","_ServiceVariableEvents","constructor","config","variableConfig","name","dataSet","paramProvider","dataBinding","isList","service","serviceType","maxResults","_context","operation","operationId","serviceInfo","getServiceInfo","httpClientService","onSuccess","context","args","variable","data","options","onError","onCanUpdate","onBeforeUpdate","onResult","onBeforeDatasetReady","get","invokeOnParamChange","last","params","latest","invoke","Promise","resolve","doNext","currentPage","reject","onDataUpdated","appConfig","refresh","console","error","setInput","key","val"],"sources":["service-variable.ts"],"sourcesContent":["import { VariableConfig, VariableEvents } from './base-variable';\nimport { isEqual } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { $queue } from './utils/inflight-queue';\nimport { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';\nimport httpService from '@wavemaker/app-rn-runtime/variables/http.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface ServiceVariableConfig extends VariableConfig {\n baseUrl: string;\n maxResults: number;\n _context: any;\n serviceType: string;\n onCanUpdate: any;\n onBeforeUpdate: any;\n onResult: any;\n onBeforeDatasetReady: any;\n inFlightBehavior: string;\n getServiceInfo: Function;\n}\n\nenum _ServiceVariableEvents {\n BEFORE_INVOKE = 'beforeInvoke'\n}\nexport type ServiceVariableEvents = _ServiceVariableEvents | VariableEvents;\n\nexport class ServiceVariable extends _ServiceVariable {\n private cancelTokenSource: any;\n params: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n\n constructor(public config: ServiceVariableConfig) {\n const variableConfig = {\n name: config.name,\n dataSet: config.paramProvider(),\n dataBinding: config.paramProvider(),\n isList: config.isList,\n service: config.service,\n serviceType: config.serviceType,\n maxResults: config.maxResults,\n _context: config._context,\n operation: config.operation,\n operationId: config.operationId,\n serviceInfo: config.getServiceInfo(),\n httpClientService: httpService,\n onSuccess: (context: any, args: any) => {\n return config.onSuccess && config.onSuccess(args.variable, args.data, args.options);\n },\n onError: (context: any, args: any) => {\n return config.onError && config.onError(args.variable, args.data, args.options);\n },\n onCanUpdate: (context: any, args: any) => {\n return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);\n },\n onBeforeUpdate: (context: any, args: any) => {\n return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.data, args.options);\n },\n onResult: (context: any, args: any) => {\n return config.onResult && config.onResult(args.variable, args.data, args.options);\n },\n onBeforeDatasetReady: (context: any, args: any) => {\n return config.onBeforeDatasetReady && config.onBeforeDatasetReady(args.variable, args.data, args.options);\n }\n }\n super(variableConfig);\n }\n\n invokeOnParamChange() {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n this.invoke();\n }\n return Promise.resolve(this);\n }\n\n public doNext(currentPage: number) {\n // this.invoke({\n // page: currentPage\n // });\n return Promise.reject(this);\n }\n\n onDataUpdated() {\n this.appConfig.refresh(false);\n }\n\n invoke(options? : any, onSuccess?: Function, onError?: Function) {\n this.dataBinding = this.params = this.config.paramProvider();\n // service definitions data depends on whether user logged in or not\n // Try to get the latest definition\n this.serviceInfo = this.config.getServiceInfo();\n if (!this.serviceInfo) {\n console.error(`Service Info is missing for (${this.name}) variable.`)\n }\n return super.invoke(options, onSuccess, onError);\n }\n\n // cancel($file?: any) {\n // // CHecks if there is any pending requests in the queue\n // if ($queue.requestsQueue.has(this)) {\n // // If the request is a File upload request then modify the elements associated with file upload\n // // else unsubscribe from the observable on the variable.\n // if (false) {\n // // $file._uploadProgress.unsubscribe();\n // // $file.status = 'abort';\n // // this.totalFilesCount--;\n // // initiateCallback(VARIABLE_CONSTANTS.EVENT.ABORT, variable, $file);\n // // if (!this.isFileUploadInProgress(variable.dataBinding) && this.totalFilesCount === 0) {\n // // $queue.process(variable);\n // // // notify inflight variable\n // // this.notifyInflight(variable, false);\n // // }\n // } else {\n // if (true) {\n // this.cancelTokenSource.cancel();\n // $queue.process(this);\n // // notify inflight variable\n // //this.notifyInflight(variable, false);\n // }\n // }\n // }\n // }\n\n setInput(key: any, val?: any, options?: any) {\n // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));\n // return this.params;\n }\n}\n"],"mappings":";;;AACA,SAASA,OAAO,QAAQ,QAAQ;AAGhC,SAASC,eAAe,IAAIC,gBAAgB,QAAQ,0DAA0D;AAC9G,OAAOC,WAAW,MAAM,kDAAkD;AAC1E,OAAOC,QAAQ,MAAM,yCAAyC;AAAC,IAe1DC,sBAAsB;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,KAAtBA,sBAAsB;AAK3B,OAAO,MAAMJ,eAAe,SAASC,gBAAgB,CAAC;EAKpDI,WAAW,CAAQC,M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