@wavemaker/app-rn-runtime 11.6.0-next.26273 → 11.6.0-next.40501

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +7 -9
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/webview/webview.component.js +11 -27
  4. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  5. app-rn-runtime/components/advanced/webview/webview.props.js +1 -0
  6. app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
  7. app-rn-runtime/components/basic/anchor/anchor.component.js +6 -19
  8. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.props.js +0 -4
  10. app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
  11. app-rn-runtime/components/basic/anchor/anchor.styles.js +0 -1
  12. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  13. app-rn-runtime/components/basic/button/button.component.js +6 -31
  14. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  15. app-rn-runtime/components/basic/button/button.props.js +0 -4
  16. app-rn-runtime/components/basic/button/button.props.js.map +1 -1
  17. app-rn-runtime/components/basic/button/button.styles.js +5 -4
  18. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  19. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +5 -13
  20. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  21. app-rn-runtime/components/basic/icon/icon.component.js +11 -61
  22. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  23. app-rn-runtime/components/basic/icon/icon.props.js +0 -4
  24. app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
  25. app-rn-runtime/components/basic/icon/icon.styles.js +1 -2
  26. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  27. app-rn-runtime/components/basic/label/label.component.js +25 -32
  28. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  29. app-rn-runtime/components/basic/label/label.styles.js +5 -4
  30. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  31. app-rn-runtime/components/basic/message/message.styles.js +1 -3
  32. app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
  33. app-rn-runtime/components/basic/search/search.styles.js +4 -4
  34. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  35. app-rn-runtime/components/chart/area-chart/area-chart.component.js +15 -20
  36. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  37. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +15 -26
  38. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  39. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +2 -0
  40. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  41. app-rn-runtime/components/chart/basechart.component.js +7 -33
  42. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  43. app-rn-runtime/components/chart/basechart.props.js +2 -4
  44. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  45. app-rn-runtime/components/chart/basechart.styles.js +2 -9
  46. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  47. app-rn-runtime/components/chart/line-chart/line-chart.component.js +17 -20
  48. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  49. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +1 -1
  50. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  51. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +7 -28
  52. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  53. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +0 -1
  54. app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
  55. app-rn-runtime/components/container/container.component.js +2 -11
  56. app-rn-runtime/components/container/container.component.js.map +1 -1
  57. app-rn-runtime/components/container/container.props.js +0 -1
  58. app-rn-runtime/components/container/container.props.js.map +1 -1
  59. app-rn-runtime/components/container/panel/panel.component.js +2 -6
  60. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  61. app-rn-runtime/components/container/panel/panel.props.js +0 -4
  62. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  63. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
  64. app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
  65. app-rn-runtime/components/container/wizard/wizard.component.js +11 -14
  66. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  67. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -19
  68. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  69. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +2 -27
  70. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  71. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +0 -3
  72. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  73. app-rn-runtime/components/data/card/card.component.js +3 -7
  74. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  75. app-rn-runtime/components/data/card/card.props.js +0 -4
  76. app-rn-runtime/components/data/card/card.props.js.map +1 -1
  77. app-rn-runtime/components/data/list/list.component.js +6 -58
  78. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  79. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +6 -13
  80. app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
  81. app-rn-runtime/components/device/camera/camera.styles.js +4 -11
  82. app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
  83. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +0 -4
  84. app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
  85. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +0 -4
  86. app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
  87. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +1 -2
  88. app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
  89. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +0 -4
  90. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
  91. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +0 -4
  92. app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
  93. app-rn-runtime/components/dialogs/dialog/dialog.component.js +3 -7
  94. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  95. app-rn-runtime/components/dialogs/dialog/dialog.props.js +0 -4
  96. app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
  97. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +2 -10
  98. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  99. app-rn-runtime/components/input/basenumber/basenumber.component.js +6 -12
  100. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  101. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -5
  102. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  103. app-rn-runtime/components/input/checkbox/checkbox.styles.js +5 -35
  104. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  105. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +6 -6
  106. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  107. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +10 -39
  108. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  109. app-rn-runtime/components/input/composite/composite.component.js +1 -1
  110. app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
  111. app-rn-runtime/components/input/composite/composite.props.js +1 -1
  112. app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
  113. app-rn-runtime/components/input/currency/currency.component.js +2 -17
  114. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  115. app-rn-runtime/components/input/currency/currency.props.js +0 -1
  116. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  117. app-rn-runtime/components/input/currency/currency.styles.js +1 -19
  118. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  119. app-rn-runtime/components/input/epoch/base-datetime.component.js +8 -70
  120. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  121. app-rn-runtime/components/input/epoch/date/date.component.js +0 -8
  122. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  123. app-rn-runtime/components/input/epoch/date/date.styles.js +0 -16
  124. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  125. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +0 -8
  126. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  127. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +0 -1
  128. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  129. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +1 -49
  130. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  131. app-rn-runtime/components/input/epoch/time/time.component.js +0 -8
  132. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  133. app-rn-runtime/components/input/epoch/time/time.styles.js +0 -16
  134. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  135. app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
  136. app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
  137. app-rn-runtime/components/input/number/number.component.js +0 -11
  138. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  139. app-rn-runtime/components/input/number/number.props.js +0 -1
  140. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  141. app-rn-runtime/components/input/number/number.styles.js +0 -17
  142. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  143. app-rn-runtime/components/input/select/select.styles.js +1 -5
  144. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  145. app-rn-runtime/components/input/slider/slider.styles.js +3 -3
  146. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  147. app-rn-runtime/components/input/switch/switch.component.js +0 -3
  148. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  149. app-rn-runtime/components/input/switch/switch.styles.js +5 -10
  150. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  151. app-rn-runtime/components/input/text/text.component.js +0 -11
  152. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  153. app-rn-runtime/components/input/text/text.props.js +0 -1
  154. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  155. app-rn-runtime/components/input/text/text.styles.js +0 -17
  156. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  157. app-rn-runtime/components/input/textarea/textarea.component.js +0 -11
  158. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  159. app-rn-runtime/components/input/textarea/textarea.props.js +0 -1
  160. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  161. app-rn-runtime/components/input/textarea/textarea.styles.js +0 -17
  162. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  163. app-rn-runtime/components/input/toggle/toggle.component.js +5 -43
  164. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  165. app-rn-runtime/components/input/toggle/toggle.styles.js +12 -5
  166. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  167. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -6
  168. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  169. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +0 -1
  170. app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
  171. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +0 -6
  172. app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
  173. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -1
  174. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  175. app-rn-runtime/components/navigation/menu/menu.styles.js +5 -8
  176. app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
  177. app-rn-runtime/components/navigation/popover/popover.component.js +0 -4
  178. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  179. app-rn-runtime/components/navigation/popover/popover.props.js +0 -4
  180. app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
  181. app-rn-runtime/components/navigation/popover/popover.styles.js +2 -8
  182. app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
  183. app-rn-runtime/components/page/tabbar/tabbar.component.js +8 -42
  184. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  185. app-rn-runtime/components/page/tabbar/tabbar.styles.js +16 -82
  186. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  187. app-rn-runtime/core/base.component.js +1 -5
  188. app-rn-runtime/core/base.component.js.map +1 -1
  189. app-rn-runtime/core/components/textinput.component.js +2 -25
  190. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  191. app-rn-runtime/core/tappable.component.js +9 -37
  192. app-rn-runtime/core/tappable.component.js.map +1 -1
  193. app-rn-runtime/package.json +3 -5
  194. app-rn-runtime/runtime/services/webprocess.service.js +1 -0
  195. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  196. app-rn-runtime/styles/theme.js +0 -36
  197. app-rn-runtime/styles/theme.js.map +1 -1
  198. app-rn-runtime/styles/theme.variables.js +3 -26
  199. app-rn-runtime/styles/theme.variables.js.map +1 -1
  200. app-rn-runtime/variables/model-variable.js +1 -2
  201. app-rn-runtime/variables/model-variable.js.map +1 -1
  202. app-rn-runtime/variables/service-variable.js +0 -1
  203. app-rn-runtime/variables/service-variable.js.map +1 -1
  204. app-rn-runtime/components/chart/staticdata.js +0 -215
  205. app-rn-runtime/components/chart/staticdata.js.map +0 -1
  206. app-rn-runtime/components/page/tabbar/curve.js +0 -84
  207. app-rn-runtime/components/page/tabbar/curve.js.map +0 -1
  208. app-rn-runtime/core/components/floatinglabel.component.js +0 -45
  209. app-rn-runtime/core/components/floatinglabel.component.js.map +0 -1
@@ -6,7 +6,7 @@ import { View, Platform } from 'react-native';
6
6
  import { Svg } from 'react-native-svg';
7
7
  import { VictoryStack, VictoryBar, VictoryChart, VictoryPie, VictoryLegend, VictoryAxis } from 'victory-native';
8
8
  import { Axis, Scale } from 'victory-core';
9
- import { orderBy, cloneDeep, findIndex, isString } from 'lodash';
9
+ import { orderBy, cloneDeep } from 'lodash';
10
10
  import WmStackChartProps from './stack-chart.props';
11
11
  import { DEFAULT_CLASS } from './stack-chart.styles';
12
12
  import { BaseChartComponent, BaseChartComponentState } from '@wavemaker/app-rn-runtime/components/chart/basechart.component';
@@ -40,30 +40,10 @@ export default class WmStackChart extends BaseChartComponent {
40
40
  positiveValuesArray = orderBy(positiveValuesArray, 'y', 'asc');
41
41
  return positiveValuesArray;
42
42
  }
43
- getData() {
44
- const negativeValues = cloneDeep(this.getNegativeValuesArray());
45
- return negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));
46
- }
47
- updateColors() {
48
- if (this.state.colors.length === 1) {
49
- return this.state.colors[0];
50
- } else {
51
- let colorCodes = cloneDeep(this.state.colors);
52
- ;
53
- if (this.state.data.length > 0) {
54
- const orderedData = this.getData();
55
- this.state.data[0].map((d, i) => {
56
- let index = findIndex(orderedData, d);
57
- colorCodes[index] = this.state.colors[i];
58
- });
59
- return colorCodes;
60
- }
61
- }
62
- }
63
43
  getBarChart(props) {
64
44
  if (this.state.data.length > 0) {
65
45
  const negativeValues = cloneDeep(this.getNegativeValuesArray());
66
- const data = this.getData();
46
+ const data = negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));
67
47
  let currentValue = 0;
68
48
  return data.map((d, i) => {
69
49
  let d1 = [];
@@ -85,8 +65,8 @@ export default class WmStackChart extends BaseChartComponent {
85
65
  }
86
66
  }
87
67
  getColorCodes() {
88
- const colors = cloneDeep(this.updateColors());
89
- return isString(colors) ? [colors] : colors.reverse();
68
+ const colors = cloneDeep(this.state.colors);
69
+ return colors.reverse();
90
70
  }
91
71
  getArcChart(props) {
92
72
  if (this.state.data.length > 0) {
@@ -167,8 +147,6 @@ export default class WmStackChart extends BaseChartComponent {
167
147
  } else {
168
148
  ticks[0] = minValue;
169
149
  }
170
- } else {
171
- ticks[0] = this.state.props.minvalue;
172
150
  }
173
151
  }
174
152
  return ticks;
@@ -194,6 +172,7 @@ export default class WmStackChart extends BaseChartComponent {
194
172
  x: this.props.xdomain === 'Min' ? this.state.chartMinX : undefined,
195
173
  y: this.props.ydomain === 'Min' ? this.state.chartMinY : undefined
196
174
  };
175
+ const colorScale = this.state.colors.length === 1 ? this.state.colors[0] : this.state.colors;
197
176
  return /*#__PURE__*/React.createElement(View, {
198
177
  style: this.styles.root,
199
178
  onLayout: this.onViewLayoutChange
@@ -223,7 +202,7 @@ export default class WmStackChart extends BaseChartComponent {
223
202
  gutter: 20,
224
203
  data: [],
225
204
  theme: this.state.theme
226
- }), this.getLegendView(this.updateColors()), /*#__PURE__*/React.createElement(VictoryAxis, {
205
+ }), this.getLegendView(colorScale), /*#__PURE__*/React.createElement(VictoryAxis, {
227
206
  crossAxis: true,
228
207
  style: {
229
208
  tickLabels: {
@@ -243,7 +222,7 @@ export default class WmStackChart extends BaseChartComponent {
243
222
  tickFormat: t => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`,
244
223
  dependentAxis: true
245
224
  }), /*#__PURE__*/React.createElement(VictoryStack, {
246
- colorScale: this.updateColors(),
225
+ colorScale: colorScale,
247
226
  horizontal: true,
248
227
  style: {
249
228
  data: {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Platform","Svg","VictoryStack","VictoryBar","VictoryChart","VictoryPie","VictoryLegend","VictoryAxis","Axis","Scale","orderBy","cloneDeep","findIndex","isString","WmStackChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmStackChartState","constructor","arguments","_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","getBarChart","currentValue","d1","x","push","createElement","key","name","cornerRadius","bottomLeft","bottomRight","topLeft","topRight","getColorCodes","reverse","getArcChart","colorScaleArray","maxValue","Math","max","o","radius","min","chartHeight","colorScale","startAngle","endAngle","standalone","origin","innerRadius","thickness","labels","getArcAxis","ticks","getTickValues","axisData","forEach","yunits","style","fontSize","paddingLeft","paddingRight","labelRadius","minValue","scale","getBaseScale","domain","getTicks","unshift","minvalue","onSelect","event","value","label","xaxisDatakeyArr","datum","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","styles","root","onLayout","onViewLayoutChange","viewtype","theme","minDomain","height","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","title","fontFamily","subheading","orientation","gutter","getLegendView","crossAxis","tickLabels","fill","showyaxis","axisLabel","grid","stroke","tickValues","tickFormat","t","abbreviateNumber","dependentAxis","horizontal","strokeWidth","events","target","eventHandlers","OS","onClick","bind","onPress"],"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';\n\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 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\n return data.map((d: any, i: number) => {\n let d1: any = [];\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={{bottomLeft:(1), bottomRight:(1), topLeft:(1), topRight:(1)}}\n data={d1}/>\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));\n const minValue = Math.min(...data.map((o: any) => o.y));\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 value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\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 style={this.styles.root} onLayout={this.onViewLayoutChange}\n >{\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.screenWidth}\n padding={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: props.offsetleft,\n right: props.offsetright\n }}\n containerComponent={\n this.getTooltip(props)\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.updateColors())}\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 }}\n theme={this.state.theme}\n tickValues={this.getTickValues()}\n tickFormat={(t) => 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 style={{\n data: { strokeWidth: this.state.props.thickness }\n }}\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 >\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;AAE/D,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;IAAA,SAAAC,SAAA;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,C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,CAACxH,KAAK,CAACwH,KAAK,EAAExH,KAAK,CAAC0H,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACX/G,IAAI,EAAE,EAAG;MACT4F,KAAK,EAAE,IAAI,CAAC7F,KAAK,CAAC6F;IAAM,CACzB,CAAC,EACD,IAAI,CAAC5D,WAAW,CAAC7C,KAAK,CAAC,EACvB,IAAI,CAAC8D,UAAU,CAAC,CACd,CAEH,CAAC;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","Platform","Svg","VictoryStack","VictoryBar","VictoryChart","VictoryPie","VictoryLegend","VictoryAxis","Axis","Scale","orderBy","cloneDeep","WmStackChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmStackChartState","constructor","arguments","_defineProperty","WmStackChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","componentDidMount","setHeightWidthOnChart","getNegativeValuesArray","negativeValuesArray","state","data","filter","d","y","getPositiveValuesArray","positiveValuesArray","getBarChart","length","negativeValues","concat","currentValue","map","i","d1","x","push","createElement","key","name","cornerRadius","bottomLeft","bottomRight","topLeft","topRight","getColorCodes","colors","reverse","getArcChart","colorScaleArray","maxValue","Math","max","o","radius","min","chartHeight","colorScale","startAngle","endAngle","standalone","origin","innerRadius","thickness","labels","getArcAxis","ticks","getTickValues","axisData","forEach","yunits","style","fontSize","paddingLeft","paddingRight","labelRadius","minValue","scale","getBaseScale","domain","getTicks","unshift","onSelect","event","value","index","label","xaxisDatakeyArr","datum","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","styles","root","onLayout","onViewLayoutChange","viewtype","theme","minDomain","height","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","title","fontFamily","subheading","orientation","gutter","getLegendView","crossAxis","tickLabels","fill","showyaxis","axisLabel","grid","stroke","tickValues","tickFormat","t","abbreviateNumber","dependentAxis","horizontal","strokeWidth","events","target","eventHandlers","OS","onClick","bind","onPress"],"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 } from 'lodash';\n\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 getBarChart(props: WmStackChartProps) {\n if ( this.state.data.length > 0 ) {\n const negativeValues = cloneDeep(this.getNegativeValuesArray());\n const data = negativeValues.concat(cloneDeep(this.getPositiveValuesArray()));\n let currentValue = 0;\n\n return data.map((d: any, i: number) => {\n let d1: any = [];\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={{bottomLeft:(1), bottomRight:(1), topLeft:(1), topRight:(1)}}\n data={d1}/>\n });\n }\n }\n\n private getColorCodes() {\n const colors = cloneDeep(this.state.colors);\n return 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));\n const minValue = Math.min(...data.map((o: any) => o.y));\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 }\n }\n return ticks;\n }\n\n onSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\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 const colorScale = this.state.colors.length === 1 ? this.state.colors[0] : this.state.colors;\n return (\n <View\n style={this.styles.root} onLayout={this.onViewLayoutChange}\n >{\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.screenWidth}\n padding={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: props.offsetleft,\n right: props.offsetright\n }}\n containerComponent={\n this.getTooltip(props)\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(colorScale)}\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 }}\n theme={this.state.theme}\n tickValues={this.getTickValues()}\n tickFormat={(t) => this.state.props.yunits ? `${this.abbreviateNumber(t)}${this.state.props.yunits}` : `${this.abbreviateNumber(t)}`} dependentAxis />\n <VictoryStack\n colorScale={colorScale}\n horizontal={true}\n style={{\n data: { strokeWidth: this.state.props.thickness }\n }}\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 >\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,QAAQ,QAAQ;AAE3C,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;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBACnE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,YAAY,SAASN,kBAAkB,CAA2D;EACrHG,WAAWA,CAACI,KAAwB,EA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QAAQ,CAACkE,IAAI,CAAC,IAAI;QAClC;MACF,CAAC;IAAE,GAGD,IAAI,CAACzH,WAAW,CAACnB,KAAK,CAEZ,CACF,CAAC,gBACfvB,KAAA,CAAAoD,aAAA,CAACjD,GAAG;MAACyB,KAAK,EAAE,IAAI,CAACO,KAAK,CAACL,UAAW;MAAC+F,MAAM,EAAE,IAAI,CAAC1F,KAAK,CAACoC;IAAY,gBAChEvE,KAAA,CAAAoD,aAAA,CAAC5C,aAAa;MACZ8C,IAAI,EAAE,QAAS;MACfkF,kBAAkB,eAAExI,KAAA,CAAAoD,aAAA,CAACjD,GAAG,MAAE,CAAE;MAC5BuI,KAAK,EAAE,CAACnH,KAAK,CAACmH,KAAK,EAAEnH,KAAK,CAACqH,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACX1G,IAAI,EAAE,EAAG;MACTuF,KAAK,EAAE,IAAI,CAACxF,KAAK,CAACwF;IAAM,CACzB,CAAC,EACD,IAAI,CAAC5D,WAAW,CAACxC,KAAK,CAAC,EACvB,IAAI,CAACyD,UAAU,CAAC,CACd,CAEH,CAAC;EAEX;AACF"}
@@ -11,7 +11,6 @@ export default class WmStackChartProps extends BaseChartComponentProps {
11
11
  _defineProperty(this, "offsetleft", 25);
12
12
  _defineProperty(this, "offsetright", 35);
13
13
  _defineProperty(this, "onSelect", void 0);
14
- _defineProperty(this, "minvalue", 0);
15
14
  }
16
15
  }
17
16
  //# sourceMappingURL=stack-chart.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseChartComponentProps","WmStackChartProps","constructor","arguments","_defineProperty"],"sources":["stack-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from '@wavemaker/app-rn-runtime/components/chart/basechart.props';\n\nexport default class WmStackChartProps extends BaseChartComponentProps {\n viewtype: string = 'Bar';\n showlegend: string = 'left';\n thickness: number = 20;\n offsetleft: number = 25;\n offsetright: number = 35;\n onSelect?: any;\n minvalue: number = 0;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,iBAAiB,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBAClD,KAAK;IAAAA,eAAA,qBACH,MAAM;IAAAA,eAAA,oBACP,EAAE;IAAAA,eAAA,qBACD,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA;IAAAA,eAAA,mBAEL,CAAC;EAAA;AACtB"}
1
+ {"version":3,"names":["BaseChartComponentProps","WmStackChartProps","constructor","arguments","_defineProperty"],"sources":["stack-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from '@wavemaker/app-rn-runtime/components/chart/basechart.props';\n\nexport default class WmStackChartProps extends BaseChartComponentProps {\n viewtype: string = 'Bar';\n showlegend: string = 'left';\n thickness: number = 20;\n offsetleft: number = 25;\n offsetright: number = 35;\n onSelect?: any;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,iBAAiB,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,mBAClD,KAAK;IAAAA,eAAA,qBACH,MAAM;IAAAA,eAAA,oBACP,EAAE;IAAAA,eAAA,qBACD,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA;EAAA;AAE1B"}
@@ -13,27 +13,18 @@ export class WmContainerState extends PartialHostState {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  _defineProperty(this, "isPartialLoaded", false);
16
- _defineProperty(this, "showContent", false);
17
16
  }
18
17
  }
19
18
  export default class WmContainer extends PartialHost {
20
19
  constructor(props) {
21
- super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());
22
- this.updateState({
23
- showContent: !this.state.props.deferload
24
- });
20
+ super(props, DEFAULT_CLASS, new WmContainerProps());
25
21
  }
26
22
  renderWidget(props) {
27
- if (!this.state.showContent && this.isVisible()) {
28
- this.updateState({
29
- showContent: true
30
- });
31
- }
32
23
  const dimensions = {
33
24
  width: this.styles.root.width ? '100%' : undefined,
34
25
  height: this.styles.root.height ? '100%' : undefined
35
26
  };
36
- return this.state.showContent && /*#__PURE__*/React.createElement(Animatedview, {
27
+ return /*#__PURE__*/React.createElement(Animatedview, {
37
28
  entryanimation: props.animation,
38
29
  style: this.styles.root
39
30
  }, this._background, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","WmContainerState","constructor","arguments","_defineProperty","WmContainer","props","updateState","showContent","state","deferload","renderWidget","isVisible","dimensions","width","styles","root","undefined","height","createElement","entryanimation","animation","style","_background","_extends","getTestPropsForAction","target","content","renderContent"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewStyle } from 'react-native';\n\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n showContent: boolean = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\n this.updateState({showContent: !this.state.props.deferload} as WmContainerState);\n }\n\n renderWidget(props: WmContainerProps) {\n if(!this.state.showContent && this.isVisible()){\n this.updateState({showContent: true} as WmContainerState);\n }\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n return this.state.showContent && (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAmB,cAAc;AAE9C,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,0BAA0B;AAExE,OAAO,MAAMC,gBAAgB,SAASD,gBAAgB,CAAmB;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BACrD,KAAK;IAAAA,eAAA,sBACA,KAAK;EAAA;AAC9B;AAEA,eAAe,MAAMC,WAAW,SAASN,WAAW,CAAwD;EAC1GG,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIM,gBAAgB,CAAC,CAAC,CAAC;IAC3E,IAAI,CAACM,WAAW,CAAC;MAACC,WAAW,EAAE,CAAC,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI;IAAS,CAAqB,CAAC;EAClF;EAEAC,YAAYA,CAACL,KAAuB,EAAE;IACpC,IAAG,CAAC,IAAI,CAACG,KAAK,CAACD,WAAW,IAAI,IAAI,CAACI,SAAS,CAAC,CAAC,EAAC;MAC7C,IAAI,CAACL,WAAW,CAAC;QAACC,WAAW,EAAE;MAAI,CAAqB,CAAC;IAC3D;IACA,MAAMK,UAAU,GAAG;MACjBC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI,CAACF,KAAK,GAAG,MAAM,GAAGG,SAAS;MAClDC,MAAM,EAAE,IAAI,CAACH,MAAM,CAACC,IAAI,CAACE,MAAM,GAAG,MAAM,GAAGD;IAC7C,CAAC;IACD,OAAO,IAAI,CAACR,KAAK,CAACD,WAAW,iBAC3Bf,KAAA,CAAA0B,aAAA,CAACrB,YAAY;MAACsB,cAAc,EAAEd,KAAK,CAACe,SAAU;MAACC,KAAK,EAAE,IAAI,CAACP,MAAM,CAACC;IAAK,GACpE,IAAI,CAACO,WAAW,eACjB9B,KAAA,CAAA0B,aAAA,CAACtB,QAAQ,EAAA2B,QAAA,KAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,MAAM,EAAE,IAAK;MAACX,MAAM,EAAEF;IAAW,iBACzEpB,KAAA,CAAA0B,aAAA,CAACzB,IAAI;MAAC4B,KAAK,EAAE,CAACT,UAAU,EAAgB,IAAI,CAACE,MAAM,CAACY,OAAO;IAAE,GAAE,IAAI,CAACC,aAAa,CAACtB,KAAK,CAAQ,CACzF,CACE,CACf;EACH;AACF"}
1
+ {"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","WmContainerState","constructor","arguments","_defineProperty","WmContainer","props","renderWidget","dimensions","width","styles","root","undefined","height","createElement","entryanimation","animation","style","_background","_extends","getTestPropsForAction","target","content","renderContent"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewStyle } from 'react-native';\n\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps());\n }\n\n renderWidget(props: WmContainerProps) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n return (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAmB,cAAc;AAE9C,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,0BAA0B;AAExE,OAAO,MAAMC,gBAAgB,SAASD,gBAAgB,CAAmB;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BACrD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,WAAW,SAASN,WAAW,CAAwD;EAC1GG,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,CAAC;EACrD;EAEAY,YAAYA,CAACD,KAAuB,EAAE;IACpC,MAAME,UAAU,GAAG;MACjBC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI,CAACF,KAAK,GAAG,MAAM,GAAGG,SAAS;MAClDC,MAAM,EAAE,IAAI,CAACH,MAAM,CAACC,IAAI,CAACE,MAAM,GAAG,MAAM,GAAGD;IAC7C,CAAC;IACD,oBACEnB,KAAA,CAAAqB,aAAA,CAAChB,YAAY;MAACiB,cAAc,EAAET,KAAK,CAACU,SAAU;MAACC,KAAK,EAAE,IAAI,CAACP,MAAM,CAACC;IAAK,GACpE,IAAI,CAACO,WAAW,eACjBzB,KAAA,CAAAqB,aAAA,CAACjB,QAAQ,EAAAsB,QAAA,KAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,MAAM,EAAE,IAAK;MAACX,MAAM,EAAEF;IAAW,iBACzEf,KAAA,CAAAqB,aAAA,CAACpB,IAAI;MAACuB,KAAK,EAAE,CAACT,UAAU,EAAgB,IAAI,CAACE,MAAM,CAACY,OAAO;IAAE,GAAE,IAAI,CAACC,aAAa,CAACjB,KAAK,CAAQ,CACzF,CACE,CAAC;EAEnB;AACF"}
@@ -7,7 +7,6 @@ export default class WmContainerProps extends PartialHostProps {
7
7
  super(...arguments);
8
8
  _defineProperty(this, "animation", null);
9
9
  _defineProperty(this, "onLoad", void 0);
10
- _defineProperty(this, "deferload", false);
11
10
  }
12
11
  }
13
12
  //# sourceMappingURL=container.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PartialHostProps","WmContainerProps","constructor","arguments","_defineProperty"],"sources":["container.props.ts"],"sourcesContent":["import { PartialHostProps } from './partial-host.component';\n\nexport default class WmContainerProps extends PartialHostProps {\n animation?: string = null as any;\n onLoad?: Function;\n deferload?: boolean = false;\n}\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,eAAe,MAAMC,gBAAgB,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACxC,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEH,KAAK;EAAA;AAC7B"}
1
+ {"version":3,"names":["PartialHostProps","WmContainerProps","constructor","arguments","_defineProperty"],"sources":["container.props.ts"],"sourcesContent":["import { PartialHostProps } from './partial-host.component';\n\nexport default class WmContainerProps extends PartialHostProps {\n animation?: string = null as any;\n onLoad?: Function;\n}\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,eAAe,MAAMC,gBAAgB,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBACxC,IAAI;IAAAA,eAAA;EAAA;AAE3B"}
@@ -73,14 +73,10 @@ export default class WmPanel extends BaseComponent {
73
73
  return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, this.getTestPropsForAction(`header`), {
74
74
  style: [this.styles.header],
75
75
  onPress: this.onPanelPress.bind(this)
76
- }), props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
76
+ }), props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
77
77
  styles: this.styles.icon,
78
78
  name: props.name + '_icon',
79
- iconclass: props.iconclass,
80
- iconheight: props.iconheight,
81
- iconwidth: props.iconwidth,
82
- iconmargin: props.iconmargin,
83
- iconurl: props.iconurl
79
+ iconclass: props.iconclass
84
80
  }) : null, /*#__PURE__*/React.createElement(View, {
85
81
  style: {
86
82
  flexDirection: 'column',
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","WmPanelState","constructor","arguments","_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","iconurl","icon","iconheight","iconwidth","iconmargin","flex","justifyContent","text","heading","title","subheading","renderPane","content","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 {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() ? \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;IAAA,SAAAC,SAAA;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,YA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AQlB,KAAA,CAAAuC,aAAA,CAACrC,IAAI;MAACsC,KAAK,EAAE,IAAI,CAACC,MAAM,CAAC6B;IAAK,GACnC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACvB,YAAY,CAAC,CAAC,EACnB,IAAI,CAACgB,UAAU,eACdhE,KAAA,CAAAuC,aAAA,CAAAvC,KAAA,CAAAwE,QAAA,QACC,IAAI,CAACnD,aAAa,CAACH,KAAK,CAAC,eAC1BlB,KAAA,CAAAuC,aAAA,CAACrC,IAAI,QAAEgB,KAAK,CAACuD,QAAe,CAC1B,CACH,CACG,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","WmPanelState","constructor","arguments","_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","icon","flex","justifyContent","text","heading","title","subheading","renderPane","content","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 {props.iconclass ? <WmIcon styles={this.styles.icon} name={props.name + '_icon'} iconclass={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 {...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() ? \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;IAAA,SAAAC,SAAA;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;IACj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EACT;AACF"}
@@ -15,10 +15,6 @@ export default class WmPanelProps extends BaseProps {
15
15
  _defineProperty(this, "badgevalue", null);
16
16
  _defineProperty(this, "badgetype", 'default');
17
17
  _defineProperty(this, "expanded", true);
18
- _defineProperty(this, "iconurl", null);
19
- _defineProperty(this, "iconheight", null);
20
- _defineProperty(this, "iconwidth", null);
21
- _defineProperty(this, "iconmargin", null);
22
18
  }
23
19
  }
24
20
  //# sourceMappingURL=panel.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmPanelProps","constructor","arguments","_defineProperty"],"sources":["panel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPanelProps extends BaseProps {\n animation: string = null as any;\n children: any;\n collapsible: boolean = null as any;\n iconclass: string = null as any;\n title: string = 'Title';\n renderPartial?: Function;\n subheading: string = null as any;\n badgevalue: string = null as any;\n badgetype: string = 'default';\n expanded: boolean = true;\n iconurl?: string = null as any;\n iconheight?: number = null as any;\n iconwidth?: number = null as any;\n iconmargin?: number = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC9B,IAAI;IAAAA,eAAA;IAAAA,eAAA,sBAED,IAAI;IAAAA,eAAA,oBACP,IAAI;IAAAA,eAAA,gBACR,OAAO;IAAAA,eAAA;IAAAA,eAAA,qBAEF,IAAI;IAAAA,eAAA,qBACJ,IAAI;IAAAA,eAAA,oBACL,SAAS;IAAAA,eAAA,mBACT,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,qBACD,IAAI;IAAAA,eAAA,oBACL,IAAI;IAAAA,eAAA,qBACH,IAAI;EAAA;AAC5B"}
1
+ {"version":3,"names":["BaseProps","WmPanelProps","constructor","arguments","_defineProperty"],"sources":["panel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPanelProps extends BaseProps {\n animation: string = null as any;\n children: any;\n collapsible: boolean = null as any;\n iconclass: string = null as any;\n title: string = 'Title';\n renderPartial?: Function;\n subheading: string = null as any;\n badgevalue: string = null as any;\n badgetype: string = 'default';\n expanded: boolean = true;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,oBAC9B,IAAI;IAAAA,eAAA;IAAAA,eAAA,sBAED,IAAI;IAAAA,eAAA,oBACP,IAAI;IAAAA,eAAA,gBACR,OAAO;IAAAA,eAAA;IAAAA,eAAA,qBAEF,IAAI;IAAAA,eAAA,qBACJ,IAAI;IAAAA,eAAA,oBACL,SAAS;IAAAA,eAAA,mBACT,IAAI;EAAA;AAC1B"}
@@ -42,7 +42,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
42
42
  backgroundColor: themeVariables.tabActiveIndicatorBgColor,
43
43
  width: 100,
44
44
  height: 2,
45
- marginTop: -2
45
+ marginTop: -4
46
46
  },
47
47
  activeHeaderIcon: {
48
48
  text: {
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingTop","paddingBottom","paddingVertical","minHeight","justifyContent","flexGrow","headerIcon","color","tabHeaderIconColor","icon","fontSize","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","activeHeader","tabActiveHeaderBgColor","activeIndicator","tabActiveIndicatorBgColor","width","height","marginTop","activeHeaderIcon","tabActiveHeaderIconColor","activeHeaderText","tabActiveHeaderTextColor","arrowIndicator","display","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","arrowIndicatorDot","skeleton"],"sources":["tabheader.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTabheaderStyles = BaseStyles & {\n activeIndicator: ViewStyle,\n header: ViewStyle,\n headerIcon: WmIconStyles,\n headerText: TextStyle,\n arrowIndicator: ViewStyle,\n arrowIndicatorDot: ViewStyle,\n activeHeader: ViewStyle,\n activeHeaderIcon: WmIconStyles,\n activeHeaderText: TextStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-tabheader';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = {\n root: {\n flexDirection: 'row',\n minWidth: '100%',\n overflow: 'visible',\n backgroundColor: themeVariables.tabHeaderBgColor,\n },\n text: {},\n header: {\n backgroundColor: themeVariables.tabHeaderBgColor,\n paddingTop: 16,\n paddingBottom: 16,\n paddingVertical: 12,\n minWidth: 80,\n minHeight:48,\n flexDirection: 'row',\n justifyContent: 'center',\n flexGrow: 1\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n },\n icon: {\n fontSize : 24\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n fontSize: 14,\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 2,\n marginTop: -2\n },\n activeHeaderIcon: {\n text: {\n color: themeVariables.tabActiveHeaderIconColor\n }\n } as WmIconStyles,\n activeHeaderText: {\n color: themeVariables.tabActiveHeaderTextColor \n },\n arrowIndicator: {\n display: 'none',\n backgroundImage: '',\n backgroundSize: '100% 100%',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat'\n },\n arrowIndicatorDot: {\n display: 'none'\n },\n skeleton: {} as WmSkeletonStyles\n } as WmTabheaderStyles;\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAmB/D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAG;IAClBC,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE,MAAM;MAChBC,QAAQ,EAAE,SAAS;MACnBC,eAAe,EAAEP,cAAc,CAACQ;IACpC,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACJH,eAAe,EAAEP,cAAc,CAACQ,gBAAgB;MAChDG,UAAU,EAAE,EAAE;MACdC,aAAa,EAAE,EAAE;MACjBC,eAAe,EAAE,EAAE;MACnBR,QAAQ,EAAE,EAAE;MACZS,SAAS,EAAC,EAAE;MACZV,aAAa,EAAE,KAAK;MACpBW,cAAc,EAAE,QAAQ;MACxBC,QAAQ,EAAE;IACd,CAAC;IACDC,UAAU,EAAE;MACRR,IAAI,EAAE;QACFS,KAAK,EAAElB,cAAc,CAACmB;MAC1B,CAAC;MACDC,IAAI,EAAE;QACFC,QAAQ,EAAG;MACd;IACL,CAAiB;IACjBC,UAAU,EAAE;MACRJ,KAAK,EAAElB,cAAc,CAACuB,kBAAkB;MACxCjB,QAAQ,EAAE,SAAS;MACnBkB,UAAU,EAAExB,cAAc,CAACyB,QAAQ;MACnCC,UAAU,EAAE,KAAK;MACjBL,QAAQ,EAAE;IACd,CAAC;IACDM,YAAY,EAAE;MACVpB,eAAe,EAAEP,cAAc,CAAC4B;IACpC,CAAC;IACDC,eAAe,EAAE;MACbtB,eAAe,EAAEP,cAAc,CAAC8B,yBAAyB;MACzDC,KAAK,EAAE,GAAG;MACVC,MAAM,EAAE,CAAC;MACTC,SAAS,EAAE,CAAC;IAChB,CAAC;IACDC,gBAAgB,EAAE;MACdzB,IAAI,EAAE;QACFS,KAAK,EAAElB,cAAc,CAACmC;MAC1B;IACJ,CAAiB;IACjBC,gBAAgB,EAAE;MACdlB,KAAK,EAAElB,cAAc,CAACqC;IAC1B,CAAC;IACDC,cAAc,EAAE;MACZC,OAAO,EAAE,MAAM;MACfC,eAAe,EAAE,EAAE;MACnBC,cAAc,EAAE,WAAW;MAC3BC,kBAAkB,EAAE,QAAQ;MAC5BC,gBAAgB,EAAE;IACtB,CAAC;IACDC,iBAAiB,EAAE;MACfL,OAAO,EAAE;IACb,CAAC;IACDM,QAAQ,EAAE,CAAC;EACf,CAAsB;EACtB5C,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingTop","paddingBottom","paddingVertical","minHeight","justifyContent","flexGrow","headerIcon","color","tabHeaderIconColor","icon","fontSize","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","activeHeader","tabActiveHeaderBgColor","activeIndicator","tabActiveIndicatorBgColor","width","height","marginTop","activeHeaderIcon","tabActiveHeaderIconColor","activeHeaderText","tabActiveHeaderTextColor","arrowIndicator","display","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","arrowIndicatorDot","skeleton"],"sources":["tabheader.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTabheaderStyles = BaseStyles & {\n activeIndicator: ViewStyle,\n header: ViewStyle,\n headerIcon: WmIconStyles,\n headerText: TextStyle,\n arrowIndicator: ViewStyle,\n arrowIndicatorDot: ViewStyle,\n activeHeader: ViewStyle,\n activeHeaderIcon: WmIconStyles,\n activeHeaderText: TextStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-tabheader';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = {\n root: {\n flexDirection: 'row',\n minWidth: '100%',\n overflow: 'visible',\n backgroundColor: themeVariables.tabHeaderBgColor,\n },\n text: {},\n header: {\n backgroundColor: themeVariables.tabHeaderBgColor,\n paddingTop: 16,\n paddingBottom: 16,\n paddingVertical: 12,\n minWidth: 80,\n minHeight:48,\n flexDirection: 'row',\n justifyContent: 'center',\n flexGrow: 1\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n },\n icon: {\n fontSize : 24\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n fontSize: 14,\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 2,\n marginTop: -4\n },\n activeHeaderIcon: {\n text: {\n color: themeVariables.tabActiveHeaderIconColor\n }\n } as WmIconStyles,\n activeHeaderText: {\n color: themeVariables.tabActiveHeaderTextColor \n },\n arrowIndicator: {\n display: 'none',\n backgroundImage: '',\n backgroundSize: '100% 100%',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat'\n },\n arrowIndicatorDot: {\n display: 'none'\n },\n skeleton: {} as WmSkeletonStyles\n } as WmTabheaderStyles;\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAmB/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cAAc,CAACqC;IAC1B,CAAC;IACDC,cAAc,EAAE;MACZC,OAAO,EAAE,MAAM;MACfC,eAAe,EAAE,EAAE;MACnBC,cAAc,EAAE,WAAW;MAC3BC,kBAAkB,EAAE,QAAQ;MAC5BC,gBAAgB,EAAE;IACtB,CAAC;IACDC,iBAAiB,EAAE;MACfL,OAAO,EAAE;IACb,CAAC;IACDM,QAAQ,EAAE,CAAC;EACf,CAAsB;EACtB5C,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
@@ -164,7 +164,7 @@ export default class WmWizard extends BaseComponent {
164
164
  const isFirstStep = index === 0;
165
165
  const isActiveStep = index === this.state.currentStep;
166
166
  const isNumberTextLayout = this.state.props.classname === 'number-text-inline';
167
- return item.state.props.show != false ? /*#__PURE__*/React.createElement(View, {
167
+ return item.props.show != false ? /*#__PURE__*/React.createElement(View, {
168
168
  style: [this.styles.headerWrapper, isNumberTextLayout ? {
169
169
  paddingRight: isActiveStep ? 0 : 5,
170
170
  paddingLeft: index === this.state.currentStep + 1 ? 0 : 5
@@ -184,10 +184,10 @@ export default class WmWizard extends BaseComponent {
184
184
  color: this.styles.activeStep.color
185
185
  }
186
186
  }),
187
- iconclass: item.state.props.iconclass || 'wm-sl-l sl-check'
187
+ iconclass: item.props.iconclass || 'wm-sl-l sl-check'
188
188
  })), (isNumberTextLayout && isActiveStep || !isNumberTextLayout) && /*#__PURE__*/React.createElement(Text, {
189
189
  style: this.styles.stepTitle
190
- }, item.state.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
190
+ }, item.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
191
191
  style: [this.styles.numberTextStepConnector, {
192
192
  width: isLastStep ? 0 : 50
193
193
  }]
@@ -204,9 +204,7 @@ export default class WmWizard extends BaseComponent {
204
204
  return;
205
205
  }
206
206
  const currentStep = this.steps[index];
207
- if (currentStep.invokePrevCB(index) == false) {
208
- return;
209
- }
207
+ currentStep.invokePrevCB(index);
210
208
  this.updateCurrentStep(index - 1);
211
209
  }
212
210
  next(eventName) {
@@ -235,13 +233,15 @@ export default class WmWizard extends BaseComponent {
235
233
  this.invokeEventCallback('onCancel', [null, this.proxy]);
236
234
  }
237
235
  skip() {
238
- this.next('skip');
236
+ if (this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip) {
237
+ this.next('skip');
238
+ }
239
239
  }
240
240
  renderWidget(props) {
241
241
  var _this$state$props$cla;
242
242
  this.numberOfSteps = this.steps.length;
243
243
  const activeStep = this.steps[this.state.currentStep];
244
- const isSkippable = activeStep && activeStep.state.props.enableskip;
244
+ const isSkippable = this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip;
245
245
  const isProgressCircleHeader = (_this$state$props$cla = this.state.props.classname) === null || _this$state$props$cla === void 0 ? void 0 : _this$state$props$cla.includes('progress-circle-header');
246
246
  return /*#__PURE__*/React.createElement(View, {
247
247
  style: this.styles.root
@@ -258,23 +258,20 @@ export default class WmWizard extends BaseComponent {
258
258
  styles: merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.doneButton),
259
259
  id: this.getTestId('donebtn'),
260
260
  caption: props.donebtnlabel,
261
- onTap: this.done.bind(this),
262
- disabled: activeStep.state.props.disabledone
261
+ onTap: this.done.bind(this)
263
262
  }), this.state.currentStep + 1 < this.numberOfSteps && /*#__PURE__*/React.createElement(WmButton, {
264
263
  iconclass: 'wi wi-chevron-right',
265
264
  styles: merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.nextButton),
266
265
  id: this.getTestId('nextbtn'),
267
266
  iconposition: 'right',
268
267
  caption: props.nextbtnlabel,
269
- onTap: this.next.bind(this),
270
- disabled: activeStep.state.props.disablenext
268
+ onTap: this.next.bind(this)
271
269
  }), this.state.currentStep > 0 && /*#__PURE__*/React.createElement(WmButton, {
272
270
  iconclass: 'wi wi-chevron-left',
273
271
  styles: merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.prevButton),
274
272
  caption: props.previousbtnlabel,
275
273
  id: this.getTestId('prevbtn'),
276
- onTap: this.prev.bind(this),
277
- disabled: activeStep.state.props.disableprev
274
+ onTap: this.prev.bind(this)
278
275
  }), props.cancelable ? /*#__PURE__*/React.createElement(WmButton, {
279
276
  id: this.getTestId('cancelbtn'),
280
277
  caption: props.cancelbtnlabel,