@wavemaker/app-rn-runtime 12.0.0-next.45032 → 12.0.0-next.45501

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +18 -3
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  4. app-rn-runtime/components/basic/anchor/anchor.component.js +2 -2
  5. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  6. app-rn-runtime/components/basic/animatedview.component.js +6 -2
  7. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  8. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  9. app-rn-runtime/components/basic/button/button.component.js +5 -4
  10. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  11. app-rn-runtime/components/basic/icon/icon.component.js +4 -4
  12. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  13. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  14. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  16. app-rn-runtime/components/basic/picture/picture.component.js +1 -2
  17. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  18. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  19. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  20. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
  21. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  22. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  23. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
  24. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  25. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  26. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  27. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  28. app-rn-runtime/components/basic/video/video.styles.js +4 -1
  29. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  30. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  31. app-rn-runtime/components/chart/basechart.component.js +31 -2
  32. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  33. app-rn-runtime/components/chart/basechart.props.js +1 -0
  34. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  35. app-rn-runtime/components/chart/basechart.styles.js +4 -0
  36. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  37. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
  38. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  39. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +4 -1
  40. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  41. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
  42. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  43. app-rn-runtime/components/container/accordion/accordion.component.js +3 -1
  44. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  45. app-rn-runtime/components/container/accordion/accordion.styles.js +1 -0
  46. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  47. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  48. app-rn-runtime/components/container/panel/panel.component.js +4 -2
  49. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  50. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -3
  51. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  52. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  53. app-rn-runtime/components/container/wizard/wizard.component.js +27 -11
  54. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  55. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  56. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  57. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
  58. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  59. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  60. app-rn-runtime/components/input/baseinput/baseinput.component.js +11 -4
  61. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  62. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
  63. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  64. app-rn-runtime/components/input/basenumber/basenumber.component.js +25 -12
  65. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  66. app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
  67. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  68. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -6
  69. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  70. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +3 -2
  71. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  72. app-rn-runtime/components/input/chips/chips.component.js +3 -2
  73. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  74. app-rn-runtime/components/input/currency/currency.component.js +16 -1
  75. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  76. app-rn-runtime/components/input/epoch/base-datetime.component.js +22 -5
  77. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  78. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
  79. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
  80. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
  81. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
  82. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  83. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
  84. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  85. app-rn-runtime/components/input/number/number.component.js +6 -3
  86. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  87. app-rn-runtime/components/input/radioset/radioset.component.js +6 -6
  88. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  89. app-rn-runtime/components/input/select/select.component.js +23 -9
  90. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  91. app-rn-runtime/components/input/switch/switch.component.js +2 -2
  92. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  93. app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
  94. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  95. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  96. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  97. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  98. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
  99. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  100. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  101. app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
  102. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  103. app-rn-runtime/core/base.component.js +2 -1
  104. app-rn-runtime/core/base.component.js.map +1 -1
  105. app-rn-runtime/core/components/textinput.component.js +4 -3
  106. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  107. app-rn-runtime/core/formatters.js.map +1 -1
  108. app-rn-runtime/core/key.extractor.js.map +1 -1
  109. app-rn-runtime/core/props.provider.js +3 -0
  110. app-rn-runtime/core/props.provider.js.map +1 -1
  111. app-rn-runtime/core/storage.service.js.map +1 -1
  112. app-rn-runtime/core/tappable.component.js +26 -25
  113. app-rn-runtime/core/tappable.component.js.map +1 -1
  114. app-rn-runtime/core/ui-preferences.context.js +7 -0
  115. app-rn-runtime/core/ui-preferences.context.js.map +1 -0
  116. app-rn-runtime/core/utils.js +66 -4
  117. app-rn-runtime/core/utils.js.map +1 -1
  118. app-rn-runtime/package.json +28 -7
  119. app-rn-runtime/runtime/App.js +2 -1
  120. app-rn-runtime/runtime/App.js.map +1 -1
  121. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  122. app-rn-runtime/runtime/base-fragment.component.js +15 -0
  123. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  124. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  125. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  126. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  127. app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
  128. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  129. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  130. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  131. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  132. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  133. app-rn-runtime/runtime/watcher.js.map +1 -1
  134. app-rn-runtime/styles/background.component.js +1 -0
  135. app-rn-runtime/styles/background.component.js.map +1 -1
  136. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  137. app-rn-runtime/styles/theme.js.map +1 -1
  138. app-rn-runtime/variables/base-variable.js.map +1 -1
  139. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  140. app-rn-runtime/variables/device-variable.js.map +1 -1
  141. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","LinearGradient","ExpoLinearGradient","Image","StyleSheet","View","isEmpty","isNil","isNumber","imageSizeEstimator","AssetConsumer","isFullPathUrl","IMAGE_URL_REGEX","LINEAT_GRADIENT_REGEX","DIMENSION_REGEX","BACKGROUND_POSITION_REGEX","BACKGROUND_SIZE_REGEX","ASSET_CACHE","Component","constructor","props","state","parse","val","value","splits","split","map","v","trim","angle","locations","endsWith","parseInt","shift","delta","Math","round","tan","PI","abs","end","x","y","start","colors","s","_s$matchAll$next","p","matchAll","next","push","replace","componentDidUpdate","prevProps","prevState","snapshot","setState","render","_this$props$size","_this$props$style","createElement","style","borderWidth","overflow","absoluteFill","middle","flexDirection","justifyContent","alignItems","size","width","position","borderRadius","children","BackgroundComponent","_defineProperty","imageSrc","image","undefined","caluculateSize","height","resolveAssetSource","naturalImageWidth","naturalImageHeight","getSize","uri","getDimension","dim","getPosition","result","top","bottom","left","right","getPositionAndSize","_this$props$size2","_this$getGradient","resizeMode","getGradient","length","repeat","renderLinearGradient","data","psresult","Fragment","setImage","componentDidMount","setTimeout","_this$props$image","_source","source","startsWith","_this$props$image2","loadAsset","_this$props$image3","renderImage","_psresult$position","_psresult$position2","loadImage","minWidth","minHeight","_gradientData$value","gradientData"],"sources":["background.component.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LinearGradient as ExpoLinearGradient, LinearGradientPoint } from 'expo-linear-gradient';\nimport { Image, StyleSheet, View, ViewStyle } from 'react-native';\nimport { isEmpty, isNil, isNumber, isString } from 'lodash-es';\nimport imageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { AssetConsumer } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport interface LinearGradientProps {\n value: string;\n children: any;\n style?: ViewStyle;\n size?: ViewStyle;\n position?: ViewStyle;\n middle?: boolean;\n}\n\nexport interface LinearGradientState {\n colors: string[];\n locations: number[];\n start: LinearGradientPoint;\n end: LinearGradientPoint;\n}\n\nconst IMAGE_URL_REGEX = /url\\(['|\"]?(.+)['|\"]?\\)$/gi;\nconst LINEAT_GRADIENT_REGEX = /linear-gradient\\((.+)\\)$/gi;\nconst DIMENSION_REGEX = /([0-9%]+)[a-z]*/g;\nconst BACKGROUND_POSITION_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\nconst BACKGROUND_SIZE_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\n\nconst ASSET_CACHE = {} as any;\n\nexport class LinearGradient extends React.Component<LinearGradientProps, LinearGradientState> {\n\n constructor(props: LinearGradientProps) {\n super(props);\n this.state = this.parse();\n }\n\n parse(val = this.props.value) {\n let state = {} as LinearGradientState;\n const splits = val.split(',').map(v => v.trim());\n let angle = 0;\n const locations: LinearGradientPoint[] = [];\n if (splits[0].endsWith('deg')) {\n angle = (parseInt(splits[0].split('deg')[0]))%360;\n angle = angle < 0 ? (360 + angle) : angle;\n splits.shift();\n }\n angle += 90;\n const delta = Math.round(Math.tan((angle * Math.PI) / 180) * 100)/100;\n if (Math.abs(delta) > 1) {\n state = {\n end: {\n x: -0.5 / delta + 0.5,\n y: 0\n },\n start: {\n x: 0.5 / delta + 0.5,\n y: 1\n }\n } as LinearGradientState;\n } else {\n state = {\n start: {\n x: 0,\n y: -0.5 * delta + 0.5\n },\n end: {\n x: 1,\n y: 0.5 * delta + 0.5\n }\n } as LinearGradientState;\n }\n if (angle >= 270 && angle <= 450) {\n state = {\n start : state.end,\n end: state.start\n } as LinearGradientState;\n }\n state.colors = [];\n state.locations = [];\n splits.map(s => {\n const p = s.matchAll(/\\s*([0-9]+)%/g).next()?.value;\n if (p) {\n state.locations.push(parseInt(p[1]) / 100);\n state.colors.push(s.replace(p[0], ''));\n } else {\n state.locations.push(null as any);\n state.colors.push(s);\n }\n });\n return state;\n }\n\n componentDidUpdate(prevProps: Readonly<LinearGradientProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (prevProps.value !== this.props.value) {\n this.setState(this.parse());\n }\n }\n \n\n public render() {\n return (\n <View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, this.props.middle ? {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n } : null]}>\n <ExpoLinearGradient\n colors={this.state.colors}\n locations={this.state.locations}\n start={this.state.start}\n end={this.state.end}\n style={[\n this.props.size?.width ? this.props.size : StyleSheet.absoluteFill,\n this.props.position,\n {position: 'absolute', borderRadius: this.props.style?.borderRadius}\n ]}\n />\n </View>\n {this.props.children}\n </View>\n );\n }\n}\n\nexport interface BackgroundProps {\n image?: string;\n position?: string;\n children?: any;\n resizeMode?: string;\n repeat?: string;\n style?: ViewStyle;\n size: string;\n}\n\nexport interface BackgroundState {\n imageSrc: any;\n naturalImageWidth: number,\n naturalImageHeight: number\n}\n\nexport class BackgroundComponent extends React.Component<BackgroundProps, BackgroundState> {\n\n private loadAsset: (path: string) => number | string = null as any;\n\n constructor(props: BackgroundProps) {\n super(props);\n this.state = {\n imageSrc : this.props.image ? ASSET_CACHE[this.props.image] : undefined\n } as BackgroundState;\n }\n\n public caluculateSize(imageSrc: any) {\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n } else if (!isNil(imageSrc)) {\n imageSizeEstimator.getSize(imageSrc.uri, (width: number, height: number) => {\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n });\n }\n }\n\n getDimension(dim: string) {\n if (dim) {\n const value = dim.matchAll(DIMENSION_REGEX).next().value;\n if (value[1]) {\n return value[1].endsWith('%') ? value[1] : parseInt(value[1]);\n }\n }\n return null;\n }\n\n public getPosition() {\n const result = {} as ViewStyle;\n if (!this.props.position) {\n return result;\n }\n const position = this.props.position.split(' ').map(s => s.trim());\n if (position[0] === 'center') {\n result.alignItems = 'center';\n } else if (position[0] === 'top') {\n result.top = 0;\n } else if (position[0] === 'bottom') {\n result.bottom = 0;\n } else {\n result.top = this.getDimension(position[0]);\n }\n if (position[1] === 'center') {\n result.justifyContent = 'center';\n } else if (position[1] === 'left') {\n result.left = 0;\n } else if (position[1] === 'bottom') {\n result.right = 0;\n } else {\n result.left = this.getDimension(position[1]);\n }\n return result;\n }\n\n public getPositionAndSize() {\n const result: {\n resizeMode? : string,\n position?: ViewStyle,\n size?: ViewStyle\n } = {} as any;\n if (this.props.resizeMode) {\n result.resizeMode = this.props.resizeMode;\n return result;\n } else if (this.props.position === 'center') {\n result.resizeMode = 'center';\n result.position = {\n justifyContent: 'center',\n alignItems: 'center'\n };\n } else if (this.props.size === 'contain' || this.props.size === 'cover') {\n result.resizeMode = this.props.size;\n return result;\n }\n const size = this.props.size?.matchAll(BACKGROUND_SIZE_REGEX).next().value;\n result.size = {};\n if (size) {\n result.size.width = size[1].endsWith('%') ? size[1] : parseInt(size[1]);\n result.size.height = size[2].endsWith('%') ? size[2] : parseInt(size[2]);\n }\n if (!result.resizeMode && this.props.position) {\n result.position = this.getPosition();\n }\n if (!this.getGradient()?.value?.length) {\n if (this.props.repeat === 'no-repeat') {\n result.size.width = result.size.width || this.state.naturalImageWidth; \n result.size.height = result.size.height || this.state.naturalImageHeight; \n } else if (this.props.repeat === 'repeat-x') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || '100%'; \n result.size.height = result.size.height || this.state.naturalImageHeight; \n } else if (this.props.repeat === 'repeat-y') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || this.state.naturalImageWidth; \n result.size.height = result.size.height || '100%'; \n } else {\n result.resizeMode = 'repeat';\n }\n }\n return result;\n }\n\n public renderLinearGradient(data: string) {\n const psresult = this.getPositionAndSize();\n return (\n <LinearGradient\n value={data || ''}\n style={this.props.style}\n size={psresult.size}\n position={psresult.position}\n middle={psresult.resizeMode === 'center'}> \n <></> \n </LinearGradient>\n );\n }\n\n componentDidUpdate(prevProps: Readonly<BackgroundProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (this.props.image && prevProps.image !== this.props.image) {\n this.setImage();\n }\n }\n\n componentDidMount(): void {\n setTimeout(() => this.setImage(), 100);\n }\n\n setImage() {\n let source = this.props.image?.trim() as any;\n if (!source) {\n return;\n }\n if (source?.startsWith('url')) {\n source = this.props.image?.matchAll(IMAGE_URL_REGEX).next().value[1];\n }\n if (this.loadAsset) {\n source = this.loadAsset(source);\n }\n if (isFullPathUrl(source)) {\n source = {\n uri: source\n };\n }\n this.caluculateSize(source);\n this.setState({\n imageSrc: source\n } as BackgroundState);\n if (this.props.image) {\n ASSET_CACHE[this.props.image] = source;\n }\n }\n\n public getGradient() {\n return this.props.image?.trim().matchAll(LINEAT_GRADIENT_REGEX).next();\n }\n\n public renderImage() {\n const psresult = this.getPositionAndSize();\n return (\n <AssetConsumer>\n {(loadAsset) => {\n const loadImage = this.loadAsset !== loadAsset;\n this.loadAsset = loadAsset;\n if (loadImage) {\n setTimeout(() => this.setImage(), 10);\n }\n return (<View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, {\n flexDirection: 'row',\n justifyContent: psresult.position?.justifyContent,\n alignItems: psresult.position?.alignItems\n }]}>\n <View style={[\n { position: 'absolute', overflow: 'hidden' },\n psresult.position,\n isEmpty(psresult.size) ? StyleSheet.absoluteFill : psresult.size\n ]}>\n <Image\n source={this.state.imageSrc}\n resizeMode={psresult.resizeMode as any || 'cover'}\n style={[\n { \n width: '100%',\n height: '100%'\n }, \n !isEmpty(psresult.size)\n || (psresult.resizeMode === 'cover'\n || psresult.resizeMode === 'contain') ? null : {\n minWidth: this.state.naturalImageWidth,\n minHeight: this.state.naturalImageHeight\n }\n ]}/> \n </View>\n </View>\n </View>);\n }}\n </AssetConsumer>\n );\n }\n\n public render() {\n const gradientData = this.getGradient();\n if (gradientData?.value?.length) {\n return this.renderLinearGradient(gradientData.value[1]);\n } else if (this.props.image && this.state.imageSrc) {\n return this.renderImage();\n }\n return null;\n }\n}\n\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,kBAAkB,QAA6B,sBAAsB;AAChG,SAASC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACjE,SAASC,OAAO,EAAEC,KAAK,EAAEC,QAAQ,QA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AC,CAAC;IAC3D,CAAC,MAAM,IAAI,IAAI,CAACJ,KAAK,CAAC0D,KAAK,IAAI,IAAI,CAACzD,KAAK,CAACwD,QAAQ,EAAE;MAChD,OAAO,IAAI,CAACuC,WAAW,CAAC,CAAC;IAC7B;IACA,OAAO,IAAI;EACf;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["React","LinearGradient","ExpoLinearGradient","Image","StyleSheet","View","isEmpty","isNil","isNumber","imageSizeEstimator","AssetConsumer","isFullPathUrl","IMAGE_URL_REGEX","LINEAT_GRADIENT_REGEX","DIMENSION_REGEX","BACKGROUND_POSITION_REGEX","BACKGROUND_SIZE_REGEX","ASSET_CACHE","Component","constructor","props","state","parse","val","value","splits","split","map","v","trim","angle","locations","endsWith","parseInt","shift","delta","Math","round","tan","PI","abs","end","x","y","start","colors","s","_s$matchAll$next","p","matchAll","next","push","replace","componentDidUpdate","prevProps","prevState","snapshot","setState","render","_this$props$size","_this$props$style","createElement","style","borderWidth","overflow","absoluteFill","middle","flexDirection","justifyContent","alignItems","testID","size","width","position","borderRadius","children","BackgroundComponent","_defineProperty","imageSrc","image","undefined","caluculateSize","height","resolveAssetSource","naturalImageWidth","naturalImageHeight","getSize","uri","getDimension","dim","getPosition","result","top","bottom","left","right","getPositionAndSize","_this$props$size2","_this$getGradient","resizeMode","getGradient","length","repeat","renderLinearGradient","data","psresult","Fragment","setImage","componentDidMount","setTimeout","_this$props$image","_source","source","startsWith","_this$props$image2","loadAsset","_this$props$image3","renderImage","_psresult$position","_psresult$position2","loadImage","minWidth","minHeight","_gradientData$value","gradientData"],"sources":["background.component.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LinearGradient as ExpoLinearGradient, LinearGradientPoint } from 'expo-linear-gradient';\nimport { Image, StyleSheet, View, ViewStyle } from 'react-native';\nimport { isEmpty, isNil, isNumber, isString } from 'lodash-es';\nimport imageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { AssetConsumer } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport interface LinearGradientProps {\n value: string;\n children: any;\n style?: ViewStyle;\n size?: ViewStyle;\n position?: ViewStyle;\n middle?: boolean;\n}\n\nexport interface LinearGradientState {\n colors: string[];\n locations: number[];\n start: LinearGradientPoint;\n end: LinearGradientPoint;\n}\n\nconst IMAGE_URL_REGEX = /url\\(['|\"]?(.+)['|\"]?\\)$/gi;\nconst LINEAT_GRADIENT_REGEX = /linear-gradient\\((.+)\\)$/gi;\nconst DIMENSION_REGEX = /([0-9%]+)[a-z]*/g;\nconst BACKGROUND_POSITION_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\nconst BACKGROUND_SIZE_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\n\nconst ASSET_CACHE = {} as any;\n\nexport class LinearGradient extends React.Component<LinearGradientProps, LinearGradientState> {\n\n constructor(props: LinearGradientProps) {\n super(props);\n this.state = this.parse();\n }\n\n parse(val = this.props.value) {\n let state = {} as LinearGradientState;\n const splits = val.split(',').map(v => v.trim());\n let angle = 0;\n const locations: LinearGradientPoint[] = [];\n if (splits[0].endsWith('deg')) {\n angle = (parseInt(splits[0].split('deg')[0]))%360;\n angle = angle < 0 ? (360 + angle) : angle;\n splits.shift();\n }\n angle += 90;\n const delta = Math.round(Math.tan((angle * Math.PI) / 180) * 100)/100;\n if (Math.abs(delta) > 1) {\n state = {\n end: {\n x: -0.5 / delta + 0.5,\n y: 0\n },\n start: {\n x: 0.5 / delta + 0.5,\n y: 1\n }\n } as LinearGradientState;\n } else {\n state = {\n start: {\n x: 0,\n y: -0.5 * delta + 0.5\n },\n end: {\n x: 1,\n y: 0.5 * delta + 0.5\n }\n } as LinearGradientState;\n }\n if (angle >= 270 && angle <= 450) {\n state = {\n start : state.end,\n end: state.start\n } as LinearGradientState;\n }\n state.colors = [];\n state.locations = [];\n splits.map(s => {\n const p = s.matchAll(/\\s*([0-9]+)%/g).next()?.value;\n if (p) {\n state.locations.push(parseInt(p[1]) / 100);\n state.colors.push(s.replace(p[0], ''));\n } else {\n state.locations.push(null as any);\n state.colors.push(s);\n }\n });\n return state;\n }\n\n componentDidUpdate(prevProps: Readonly<LinearGradientProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (prevProps.value !== this.props.value) {\n this.setState(this.parse());\n }\n }\n \n\n public render() {\n return (\n <View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, this.props.middle ? {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n } : null]}>\n <ExpoLinearGradient testID=\"wm-expo-linear-gradient\"\n colors={this.state.colors}\n locations={this.state.locations}\n start={this.state.start}\n end={this.state.end}\n style={[\n this.props.size?.width ? this.props.size : StyleSheet.absoluteFill,\n this.props.position,\n {position: 'absolute', borderRadius: this.props.style?.borderRadius}\n ]}\n />\n </View>\n {this.props.children}\n </View>\n );\n }\n}\n\nexport interface BackgroundProps {\n image?: string;\n position?: string;\n children?: any;\n resizeMode?: string;\n repeat?: string;\n style?: ViewStyle;\n size: string;\n}\n\nexport interface BackgroundState {\n imageSrc: any;\n naturalImageWidth: number,\n naturalImageHeight: number\n}\n\nexport class BackgroundComponent extends React.Component<BackgroundProps, BackgroundState> {\n\n private loadAsset: (path: string) => number | string = null as any;\n\n constructor(props: BackgroundProps) {\n super(props);\n this.state = {\n imageSrc : this.props.image ? ASSET_CACHE[this.props.image] : undefined\n } as BackgroundState;\n }\n\n public caluculateSize(imageSrc: any) {\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n } else if (!isNil(imageSrc)) {\n imageSizeEstimator.getSize(imageSrc.uri, (width: number, height: number) => {\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n });\n }\n }\n\n getDimension(dim: string) {\n if (dim) {\n const value = dim.matchAll(DIMENSION_REGEX).next().value;\n if (value[1]) {\n return value[1].endsWith('%') ? value[1] : parseInt(value[1]);\n }\n }\n return null;\n }\n\n public getPosition() {\n const result = {} as ViewStyle;\n if (!this.props.position) {\n return result;\n }\n const position = this.props.position.split(' ').map(s => s.trim());\n if (position[0] === 'center') {\n result.alignItems = 'center';\n } else if (position[0] === 'top') {\n result.top = 0;\n } else if (position[0] === 'bottom') {\n result.bottom = 0;\n } else {\n result.top = this.getDimension(position[0]);\n }\n if (position[1] === 'center') {\n result.justifyContent = 'center';\n } else if (position[1] === 'left') {\n result.left = 0;\n } else if (position[1] === 'bottom') {\n result.right = 0;\n } else {\n result.left = this.getDimension(position[1]);\n }\n return result;\n }\n\n public getPositionAndSize() {\n const result: {\n resizeMode? : string,\n position?: ViewStyle,\n size?: ViewStyle\n } = {} as any;\n if (this.props.resizeMode) {\n result.resizeMode = this.props.resizeMode;\n return result;\n } else if (this.props.position === 'center') {\n result.resizeMode = 'center';\n result.position = {\n justifyContent: 'center',\n alignItems: 'center'\n };\n } else if (this.props.size === 'contain' || this.props.size === 'cover') {\n result.resizeMode = this.props.size;\n return result;\n }\n const size = this.props.size?.matchAll(BACKGROUND_SIZE_REGEX).next().value;\n result.size = {};\n if (size) {\n result.size.width = size[1].endsWith('%') ? size[1] : parseInt(size[1]);\n result.size.height = size[2].endsWith('%') ? size[2] : parseInt(size[2]);\n }\n if (!result.resizeMode && this.props.position) {\n result.position = this.getPosition();\n }\n if (!this.getGradient()?.value?.length) {\n if (this.props.repeat === 'no-repeat') {\n result.size.width = result.size.width || this.state.naturalImageWidth; \n result.size.height = result.size.height || this.state.naturalImageHeight; \n } else if (this.props.repeat === 'repeat-x') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || '100%'; \n result.size.height = result.size.height || this.state.naturalImageHeight; \n } else if (this.props.repeat === 'repeat-y') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || this.state.naturalImageWidth; \n result.size.height = result.size.height || '100%'; \n } else {\n result.resizeMode = 'repeat';\n }\n }\n return result;\n }\n\n public renderLinearGradient(data: string) {\n const psresult = this.getPositionAndSize();\n return (\n <LinearGradient\n value={data || ''}\n style={this.props.style}\n size={psresult.size}\n position={psresult.position}\n middle={psresult.resizeMode === 'center'}> \n <></> \n </LinearGradient>\n );\n }\n\n componentDidUpdate(prevProps: Readonly<BackgroundProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (this.props.image && prevProps.image !== this.props.image) {\n this.setImage();\n }\n }\n\n componentDidMount(): void {\n setTimeout(() => this.setImage(), 100);\n }\n\n setImage() {\n let source = this.props.image?.trim() as any;\n if (!source) {\n return;\n }\n if (source?.startsWith('url')) {\n source = this.props.image?.matchAll(IMAGE_URL_REGEX).next().value[1];\n }\n if (this.loadAsset) {\n source = this.loadAsset(source);\n }\n if (isFullPathUrl(source)) {\n source = {\n uri: source\n };\n }\n this.caluculateSize(source);\n this.setState({\n imageSrc: source\n } as BackgroundState);\n if (this.props.image) {\n ASSET_CACHE[this.props.image] = source;\n }\n }\n\n public getGradient() {\n return this.props.image?.trim().matchAll(LINEAT_GRADIENT_REGEX).next();\n }\n\n public renderImage() {\n const psresult = this.getPositionAndSize();\n return (\n <AssetConsumer>\n {(loadAsset) => {\n const loadImage = this.loadAsset !== loadAsset;\n this.loadAsset = loadAsset;\n if (loadImage) {\n setTimeout(() => this.setImage(), 10);\n }\n return (<View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, {\n flexDirection: 'row',\n justifyContent: psresult.position?.justifyContent,\n alignItems: psresult.position?.alignItems\n }]}>\n <View style={[\n { position: 'absolute', overflow: 'hidden' },\n psresult.position,\n isEmpty(psresult.size) ? StyleSheet.absoluteFill : psresult.size\n ]}>\n <Image\n source={this.state.imageSrc}\n resizeMode={psresult.resizeMode as any || 'cover'}\n style={[\n { \n width: '100%',\n height: '100%'\n }, \n !isEmpty(psresult.size)\n || (psresult.resizeMode === 'cover'\n || psresult.resizeMode === 'contain') ? null : {\n minWidth: this.state.naturalImageWidth,\n minHeight: this.state.naturalImageHeight\n }\n ]}/> \n </View>\n </View>\n </View>);\n }}\n </AssetConsumer>\n );\n }\n\n public render() {\n const gradientData = this.getGradient();\n if (gradientData?.value?.length) {\n return this.renderLinearGradient(gradientData.value[1]);\n } else if (this.props.image && this.state.imageSrc) {\n return this.renderImage();\n }\n return null;\n }\n}\n\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,kBAAkB,QAA6B,sBAAsB;AAChG,SAASC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACjE,SAASC,OAAO,EAAEC,KAAK,EAAEC,QAAQ,QAAkB,WAAW;AAC9D,OAAOC,kBAAkB,MAAM,mDAAmD;AAClF,SAASC,aAAa,QAAQ,+CAA+C;AAC7E,SAASC,aAAa,QAAQ,sCAAsC;AAkBpE,MAAMC,eAAe,GAAG,4BAA4B;AACpD,MAAMC,qBAAqB,GAAG,4BAA4B;AAC1D,MAAMC,eAAe,GAAG,kBAAkB;AAC1C,MAAMC,yBAAyB,GAAG,oCAAoC;AACtE,MAAMC,qBAAqB,GAAG,oCAAoC;AAElE,MAAMC,WAAW,GAAG,CAAC,CAAQ;AAE7B,OAAO,MAAMhB,cAAc,SAASD,KAAK,CAACkB,SAAS,CAA2C;EAE1FC,WAAWA,CAACC,KAA0B,EAAE;IACpC,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,KAAK,GAAG,IAAI,CAACC,KAAK,CAAC,CAAC;EAC7B;EAEAA,KAAKA,CAACC,GAAG,GAAG,IAAI,CAACH,KAAK,CAACI,KAAK,EAAE;IAC1B,IAAIH,KAAK,GAAG,CAAC,CAAwB;IACrC,MAAMI,MAAM,GAAGF,GAAG,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,GA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AAO,IAC5BM,QAAQ,CAACN,UAAU,KAAM,SAAU,GAAG,IAAI,GAAG;UACpDsB,QAAQ,EAAE,IAAI,CAACpG,KAAK,CAAC+D,iBAAiB;UACtCsC,SAAS,EAAE,IAAI,CAACrG,KAAK,CAACgE;QAC1B,CAAC;MACH,CAAC,CACL,CACJ,CACJ,CAAC;IACP,CACW,CAAC;EAEpB;EAEO3B,MAAMA,CAAA,EAAG;IAAA,IAAAiE,mBAAA;IACZ,MAAMC,YAAY,GAAG,IAAI,CAACxB,WAAW,CAAC,CAAC;IACvC,IAAIwB,YAAY,aAAZA,YAAY,gBAAAD,mBAAA,GAAZC,YAAY,CAAEpG,KAAK,cAAAmG,mBAAA,eAAnBA,mBAAA,CAAqBtB,MAAM,EAAE;MAC7B,OAAO,IAAI,CAACE,oBAAoB,CAACqB,YAAY,CAACpG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC,MAAM,IAAI,IAAI,CAACJ,KAAK,CAAC2D,KAAK,IAAI,IAAI,CAAC1D,KAAK,CAACyD,QAAQ,EAAE;MAChD,OAAO,IAAI,CAACuC,WAAW,CAAC,CAAC;IAC7B;IACA,OAAO,IAAI;EACf;AACJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["isNumber","isString","Font","isColor","c","isStringOrNumber","v","isIn","arr","obj","forEach","k","STYLE_PROP_TYPE_INFO","alignContent","isValid","ref","alignItems","alignSelf","aspectRatio","backfaceVisibility","backgroundColor","backgroundImage","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","backgroundPosition","backgroundRepeat","backgroundSize","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderCurve","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopColor","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","userSelect","verticalAlign","width","writingDirection","zIndex","getStyleReference","name","info","isValidStyleProp","value","trim","startsWith","getErrorMessage","replace","g","toLowerCase"],"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 backgroundImage: {\n isValid: isString,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\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 backgroundPosition: {\n isValid: isStringOrNumber,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backgroundRepeat: {\n isValid: isIn('repeat', 'repeat-x', 'repeat-y', 'no-repeat'),\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backgroundSize: {\n isValid: isStringOrNumber,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\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: isColor,\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 borderTopColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/layout-props#bordertopwidth'\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 userSelect: {\n isValid: isIn('text', 'none'),\n ref: 'valid values to user-select are text, none.'\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 name?.trim().startsWith('__') || (info && info.isValid(value));\n};\n\nexport const getErrorMessage = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n name = name.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`);\n if (info) {\n if (info.errorMsg) {\n return info.errorMsg(value);\n } else {\n return `'${value}' is not a valid value to '${name}'.`;\n }\n }\n return `'${name}' is not a supported style property in one or all Native Platforms.`\n};"],"mappings":"AAAA,SAAQA,QAAQ,EAASC,QAAQ,QAAQ,WAAW;AACpD,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,MAAMC,OAAO,GAAIC,CAAS,IAAK,IAAI;AACnC,MAAMC,gBAAgB,GAAIC,CAAM,IAAKN,QAAQ,CAACM,CAAC,CAAC,IAAIL,QAAQ,CAACK,CAAC,CAAC;AAC/D,MAAMC,IAAI,GAAGA,CAAC,GAAGC,GAAQ,KAAK;EAC1B,MAAMC,GAAG,GAAG,CAAC,CAAC;EACdD,GAAG,CAACE,OAAO,CAAEJ,CAAM,IAAK;IACnBG,GAAG,CAASH,CAAC,CAAC,GAAG,IAAI;EAC1B,CAAC,CAAC;EACF,OAAQK,CAAM,IAAMF,GAAG,CAASE,CAAC,CAAC,KAAK,IAAI;AAC/C,CAAC;AAED,MAAMC,oBAAoB,GAAG;EACzBC,YAAY,EAAE;IACVC,OAAO,EAAEP,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","k","STYLE_PROP_TYPE_INFO","alignContent","isValid","ref","alignItems","alignSelf","aspectRatio","backfaceVisibility","backgroundColor","backgroundImage","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","backgroundPosition","backgroundRepeat","backgroundSize","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderCurve","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopColor","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","userSelect","verticalAlign","width","writingDirection","zIndex","getStyleReference","name","info","isValidStyleProp","value","trim","startsWith","getErrorMessage","replace","g","toLowerCase"],"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 backgroundImage: {\n isValid: isString,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\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 backgroundPosition: {\n isValid: isStringOrNumber,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backgroundRepeat: {\n isValid: isIn('repeat', 'repeat-x', 'repeat-y', 'no-repeat'),\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backgroundSize: {\n isValid: isStringOrNumber,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\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: isColor,\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 borderTopColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/layout-props#bordertopwidth'\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 userSelect: {\n isValid: isIn('text', 'none'),\n ref: 'valid values to user-select are text, none.'\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 name?.trim().startsWith('__') || (info && info.isValid(value));\n};\n\nexport const getErrorMessage = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n name = name.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`);\n if (info) {\n if (info.errorMsg) {\n return info.errorMsg(value);\n } else {\n return `'${value}' is not a valid value to '${name}'.`;\n }\n }\n return `'${name}' is not a supported style property in one or all Native Platforms.`\n};"],"mappings":"AAAA,SAAQA,QAAQ,EAASC,QAAQ,QAAQ,WAAW;AACpD,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,MAAMC,OAAO,GAAIC,CAAS,IAAK,IAAI;AACnC,MAAMC,gBAAgB,GAAIC,CAAM,IAAK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C,IAAK,IAAIA,CAAC,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,EAAE,CAAC;EAChE,IAAIR,IAAI,EAAE;IACN,IAAIA,IAAI,CAAC9D,QAAQ,EAAE;MACf,OAAO8D,IAAI,CAAC9D,QAAQ,CAACgE,KAAK,CAAC;IAC/B,CAAC,MAAM;MACH,OAAO,IAAIA,KAAK,8BAA8BH,IAAI,IAAI;IAC1D;EACJ;EACA,OAAO,IAAIA,IAAI,qEAAqE;AACxF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["cloneDeep","isNil","forEach","flatten","isArray","isEmpty","isObject","isString","get","reverse","React","camelCase","Dimensions","deepCopy","isWebPreviewMode","EventNotifier","ViewPort","EVENTS","ViewPortEvents","MediaQueryList","ThemeVariables","getErrorMessage","getStyleReference","isValidStyleProp","DEFAULT_CLASS","window","matchMedia","query","DEVICE_BREAK_POINTS","ThemeEvent","Theme","constructor","parent","name","_defineProperty","traceEnabled","subscribe","event","fn","eventNotifer","notify","children","t","replaceVariables","val","match","s","variableName","substring","length","replace","INSTANCE","clearCache","cache","registerStyle","styleGenerators","push","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","cs","filter","cleanseStyleProperties","screenWidth","width","screenHeight","height","i","stylePropertyValue","endsWith","Number","indexOf","split","c","mediaQuery","clonedStyle","matches","BASE","$new","newTheme","reset","destroy","splice","getTextStyle","color","fontFamily","fontSize","fontStyle","fontWeight","includeFontPadding","fontVariant","letterSpacing","lineHeight","textAlign","textAlignVertical","textDecorationColor","textDecorationStyle","textShadowColor","textShadowOffset","textShadowRadius","textTransform","verticalAlign","writingDirection","userSelect","themeVariables","CHANGE","_Theme","SIZE_CHANGE","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","text"],"sources":["theme.tsx"],"sourcesContent":["import { cloneDeep, isNil, forEach, flatten, isArray, isEmpty, isObject, isString, isFunction, get, reverse } from 'lodash';\nimport React from 'react';\nimport { camelCase } from 'lodash-es';\nimport { TextStyle, ViewStyle, ImageStyle, ImageBackground, Dimensions } 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 private replaceVariables(val: string) {\n if(isString(val)) { \n (val.match(/_*var\\([^\\)]*\\)/g) || []).forEach((s) => {\n const variableName = s.substring(4, s.length - 1);\n val = val.replace(s, (ThemeVariables.INSTANCE as any)[variableName]\n || (ThemeVariables.INSTANCE as any)[variableName.substring(2)]\n || (ThemeVariables.INSTANCE as any)[camelCase(variableName.substring(2))]);\n val = this.replaceVariables(val);\n });\n }\n return val; \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(name && !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 cleanseStyleProperties(style: any) {\n if (!(style && isObject(style)) || isString(style) || isArray(style)) {\n return style;\n }\n style = style as any;\n if (isObject(style) && !isArray(style)) {\n Object.keys(style).forEach(k => {\n (style as any)[k] = this.replaceVariables((style as any)[k]);\n });\n }\n if (!isNil(style['shadowRadius'])) {\n if (style['shadowRadius'] <= 0) {\n style['shadowColor'] = 'transparent';\n } else if (isNil(style['elevation'])) {\n style['elevation'] = 2;\n }\n }\n if (!isNil(style['margin'])) {\n style['marginLeft'] = style['marginLeft'] || style['margin'];\n style['marginRight'] = style['marginRight'] || style['margin'];\n style['marginTop'] = style['marginTop'] || style['margin'];\n style['marginBottom'] = style['marginBottom'] || style['margin'];\n delete style['margin'];\n }\n if (!isNil(style['padding'])) {\n style['paddingLeft'] = style['paddingLeft'] || style['padding'];\n style['paddingRight'] = style['paddingRight'] || style['padding'];\n style['paddingTop'] = style['paddingTop'] || style['padding'];\n style['paddingBottom'] = style['paddingBottom'] || style['padding'];\n delete style['padding'];\n }\n let screenWidth = Dimensions.get('window').width;\n let screenHeight = Dimensions.get('window').height;\n Object.keys(style).forEach((k, i) => {\n let stylePropertyValue = style[k]\n if(typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vw')) {\n stylePropertyValue = stylePropertyValue.replace('vw','')\n style[k] = Number(stylePropertyValue)/100 * screenWidth\n }\n if((typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vh'))) {\n stylePropertyValue = stylePropertyValue.replace('vh','')\n style[k] = Number(stylePropertyValue)/100 * screenHeight\n }\n })\n Object.keys(style).forEach((k, i) => this.cleanseStyleProperties(style[k]));\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 this.cleanseStyleProperties(clonedStyle);\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 getTextStyle(s: any) {\n if (!s) {\n return {};\n }\n return {\n color: s.color,\n fontFamily: s.fontFamily,\n fontSize: s.fontSize,\n fontStyle: s.fontStyle,\n fontWeight: s.fontWeight,\n includeFontPadding: s.includeFontPadding,\n fontVariant: s.fontVariant,\n letterSpacing: s.letterSpacing,\n lineHeight: s.lineHeight,\n textAlign: s.textAlign,\n textAlignVertical: s.textAlignVertical,\n textDecorationColor: s.textDecorationColor,\n textDecorationStyle: s.textDecorationStyle,\n textShadowColor: s.textShadowColor,\n textShadowOffset: s.textShadowOffset,\n textShadowRadius: s.textShadowRadius,\n textTransform: s.textTransform,\n verticalAlign: s.verticalAlign,\n writingDirection: s.writingDirection,\n userSelect: s.userSelect,\n } as TextStyle;\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]: AllStyle | 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 & {userSelect?: 'none'| 'text'} & {rippleColor?: string});\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 addStyle('hide-context-menu', '', { text: { userSelect: 'none' }});\n});\n\n"],"mappings":";;;;AAAA,SAASA,SAAS,EAAEC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAcC,GAAG,EAAEC,OAAO,QAAQ,QAAQ;AAC3H,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,WAAW;AACrC,SAA4DC,UAAU,QAAQ,cAAc;AAC5F,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,eAAe,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,wBAAwB;AAC7F,OAAO,MAAMC,aAAa,GAAG,eAAe;AA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3G,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAAEmF,IAAI,EAAE;MAAE2B,WAAW,EAAExC,cAAc,CAACsC;IAAa;EAAC,CAAC,CAAC;EACrF5G,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAAEmF,IAAI,EAAE;MAAE2B,WAAW,EAAExC,cAAc,CAACuC;IAAa;EAAC,CAAC,CAAC;EAErF7G,QAAQ,CAAC,mBAAmB,EAAE,EAAE,EAAE;IAAE+G,IAAI,EAAE;MAAE1C,UAAU,EAAE;IAAO;EAAC,CAAC,CAAC;AACtE,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["cloneDeep","isNil","forEach","flatten","isArray","isEmpty","isObject","isString","get","reverse","React","camelCase","Dimensions","deepCopy","isWebPreviewMode","EventNotifier","ViewPort","EVENTS","ViewPortEvents","MediaQueryList","ThemeVariables","getErrorMessage","getStyleReference","isValidStyleProp","DEFAULT_CLASS","window","matchMedia","query","DEVICE_BREAK_POINTS","ThemeEvent","Theme","constructor","parent","name","_defineProperty","traceEnabled","subscribe","event","fn","eventNotifer","notify","children","t","replaceVariables","val","match","s","variableName","substring","length","replace","INSTANCE","clearCache","cache","registerStyle","styleGenerators","push","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","cs","filter","cleanseStyleProperties","screenWidth","width","screenHeight","height","i","stylePropertyValue","endsWith","Number","indexOf","split","c","mediaQuery","clonedStyle","matches","BASE","$new","newTheme","reset","destroy","splice","getTextStyle","color","fontFamily","fontSize","fontStyle","fontWeight","includeFontPadding","fontVariant","letterSpacing","lineHeight","textAlign","textAlignVertical","textDecorationColor","textDecorationStyle","textShadowColor","textShadowOffset","textShadowRadius","textTransform","verticalAlign","writingDirection","userSelect","themeVariables","CHANGE","_Theme","SIZE_CHANGE","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","text"],"sources":["theme.tsx"],"sourcesContent":["import { cloneDeep, isNil, forEach, flatten, isArray, isEmpty, isObject, isString, isFunction, get, reverse } from 'lodash';\nimport React from 'react';\nimport { camelCase } from 'lodash-es';\nimport { TextStyle, ViewStyle, ImageStyle, ImageBackground, Dimensions } 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 private replaceVariables(val: string) {\n if(isString(val)) { \n (val.match(/_*var\\([^\\)]*\\)/g) || []).forEach((s) => {\n const variableName = s.substring(4, s.length - 1);\n val = val.replace(s, (ThemeVariables.INSTANCE as any)[variableName]\n || (ThemeVariables.INSTANCE as any)[variableName.substring(2)]\n || (ThemeVariables.INSTANCE as any)[camelCase(variableName.substring(2))]);\n val = this.replaceVariables(val);\n });\n }\n return val; \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(name && !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 cleanseStyleProperties(style: any) {\n if (!(style && isObject(style)) || isString(style) || isArray(style)) {\n return style;\n }\n style = style as any;\n if (isObject(style) && !isArray(style)) {\n Object.keys(style).forEach(k => {\n (style as any)[k] = this.replaceVariables((style as any)[k]);\n });\n }\n if (!isNil(style['shadowRadius'])) {\n if (style['shadowRadius'] <= 0) {\n style['shadowColor'] = 'transparent';\n } else if (isNil(style['elevation'])) {\n style['elevation'] = 2;\n }\n }\n if (!isNil(style['margin'])) {\n style['marginLeft'] = style['marginLeft'] || style['margin'];\n style['marginRight'] = style['marginRight'] || style['margin'];\n style['marginTop'] = style['marginTop'] || style['margin'];\n style['marginBottom'] = style['marginBottom'] || style['margin'];\n delete style['margin'];\n }\n if (!isNil(style['padding'])) {\n style['paddingLeft'] = style['paddingLeft'] || style['padding'];\n style['paddingRight'] = style['paddingRight'] || style['padding'];\n style['paddingTop'] = style['paddingTop'] || style['padding'];\n style['paddingBottom'] = style['paddingBottom'] || style['padding'];\n delete style['padding'];\n }\n let screenWidth = Dimensions.get('window').width;\n let screenHeight = Dimensions.get('window').height;\n Object.keys(style).forEach((k, i) => {\n let stylePropertyValue = style[k]\n if(typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vw')) {\n stylePropertyValue = stylePropertyValue.replace('vw','')\n style[k] = Number(stylePropertyValue)/100 * screenWidth\n }\n if((typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vh'))) {\n stylePropertyValue = stylePropertyValue.replace('vh','')\n style[k] = Number(stylePropertyValue)/100 * screenHeight\n }\n })\n Object.keys(style).forEach((k, i) => this.cleanseStyleProperties(style[k]));\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 this.cleanseStyleProperties(clonedStyle);\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 getTextStyle(s: any) {\n if (!s) {\n return {};\n }\n return {\n color: s.color,\n fontFamily: s.fontFamily,\n fontSize: s.fontSize,\n fontStyle: s.fontStyle,\n fontWeight: s.fontWeight,\n includeFontPadding: s.includeFontPadding,\n fontVariant: s.fontVariant,\n letterSpacing: s.letterSpacing,\n lineHeight: s.lineHeight,\n textAlign: s.textAlign,\n textAlignVertical: s.textAlignVertical,\n textDecorationColor: s.textDecorationColor,\n textDecorationStyle: s.textDecorationStyle,\n textShadowColor: s.textShadowColor,\n textShadowOffset: s.textShadowOffset,\n textShadowRadius: s.textShadowRadius,\n textTransform: s.textTransform,\n verticalAlign: s.verticalAlign,\n writingDirection: s.writingDirection,\n userSelect: s.userSelect,\n } as TextStyle;\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]: AllStyle | 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 & {userSelect?: 'none'| 'text'} & {rippleColor?: string});\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 addStyle('hide-context-menu', '', { text: { userSelect: 'none' }});\n});\n\n"],"mappings":";;;;AAAA,SAASA,SAAS,EAAEC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAcC,GAAG,EAAEC,OAAO,QAAQ,QAAQ;AAC3H,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,WAAW;AACrC,SAA4DC,UAAU,QAAQ,cAAc;AAC5F,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,eAAe,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ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2B,WAAW,EAAExC,cAAc,CAACqC;IAAa;EAAC,CAAC,CAAC;EACrF3G,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAAEmF,IAAI,EAAE;MAAE2B,WAAW,EAAExC,cAAc,CAACsC;IAAa;EAAC,CAAC,CAAC;EACrF5G,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAAEmF,IAAI,EAAE;MAAE2B,WAAW,EAAExC,cAAc,CAACuC;IAAa;EAAC,CAAC,CAAC;EAErF7G,QAAQ,CAAC,mBAAmB,EAAE,EAAE,EAAE;IAAE+G,IAAI,EAAE;MAAE1C,UAAU,EAAE;IAAO;EAAC,CAAC,CAAC;AACtE,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["DatasetUtil","EventNotifier","ROOT_LOGGER","isNumber","isObject","isBoolean","get","isEqual","VariableEvents","VARIABLE_LOGGER","extend","BaseVariable","constructor","config","_defineProperty","name","isList","twoWayBinding","dataSet","subscribe","BEFORE_INVOKE","isExecuting","info","AFTER_INVOKE","invoke","params","onSuccess","onError","paramProvider","Promise","resolve","doNext","reject","invokeOnParamChange","last","latest","getData","setData","isValidDataset","getValue","key","index","setValue","value","getItem","setItem","options","getChildDetails","addItem","removeItem","exactMatch","parentIndex","path","clearData","getValidDataset","getCount","pause","resume","destroy"],"sources":["base-variable.ts"],"sourcesContent":["import DatasetUtil from './utils/dataset-util';\nimport EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';\nimport { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { isNumber, isObject, isBoolean, get, isEqual } from 'lodash';\nexport interface VariableConfig {\n name: string;\n paramProvider: Function;\n onBefore: Function;\n onComplete: Function;\n onSuccess: Function;\n onError: Function;\n isList: boolean;\n twoWayBinding: boolean;\n service: any;\n operation: string;\n operationId: string;\n operationType: string;\n serviceType: string;\n}\n\nexport enum VariableEvents {\n BEFORE_INVOKE = 'beforeInvoke',\n SUCCESS = 'success',\n ERROR = 'error',\n AFTER_INVOKE = 'afterInvoke'\n};\n\nexport const VARIABLE_LOGGER = ROOT_LOGGER.extend('variable');\n\nexport abstract class BaseVariable<T extends VariableConfig> extends EventNotifier {\n name: string = '';\n params: any = {};\n dataSet: any = {};\n isList: boolean;\n twoWayBinding: boolean;\n isExecuting = false;\n\n constructor(public config: T) {\n super();\n this.name = config.name;\n this.isList = config.isList;\n this.twoWayBinding = config.twoWayBinding;\n this.dataSet = this.isList ? []: this.dataSet;\n this.subscribe(VariableEvents.BEFORE_INVOKE, () => {\n this.isExecuting = true;\n VARIABLE_LOGGER.info(`Before Invoking variable ${this.name}`);\n });\n this.subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.isExecuting = false;\n VARIABLE_LOGGER.info(`After Invoking variable ${this.name}`);\n });\n }\n\n public invoke(params?: {}, onSuccess?: Function, onError?: Function): Promise<BaseVariable<T>> {\n if (!params) {\n this.params = this.config.paramProvider();\n } else {\n this.params = params;\n }\n return Promise.resolve(this);\n }\n\n public doNext(): Promise<BaseVariable<T>> {\n return Promise.reject(this);\n }\n\n public invokeOnParamChange(): Promise<BaseVariable<T>> {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n return this.invoke(latest);\n }\n return Promise.resolve(this);\n }\n\n public getData() {\n return this.dataSet;\n }\n\n public setData(dataSet: any) {\n if (DatasetUtil.isValidDataset(dataSet, this.isList)) {\n this.dataSet = dataSet;\n }\n return this.dataSet;\n }\n\n getValue(key: string, index: number) {\n return DatasetUtil.getValue(this.dataSet, key, index, this.isList);\n }\n\n setValue(key: string, value: any) {\n return DatasetUtil.setValue(this.dataSet, key, value, this.isList);\n }\n\n getItem(index: number) {\n return DatasetUtil.getItem(this.dataSet, index, this.isList);\n }\n\n setItem(index: any, value: any, options?: any) {\n options = DatasetUtil.getChildDetails(this.dataSet, options, this.isList);\n return DatasetUtil.setItem(this.dataSet, index, value, options);\n }\n\n addItem(value: any, options?: any) {\n let index;\n if (isNumber(options)) {\n index = options;\n }\n if (isObject(options)) {\n // @ts-ignore\n index = options.index;\n }\n\n options = DatasetUtil.getChildDetails(this.dataSet, options, this.isList);\n return DatasetUtil.addItem(this.dataSet, value, index, options);\n }\n\n removeItem(index: any, options?: any) {\n let exactMatch, parentIndex;\n if (options) {\n if (isBoolean(options)) {\n exactMatch = options;\n }\n if (isObject(options)) {\n // @ts-ignore\n exactMatch = options.exactMatch;\n if (this.isList) {\n // @ts-ignore\n parentIndex = options.parentIndex || 0;\n }\n }\n }\n return DatasetUtil.removeItem(this.dataSet, index, { exactMatch, path: get(options, 'path'), parentIndex });\n }\n\n clearData() {\n this.dataSet = DatasetUtil.getValidDataset(this.isList);\n return this.dataSet;\n }\n\n getCount() {\n return DatasetUtil.getCount(this.dataSet, this.isList);\n }\n\n pause() {}\n\n resume() {}\n\n destroy() {}\n\n}\n"],"mappings":";;;AAAA,OAAOA,WAAW,MAAM,sBAAsB;AAC9C,OAAOC,aAAa,MAAM,+CAA+C;AACzE,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,GAAG,EAAEC,OAAO,QAAQ,QAAQ;AAiBpE,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAKzB;AAED,OAAO,MAAMC,eAAe,GAAGP,WAAW,CAACQ,MAAM,CAAC,UAAU,CAAC;AAE7D,OAAO,MAAeC,YAAY,SAAmCV,aAAa,CAAC;EAQ/EW,WAAWA,CAAQC,MAAS,EAAE;IAC5B,KAAK,CAAC,CAAC;IAAC,KADSA,MAAS,GAATA,MAAS;IAAAC,eAAA,eAPb,EAAE;IAAAA,eAAA,iBACH,CAAC,CAAC;IAAAA,eAAA,kBACD,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,sBAGH,KAAK;IAIjB,IAAI,CAACC,IA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AAOA,CAAA,EAAG,CAAC;AAEf","ignoreList":[]}
1
+ {"version":3,"names":["DatasetUtil","EventNotifier","ROOT_LOGGER","isNumber","isObject","isBoolean","get","isEqual","VariableEvents","VARIABLE_LOGGER","extend","BaseVariable","constructor","config","_defineProperty","name","isList","twoWayBinding","dataSet","subscribe","BEFORE_INVOKE","isExecuting","info","AFTER_INVOKE","invoke","params","onSuccess","onError","paramProvider","Promise","resolve","doNext","reject","invokeOnParamChange","last","latest","getData","setData","isValidDataset","getValue","key","index","setValue","value","getItem","setItem","options","getChildDetails","addItem","removeItem","exactMatch","parentIndex","path","clearData","getValidDataset","getCount","pause","resume","destroy"],"sources":["base-variable.ts"],"sourcesContent":["import DatasetUtil from './utils/dataset-util';\nimport EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';\nimport { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { isNumber, isObject, isBoolean, get, isEqual } from 'lodash';\nexport interface VariableConfig {\n name: string;\n paramProvider: Function;\n onBefore: Function;\n onComplete: Function;\n onSuccess: Function;\n onError: Function;\n isList: boolean;\n twoWayBinding: boolean;\n service: any;\n operation: string;\n operationId: string;\n operationType: string;\n serviceType: string;\n}\n\nexport enum VariableEvents {\n BEFORE_INVOKE = 'beforeInvoke',\n SUCCESS = 'success',\n ERROR = 'error',\n AFTER_INVOKE = 'afterInvoke'\n};\n\nexport const VARIABLE_LOGGER = ROOT_LOGGER.extend('variable');\n\nexport abstract class BaseVariable<T extends VariableConfig> extends EventNotifier {\n name: string = '';\n params: any = {};\n dataSet: any = {};\n isList: boolean;\n twoWayBinding: boolean;\n isExecuting = false;\n\n constructor(public config: T) {\n super();\n this.name = config.name;\n this.isList = config.isList;\n this.twoWayBinding = config.twoWayBinding;\n this.dataSet = this.isList ? []: this.dataSet;\n this.subscribe(VariableEvents.BEFORE_INVOKE, () => {\n this.isExecuting = true;\n VARIABLE_LOGGER.info(`Before Invoking variable ${this.name}`);\n });\n this.subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.isExecuting = false;\n VARIABLE_LOGGER.info(`After Invoking variable ${this.name}`);\n });\n }\n\n public invoke(params?: {}, onSuccess?: Function, onError?: Function): Promise<BaseVariable<T>> {\n if (!params) {\n this.params = this.config.paramProvider();\n } else {\n this.params = params;\n }\n return Promise.resolve(this);\n }\n\n public doNext(): Promise<BaseVariable<T>> {\n return Promise.reject(this);\n }\n\n public invokeOnParamChange(): Promise<BaseVariable<T>> {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n return this.invoke(latest);\n }\n return Promise.resolve(this);\n }\n\n public getData() {\n return this.dataSet;\n }\n\n public setData(dataSet: any) {\n if (DatasetUtil.isValidDataset(dataSet, this.isList)) {\n this.dataSet = dataSet;\n }\n return this.dataSet;\n }\n\n getValue(key: string, index: number) {\n return DatasetUtil.getValue(this.dataSet, key, index, this.isList);\n }\n\n setValue(key: string, value: any) {\n return DatasetUtil.setValue(this.dataSet, key, value, this.isList);\n }\n\n getItem(index: number) {\n return DatasetUtil.getItem(this.dataSet, index, this.isList);\n }\n\n setItem(index: any, value: any, options?: any) {\n options = DatasetUtil.getChildDetails(this.dataSet, options, this.isList);\n return DatasetUtil.setItem(this.dataSet, index, value, options);\n }\n\n addItem(value: any, options?: any) {\n let index;\n if (isNumber(options)) {\n index = options;\n }\n if (isObject(options)) {\n // @ts-ignore\n index = options.index;\n }\n\n options = DatasetUtil.getChildDetails(this.dataSet, options, this.isList);\n return DatasetUtil.addItem(this.dataSet, value, index, options);\n }\n\n removeItem(index: any, options?: any) {\n let exactMatch, parentIndex;\n if (options) {\n if (isBoolean(options)) {\n exactMatch = options;\n }\n if (isObject(options)) {\n // @ts-ignore\n exactMatch = options.exactMatch;\n if (this.isList) {\n // @ts-ignore\n parentIndex = options.parentIndex || 0;\n }\n }\n }\n return DatasetUtil.removeItem(this.dataSet, index, { exactMatch, path: get(options, 'path'), parentIndex });\n }\n\n clearData() {\n this.dataSet = DatasetUtil.getValidDataset(this.isList);\n return this.dataSet;\n }\n\n getCount() {\n return DatasetUtil.getCount(this.dataSet, this.isList);\n }\n\n pause() {}\n\n resume() {}\n\n destroy() {}\n\n}\n"],"mappings":";;;AAAA,OAAOA,WAAW,MAAM,sBAAsB;AAC9C,OAAOC,aAAa,MAAM,+CAA+C;AACzE,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,GAAG,EAAEC,OAAO,QAAQ,QAAQ;AAiBpE,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAKzB;AAED,OAAO,MAAMC,eAAe,GAAGP,WAAW,CAACQ,MAAM,CAAC,UAAU,CAAC;AAE7D,OAAO,MAAeC,YAAY,SAAmCV,aAAa,CAAC;EAQ/EW,WAAWA,CAAQC,MAAS,EAAE;IAC5B,KAAK,CAAC,CAAC;IAAC,KADSA,MAAS,GAATA,MAAS;IAAAC,eAAA,eAPb,EAAE;IAAAA,eAAA,iBACH,CAAC,CAAC;IAAAA,eAAA,kBACD,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,sBAGH,KAAK;IAIjB,IAAI,CAACC,IAAI,GAAGF,MAAM,CAACE,IAAI;IACvB,IAAI,CAACC,MAAM,GAAGH,MAAM,CAACG,MAAM;IAC3B,IAAI,CAACC,aAAa,GAAGJ,MAAM,CAACI,aAAa;IACzC,IAAI,CAACC,OAAO,GAAG,IAAI,CAACF,MAAM,GAAG,EAAE,GAAE,IAAI,CAACE,OAAO;IAC7C,IAAI,CAACC,SAAS,CAACX,cAAc,CAACY,aAAa,EAAE,MAAM;MACjD,IAAI,CAACC,WAAW,GAAG,IAAI;MACvBZ,eAAe,CAACa,IAAI,CAAC,4BAA4B,IAAI,CAACP,IAAI,EAAE,CAAC;IAC/D,CAAC,CAAC;IACF,IAAI,CAACI,SAAS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EAAE;MACX,IAAIzC,SAAS,CAACyC,OAAO,CAAC,EAAE;QACtBI,UAAU,GAAGJ,OAAO;MACtB;MACA,IAAI1C,QAAQ,CAAC0C,OAAO,CAAC,EAAE;QACrB;QACAI,UAAU,GAAGJ,OAAO,CAACI,UAAU;QAC/B,IAAI,IAAI,CAAClC,MAAM,EAAE;UACf;UACAmC,WAAW,GAAGL,OAAO,CAACK,WAAW,IAAI,CAAC;QACxC;MACF;IACF;IACA,OAAOnD,WAAW,CAACiD,UAAU,CAAC,IAAI,CAAC/B,OAAO,EAAEuB,KAAK,EAAE;MAAES,UAAU;MAAEE,IAAI,EAAE9C,GAAG,CAACwC,OAAO,EAAE,MAAM,CAAC;MAAEK;IAAY,CAAC,CAAC;EAC7G;EAEAE,SAASA,CAAA,EAAG;IACV,IAAI,CAACnC,OAAO,GAAGlB,WAAW,CAACsD,eAAe,CAAC,IAAI,CAACtC,MAAM,CAAC;IACvD,OAAO,IAAI,CAACE,OAAO;EACrB;EAEAqC,QAAQA,CAAA,EAAG;IACT,OAAOvD,WAAW,CAACuD,QAAQ,CAAC,IAAI,CAACrC,OAAO,EAAE,IAAI,CAACF,MAAM,CAAC;EACxD;EAEAwC,KAAKA,CAAA,EAAG,CAAC;EAETC,MAAMA,CAAA,EAAG,CAAC;EAEVC,OAAOA,CAAA,EAAG,CAAC;AAEf","ignoreList":[]}
@@ -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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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,CAAC,CAAC;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","ignoreList":[]}
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 as any);\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,UAAUA,CAAA,EAAG;IAClB,OAAOP,cAAc,CAACQ,gBAAgB,CAACN,eAAe,CAAC,CAACO,IAAI,CAAEC,QAAa,IAAK;MAC9E,OAAOZ,QAAQ,CAACa,EAAE,KAAK,KA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AAO,EAAEJ,OAAc,CAAC;MACxC,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","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseVariable","VariableEvents","OperationProvider","DeviceVariable","constructor","config","dataSet","isList","invoke","params","onSuccess","onError","operation","get","service","Promise","resolve","notify","BEFORE_INVOKE","then","data","SUCCESS","err","ERROR","AFTER_INVOKE"],"sources":["device-variable.ts"],"sourcesContent":["import { BaseVariable, VariableConfig, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport OperationProvider, { Input, Output } from './device/operation.provider';\n\nexport interface DeviceVariableConfig extends VariableConfig {\n service: string;\n operation: string;\n}\n\nexport class DeviceVariable extends BaseVariable<DeviceVariableConfig> {\n\n constructor(config: DeviceVariableConfig) {\n super(config);\n this.dataSet = this.isList ? [] : {};\n }\n\n invoke(params: any, onSuccess?: Function, onError?: Function): Promise<DeviceVariable> {\n super.invoke(params, onSuccess, onError);\n const operation = OperationProvider.get(`${this.config.service}.${this.config.operation}`);\n if (!operation) {\n return Promise.resolve(this);\n }\n this.notify(VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);\n\n return operation.invoke(this.params as Input, onSuccess, onError, this.config.operation, this)\n .then((data: Output) => {\n this.dataSet = data;\n this.config.onSuccess && this.config.onSuccess(this, this.dataSet);\n this.notify(VariableEvents.SUCCESS, [this, this.dataSet]);\n }, (err: Output) => {\n this.config.onError && this.config.onError(this, null);\n this.notify(VariableEvents.ERROR, [this, this.dataSet]);\n }).then(() => {\n this.not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C;IAC3D,CAAC,EAAGgB,GAAW,IAAK;MAClB,IAAI,CAACjB,MAAM,CAACM,OAAO,IAAI,IAAI,CAACN,MAAM,CAACM,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;MACtD,IAAI,CAACM,MAAM,CAAChB,cAAc,CAACsB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAACjB,OAAO,CAAC,CAAC;IACzD,CAAC,CAAC,CAACa,IAAI,CAAC,MAAM;MACZ,IAAI,CAACF,MAAM,CAAChB,cAAc,CAACuB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAAClB,OAAO,CAAC,CAAC;MAC9D,OAAO,IAAI;IACf,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
1
+ {"version":3,"names":["BaseVariable","VariableEvents","OperationProvider","DeviceVariable","constructor","config","dataSet","isList","invoke","params","onSuccess","onError","operation","get","service","Promise","resolve","notify","BEFORE_INVOKE","then","data","SUCCESS","err","ERROR","AFTER_INVOKE"],"sources":["device-variable.ts"],"sourcesContent":["import { BaseVariable, VariableConfig, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport OperationProvider, { Input, Output } from './device/operation.provider';\n\nexport interface DeviceVariableConfig extends VariableConfig {\n service: string;\n operation: string;\n}\n\nexport class DeviceVariable extends BaseVariable<DeviceVariableConfig> {\n\n constructor(config: DeviceVariableConfig) {\n super(config);\n this.dataSet = this.isList ? [] : {};\n }\n\n invoke(params: any, onSuccess?: Function, onError?: Function): Promise<DeviceVariable> {\n super.invoke(params, onSuccess, onError);\n const operation = OperationProvider.get(`${this.config.service}.${this.config.operation}`);\n if (!operation) {\n return Promise.resolve(this);\n }\n this.notify(VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);\n\n return operation.invoke(this.params as Input, onSuccess, onError, this.config.operation, this)\n .then((data: Output) => {\n this.dataSet = data;\n this.config.onSuccess && this.config.onSuccess(this, this.dataSet);\n this.notify(VariableEvents.SUCCESS, [this, this.dataSet]);\n }, (err: Output) => {\n this.config.onError && this.config.onError(this, null);\n this.notify(VariableEvents.ERROR, [this, this.dataSet]);\n }).then(() => {\n this.notify(VariableEvents.AFTER_INVOKE, [this, this.dataSet]);\n return this;\n });\n }\n}\n"],"mappings":"AAAA,SAASA,YAAY,EAAkBC,cAAc,QAAQ,mDAAmD;AAChH,OAAOC,iBAAiB,MAAyB,6BAA6B;AAO9E,OAAO,MAAMC,cAAc,SAASH,YAAY,CAAuB;EAErEI,WAAWA,CAACC,MAA4B,EAAE;IACxC,KAAK,CAACA,MAAM,CAAC;IACb,IAAI,CAACC,OAAO,GAAG,IAAI,CAACC,MAAM,GAAG,EAAE,GAAG,CAAC,CAAC;EACtC;EAEAC,MAAMA,CAACC,MAAW,EAAEC,SAAoB,EAAEC,OAAkB,EAA2B;IACrF,KAAK,CAACH,MAAM,CAACC,MAAM,EAAEC,SAAS,EAAEC,OAAO,CAAC;IACxC,MAAMC,SAAS,GAAGV,iBAAiB,CAACW,GAAG,CAAC,GAAG,IAAI,CAACR,MAAM,CAACS,OAAO,IAAI,IAAI,CAACT,MAAM,CAACO,SAAS,EAAE,CAAC;IAC1F,IAAI,CAACA,SAAS,EAAE;MACd,OAAOG,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;IAC9B;IACA,IAAI,CAACC,MAAM,CAAChB,cAAc,CAACiB,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,CAACZ,OAAO,CAAC,CAAC;IAE/D,OAAOM,SAAS,CAACJ,MAAM,CAAC,IAAI,CAACC,MAAM,EAAWC,SAAS,EAAEC,OAAO,EAAE,IAAI,CAACN,MAAM,CAACO,SAAS,EAAE,IAAI,CAAC,CAC3FO,IAAI,CAAEC,IAAY,IAAK;MACtB,IAAI,CAACd,OAAO,GAAGc,IAAI;MACnB,IAAI,CAACf,MAAM,CAACK,SAAS,IAAI,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,IAAI,EAAE,IAAI,CAACJ,OAAO,CAAC;MAClE,IAAI,CAACW,MA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