@wavemaker/app-rn-runtime 12.0.0-next.45031 → 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","View","Platform","Svg","VictoryStack","VictoryBar","VictoryChart","VictoryPie","VictoryLegend","VictoryAxis","Axis","Scale","orderBy","cloneDeep","findIndex","isString","AccessibilityWidgetType","getAccessibilityProps","WmStackChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmStackChartState","constructor","args","_defineProperty","WmStackChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","componentDidMount","setHeightWidthOnChart","getNegativeValuesArray","negativeValuesArray","state","data","filter","d","y","getPositiveValuesArray","positiveValuesArray","getData","negativeValues","concat","updateColors","colors","length","colorCodes","orderedData","map","i","index","getLegendColors","getBarChart","currentValue","yValues","minValue","Math","min","maxValue","max","cornerRadius","bottom","top","d1","x","push","createElement","key","name","barWidth","thickness","events","target","eventHandlers","OS","onClick","onSelect","bind","onPress","getColorCodes","reverse","getArcChart","colorScaleArray","o","radius","chartHeight","colorScale","startAngle","endAngle","standalone","origin","innerRadius","labels","getArcAxis","ticks","getTickValues","axisData","forEach","yunits","style","fontSize","paddingLeft","paddingRight","labelRadius","scale","getBaseScale","domain","getTicks","unshift","minvalue","event","datum","yaxisKey","yaxisdatakey","label","xaxisDatakeyArr","value","dataset","selectedItem","selectedChartItem","series","_dataObj","setTooltipPosition","tooltipXaxis","tooltipYaxis","isTooltipOpen","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","_extends","LINECHART","styles","root","onLayout","onViewLayoutChange","getTooltip","viewtype","theme","minDomain","height","padding","offsettop","offsetbottom","left","offsetleft","right","offsetright","containerComponent","title","fontFamily","subheading","orientation","gutter","getLegendView","crossAxis","tickLabels","fill","showyaxis","axisLabel","grid","stroke","axis","tickValues","tickFormat","t","abbreviateNumber","dependentAxis","horizontal"],"sources":["stack-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\nimport { VictoryStack, VictoryBar, VictoryChart, VictoryPie, VictoryLegend, VictoryAxis } from 'victory-native';\nimport { Axis, Scale } from 'victory-core';\nimport { orderBy, cloneDeep, findIndex, isString} from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport WmStackChartProps from './stack-chart.props';\nimport { DEFAULT_CLASS, WmStackChartStyles } from './stack-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\n\nexport class WmStackChartState extends BaseChartComponentState<WmStackChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmStackChart extends BaseChartComponent<WmStackChartProps, WmStackChartState, WmStackChartStyles> {\n constructor(props: WmStackChartProps) {\n super(props, DEFAULT_CLASS, new WmStackChartProps(), new WmStackChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.setHeightWidthOnChart();\n }\n\n getNegativeValuesArray() {\n let negativeValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y < 0);\n negativeValuesArray = orderBy(negativeValuesArray, 'y', 'desc');\n return negativeValuesArray;\n }\n\n getPositiveValuesArray() {\n let positiveValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y > 0);\n positiveValuesArray = orderBy(positiveValuesArray, 'y', 'asc');\n return positiveValuesArray;\n }\n\n getData() {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n return negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));\n }\n\n updateColors() {\n if (this.state.colors.length === 1 ) {\n return this.state.colors[0];\n } else {\n let colorCodes = cloneDeep(this.state.colors);\n if ( this.state.data.length > 0 ) {\n const orderedData = this.getData();\n this.state.data[0].map((d: any, i: number) => {\n let index = findIndex(orderedData, d);\n colorCodes[index] = this.state.colors[i];\n })\n return colorCodes;\n }\n }\n }\n\n getLegendColors(){\n if (this.state.colors.length === 1 ) {\n return this.state.colors[0];\n } else {\n let colorCodes = cloneDeep(this.state.colors);\n if ( this.state.data.length > 0 ) {\n const orderedData = orderBy(this.state.data[0], 'y', 'asc');;\n this.state.data[0].map((d: any, i: number) => {\n let index = findIndex(orderedData, d);\n colorCodes[index] = this.state.colors[i];\n })\n return colorCodes;\n }\n }\n }\n\n getBarChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n const data = this.getData();\n let currentValue = 0;\n const yValues = data.map((d: any) => d.y);\n const minValue = Math.min(...yValues);\n const maxValue = Math.max(...yValues);\n\n return data.map((d: any, i: number) => {\n let cornerRadius: any;\n if (d.y === minValue) {\n cornerRadius = d.y > 0 ? { bottom: 10 } : { top: 10 };\n } else if (d.y === maxValue) {\n cornerRadius = d.y > 0 ? { top: 10 } : { bottom: 10 };\n } else {\n cornerRadius = 0;\n } \n let d1: any = [];\n d.index = d.x;\n d.x = 0;\n d.y = d.y - currentValue;\n d1.push(d);\n currentValue = d.y < 0 && i === negativeValues.length -1 ? 0 : d.y + currentValue;\n return <VictoryBar key={props.name + '_' + i}\n cornerRadius={cornerRadius}\n barWidth={this.state.props.thickness}\n data={d1}\n events={[\n {\n target: 'data',\n eventHandlers: Platform.OS === 'web'\n ? { onClick: this.onSelect.bind(this) }\n : { onPress: this.onSelect.bind(this) }\n }\n ]}/>\n });\n }\n }\n\n private getColorCodes() {\n const colors = cloneDeep(this.updateColors());\n return isString(colors) ? [colors] : colors.reverse();\n }\n\n getArcChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n let data = cloneDeep(this.state.data[0]);\n const colorScaleArray = this.getColorCodes();\n const maxValue = Math.max(...data.map((o: any) => o.y));\n data = orderBy(data, 'y', 'desc');\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight - 50);\n return data.map((d: any, i: number) => {\n let d1: any = [];\n d1.push(d);\n d1.push({x: d.x, y: maxValue - d.y})\n return <VictoryPie key={props.name + '_' + i}\n radius={radius}\n colorScale={[colorScaleArray[i], '#fff0']}\n startAngle={-80}\n endAngle={80}\n cornerRadius={100}\n standalone={false}\n origin={{x: (this.state.chartWidth/2), y: (this.state.chartHeight - 50)}}\n innerRadius={radius - this.state.props.thickness}\n labels={[]}\n data={d1}/>\n });\n }\n }\n\n getArcAxis() {\n const ticks = this.getTickValues();\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight-50);\n const axisData: any = [];\n ticks.forEach((d: any, i: any) => {\n axisData.push({x: `${this.state.props.yunits}${d}`, y: 1})\n });\n return <VictoryPie\n style={{\n labels: {\n fontSize: 12, paddingLeft: 50, paddingRight: 80\n }}\n }\n startAngle={-90}\n endAngle={90}\n standalone={false}\n colorScale={['#fff0']}\n origin={{x: (this.state.chartWidth/2 - 5), y: (this.state.chartHeight - 50)}}\n labelRadius={radius - this.state.props.thickness - 20}\n data={axisData}\n />\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth\n } as WmStackChartState);\n }\n\n getTickValues() {\n let ticks: any = [];\n if (this.state.data[0].length) {\n let data = cloneDeep(this.state.data[0]);\n const maxValue = Math.max(...data.map((o: any) => o.y ? o.y : 0));\n const minValue = Math.min(...data.map((o: any) => o.y ? o.y : 0));\n const scale = Scale.getBaseScale({}, 'x');\n scale.domain([minValue > 0 ? 0 : minValue, maxValue]);\n ticks = Axis.getTicks({}, scale);\n ticks[ticks.length -1] = maxValue;\n if ( minValue < 0 ) {\n if (ticks[0] === 0) {\n ticks.unshift(minValue);\n } else {\n ticks[0] = minValue;\n }\n } else {\n ticks[0] = this.state.props.minvalue;\n }\n }\n return ticks;\n }\n\n onSelect(event: any, data: any){\n let props = this.state.props\n let index = data.datum.index\n let yaxisKey = props.yaxisdatakey;\n let label = this.state.xaxisDatakeyArr[index];\n let value = props.dataset[index][yaxisKey];\n let selectedItem = props.dataset[index];\n let selectedChartItem = [{series: 0, x: index, y: value,_dataObj: selectedItem}, index];\n const nativeEvent = event.nativeEvent;\n this.setTooltipPosition(nativeEvent);\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: index},\n } as WmStackChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmStackChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root} onLayout={this.onViewLayoutChange}\n >\n {this.getTooltip()}{\n props.viewtype === 'Bar' ?\n <VictoryChart\n theme={this.state.theme}\n minDomain={mindomain}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.state.chartWidth || 200}\n padding={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: props.offsetleft,\n right: props.offsetright\n }}\n >\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n style={{title: {\n fontFamily: \"'Helvetica Neue', 'Helvetica', sans-serif\",\n fontSize: 18\n }\n }}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView(this.getLegendColors())}\n <VictoryAxis crossAxis\n style={{\n tickLabels: { fill: this.state.props.showyaxis === false ? 'transparent' : '#000000', fontSize: 12, padding: this.state.props.thickness/2 + 5},\n axisLabel: { padding: (15 + this.state.props.thickness/2) },\n grid: {stroke: 'none'},\n axis: {stroke: 'none'},\n ticks: {stroke: 'none'}\n }}\n theme={this.state.theme}\n tickValues={this.getTickValues()}\n tickFormat={(t: any) => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`} dependentAxis />\n <VictoryStack\n colorScale={this.updateColors()}\n horizontal={true}\n >\n {\n this.getBarChart(props)\n }\n </VictoryStack>\n </VictoryChart> :\n <Svg width={this.state.chartWidth} height={this.state.chartHeight}>\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getArcChart(props)}\n {this.getArcAxis()}\n </Svg>\n }\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAE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E,aAAA,CAACrE,GAAG;MAAC6B,KAAK,EAAE,IAAI,CAACO,KAAK,CAACL,UAAW;MAACqH,MAAM,EAAE,IAAI,CAAChH,KAAK,CAACoD;IAAY,gBAChE3F,KAAA,CAAAwE,aAAA,CAAChE,aAAa;MACZkE,IAAI,EAAE,QAAS;MACfqF,kBAAkB,eAAE/J,KAAA,CAAAwE,aAAA,CAACrE,GAAG,MAAE,CAAE;MAC5B6J,KAAK,EAAE,CAACrI,KAAK,CAACqI,KAAK,EAAErI,KAAK,CAACuI,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACX5H,IAAI,EAAE,EAAG;MACT6G,KAAK,EAAE,IAAI,CAAC9G,KAAK,CAAC8G;IAAM,CACzB,CAAC,EACD,IAAI,CAAC9D,WAAW,CAAC5D,KAAK,CAAC,EACvB,IAAI,CAACwE,UAAU,CAAC,CACd,CAEH,CAAC;EAEX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Platform","Svg","VictoryStack","VictoryBar","VictoryChart","VictoryPie","VictoryLegend","VictoryAxis","Axis","Scale","orderBy","cloneDeep","findIndex","isString","AccessibilityWidgetType","getAccessibilityProps","WmStackChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmStackChartState","constructor","args","_defineProperty","WmStackChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","componentDidMount","setHeightWidthOnChart","getNegativeValuesArray","negativeValuesArray","state","data","filter","d","y","getPositiveValuesArray","positiveValuesArray","getData","negativeValues","concat","updateColors","colors","length","colorCodes","orderedData","map","i","index","getLegendColors","getBarChart","currentValue","yValues","minValue","Math","min","maxValue","max","cornerRadius","bottom","top","d1","x","push","createElement","key","name","barWidth","thickness","events","target","eventHandlers","OS","onClick","onSelect","bind","onPress","getColorCodes","reverse","getArcChart","prevValue","abs","portionToReverse","slice","reversedPortion","radius","chartHeight","angles","total","reduce","sum","item","round","startAngle","colorScale","endAngle","standalone","origin","innerRadius","labels","getArcAxis","ticks","getTickValues","axisData","forEach","yunits","style","fontSize","paddingLeft","paddingRight","labelRadius","o","scale","getBaseScale","domain","getTicks","unshift","minvalue","event","datum","yaxisKey","yaxisdatakey","label","xaxisDatakeyArr","value","dataset","selectedItem","selectedChartItem","series","_dataObj","setTooltipPosition","tooltipXaxis","tooltipYaxis","isTooltipOpen","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","_extends","LINECHART","styles","root","onLayout","onViewLayoutChange","getTooltip","viewtype","theme","minDomain","height","padding","offsettop","offsetbottom","left","offsetleft","right","offsetright","containerComponent","title","fontFamily","subheading","orientation","gutter","getLegendView","crossAxis","tickLabels","fill","showyaxis","axisLabel","grid","stroke","axis","tickValues","tickFormat","t","abbreviateNumber","dependentAxis","horizontal"],"sources":["stack-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\nimport { VictoryStack, VictoryBar, VictoryChart, VictoryPie, VictoryLegend, VictoryAxis } from 'victory-native';\nimport { Axis, Scale } from 'victory-core';\nimport { orderBy, cloneDeep, findIndex, isString} from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport WmStackChartProps from './stack-chart.props';\nimport { DEFAULT_CLASS, WmStackChartStyles } from './stack-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\n\nexport class WmStackChartState extends BaseChartComponentState<WmStackChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmStackChart extends BaseChartComponent<WmStackChartProps, WmStackChartState, WmStackChartStyles> {\n constructor(props: WmStackChartProps) {\n super(props, DEFAULT_CLASS, new WmStackChartProps(), new WmStackChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.setHeightWidthOnChart();\n }\n\n getNegativeValuesArray() {\n let negativeValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y < 0);\n negativeValuesArray = orderBy(negativeValuesArray, 'y', 'desc');\n return negativeValuesArray;\n }\n\n getPositiveValuesArray() {\n let positiveValuesArray = cloneDeep(this.state.data[0]).filter((d: any) => d.y > 0);\n positiveValuesArray = orderBy(positiveValuesArray, 'y', 'asc');\n return positiveValuesArray;\n }\n\n getData() {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n return negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));\n }\n\n updateColors() {\n if (this.state.colors.length === 1 ) {\n return this.state.colors[0];\n } else {\n let colorCodes = cloneDeep(this.state.colors);\n if ( this.state.data.length > 0 ) {\n const orderedData = this.getData();\n this.state.data[0].map((d: any, i: number) => {\n let index = findIndex(orderedData, d);\n colorCodes[index] = this.state.colors[i];\n })\n return colorCodes;\n }\n }\n }\n\n getLegendColors(){\n if (this.state.colors.length === 1 ) {\n return this.state.colors[0];\n } else {\n let colorCodes = cloneDeep(this.state.colors);\n if ( this.state.data.length > 0 ) {\n const orderedData = orderBy(this.state.data[0], 'y', 'asc');;\n this.state.data[0].map((d: any, i: number) => {\n let index = findIndex(orderedData, d);\n colorCodes[index] = this.state.colors[i];\n })\n return colorCodes;\n }\n }\n }\n\n getBarChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n const data = this.getData();\n let currentValue = 0;\n const yValues = data.map((d: any) => d.y);\n const minValue = Math.min(...yValues);\n const maxValue = Math.max(...yValues);\n\n return data.map((d: any, i: number) => {\n let cornerRadius: any;\n if (d.y === minValue) {\n cornerRadius = d.y > 0 ? { bottom: 10 } : { top: 10 };\n } else if (d.y === maxValue) {\n cornerRadius = d.y > 0 ? { top: 10 } : { bottom: 10 };\n } else {\n cornerRadius = 0;\n } \n let d1: any = [];\n d.index = d.x;\n d.x = 0;\n d.y = d.y - currentValue;\n d1.push(d);\n currentValue = d.y < 0 && i === negativeValues.length -1 ? 0 : d.y + currentValue;\n return <VictoryBar key={props.name + '_' + i}\n cornerRadius={cornerRadius}\n barWidth={this.state.props.thickness}\n data={d1}\n events={[\n {\n target: 'data',\n eventHandlers: Platform.OS === 'web'\n ? { onClick: this.onSelect.bind(this) }\n : { onPress: this.onSelect.bind(this) }\n }\n ]}/>\n });\n }\n }\n\n private getColorCodes() {\n const colors = cloneDeep(this.updateColors());\n return isString(colors) ? [colors] : colors.reverse();\n }\n\n getArcChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n let data = this.getData()\n let negativeValues = cloneDeep(this.getNegativeValuesArray());\n let currentValue = 0;\n let prevValue = 0\n data = data.map((d: any, i: number) => {\n d.y = d.y - currentValue\n prevValue = d.y\n d.y = Math.abs(d.y)\n d.index = d.x\n currentValue = prevValue < 0 && i === negativeValues.length -1 ? 0 : prevValue + currentValue;\n return d\n })\n data.reverse()\n if(negativeValues.length > 1){\n const portionToReverse = data.slice(-(negativeValues.length));\n const reversedPortion = portionToReverse.reverse();\n data = [...data.slice(0, -(negativeValues.length)), ...reversedPortion];\n }\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight - 50);\n const angles = data.map((d: any, i: number) => {\n let total = data.reduce((sum: number, item: any) => sum + item.y, 0);\n return Math.round((d.y / total) * 160);\n });\n let startAngle = 80\n return data.map((d: any, i: number) => {\n let d1: any = [];\n d1.push(d);\n if (i != 0) {\n startAngle = startAngle - angles[i - 1] + (angles[i - 1] / 10)\n }\n return <VictoryPie key={props.name + '_' + i}\n radius={radius}\n colorScale={[this.state.colors[d.index], '#fff0']}\n startAngle={angles ? startAngle : -80}\n endAngle={-80}\n cornerRadius={100}\n standalone={false}\n origin={{x: (this.state.chartWidth/2), y: (this.state.chartHeight - 50)}}\n innerRadius={radius - this.state.props.thickness}\n labels={[]}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n data={d1}/>\n });\n }\n }\n\n getArcAxis() {\n const ticks = this.getTickValues();\n const radius = Math.min(this.state.chartWidth/2, this.state.chartHeight-50);\n const axisData: any = [];\n ticks.forEach((d: any, i: any) => {\n axisData.push({x: `${this.state.props.yunits}${d}`, y: 1})\n });\n return <VictoryPie\n style={{\n labels: {\n fontSize: 12, paddingLeft: 50, paddingRight: 80\n }}\n }\n startAngle={-90}\n endAngle={90}\n standalone={false}\n colorScale={['#fff0']}\n origin={{x: (this.state.chartWidth/2 - 5), y: (this.state.chartHeight - 50)}}\n labelRadius={radius - this.state.props.thickness - 20}\n data={axisData}\n />\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth\n } as WmStackChartState);\n }\n\n getTickValues() {\n let ticks: any = [];\n if (this.state.data[0].length) {\n let data = cloneDeep(this.state.data[0]);\n const maxValue = Math.max(...data.map((o: any) => o.y ? o.y : 0));\n const minValue = Math.min(...data.map((o: any) => o.y ? o.y : 0));\n const scale = Scale.getBaseScale({}, 'x');\n scale.domain([minValue > 0 ? 0 : minValue, maxValue]);\n ticks = Axis.getTicks({}, scale);\n ticks[ticks.length -1] = maxValue;\n if ( minValue < 0 ) {\n if (ticks[0] === 0) {\n ticks.unshift(minValue);\n } else {\n ticks[0] = minValue;\n }\n } else {\n ticks[0] = this.state.props.minvalue;\n }\n }\n return ticks;\n }\n\n onSelect(event: any, data: any){\n let props = this.state.props\n let index = data.datum.index\n let yaxisKey = props.yaxisdatakey;\n let label = this.state.xaxisDatakeyArr[index];\n let value = props.dataset[index][yaxisKey];\n let selectedItem = props.dataset[index];\n let selectedChartItem = [{series: 0, x: index, y: value,_dataObj: selectedItem}, index];\n const nativeEvent = event.nativeEvent;\n this.setTooltipPosition(nativeEvent);\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: index},\n } as WmStackChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmStackChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root} onLayout={this.onViewLayoutChange}\n >\n {this.getTooltip()}{\n props.viewtype === 'Bar' ?\n <VictoryChart\n theme={this.state.theme}\n minDomain={mindomain}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.state.chartWidth || 200}\n padding={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: props.offsetleft,\n right: props.offsetright\n }}\n >\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n style={{title: {\n fontFamily: \"'Helvetica Neue', 'Helvetica', sans-serif\",\n fontSize: 18\n }\n }}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView(this.getLegendColors())}\n <VictoryAxis crossAxis\n style={{\n tickLabels: { fill: this.state.props.showyaxis === false ? 'transparent' : '#000000', fontSize: 12, padding: this.state.props.thickness/2 + 5},\n axisLabel: { padding: (15 + this.state.props.thickness/2) },\n grid: {stroke: 'none'},\n axis: {stroke: 'none'},\n ticks: {stroke: 'none'}\n }}\n theme={this.state.theme}\n tickValues={this.getTickValues()}\n tickFormat={(t: any) => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`} dependentAxis />\n <VictoryStack\n colorScale={this.updateColors()}\n horizontal={true}\n >\n {\n this.getBarChart(props)\n }\n </VictoryStack>\n </VictoryChart> :\n <Svg width={this.state.chartWidth} height={this.state.chartHeight}>\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getArcChart(props)}\n {this.getArcAxis()}\n </Svg>\n }\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAChE,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,YAAY,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,aAAa,EAAEC,WAAW,QAAQ,gBAAgB;AAC/G,SAASC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAC1C,SAASC,OAAO,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,QAAO,QAAQ;AAC/D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,aAAa,QAA4B,sBAAsB;AACxE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AAEvE,OAAO,MAAMC,iBAAiB,SAASD,uBAAuB,CAAoB;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBACnE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,YAAY,SAASN,kBAAkB,CAA2D;EACrHG,WAAWA,CAACI,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,iBAAiB,CAAC,CAAC,EAAE,IAAII,iBAAiB,CAAC,CAAC,CAAC;IAACG,eAAA,6BAoL1DG,CAAoB,IAAK;MAC7C,IAAIC,SAAS,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM,CAACC,KAAK;MAC1C,IAAI,CAACC,WAAW,CAAC;QACfC,UAAU,EAAEL;MACd,CAAsB,CAAC;IACzB,CAAC;EAxLD;EAEAM,iBAAiBA,CAAA,EAAG;IAClB,KAAK,CAACA,iBAAiB,CAAC,CAAC;IACzB,IAAI,CAACC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MAAM,GAAG,GAAG,IAAI,CAAC0E,gBAAgB,CAACD,CAAC,CAAC,GAAG,IAAI,CAACnJ,KAAK,CAACZ,KAAK,CAACsF,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC0E,gBAAgB,CAACD,CAAC,CAAC,EAAG;MAACE,aAAa;IAAA,CAAE,CAAC,eACxK5L,KAAA,CAAAwE,aAAA,CAACpE,YAAY;MACXkG,UAAU,EAAE,IAAI,CAACrD,YAAY,CAAC,CAAE;MAChC4I,UAAU,EAAE;IAAK,GAGf,IAAI,CAACnI,WAAW,CAAC/B,KAAK,CAEZ,CACF,CAAC,gBACf3B,KAAA,CAAAwE,aAAA,CAACrE,GAAG;MAAC6B,KAAK,EAAE,IAAI,CAACO,KAAK,CAACL,UAAW;MAAC+H,MAAM,EAAE,IAAI,CAAC1H,KAAK,CAACuD;IAAY,gBAChE9F,KAAA,CAAAwE,aAAA,CAAChE,aAAa;MACZkE,IAAI,EAAE,QAAS;MACf+F,kBAAkB,eAAEzK,KAAA,CAAAwE,aAAA,CAACrE,GAAG,MAAE,CAAE;MAC5BuK,KAAK,EAAE,CAAC/I,KAAK,CAAC+I,KAAK,EAAE/I,KAAK,CAACiJ,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACXtI,IAAI,EAAE,EAAG;MACTuH,KAAK,EAAE,IAAI,CAACxH,KAAK,CAACwH;IAAM,CACzB,CAAC,EACD,IAAI,CAACxE,WAAW,CAAC5D,KAAK,CAAC,EACvB,IAAI,CAACiF,UAAU,CAAC,CACd,CAEH,CAAC;EAEX;AACF","ignoreList":[]}
@@ -70,6 +70,7 @@ export default class WmAccordion extends BaseComponent {
70
70
  renderAccordionpane(item, index, accordionpanes = []) {
71
71
  const showIconOnLeft = this.styles.leftToggleIcon.root.width !== undefined;
72
72
  const isExpanded = this.state.isExpanded[index];
73
+ const titleIconStyles = this.theme.mergeStyle(this.styles.icon, this.styles.titleIcon);
73
74
  return item.props.show != false ? /*#__PURE__*/React.createElement(View, {
74
75
  style: this.styles.pane,
75
76
  key: item.props.title
@@ -79,7 +80,8 @@ export default class WmAccordion extends BaseComponent {
79
80
  style: [this.styles.header, index === 0 ? this.styles.firstHeader : null, index === accordionpanes.length - 1 && !isExpanded ? this.styles.lastHeader : null, isExpanded ? this.styles.activeHeader : {}],
80
81
  onPress: this.toggle.bind(this, index + 1, !isExpanded)
81
82
  }), this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded), item.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
82
- styles: this.styles.icon,
83
+ id: this.getTestId('icon'),
84
+ styles: titleIconStyles,
83
85
  name: item.props.name + '_icon',
84
86
  iconclass: item.props.iconclass
85
87
  }) : null, /*#__PURE__*/React.createElement(View, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","TouchableOpacity","View","Badge","isArray","BaseComponent","BaseComponentState","WmAccordionProps","DEFAULT_CLASS","WmIcon","isDefined","WmAccordionState","constructor","args","_defineProperty","WmAccordion","props","addAccordionPane","accordionPane","_this$state$isExpande","i","accordionPanes","findIndex","t","title","newIndex","state","isExpanded","find","v","toggle","defaultpaneindex","expand","accordionName","name","collapse","expandCollapseIcon","item","index","showBadge","showIcon","useChevron","widgetProps","badge","badgevalue","undefined","createElement","_extends","style","styles","activeBadge","badgetype","getTestProps","iconclass","flexDirection","id","getTestId","theme","mergeStyle","icon","activeIcon","renderAccordionpane","accordionpanes","showIconOnLeft","leftToggleIcon","root","width","show","pane","key","getTestPropsForAction","header","firstHeader","length","lastHeader","activeHeader","onPress","bind","flex","justifyContent","text","heading","activeHeaderTitle","accessibilityRole","description","subheading","expandedId","collapseId","closeothers","lastExpandedIndex","collapsedPane","hide","Promise","resolve","then","expandedPane","setState","invokeEventCallback","proxy","componentDidMount","renderWidget","children","_background","map"],"sources":["accordion.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { isArray } from 'lodash';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAccordionProps from './accordion.props';\nimport { DEFAULT_CLASS, WmAccordionStyles } from './accordion.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAccordionpane from './accordionpane/accordionpane.component';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAccordionState extends BaseComponentState<WmAccordionProps> {\n lastExpandedIndex = -1;\n isExpanded = [] as boolean[];\n}\n\nexport default class WmAccordion extends BaseComponent<WmAccordionProps, WmAccordionState, WmAccordionStyles> {\n public accordionPanes = [] as WmAccordionpane[];\n private newIndex = 0;\n\n constructor(props: WmAccordionProps) {\n super(props, DEFAULT_CLASS, new WmAccordionProps(), new WmAccordionState());\n }\n\n addAccordionPane(accordionPane: WmAccordionpane) {\n const i = this.accordionPanes.findIndex(t => t.props.title === accordionPane.props.title);\n if (i >= 0) {\n this.accordionPanes[i] = accordionPane;\n } else {\n this.accordionPanes[this.newIndex++] = accordionPane;\n }\n if (!(this.state.isExpanded?.find((v) => v))) {\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n }\n\n expand(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, true);\n }\n\n collapse(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, false);\n }\n\n expandCollapseIcon(item: any, index: number, showBadge = true, showIcon = true, useChevron = true, isExpanded = false) {\n const widgetProps = item.props;\n //@ts-ignore\n const badge = showBadge && widgetProps.badgevalue != undefined ? (\n <Badge style={[\n this.styles.badge,\n isExpanded ? this.styles.activeBadge: null,\n this.styles[widgetProps.badgetype || 'default']]}\n {...this.getTestProps('badge'+index)}>\n {widgetProps.badgevalue}\n </Badge>): null;\n let iconclass = null;\n if (useChevron) {\n iconclass = isExpanded ? 'wi wi-chevron-down' : 'wi wi-chevron-up';\n } else {\n iconclass = isExpanded ? 'wi wi-minus' : 'wi wi-plus';\n }\n return (<View style={{flexDirection: 'row'}}>\n {badge}\n {showIcon ? (\n <WmIcon\n id={this.getTestId('icon' + index)}\n styles={this.theme.mergeStyle({}, this.styles.icon, isExpanded ? this.styles.activeIcon : null)}\n name={'expand_collapse_icon'}\n iconclass={iconclass}></WmIcon>): null}\n </View>);\n }\n\n renderAccordionpane(item: any, index: any, accordionpanes: any[] = []) {\n const showIconOnLeft = this.styles.leftToggleIcon.root.width !== undefined;\n const isExpanded = this.state.isExpanded[index];\n return item.props.show != false ? (\n <View style={this.styles.pane} key={item.props.title}>\n <TouchableOpacity key={'accordionpane_' + (index + 1)}\n {...this.getTestPropsForAction(`header${index}`)}\n style={[this.styles.header,\n index === 0 ? this.styles.firstHeader: null,\n index === accordionpanes.length - 1 && !isExpanded ? this.styles.lastHeader: null,\n isExpanded ? this.styles.activeHeader : {}]}\n onPress={this.toggle.bind(this, index + 1, !isExpanded)}>\n {this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded)}\n {item.props.iconclass ? <WmIcon styles={this.styles.icon} name={item.props.name + '_icon'} iconclass={item.props.iconclass}></WmIcon>: null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading,\n isExpanded ? this.styles.activeHeaderTitle : {}]}\n {...this.getTestPropsForAction(`header${index}_title`)}\n accessibilityRole='header'>\n {isDefined(item.props.title) ? item.props.title : 'Title'}\n </Text>\n {item.props.description ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`header${index}_description`)}>{item.props.description}</Text>) : null }\n </View>\n {this.expandCollapseIcon(item, index, true, !showIconOnLeft, true, isExpanded)}\n </TouchableOpacity>\n {item}\n </View>\n ): null;\n }\n\n toggle(index: number, expand = true) {\n let expandedId = expand ? index : -1;\n let collapseId = expand ? -1 : index;\n if (expand && this.state.isExpanded[expandedId - 1]\n || !expand && this.state.isExpanded[collapseId - 1] === false) {\n return;\n }\n if (collapseId < 0 && this.state.props.closeothers) {\n collapseId = this.state.lastExpandedIndex;\n }\n const collapsedPane = this.accordionPanes[collapseId -1];\n collapsedPane?.hide();\n Promise.resolve().then(() => {\n const expandedPane = expandedId ? this.accordionPanes[expandedId - 1]: null;\n expandedPane?.show();\n this.setState((state) => {\n if (collapseId > 0 && collapsedPane) {\n state.isExpanded[collapseId - 1] = false;\n }\n if (expandedId > 0 && expandedPane) {\n state.isExpanded[expandedId - 1] = true;\n }\n return {\n lastExpandedIndex: expandedId,\n isExpanded: [...state.isExpanded]\n };\n }, () => {\n this.invokeEventCallback('onChange', [{},\n this.proxy,\n expandedId - 1,\n collapseId ? collapseId - 1 : null,\n expandedPane && expandedPane.props.name,\n collapsedPane && collapsedPane.props.name]);\n });\n }, () => {});\n }\n\n public componentDidMount(): void {\n super.componentDidMount();\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n\n renderWidget(props: WmAccordionProps) {\n const accordionpanes = props.children;\n const expandedId = this.state.lastExpandedIndex || 0;\n return (\n <View style={this.styles.root}>\n {this._background}\n {accordionpanes\n ? isArray(accordionpanes) && accordionpanes.length\n ? accordionpanes.map((item: any, index: any) => this.renderAccordionpane(item, index, accordionpanes))\n : this.renderAccordionpane(accordionpanes, 0)\n : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,SAASC,SAAS,QAAQ,sCAAsC;AAEhE,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CA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;MAAC8C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACgB;IAAK,GAC3B,IAAI,CAACqC,WAAW,EACdxC,cAAc,GACX1D,OAAO,CAAC0D,cAAc,CAAC,IAAIA,cAAc,CAACW,MAAM,GAC9CX,cAAc,CAACyC,GAAG,CAAC,CAAClE,IAAS,EAAEC,KAAU,KAAK,IAAI,CAACuB,mBAAmB,CAACxB,IAAI,EAAEC,KAAK,EAAEwB,cAAc,CAAC,CAAC,GACpG,IAAI,CAACD,mBAAmB,CAACC,cAAc,EAAE,CAAC,CAAC,GAC7C,IACF,CAAC;EAEb;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","TouchableOpacity","View","Badge","isArray","BaseComponent","BaseComponentState","WmAccordionProps","DEFAULT_CLASS","WmIcon","isDefined","WmAccordionState","constructor","args","_defineProperty","WmAccordion","props","addAccordionPane","accordionPane","_this$state$isExpande","i","accordionPanes","findIndex","t","title","newIndex","state","isExpanded","find","v","toggle","defaultpaneindex","expand","accordionName","name","collapse","expandCollapseIcon","item","index","showBadge","showIcon","useChevron","widgetProps","badge","badgevalue","undefined","createElement","_extends","style","styles","activeBadge","badgetype","getTestProps","iconclass","flexDirection","id","getTestId","theme","mergeStyle","icon","activeIcon","renderAccordionpane","accordionpanes","showIconOnLeft","leftToggleIcon","root","width","titleIconStyles","titleIcon","show","pane","key","getTestPropsForAction","header","firstHeader","length","lastHeader","activeHeader","onPress","bind","flex","justifyContent","text","heading","activeHeaderTitle","accessibilityRole","description","subheading","expandedId","collapseId","closeothers","lastExpandedIndex","collapsedPane","hide","Promise","resolve","then","expandedPane","setState","invokeEventCallback","proxy","componentDidMount","renderWidget","children","_background","map"],"sources":["accordion.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, TouchableOpacity, View } from 'react-native';\nimport { Badge } from 'react-native-paper';\nimport { isArray } from 'lodash';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAccordionProps from './accordion.props';\nimport { DEFAULT_CLASS, WmAccordionStyles } from './accordion.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAccordionpane from './accordionpane/accordionpane.component';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmAccordionState extends BaseComponentState<WmAccordionProps> {\n lastExpandedIndex = -1;\n isExpanded = [] as boolean[];\n}\n\nexport default class WmAccordion extends BaseComponent<WmAccordionProps, WmAccordionState, WmAccordionStyles> {\n public accordionPanes = [] as WmAccordionpane[];\n private newIndex = 0;\n\n constructor(props: WmAccordionProps) {\n super(props, DEFAULT_CLASS, new WmAccordionProps(), new WmAccordionState());\n }\n\n addAccordionPane(accordionPane: WmAccordionpane) {\n const i = this.accordionPanes.findIndex(t => t.props.title === accordionPane.props.title);\n if (i >= 0) {\n this.accordionPanes[i] = accordionPane;\n } else {\n this.accordionPanes[this.newIndex++] = accordionPane;\n }\n if (!(this.state.isExpanded?.find((v) => v))) {\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n }\n\n expand(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, true);\n }\n\n collapse(accordionName: string) {\n const i = this.accordionPanes.findIndex(t => t.props.name === accordionName);\n this.toggle(i + 1, false);\n }\n\n expandCollapseIcon(item: any, index: number, showBadge = true, showIcon = true, useChevron = true, isExpanded = false) {\n const widgetProps = item.props;\n //@ts-ignore\n const badge = showBadge && widgetProps.badgevalue != undefined ? (\n <Badge style={[\n this.styles.badge,\n isExpanded ? this.styles.activeBadge: null,\n this.styles[widgetProps.badgetype || 'default']]}\n {...this.getTestProps('badge'+index)}>\n {widgetProps.badgevalue}\n </Badge>): null;\n let iconclass = null;\n if (useChevron) {\n iconclass = isExpanded ? 'wi wi-chevron-down' : 'wi wi-chevron-up';\n } else {\n iconclass = isExpanded ? 'wi wi-minus' : 'wi wi-plus';\n }\n return (<View style={{flexDirection: 'row'}}>\n {badge}\n {showIcon ? (\n <WmIcon\n id={this.getTestId('icon' + index)}\n styles={this.theme.mergeStyle({}, this.styles.icon, isExpanded ? this.styles.activeIcon : null)}\n name={'expand_collapse_icon'}\n iconclass={iconclass}></WmIcon>): null}\n </View>);\n }\n\n renderAccordionpane(item: any, index: any, accordionpanes: any[] = []) {\n const showIconOnLeft = this.styles.leftToggleIcon.root.width !== undefined;\n const isExpanded = this.state.isExpanded[index];\n const titleIconStyles = this.theme.mergeStyle(this.styles.icon, this.styles.titleIcon)\n return item.props.show != false ? (\n <View style={this.styles.pane} key={item.props.title}>\n <TouchableOpacity key={'accordionpane_' + (index + 1)}\n {...this.getTestPropsForAction(`header${index}`)}\n style={[this.styles.header,\n index === 0 ? this.styles.firstHeader: null,\n index === accordionpanes.length - 1 && !isExpanded ? this.styles.lastHeader: null,\n isExpanded ? this.styles.activeHeader : {}]}\n onPress={this.toggle.bind(this, index + 1, !isExpanded)}>\n {this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded)}\n {item.props.iconclass ? <WmIcon id={this.getTestId('icon')} styles={titleIconStyles} name={item.props.name + '_icon'} iconclass={item.props.iconclass}></WmIcon>: null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading,\n isExpanded ? this.styles.activeHeaderTitle : {}]}\n {...this.getTestPropsForAction(`header${index}_title`)}\n accessibilityRole='header'>\n {isDefined(item.props.title) ? item.props.title : 'Title'}\n </Text>\n {item.props.description ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`header${index}_description`)}>{item.props.description}</Text>) : null }\n </View>\n {this.expandCollapseIcon(item, index, true, !showIconOnLeft, true, isExpanded)}\n </TouchableOpacity>\n {item}\n </View>\n ): null;\n }\n\n toggle(index: number, expand = true) {\n let expandedId = expand ? index : -1;\n let collapseId = expand ? -1 : index;\n if (expand && this.state.isExpanded[expandedId - 1]\n || !expand && this.state.isExpanded[collapseId - 1] === false) {\n return;\n }\n if (collapseId < 0 && this.state.props.closeothers) {\n collapseId = this.state.lastExpandedIndex;\n }\n const collapsedPane = this.accordionPanes[collapseId -1];\n collapsedPane?.hide();\n Promise.resolve().then(() => {\n const expandedPane = expandedId ? this.accordionPanes[expandedId - 1]: null;\n expandedPane?.show();\n this.setState((state) => {\n if (collapseId > 0 && collapsedPane) {\n state.isExpanded[collapseId - 1] = false;\n }\n if (expandedId > 0 && expandedPane) {\n state.isExpanded[expandedId - 1] = true;\n }\n return {\n lastExpandedIndex: expandedId,\n isExpanded: [...state.isExpanded]\n };\n }, () => {\n this.invokeEventCallback('onChange', [{},\n this.proxy,\n expandedId - 1,\n collapseId ? collapseId - 1 : null,\n expandedPane && expandedPane.props.name,\n collapsedPane && collapsedPane.props.name]);\n });\n }, () => {});\n }\n\n public componentDidMount(): void {\n super.componentDidMount();\n this.toggle(this.state.props.defaultpaneindex + 1);\n }\n\n renderWidget(props: WmAccordionProps) {\n const accordionpanes = props.children;\n const expandedId = this.state.lastExpandedIndex || 0;\n return (\n <View style={this.styles.root}>\n {this._background}\n {accordionpanes\n ? isArray(accordionpanes) && accordionpanes.length\n ? accordionpanes.map((item: any, index: any) => this.renderAccordionpane(item, index, accordionpanes))\n : this.renderAccordionpane(accordionpanes, 0)\n : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,SAASC,SAAS,QAAQ,sCAAsC;AAEhE,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;EAAAM,YAAA,GAAAC,IAA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AAQ;IACrC,MAAMf,UAAU,GAAG,IAAI,CAAC9D,KAAK,CAACiE,iBAAiB,IAAI,CAAC;IACpD,oBACI5F,KAAA,CAAA+C,aAAA,CAAC5C,IAAI;MAAC8C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACgB;IAAK,GAC3B,IAAI,CAACuC,WAAW,EACd1C,cAAc,GACX1D,OAAO,CAAC0D,cAAc,CAAC,IAAIA,cAAc,CAACa,MAAM,GAC9Cb,cAAc,CAAC2C,GAAG,CAAC,CAACpE,IAAS,EAAEC,KAAU,KAAK,IAAI,CAACuB,mBAAmB,CAACxB,IAAI,EAAEC,KAAK,EAAEwB,cAAc,CAAC,CAAC,GACpG,IAAI,CAACD,mBAAmB,CAACC,cAAc,EAAE,CAAC,CAAC,GAC7C,IACF,CAAC;EAEb;AACF","ignoreList":[]}
@@ -90,6 +90,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
90
90
  borderColor: themeVariables.accordionIconColor,
91
91
  backgroundColor: themeVariables.transparent
92
92
  },
93
+ titleIcon: {},
93
94
  default: {},
94
95
  success: {
95
96
  backgroundColor: themeVariables.labelSuccessColor
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","borderWidth","borderStyle","borderColor","accordionBorderColor","borderRadius","backgroundColor","transparent","text","color","accordionTitleColor","fontSize","firstHeader","borderTopLeftRadius","borderTopRightRadius","pane","header","borderBottomWidth","accordionHeaderBgColor","padding","flexDirection","justifyContent","lastHeader","borderBottomLeftRadius","borderBottomRightRadius","activeHeader","accordionActiveHeaderBgColor","activeHeaderTitle","accordionActiveHeaderTextColor","subheading","icon","alignSelf","height","accordionIconColor","fontWeight","leftToggleIcon","rightToggleIcon","activeIcon","activeBadge","badge","marginRight","alignContent","default","success","labelSuccessColor","danger","labelDangerColor","warning","labelWarningColor","info","labelInfoColor","primary","labelPrimaryColor","OS","textAlign","marginBottom"],"sources":["accordion.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { TextStyle, ViewStyle, Platform } from 'react-native';\nimport Color from 'color';\n\nexport type WmAccordionStyles = BaseStyles & {\n icon: WmIconStyles,\n rightToggleIcon: WmIconStyles,\n leftToggleIcon: WmIconStyles,\n activeIcon: WmIconStyles,\n pane: AllStyle,\n badge: AllStyle,\n activeBadge: AllStyle,\n firstHeader: ViewStyle,\n lastHeader: ViewStyle,\n header: AllStyle,\n activeHeader: AllStyle,\n activeHeaderTitle: TextStyle,\n subheading: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-accordion';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAccordionStyles = defineStyles({\n root: {\n width: '100%',\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: themeVariables.accordionBorderColor,\n borderRadius: 6,\n backgroundColor: themeVariables.transparent\n },\n text: {\n color: themeVariables.accordionTitleColor,\n fontSize: 18\n },\n firstHeader: {\n borderTopLeftRadius: 6,\n borderTopRightRadius: 6\n },\n pane : {},\n header: {\n borderBottomWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.accordionBorderColor,\n backgroundColor: themeVariables.accordionHeaderBgColor,\n padding: 8,\n flexDirection: 'row',\n justifyContent: 'center'\n },\n lastHeader: {\n borderBottomWidth: 0,\n borderBottomLeftRadius: 6,\n borderBottomRightRadius: 6\n },\n activeHeader: {\n borderColor: themeVariables.accordionActiveHeaderBgColor,\n backgroundColor: themeVariables.accordionActiveHeaderBgColor\n },\n activeHeaderTitle: {\n color: themeVariables.accordionActiveHeaderTextColor\n },\n subheading: {\n\n },\n icon: {\n root: {\n alignSelf: 'auto',\n width: 24,\n height: 24,\n borderRadius: 24,\n justifyContent: 'center'\n },\n icon: {\n color: themeVariables.accordionIconColor,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16,\n fontWeight: 'bold'\n }\n } as WmIconStyles,\n leftToggleIcon: {\n root: {}\n } as WmIconStyles,\n rightToggleIcon: {\n root: {}\n } as WmIconStyles,\n activeIcon : {\n root: {\n borderColor: themeVariables.accordionActiveHeaderTextColor,\n },\n icon: {\n color: themeVariables.accordionActiveHeaderTextColor\n }\n } as WmIconStyles,\n activeBadge: {\n borderColor: themeVariables.accordionActiveHeaderTextColor,\n color: themeVariables.accordionActiveHeaderTextColor\n },\n badge: {\n color: themeVariables.accordionIconColor,\n fontSize: 14,\n marginRight: 4,\n width: 24,\n height: 24,\n borderRadius: 12,\n alignContent: 'center',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: themeVariables.accordionIconColor,\n backgroundColor: themeVariables.transparent\n },\n default: {},\n success: {\n backgroundColor: themeVariables.labelSuccessColor\n },\n danger: {\n backgroundColor: themeVariables.labelDangerColor\n },\n warning: {\n backgroundColor: themeVariables.labelWarningColor\n },\n info: {\n backgroundColor: themeVariables.labelInfoColor\n },\n primary: {\n backgroundColor: themeVariables.labelPrimaryColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n text:{\n textAlign:'right',\n } \n }:{\n text:{\n textAlign:'left',\n } \n });\n addStyle('app-accordion1', '', {\n pane: {\n marginBottom: 0\n },\n leftToggleIcon: {\n root: {\n width: 1\n }\n },\n icon: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)'\n }\n }\n } as WmAccordionStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAA+BC,QAAQ,QAAQ,cAAc;AAmB7D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC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AQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAED,QAAQ,CAAC4D,EAAE,IAAE,KAAK,GAAC;IACtD7C,IAAI,EAAC;MACD8C,SAAS,EAAC;IACd;EACF,CAAC,GAAC;IACA9C,IAAI,EAAC;MACH8C,SAAS,EAAC;IACZ;EACF,CAAC,CAAC;EACFzD,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAC7BkB,IAAI,EAAE;MACJwC,YAAY,EAAE;IAChB,CAAC;IACDpB,cAAc,EAAE;MACdpC,IAAI,EAAE;QACJC,KAAK,EAAE;MACT;IACF,CAAC;IACD8B,IAAI,EAAE;MACJ/B,IAAI,EAAE;QACJO,eAAe,EAAE;MACnB;IACF;EACF,CAAsB,CAAC;AACzB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","borderWidth","borderStyle","borderColor","accordionBorderColor","borderRadius","backgroundColor","transparent","text","color","accordionTitleColor","fontSize","firstHeader","borderTopLeftRadius","borderTopRightRadius","pane","header","borderBottomWidth","accordionHeaderBgColor","padding","flexDirection","justifyContent","lastHeader","borderBottomLeftRadius","borderBottomRightRadius","activeHeader","accordionActiveHeaderBgColor","activeHeaderTitle","accordionActiveHeaderTextColor","subheading","icon","alignSelf","height","accordionIconColor","fontWeight","leftToggleIcon","rightToggleIcon","activeIcon","activeBadge","badge","marginRight","alignContent","titleIcon","default","success","labelSuccessColor","danger","labelDangerColor","warning","labelWarningColor","info","labelInfoColor","primary","labelPrimaryColor","OS","textAlign","marginBottom"],"sources":["accordion.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { TextStyle, ViewStyle, Platform } from 'react-native';\nimport Color from 'color';\n\nexport type WmAccordionStyles = BaseStyles & {\n icon: WmIconStyles,\n rightToggleIcon: WmIconStyles,\n leftToggleIcon: WmIconStyles,\n activeIcon: WmIconStyles,\n pane: AllStyle,\n badge: AllStyle,\n activeBadge: AllStyle,\n firstHeader: ViewStyle,\n lastHeader: ViewStyle,\n header: AllStyle,\n activeHeader: AllStyle,\n activeHeaderTitle: TextStyle,\n subheading: AllStyle,\n titleIcon: WmIconStyles\n};\n\nexport const DEFAULT_CLASS = 'app-accordion';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmAccordionStyles = defineStyles({\n root: {\n width: '100%',\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: themeVariables.accordionBorderColor,\n borderRadius: 6,\n backgroundColor: themeVariables.transparent\n },\n text: {\n color: themeVariables.accordionTitleColor,\n fontSize: 18\n },\n firstHeader: {\n borderTopLeftRadius: 6,\n borderTopRightRadius: 6\n },\n pane : {},\n header: {\n borderBottomWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.accordionBorderColor,\n backgroundColor: themeVariables.accordionHeaderBgColor,\n padding: 8,\n flexDirection: 'row',\n justifyContent: 'center'\n },\n lastHeader: {\n borderBottomWidth: 0,\n borderBottomLeftRadius: 6,\n borderBottomRightRadius: 6\n },\n activeHeader: {\n borderColor: themeVariables.accordionActiveHeaderBgColor,\n backgroundColor: themeVariables.accordionActiveHeaderBgColor\n },\n activeHeaderTitle: {\n color: themeVariables.accordionActiveHeaderTextColor\n },\n subheading: {\n\n },\n icon: {\n root: {\n alignSelf: 'auto',\n width: 24,\n height: 24,\n borderRadius: 24,\n justifyContent: 'center'\n },\n icon: {\n color: themeVariables.accordionIconColor,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16,\n fontWeight: 'bold'\n }\n } as WmIconStyles,\n leftToggleIcon: {\n root: {}\n } as WmIconStyles,\n rightToggleIcon: {\n root: {}\n } as WmIconStyles,\n activeIcon : {\n root: {\n borderColor: themeVariables.accordionActiveHeaderTextColor,\n },\n icon: {\n color: themeVariables.accordionActiveHeaderTextColor\n }\n } as WmIconStyles,\n activeBadge: {\n borderColor: themeVariables.accordionActiveHeaderTextColor,\n color: themeVariables.accordionActiveHeaderTextColor\n },\n badge: {\n color: themeVariables.accordionIconColor,\n fontSize: 14,\n marginRight: 4,\n width: 24,\n height: 24,\n borderRadius: 12,\n alignContent: 'center',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: themeVariables.accordionIconColor,\n backgroundColor: themeVariables.transparent\n },\n titleIcon: {} as WmIconStyles,\n default: {},\n success: {\n backgroundColor: themeVariables.labelSuccessColor\n },\n danger: {\n backgroundColor: themeVariables.labelDangerColor\n },\n warning: {\n backgroundColor: themeVariables.labelWarningColor\n },\n info: {\n backgroundColor: themeVariables.labelInfoColor\n },\n primary: {\n backgroundColor: themeVariables.labelPrimaryColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n text:{\n textAlign:'right',\n } \n }:{\n text:{\n textAlign:'left',\n } \n });\n addStyle('app-accordion1', '', {\n pane: {\n marginBottom: 0\n },\n leftToggleIcon: {\n root: {\n width: 1\n }\n },\n icon: {\n root: {\n backgroundColor: 'rgba(255, 255, 255, 0.1)'\n }\n }\n } as WmAccordionStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAA+BC,QAAQ,QAAQ,cAAc;AAoB7D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAgC,GAAGN,YAAY,CAAC;IAClDO,IAAI,EAAE;MACJC,KAAK,EAAE,MAAM;MACbC,WAAW,EAAE,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MAAM,EAAE,EAAE,EAAED,QAAQ,CAAC6D,EAAE,IAAE,KAAK,GAAC;IACtD9C,IAAI,EAAC;MACD+C,SAAS,EAAC;IACd;EACF,CAAC,GAAC;IACA/C,IAAI,EAAC;MACH+C,SAAS,EAAC;IACZ;EACF,CAAC,CAAC;EACF1D,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAC7BkB,IAAI,EAAE;MACJyC,YAAY,EAAE;IAChB,CAAC;IACDrB,cAAc,EAAE;MACdpC,IAAI,EAAE;QACJC,KAAK,EAAE;MACT;IACF,CAAC;IACD8B,IAAI,EAAE;MACJ/B,IAAI,EAAE;QACJO,eAAe,EAAE;MACnB;IACF;EACF,CAAsB,CAAC;AACzB,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmGridcolumnProps","DEFAULT_CLASS","WmGridcolumnState","WmGridcolumn","constructor","props","renderWidget","styles","root","height","overflow","undefined","theme","getStyle","xscolumnwidth","columnwidth","createElement","style","width","_background","children"],"sources":["gridcolumn.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmGridcolumnProps from './gridcolumn.props';\nimport { DEFAULT_CLASS, WmGridColumnStyles } from './gridcolumn.styles';\n\nexport class WmGridcolumnState extends BaseComponentState<WmGridcolumnProps> {\n\n}\n\nexport default class WmGridcolumn extends BaseComponent<WmGridcolumnProps, WmGridcolumnState, WmGridColumnStyles> {\n\n constructor(props: WmGridcolumnProps) {\n super(props, DEFAULT_CLASS, new WmGridcolumnProps());\n }\n\n renderWidget(props: WmGridcolumnProps) {\n if (this.styles.root.height) {\n this.styles.root.overflow = undefined;\n }\n const styles = this.theme.getStyle(`col-xs-${props.xscolumnwidth} col-sm-${props.columnwidth}`);\n return (\n <View style={[{width: \"100%\"}, styles.root, this.styles.root]}>{this._background}{props.children}</View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AAEvE,OAAO,MAAMC,iBAAiB,SAASH,kBAAkB,CAAoB;AAI7E,eAAe,MAAMI,YAAY,SAASL,aAAa,CAA2D;EAEhHM,WAAWA,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,iBAAiB,CAAC,CAAC,CAAC;EACtD;EAEAM,YAAYA,CAACD,KAAwB,EAAE;IACrC,IAAI,IAAI,CAACE,MAAM,CAACC,IAAI,CAACC,MAAM,EAAE;MAC3B,IAAI,CAACF,MAAM,CAACC,IAAI,CAACE,QAAQ,GAAGC,SAAS;IACvC;IACA,MAAMJ,MAAM,GAAG,IAAI,CAACK,KAAK,CAACC,QAAQ,CAAE,UAASR,KAAK,CAACS,aAAc,YAAWT,KAAK,CAACU,WAAY,EAAC,CAAC;IAChG,oBACEnB,KAAA,CAAAoB,aAAA,CAACnB,IAAI;MAACoB,KAAK,EAAE,CAAC;QAACC,KAAK,EAAE;MAAM,CAAC,EAAEX,MAAM,CAACC,IAAI,EAAE,IAAI,CAACD,MAAM,CAACC,IAAI;IAAE,GAAE,IAAI,CAACW,WAAW,EAAEd,KAAK,CAACe,QAAe,CAAC;EAE5G;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmGridcolumnProps","DEFAULT_CLASS","WmGridcolumnState","WmGridcolumn","constructor","props","renderWidget","styles","root","height","overflow","undefined","theme","getStyle","xscolumnwidth","columnwidth","createElement","style","width","_background","children"],"sources":["gridcolumn.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmGridcolumnProps from './gridcolumn.props';\nimport { DEFAULT_CLASS, WmGridColumnStyles } from './gridcolumn.styles';\n\nexport class WmGridcolumnState extends BaseComponentState<WmGridcolumnProps> {\n\n}\n\nexport default class WmGridcolumn extends BaseComponent<WmGridcolumnProps, WmGridcolumnState, WmGridColumnStyles> {\n\n constructor(props: WmGridcolumnProps) {\n super(props, DEFAULT_CLASS, new WmGridcolumnProps());\n }\n\n renderWidget(props: WmGridcolumnProps) {\n if (this.styles.root.height) {\n this.styles.root.overflow = undefined;\n }\n const styles = this.theme.getStyle(`col-xs-${props.xscolumnwidth} col-sm-${props.columnwidth}`);\n return (\n <View style={[{width: \"100%\"}, styles.root, this.styles.root]}>{this._background}{props.children}</View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AAEvE,OAAO,MAAMC,iBAAiB,SAASH,kBAAkB,CAAoB;AAI7E,eAAe,MAAMI,YAAY,SAASL,aAAa,CAA2D;EAEhHM,WAAWA,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,iBAAiB,CAAC,CAAC,CAAC;EACtD;EAEAM,YAAYA,CAACD,KAAwB,EAAE;IACrC,IAAI,IAAI,CAACE,MAAM,CAACC,IAAI,CAACC,MAAM,EAAE;MAC3B,IAAI,CAACF,MAAM,CAACC,IAAI,CAACE,QAAQ,GAAGC,SAAS;IACvC;IACA,MAAMJ,MAAM,GAAG,IAAI,CAACK,KAAK,CAACC,QAAQ,CAAC,UAAUR,KAAK,CAACS,aAAa,YAAYT,KAAK,CAACU,WAAW,EAAE,CAAC;IAChG,oBACEnB,KAAA,CAAAoB,aAAA,CAACnB,IAAI;MAACoB,KAAK,EAAE,CAAC;QAACC,KAAK,EAAE;MAAM,CAAC,EAAEX,MAAM,CAACC,IAAI,EAAE,IAAI,CAACD,MAAM,CAACC,IAAI;IAAE,GAAE,IAAI,CAACW,WAAW,EAAEd,KAAK,CAACe,QAAe,CAAC;EAE5G;AACF","ignoreList":[]}
@@ -52,11 +52,12 @@ export default class WmPanel extends BaseComponent {
52
52
  expandCollapseIcon(isExpanded) {
53
53
  const widgetProps = this.state.props;
54
54
  //@ts-ignore
55
- const badge = widgetProps.badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, {
55
+ const badge = widgetProps.badgevalue != undefined ? /*#__PURE__*/React.createElement(Badge, _extends({
56
56
  style: [this.styles.badge, this.styles[widgetProps.badgetype || 'default']]
57
- }, widgetProps.badgevalue) : null;
57
+ }, this.getTestProps('badge')), widgetProps.badgevalue) : null;
58
58
  const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';
59
59
  const expandCollapseIcon = widgetProps.collapsible ? /*#__PURE__*/React.createElement(WmIcon, {
60
+ id: this.getTestId('collapseicon'),
60
61
  name: 'expand_collapse_icon',
61
62
  styles: this.styles.toggleIcon,
62
63
  iconclass: iconclass
@@ -76,6 +77,7 @@ export default class WmPanel extends BaseComponent {
76
77
  accessibilityRole: "header"
77
78
  }), props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
78
79
  styles: this.styles.icon,
80
+ id: this.getTestId('icon'),
79
81
  name: props.name + '_icon',
80
82
  iconclass: props.iconclass,
81
83
  iconheight: props.iconheight,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","WmPanelState","constructor","args","_defineProperty","WmPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","onPanelPress","collapsible","eventName","expanded","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","style","styles","badgetype","iconclass","name","toggleIcon","flexDirection","alignItems","renderHeader","_extends","getTestPropsForAction","header","onPress","accessibilityRole","iconurl","icon","iconheight","iconwidth","iconmargin","flex","justifyContent","text","heading","title","subheading","renderPane","content","display","maxHeight","overflow","close","renderWidget","root","_background","Fragment","children"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\nimport { isUndefined } from 'lodash';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { CollapsiblePane } from './collapsible-pane.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress() {\n if (!this.state.props.collapsible) {\n return;\n }\n const eventName = this.state.props.expanded ? 'onCollapse' : 'onExpand';\n this.updateState({\n props: {\n expanded: !this.state.props.expanded\n }\n } as WmPanelState);\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row', alignItems: 'center'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderHeader() {\n const props = this.state.props;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction(`header`)}\n style={[this.styles.header]}\n onPress={this.onPanelPress.bind(this)}\n accessibilityRole='header'>\n {props.iconclass || props.iconurl ? \n <WmIcon styles={this.styles.icon} \n name={props.name + '_icon'}\n iconclass={props.iconclass}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n /> : null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading]}\n {...this.getTestPropsForAction(`header_title`)}>\n {isUndefined(props.title) ? 'Title' : props.title}\n </Text>\n {props.subheading ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`subheader`)}>{props.subheading}</Text>) : null }\n </View>\n {this.expandCollapseIcon(props.expanded)}\n </TouchableOpacity>\n );\n }\n\n renderPane(content: React.ReactNode) {\n const expanded = this.state.props.expanded;\n return isWebPreviewMode() || this.styles.header.display == \"none\" ? \n (<View style={expanded ? {} : {maxHeight: 0, overflow: 'hidden'}}>\n {content}\n </View>) :\n (<CollapsiblePane close={!expanded}>\n {content}\n </CollapsiblePane>);\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EA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d,qBAAqB,CAAE,WAAU,CAAC,GAAGhC,KAAK,CAAC8C,UAAiB,CAAC,GAAI,IAC1E,CAAC,EACN,IAAI,CAAC/B,kBAAkB,CAACf,KAAK,CAACa,QAAQ,CACvB,CAAC;EAEvB;EAEAkC,UAAUA,CAACC,OAAwB,EAAE;IACnC,MAAMnC,QAAQ,GAAG,IAAI,CAACR,KAAK,CAACL,KAAK,CAACa,QAAQ;IAC1C,OAAOpB,gBAAgB,CAAC,CAAC,IAAI,IAAI,CAAC8B,MAAM,CAACU,MAAM,CAACgB,OAAO,IAAI,MAAM,gBAC9DnE,KAAA,CAAAuC,aAAA,CAACrC,IAAI;MAACsC,KAAK,EAAET,QAAQ,GAAG,CAAC,CAAC,GAAG;QAACqC,SAAS,EAAE,CAAC;QAAEC,QAAQ,EAAE;MAAQ;IAAE,GAC9DH,OACG,CAAC,gBACNlE,KAAA,CAAAuC,aAAA,CAAC3B,eAAe;MAAC0D,KAAK,EAAE,CAACvC;IAAS,GAChCmC,OACc,CAAE;EACvB;EAEAK,YAAYA,CAACrD,KAAmB,EAAE;IAChC,oBAAQlB,KAAA,CAAAuC,aAAA,CAACrC,IAAI;MAACsC,KAAK,EAAE,IAAI,CAACC,MAAM,CAAC+B;IAAK,GACnC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACzB,YAAY,CAAC,CAAC,EACnB,IAAI,CAACiB,UAAU,eACdjE,KAAA,CAAAuC,aAAA,CAAAvC,KAAA,CAAA0E,QAAA,QACC,IAAI,CAACrD,aAAa,CAACH,KAAK,CAAC,eAC1BlB,KAAA,CAAAuC,aAAA,CAACrC,IAAI,QAAEgB,KAAK,CAACyD,QAAe,CAC1B,CACH,CACG,CAAC;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","WmPanelState","constructor","args","_defineProperty","WmPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","onPanelPress","collapsible","eventName","expanded","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","_extends","style","styles","badgetype","getTestProps","iconclass","id","getTestId","name","toggleIcon","flexDirection","alignItems","renderHeader","getTestPropsForAction","header","onPress","accessibilityRole","iconurl","icon","iconheight","iconwidth","iconmargin","flex","justifyContent","text","heading","title","subheading","renderPane","content","display","maxHeight","overflow","close","renderWidget","root","_background","Fragment","children"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\nimport { isUndefined } from 'lodash';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { CollapsiblePane } from './collapsible-pane.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress() {\n if (!this.state.props.collapsible) {\n return;\n }\n const eventName = this.state.props.expanded ? 'onCollapse' : 'onExpand';\n this.updateState({\n props: {\n expanded: !this.state.props.expanded\n }\n } as WmPanelState);\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]} {...this.getTestProps('badge')}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon id={this.getTestId('collapseicon')} name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row', alignItems: 'center'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderHeader() {\n const props = this.state.props;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction(`header`)}\n style={[this.styles.header]}\n onPress={this.onPanelPress.bind(this)}\n accessibilityRole='header'>\n {props.iconclass || props.iconurl ? \n <WmIcon styles={this.styles.icon}\n id={this.getTestId('icon')} \n name={props.name + '_icon'}\n iconclass={props.iconclass}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n /> : null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n <Text style={[\n this.styles.text,\n this.styles.heading]}\n {...this.getTestPropsForAction(`header_title`)}>\n {isUndefined(props.title) ? 'Title' : props.title}\n </Text>\n {props.subheading ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`subheader`)}>{props.subheading}</Text>) : null }\n </View>\n {this.expandCollapseIcon(props.expanded)}\n </TouchableOpacity>\n );\n }\n\n renderPane(content: React.ReactNode) {\n const expanded = this.state.props.expanded;\n return isWebPreviewMode() || this.styles.header.display == \"none\" ? \n (<View style={expanded ? {} : {maxHeight: 0, overflow: 'hidden'}}>\n {content}\n </View>) :\n (<CollapsiblePane close={!expanded}>\n {content}\n </CollapsiblePane>);\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAC3D,SAASC,WAAW,QAAQ,QAAQ;AACpC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,OAAO,MAAMC,YAAY,SAASN,kBAAkB,CAAe;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BAC/C,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,OAAO,SAASX,aAAa,CAA4C;EAC5FQ,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;EACjD;EAEAU,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC5C;EAEAC,aAAaA,CAACH,KAAmB,EAAE;IACjC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAiB,CAAC;QACpB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAACJ,KAAK,EAAE,IAAI,CAACC,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CA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CAAAuC,aAAA,CAAAvC,KAAA,CAAA6E,QAAA,QACC,IAAI,CAACxD,aAAa,CAACH,KAAK,CAAC,eAC1BlB,KAAA,CAAAuC,aAAA,CAACrC,IAAI,QAAEgB,KAAK,CAAC4D,QAAe,CAC1B,CACH,CACG,CAAC;EACT;AACF","ignoreList":[]}
@@ -154,14 +154,13 @@ export default class WmTabheader extends BaseComponent {
154
154
  flexGrow: this.styles.header.flexGrow
155
155
  } : null
156
156
  }), /*#__PURE__*/React.createElement(View, {
157
- onLayout: this.setHeaderPositon.bind(this, i),
158
- accessible: true,
159
- accessibilityRole: "header"
157
+ onLayout: this.setHeaderPositon.bind(this, i)
160
158
  }, /*#__PURE__*/React.createElement(View, {
161
159
  style: [this.styles.header, {
162
160
  flexGrow: undefined
163
161
  }, isSelected ? this.styles.activeHeader : null]
164
162
  }, /*#__PURE__*/React.createElement(WmIcon, {
163
+ id: this.getTestId(i + 'icon'),
165
164
  styles: this.theme.mergeStyle({}, this.styles.headerIcon, isSelected ? this.styles.activeHeaderIcon : null),
166
165
  iconclass: header.icon
167
166
  }), /*#__PURE__*/React.createElement(Text, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["React","Animated","Easing","Text","View","BaseComponent","BaseComponentState","WmTabheaderProps","DEFAULT_CLASS","Tappable","createSkeleton","BackgroundComponent","WmIcon","WmTabheaderState","WmTabheader","constructor","props","_defineProperty","Value","headerScrollPosition","addListener","value","headerScrollPositionValue","setHeaderPanelPositon","nativeEvent","headerPanelLayout","layout","forceUpdate","setHeaderPositon","index","headersLayout","selectedTabIndex","onTabSelection","state","onIndexChange","setPosition","_this$headersLayout$s","_this$headerPanelLayo","_this$headerPanelLayo2","toIndicatorPosition","toIndicatorWidth","width","toHeaderScrollPosition","totalWidth","data","length","forEach","p","i","minScrollPosition","maxScrollPosition","Math","max","min","positionIndicator","position","isRTL","parallel","timing","useNativeDriver","toValue","duration","easing","linear","indicatorWidth","reverseIndicatorWidth","indicatorPosition","start","renderSkeleton","createElement","style","transform","translateX","onLayout","bind","styles","root","map","header","_this$styles$root","_this$styles$root2","_this$styles$activeHe","isSelected","onTap","key","flex","activeHeader","theme","borderRadius","height","activeHeaderText","fontSize","activeIndicator","scaleX","renderWidget","arrowIndicator","overflow","zIndex","_background","_extends","getTestPropsForAction","flexGrow","accessible","accessibilityRole","undefined","mergeStyle","headerIcon","activeHeaderIcon","iconclass","icon","numberOfLines","headerText","getTestPropsForLabel","title","backgroundImage","image","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","arrowIndicatorDot"],"sources":["tabheader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, Easing, LayoutChangeEvent, LayoutRectangle, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabheaderProps from './tabheader.props';\nimport { DEFAULT_CLASS, WmTabheaderStyles } from './tabheader.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmSkeleton, { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\n\nexport class WmTabheaderState extends BaseComponentState<WmTabheaderProps> {\n}\n\nexport default class WmTabheader extends BaseComponent<WmTabheaderProps, WmTabheaderState, WmTabheaderStyles> {\n\n private headerPanelLayout: LayoutRectangle = null as any;\n private headersLayout: LayoutRectangle[] = [];\n private headerScrollPosition = new Animated.Value(0);\n private headerScrollPositionValue = 0;\n private indicatorPosition = new Animated.Value(0);\n private reverseIndicatorWidth = new Animated.Value(0);\n private indicatorWidth = new Animated.Value(0);\n\n constructor(props: WmTabheaderProps) {\n super(props, DEFAULT_CLASS, new WmTabheaderProps(), new WmTabheaderState());\n this.headerScrollPosition.addListener(({value}) => this.headerScrollPositionValue = value);\n }\n\n setHeaderPanelPositon(nativeEvent: LayoutChangeEvent) {\n this.headerPanelLayout = nativeEvent.nativeEvent.layout;\n this.forceUpdate();\n }\n\n setHeaderPositon(index: number, nativeEvent: LayoutChangeEvent) {\n this.headersLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.props.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n onTabSelection(index: number) {\n if (this.state.props.selectedTabIndex != index) {\n this.state.props.onIndexChange && this.state.props.onIndexChange(index);\n }\n }\n\n setPosition() {\n const selectedTabIndex = this.state.props.selectedTabIndex;\n let toIndicatorPosition = 0;\n let toIndicatorWidth = this.headersLayout[selectedTabIndex]?.width || 0;\n let toHeaderScrollPosition = this.headerScrollPositionValue;\n let totalWidth = 0;\n if (this.state.props.data.length !== this.headersLayout.length) {\n return;\n }\n this.headersLayout.forEach((p, i) => {\n if (i < selectedTabIndex) {\n toIndicatorPosition += p.width;\n }\n totalWidth += p.width;\n });\n toHeaderScrollPosition = -1 * (toIndicatorPosition - (this.headerPanelLayout?.width || 0) / 2 + toIndicatorWidth/ 2) ;\n const minScrollPosition = -1 * (totalWidth - (this.headerPanelLayout?.width || 0));\n const maxScrollPosition = 0;\n toHeaderScrollPosition = Math.max(minScrollPosition, toHeaderScrollPosition);\n toHeaderScrollPosition = Math.min(maxScrollPosition, toHeaderScrollPosition);\n let positionIndicator = (toIndicatorPosition - (100 - toIndicatorWidth) / 2);\n let position = this.isRTL?-positionIndicator:positionIndicator;\n Animated.parallel([\n Animated.timing(this.headerScrollPosition, {\n useNativeDriver: true,\n toValue: toHeaderScrollPosition,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth / 100,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.reverseIndicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth ? 100 / toIndicatorWidth : 0,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorPosition, {\n useNativeDriver: true,\n toValue: position,\n duration: 200,\n easing: Easing.linear\n })\n ]).start();\n }\n\n public renderSkeleton(props: WmTabheaderProps){\n return(\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this.props.data.map((header ,i) => {\n const isSelected = i === this.props.selectedTabIndex;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key} styles={{flex: 1}}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header,\n isSelected ? this.styles.activeHeader : null]}>\n {\n createSkeleton(this.theme, { root: { borderRadius: 4 }} as WmSkeletonStyles, {\n ...this.styles.root,\n width: this.styles.root?.width || \"80%\",\n height: this.styles.root?.height || this.styles.activeHeaderText?.fontSize || 16\n })\n }\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n\n )\n }\n\n renderWidget(props: WmTabheaderProps) {\n this.setPosition();\n const arrowIndicator = this.styles.arrowIndicator as any;\n return (\n <View style={{overflow: 'hidden', zIndex: 16}}>\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this._background}\n {props.data.map((header ,i) => {\n const isSelected = i === props.selectedTabIndex ;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)}\n {...this.getTestPropsForAction(i +'')}\n key={header.key}\n styles={this.styles.header.flexGrow ? {flexGrow: this.styles.header.flexGrow} : null}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} accessible={true} accessibilityRole='header'>\n <View style={[\n this.styles.header,\n {flexGrow: undefined},\n isSelected ? this.styles.activeHeader : null]}>\n <WmIcon\n styles={this.theme.mergeStyle({}, this.styles.headerIcon, isSelected ? this.styles.activeHeaderIcon : null)}\n iconclass={header.icon}></WmIcon>\n <Text numberOfLines={1} style={[\n this.styles.headerText,\n isSelected ? this.styles.activeHeaderText : null]}\n {...this.getTestPropsForLabel(i + '_title')}\n >{header.title}</Text>\n </View>\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}>\n <Animated.View style={[{\n transform: [{\n scaleX: this.reverseIndicatorWidth\n }]\n },\n this.styles.arrowIndicator\n ]}>\n {arrowIndicator.backgroundImage ? (<BackgroundComponent\n image={arrowIndicator.backgroundImage}\n position={arrowIndicator.backgroundPosition}\n size={arrowIndicator.backgroundSize}\n repeat={arrowIndicator.backgroundRepeat}\n resizeMode={arrowIndicator.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}\n ></BackgroundComponent>) : null }\n <View style={this.styles.arrowIndicatorDot}></View>\n </Animated.View>\n </Animated.View>\n </Animated.View>\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,MAAM,EAAsCC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC/F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAAqBC,cAAc,QAAQ,wEAAwE;AAEnH,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAO,MAAMC,gBAAgB,SAASP,kBAAkB,CAAmB;AAG3E,eAAe,MAAMQ,WAAW,SAAST,aAAa,CAAwD;EAU5GU,WAAWA,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,K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EAEX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Animated","Easing","Text","View","BaseComponent","BaseComponentState","WmTabheaderProps","DEFAULT_CLASS","Tappable","createSkeleton","BackgroundComponent","WmIcon","WmTabheaderState","WmTabheader","constructor","props","_defineProperty","Value","headerScrollPosition","addListener","value","headerScrollPositionValue","setHeaderPanelPositon","nativeEvent","headerPanelLayout","layout","forceUpdate","setHeaderPositon","index","headersLayout","selectedTabIndex","onTabSelection","state","onIndexChange","setPosition","_this$headersLayout$s","_this$headerPanelLayo","_this$headerPanelLayo2","toIndicatorPosition","toIndicatorWidth","width","toHeaderScrollPosition","totalWidth","data","length","forEach","p","i","minScrollPosition","maxScrollPosition","Math","max","min","positionIndicator","position","isRTL","parallel","timing","useNativeDriver","toValue","duration","easing","linear","indicatorWidth","reverseIndicatorWidth","indicatorPosition","start","renderSkeleton","createElement","style","transform","translateX","onLayout","bind","styles","root","map","header","_this$styles$root","_this$styles$root2","_this$styles$activeHe","isSelected","onTap","key","flex","activeHeader","theme","borderRadius","height","activeHeaderText","fontSize","activeIndicator","scaleX","renderWidget","arrowIndicator","overflow","zIndex","_background","_extends","getTestPropsForAction","flexGrow","undefined","id","getTestId","mergeStyle","headerIcon","activeHeaderIcon","iconclass","icon","numberOfLines","headerText","getTestPropsForLabel","title","backgroundImage","image","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","arrowIndicatorDot"],"sources":["tabheader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, Easing, LayoutChangeEvent, LayoutRectangle, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabheaderProps from './tabheader.props';\nimport { DEFAULT_CLASS, WmTabheaderStyles } from './tabheader.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmSkeleton, { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\n\nexport class WmTabheaderState extends BaseComponentState<WmTabheaderProps> {\n}\n\nexport default class WmTabheader extends BaseComponent<WmTabheaderProps, WmTabheaderState, WmTabheaderStyles> {\n\n private headerPanelLayout: LayoutRectangle = null as any;\n private headersLayout: LayoutRectangle[] = [];\n private headerScrollPosition = new Animated.Value(0);\n private headerScrollPositionValue = 0;\n private indicatorPosition = new Animated.Value(0);\n private reverseIndicatorWidth = new Animated.Value(0);\n private indicatorWidth = new Animated.Value(0);\n\n constructor(props: WmTabheaderProps) {\n super(props, DEFAULT_CLASS, new WmTabheaderProps(), new WmTabheaderState());\n this.headerScrollPosition.addListener(({value}) => this.headerScrollPositionValue = value);\n }\n\n setHeaderPanelPositon(nativeEvent: LayoutChangeEvent) {\n this.headerPanelLayout = nativeEvent.nativeEvent.layout;\n this.forceUpdate();\n }\n\n setHeaderPositon(index: number, nativeEvent: LayoutChangeEvent) {\n this.headersLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.props.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n onTabSelection(index: number) {\n if (this.state.props.selectedTabIndex != index) {\n this.state.props.onIndexChange && this.state.props.onIndexChange(index);\n }\n }\n\n setPosition() {\n const selectedTabIndex = this.state.props.selectedTabIndex;\n let toIndicatorPosition = 0;\n let toIndicatorWidth = this.headersLayout[selectedTabIndex]?.width || 0;\n let toHeaderScrollPosition = this.headerScrollPositionValue;\n let totalWidth = 0;\n if (this.state.props.data.length !== this.headersLayout.length) {\n return;\n }\n this.headersLayout.forEach((p, i) => {\n if (i < selectedTabIndex) {\n toIndicatorPosition += p.width;\n }\n totalWidth += p.width;\n });\n toHeaderScrollPosition = -1 * (toIndicatorPosition - (this.headerPanelLayout?.width || 0) / 2 + toIndicatorWidth/ 2) ;\n const minScrollPosition = -1 * (totalWidth - (this.headerPanelLayout?.width || 0));\n const maxScrollPosition = 0;\n toHeaderScrollPosition = Math.max(minScrollPosition, toHeaderScrollPosition);\n toHeaderScrollPosition = Math.min(maxScrollPosition, toHeaderScrollPosition);\n let positionIndicator = (toIndicatorPosition - (100 - toIndicatorWidth) / 2);\n let position = this.isRTL?-positionIndicator:positionIndicator;\n Animated.parallel([\n Animated.timing(this.headerScrollPosition, {\n useNativeDriver: true,\n toValue: toHeaderScrollPosition,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth / 100,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.reverseIndicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth ? 100 / toIndicatorWidth : 0,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorPosition, {\n useNativeDriver: true,\n toValue: position,\n duration: 200,\n easing: Easing.linear\n })\n ]).start();\n }\n\n public renderSkeleton(props: WmTabheaderProps){\n return(\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this.props.data.map((header ,i) => {\n const isSelected = i === this.props.selectedTabIndex;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key} styles={{flex: 1}}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header,\n isSelected ? this.styles.activeHeader : null]}>\n {\n createSkeleton(this.theme, { root: { borderRadius: 4 }} as WmSkeletonStyles, {\n ...this.styles.root,\n width: this.styles.root?.width || \"80%\",\n height: this.styles.root?.height || this.styles.activeHeaderText?.fontSize || 16\n })\n }\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n\n )\n }\n\n renderWidget(props: WmTabheaderProps) {\n this.setPosition();\n const arrowIndicator = this.styles.arrowIndicator as any;\n return (\n <View style={{overflow: 'hidden', zIndex: 16}}>\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this._background}\n {props.data.map((header ,i) => {\n const isSelected = i === props.selectedTabIndex ;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)}\n {...this.getTestPropsForAction(i +'')}\n key={header.key}\n styles={this.styles.header.flexGrow ? {flexGrow: this.styles.header.flexGrow} : null}>\n <View onLayout={this.setHeaderPositon.bind(this, i)}>\n <View style={[\n this.styles.header,\n {flexGrow: undefined},\n isSelected ? this.styles.activeHeader : null]}>\n <WmIcon\n id={this.getTestId(i + 'icon')}\n styles={this.theme.mergeStyle({}, this.styles.headerIcon, isSelected ? this.styles.activeHeaderIcon : null)}\n iconclass={header.icon}></WmIcon>\n <Text numberOfLines={1} style={[\n this.styles.headerText,\n isSelected ? this.styles.activeHeaderText : null]}\n {...this.getTestPropsForLabel(i + '_title')}\n >{header.title}</Text>\n </View>\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}>\n <Animated.View style={[{\n transform: [{\n scaleX: this.reverseIndicatorWidth\n }]\n },\n this.styles.arrowIndicator\n ]}>\n {arrowIndicator.backgroundImage ? (<BackgroundComponent\n image={arrowIndicator.backgroundImage}\n position={arrowIndicator.backgroundPosition}\n size={arrowIndicator.backgroundSize}\n repeat={arrowIndicator.backgroundRepeat}\n resizeMode={arrowIndicator.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}\n ></BackgroundComponent>) : null }\n <View style={this.styles.arrowIndicatorDot}></View>\n </Animated.View>\n </Animated.View>\n </Animated.View>\n </View>\n );\n }\n}\n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