@wavemaker/app-rn-runtime 11.5.1-next.40402 → 11.5.1-rc.5399

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 (52) hide show
  1. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +4 -2
  2. app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
  3. app-rn-runtime/components/basic/label/label.component.js +1 -2
  4. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  5. app-rn-runtime/components/basic/label/label.props.js +0 -1
  6. app-rn-runtime/components/basic/label/label.props.js.map +1 -1
  7. app-rn-runtime/components/chart/area-chart/area-chart.component.js +28 -28
  8. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  9. app-rn-runtime/components/chart/area-chart/area-chart.props.js +9 -1
  10. app-rn-runtime/components/chart/area-chart/area-chart.props.js.map +1 -1
  11. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +15 -20
  12. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  13. app-rn-runtime/components/chart/basechart.component.js +83 -55
  14. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  15. app-rn-runtime/components/chart/basechart.props.js +9 -5
  16. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  17. app-rn-runtime/components/chart/basechart.styles.js +26 -3
  18. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  19. app-rn-runtime/components/chart/line-chart/line-chart.component.js +45 -23
  20. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  21. app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -0
  22. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  23. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  24. app-rn-runtime/components/container/wizard/wizard.component.js +97 -5
  25. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  26. app-rn-runtime/components/container/wizard/wizard.props.js +4 -0
  27. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  28. app-rn-runtime/components/container/wizard/wizard.styles.js +103 -5
  29. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  30. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +0 -8
  31. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  32. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +1 -0
  33. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  34. app-rn-runtime/components/data/list/list.component.js +2 -3
  35. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  36. app-rn-runtime/components/input/basenumber/basenumber.component.js +41 -7
  37. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  38. app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -0
  39. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  40. app-rn-runtime/components/input/currency/currency.component.js +4 -1
  41. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  42. app-rn-runtime/components/input/number/number.component.js +4 -1
  43. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  44. app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -1
  45. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  46. app-rn-runtime/core/utils.js +16 -0
  47. app-rn-runtime/core/utils.js.map +1 -1
  48. app-rn-runtime/package.json +3 -3
  49. app-rn-runtime/variables/service-variable.js +0 -1
  50. app-rn-runtime/variables/service-variable.js.map +1 -1
  51. app-rn-runtime/components/chart/staticdata.js +0 -215
  52. app-rn-runtime/components/chart/staticdata.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { Text, View } from 'react-native';
3
- import { VictoryChart, VictoryLine, VictoryScatter, VictoryGroup } from 'victory-native';
2
+ import { View } from 'react-native';
3
+ import { Svg } from 'react-native-svg';
4
+ import { VictoryChart, VictoryLine, VictoryLegend, VictoryScatter, VictoryGroup, VictoryArea, VictoryVoronoiContainer } from 'victory-native';
4
5
  import WmLineChartProps from './line-chart.props';
5
6
  import { DEFAULT_CLASS } from './line-chart.styles';
6
7
  import { BaseChartComponent, BaseChartComponentState } from "@wavemaker/app-rn-runtime/components/chart/basechart.component";
7
8
  import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
8
- import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
9
9
  export class WmLineChartState extends BaseChartComponentState {}
10
10
  export default class WmLineChart extends BaseChartComponent {
11
11
  constructor(props) {
@@ -14,23 +14,19 @@ export default class WmLineChart extends BaseChartComponent {
14
14
  renderWidget(props) {
15
15
  var _this$state$data;
16
16
  if (!((_this$state$data = this.state.data) !== null && _this$state$data !== void 0 && _this$state$data.length)) {
17
- /*#__PURE__*/React.createElement(VictoryLine, null);
17
+ return null;
18
18
  }
19
19
  return /*#__PURE__*/React.createElement(View, {
20
20
  style: this.styles.root
21
- }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
22
- style: {
23
- flexDirection: 'row',
24
- alignItems: 'center'
25
- }
26
- }, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
27
- iconclass: props.iconclass,
28
- styles: this.styles.icon
29
- }) : null, /*#__PURE__*/React.createElement(Text, {
30
- style: this.styles.title
31
- }, props.title)), /*#__PURE__*/React.createElement(Text, {
32
- style: this.styles.subHeading
33
- }, props.subheading)), /*#__PURE__*/React.createElement(VictoryChart, {
21
+ }, /*#__PURE__*/React.createElement(VictoryChart, {
22
+ containerComponent: /*#__PURE__*/React.createElement(VictoryVoronoiContainer, {
23
+ labels: _ref => {
24
+ let {
25
+ datum
26
+ } = _ref;
27
+ return `${datum.x}, ${datum.y}`;
28
+ }
29
+ }),
34
30
  theme: this.state.theme,
35
31
  height: this.styles.root.height,
36
32
  width: this.styles.root.width || this.screenWidth,
@@ -40,21 +36,44 @@ export default class WmLineChart extends BaseChartComponent {
40
36
  left: props.offsetleft,
41
37
  right: props.offsetright
42
38
  }
43
- }, this.getLegendView(), this.getXaxis(), this.getYAxis(), this.state.data.map((d, i) => {
39
+ }, /*#__PURE__*/React.createElement(VictoryLegend, {
40
+ name: 'legend',
41
+ containerComponent: /*#__PURE__*/React.createElement(Svg, null),
42
+ title: [props.title, props.subheading],
43
+ orientation: "horizontal",
44
+ gutter: 20,
45
+ data: [],
46
+ theme: this.state.theme,
47
+ y: 0
48
+ }), this.getLegendView(), this.getXaxis(), this.getYAxis(), this.state.data.map((d, i) => {
44
49
  return /*#__PURE__*/React.createElement(VictoryGroup, {
45
50
  key: props.name + '_line_group_' + i
46
- }, /*#__PURE__*/React.createElement(VictoryLine, {
51
+ }, /*#__PURE__*/React.createElement(VictoryArea, {
52
+ interpolation: props.interpolation,
53
+ key: props.name + '_area_' + i,
54
+ name: props.name + '_area_' + i,
55
+ standalone: true,
56
+ style: {
57
+ data: {
58
+ fill: '#90EE90',
59
+ // Set the fill color to green
60
+ fillOpacity: 0.8 // Adjust the opacity as needed
61
+ }
62
+ },
63
+
64
+ data: this.isRTL ? d.toReversed() : d
65
+ }), /*#__PURE__*/React.createElement(VictoryLine, {
47
66
  interpolation: props.interpolation,
48
67
  key: props.name + '_line_' + i,
49
68
  name: props.name + '_line_' + i,
50
69
  standalone: true,
51
70
  style: {
52
71
  data: {
53
- stroke: this.state.colors[i] || ThemeVariables.INSTANCE.chartLineColor,
72
+ stroke: "green" || ThemeVariables.INSTANCE.chartLineColor,
54
73
  strokeWidth: props.linethickness
55
74
  }
56
75
  },
57
- data: d
76
+ data: this.isRTL ? d.toReversed() : d
58
77
  }), props.highlightpoints || this.state.data.length === 1 ? /*#__PURE__*/React.createElement(VictoryScatter, {
59
78
  size: 5,
60
79
  key: props.name + '_scatter' + i,
@@ -63,8 +82,11 @@ export default class WmLineChart extends BaseChartComponent {
63
82
  fill: this.state.colors[i],
64
83
  opacity: 0.8
65
84
  }
66
- },
67
- data: d
85
+ }
86
+
87
+ // data={this.isRTL?d.toReversed():d}
88
+ ,
89
+ data: this.isRTL ? d.toReversed() : [d[d.length - 1]]
68
90
  }) : null);
69
91
  })));
70
92
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","VictoryChart","VictoryLine","VictoryScatter","VictoryGroup","WmLineChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","ThemeVariables","WmIcon","WmLineChartState","WmLineChart","constructor","props","renderWidget","_this$state$data","state","data","length","createElement","style","styles","root","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","theme","height","width","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","getLegendView","getXaxis","getYAxis","map","d","i","key","name","interpolation","standalone","stroke","colors","INSTANCE","chartLineColor","strokeWidth","linethickness","highlightpoints","size","fill","opacity"],"sources":["line-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { Svg } from 'react-native-svg';\n\nimport {\n VictoryChart,\n VictoryLine,\n VictoryLegend,\n VictoryScatter,\n VictoryGroup,\n VictoryLabel\n} from 'victory-native';\n\nimport WmLineChartProps from './line-chart.props';\nimport { DEFAULT_CLASS, WmLineChartStyles } from './line-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport {InterpolationPropType} from \"victory-core\";\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nexport class WmLineChartState extends BaseChartComponentState<WmLineChartProps> {}\n\nexport default class WmLineChart extends BaseChartComponent<WmLineChartProps, WmLineChartState, WmLineChartStyles> {\n\n constructor(props: WmLineChartProps) {\n super(props, DEFAULT_CLASS, new WmLineChartProps(), new WmLineChartState());\n }\n\n renderWidget(props: WmLineChartProps) {\n if (!this.state.data?.length) {\n <VictoryLine/>\n }\n return (<View\n style={this.styles.root}\n >\n <View>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n { props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n <VictoryChart\n theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.screenWidth}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}\n > \n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {\n this.state.data.map((d: any, i: number) => {\n return <VictoryGroup key={props.name + '_line_group_' + i}>\n <VictoryLine interpolation={props.interpolation as InterpolationPropType} key={props.name + '_line_' + i}\n name={props.name + '_line_' + i}\n standalone={true}\n style={{\n data: {\n stroke: (this.state.colors[i] || ThemeVariables.INSTANCE.chartLineColor),\n strokeWidth: props.linethickness}\n }}\n data={d}\n />\n {(props.highlightpoints || this.state.data.length === 1) ?\n <VictoryScatter size={5} key={props.name + '_scatter' + i}\n style={{\n data: { fill: this.state.colors[i], opacity: 0.8}\n }}\n data={d}\n />: null}</VictoryGroup>\n })\n }\n </VictoryChart>\n </View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAGzC,SACEC,YAAY,EACZC,WAAW,EAEXC,cAAc,EACdC,YAAY,QAEP,gBAAgB;AAEvB,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,cAAc,MAAM,kDAAkD;AAE7E,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAO,MAAMC,gBAAgB,SAASH,uBAAuB,CAAmB;AAEhF,eAAe,MAAMI,WAAW,SAASL,kBAAkB,CAAwD;EAEjHM,WAAWA,CAACC,KAAuB,EAAE;IACnC,KAAK,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IAAI,GAAG,UAAU,GAAGF,CAAE;QAC1C5B,KAAK,EAAE;UACLH,IAAI,EAAE;YAAE4C,IAAI,EAAE,IAAI,CAAC7C,KAAK,CAACsC,MAAM,CAACN,CAAC,CAAC;YAAEc,OAAO,EAAE;UAAG;QAClD,CAAE;QACF7C,IAAI,EAAE8B;MAAE,CACvB,CAAC,GAAE,IAAmB,CAAC;IAC5B,CAAC,CAES,CACR,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","View","Svg","VictoryChart","VictoryLine","VictoryLegend","VictoryScatter","VictoryGroup","VictoryArea","VictoryVoronoiContainer","WmLineChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","ThemeVariables","WmLineChartState","WmLineChart","constructor","props","renderWidget","_this$state$data","state","data","length","createElement","style","styles","root","containerComponent","labels","_ref","datum","x","y","theme","height","width","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","name","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","map","d","i","key","interpolation","standalone","fill","fillOpacity","isRTL","toReversed","stroke","INSTANCE","chartLineColor","strokeWidth","linethickness","highlightpoints","size","colors","opacity"],"sources":["line-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { Svg } from 'react-native-svg';\n\nimport {\n VictoryChart,\n VictoryLine,\n VictoryLegend,\n VictoryScatter,\n VictoryGroup,\n VictoryLabel,\n VictoryArea,\n VictoryAxis,\n VictoryTooltip,\n VictoryVoronoiContainer\n} from 'victory-native';\n\nimport WmLineChartProps from './line-chart.props';\nimport { DEFAULT_CLASS, WmLineChartStyles } from './line-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport {InterpolationPropType} from \"victory-core\";\n\nexport class WmLineChartState extends BaseChartComponentState<WmLineChartProps> {}\n\nexport default class WmLineChart extends BaseChartComponent<WmLineChartProps, WmLineChartState, WmLineChartStyles> {\n\n constructor(props: WmLineChartProps) {\n super(props, DEFAULT_CLASS, new WmLineChartProps(), new WmLineChartState());\n }\n renderWidget(props: WmLineChartProps) {\n \n if (!this.state.data?.length) {\n return null;\n }\n return (<View\n style={this.styles.root}\n >\n <VictoryChart\n containerComponent={<VictoryVoronoiContainer labels={({ datum }) => `${(datum.x)}, ${(datum.y)}`}/>}\n theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.screenWidth}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}\n >\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 y={0}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {\n this.state.data.map((d: any, i: number) => {\n return <VictoryGroup key={props.name + '_line_group_' + i}>\n <VictoryArea\n interpolation={props.interpolation as InterpolationPropType}\n key={props.name + '_area_' + i}\n name={props.name + '_area_' + i}\n standalone={true}\n style={{\n data: {\n fill: '#90EE90', // Set the fill color to green\n fillOpacity: 0.8, // Adjust the opacity as needed\n },\n }}\n data={this.isRTL ? d.toReversed() : d}\n />\n <VictoryLine interpolation={props.interpolation as InterpolationPropType} key={props.name + '_line_' + i}\n name={props.name + '_line_' + i}\n standalone={true}\n style={{\n data: {\n stroke: (\"green\" || ThemeVariables.INSTANCE.chartLineColor),\n strokeWidth: props.linethickness,\n }\n }} \n data={this.isRTL?d.toReversed():d}\n />\n {(props.highlightpoints || this.state.data.length === 1) ?\n <VictoryScatter size={5} key={props.name + '_scatter' + i}\n style={{\n data: { fill: this.state.colors[i], opacity: 0.8,}\n }}\n \n // data={this.isRTL?d.toReversed():d}\n data={this.isRTL?d.toReversed(): [d[d.length-1]]}\n \n />: null}\n </VictoryGroup>\n })\n }\n </VictoryChart>\n </View>);\n }\n}\n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E,CAACR,CAAC,CAACA,CAAC,CAACjC,MAAM,GAAC,CAAC,CAAC;MAAE,CAEhE,CAAC,GAAE,IACU,CAAC;IACnB,CAAC,CAES,CACR,CAAC;EACT;AACF"}
@@ -6,6 +6,7 @@ export default class WmLineChartProps extends BaseChartComponentProps {
6
6
  constructor() {
7
7
  super(...arguments);
8
8
  _defineProperty(this, "linethickness", 2);
9
+ _defineProperty(this, "getdatapointstodisplay", label => null);
9
10
  }
10
11
  }
11
12
  //# sourceMappingURL=line-chart.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseChartComponentProps","WmLineChartProps","constructor","arguments","_defineProperty"],"sources":["line-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmLineChartProps extends BaseChartComponentProps {\n linethickness: number = 2;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,gBAAgB,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,wBAC5C,CAAC;EAAA;AAC3B"}
1
+ {"version":3,"names":["BaseChartComponentProps","WmLineChartProps","constructor","arguments","_defineProperty","label"],"sources":["line-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmLineChartProps extends BaseChartComponentProps {\n linethickness: number = 2;\n getdatapointstodisplay = (label: string) => null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,gBAAgB,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,wBAC5C,CAAC;IAAAA,eAAA,iCACCC,KAAa,IAAK,IAAW;EAAA;AACzD"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Platform","Svg","VictoryLabel","VictoryPie","WmPieChartProps","DEFAULT_CLASS","formatCompactNumber","WmIcon","BaseChartComponent","BaseChartComponentState","WmDonutChartProps","Legend","WmPieChartState","constructor","arguments","_defineProperty","WmPieChart","props","type","e","_e$nativeEvent","viewWidth","nativeEvent","layout","width","updateState","chartWidth","totalHeight","height","_e$nativeEvent2","infoHeight","opacity","_e$nativeEvent3","_e$nativeEvent4","legendWidth","legendHeight","componentDidMount","getLabel","d","labeltype","Math","round","y","state","total","xaxisDatakeyArr","x","onSelect","event","data","value","slice","label","datum","selectedItem","dataset","index","selectedChartItem","color","style","fill","_dataObj","invokeEventCallback","proxy","renderWidget","length","pieData","showlegend","chartHeight","styles","root","radius","min","innerRadius","donutratio","styleProp","labelRadius","showlabels","labels","display","origin","orientation","legendData","map","name","colors","createElement","onLayout","onViewLayoutChange","onInfoViewLayoutChange","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","onLegendViewLayoutChange","testStyle","legendText","dotStyle","legenedDot","justifyContent","flex","standalone","colorScale","_ref","endAngle","theme","key","labelPlacement","labelplacement","events","target","eventHandlers","OS","onClick","bind","onPress","textAnchor","text","centerlabel","maxWidth"],"sources":["pie-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\n\nimport { VictoryLabel, VictoryLegend, VictoryPie } from 'victory-native';\n\nimport WmPieChartProps from './pie-chart.props';\nimport { DEFAULT_CLASS, WmPieChartStyles } from './pie-chart.styles';\n\nimport { formatCompactNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\nimport WmDonutChartProps from '@wavemaker/app-rn-runtime/components/chart/donut-chart/donut-chart.props';\nimport { Legend } from '../legend/legend.component';\n\n\nexport class WmPieChartState extends BaseChartComponentState<WmPieChartProps> {\n chartWidth = 0;\n totalHeight = 0;\n infoHeight = 10;\n legendWidth = 0;\n legendHeight = 0;\n opacity = 0;\n}\n\nexport default class WmPieChart extends BaseChartComponent<WmPieChartProps, WmPieChartState, WmPieChartStyles> {\n\n constructor(props: WmPieChartProps) {\n super(props, DEFAULT_CLASS, props.type === 'Donut' ? new WmDonutChartProps() : new WmPieChartProps(), new WmPieChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth,\n totalHeight: e.nativeEvent?.layout.height\n } as WmPieChartState)\n }\n\n onInfoViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n infoHeight: e.nativeEvent?.layout.height,\n opacity: 1\n } as WmPieChartState);\n }\n\n onLegendViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n legendWidth: e.nativeEvent?.layout.width,\n legendHeight: e.nativeEvent?.layout.height\n } as WmPieChartState);\n }\n\n getLabel(d: {x: any, y: any}, props: WmPieChartProps): string {\n switch(props.labeltype) {\n case 'percent': {\n return Math.round(d.y * 100 /this.state.total) + '%';\n }\n case 'key': {\n return this.state.xaxisDatakeyArr[d.x];\n }\n case 'value': {\n return formatCompactNumber(d.y);\n }\n case 'key-value': {\n return this.state.xaxisDatakeyArr[d.x] + ' ' + d.y;\n }\n }\n }\n\n onSelect(event: any, data: any){\n let value = data.slice.value;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = data.slice;\n selectedChartItem[\"data\"] = {x: label, y: value, color: data.style.fill, _dataObj: selectedItem}\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmPieChartProps) {\n if (!this.state.data.length) {\n return null;\n } \n const pieData = this.state.data[0];\n const chartWidth = this.state.chartWidth \n - (props.showlegend === 'right' ? this.state.legendWidth : 0);\n const chartHeight = (this.styles.root.height ? this.state.totalHeight : chartWidth) \n - this.state.infoHeight \n - (props.showlegend === 'right' ? 0 : this.state.legendHeight);\n let radius = (Math.min(chartWidth, chartHeight) - 40)/ 2;\n let innerRadius = props.donutratio * radius;\n let styleProp = {};\n let labelRadius;\n if (props.showlabels === 'hide') {\n styleProp={labels: { display: \"none\" }};\n } else if (props.showlabels === 'inside') {\n labelRadius = radius/2;\n } else {\n labelRadius = radius + 8;\n }\n const origin = {x: (chartWidth/2), y: (chartHeight/2)};\n const orientation = props.showlegend === 'right' ? 'vertical' : 'horizontal';\n let legendData = pieData.map((d: {x: any, y: any}, index: number) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x],\n color: this.state.colors[index % (this.state.colors.length)]\n };\n });\n return (\n <View style={[{opacity: this.state.opacity}, this.styles.root]}\n onLayout={this.onViewLayoutChange}>\n <View onLayout={this.onInfoViewLayoutChange}>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n {props.showlegend === 'top' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n <View style={{flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>\n <View style={{flex: 1}}>\n {chartWidth ? (\n <Svg\n width={chartWidth}\n height={chartHeight}\n >\n <VictoryPie\n style={styleProp}\n standalone={false}\n colorScale={this.state.colors}\n labels={({datum}) => this.getLabel(datum, props)}\n endAngle={this.state.endAngle || 0}\n radius={radius}\n innerRadius={innerRadius}\n theme={this.state.theme}\n key={props.name}\n name={props.name}\n data={pieData}\n origin={origin}\n labelPlacement={props.labelplacement}\n labelRadius={labelRadius}\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 <VictoryLabel\n textAnchor=\"middle\"\n style={this.styles.title as any}\n x={origin.x} y={origin.y}\n text={props.centerlabel}\n />\n </Svg>) : null}\n </View>\n {props.showlegend === 'right' ? \n (<View style={{maxWidth: '50%'}} onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}\n orientation='vertical'></Legend>\n </View>) : null }\n </View>\n {props.showlegend === 'bottom' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACtE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,SAASC,YAAY,EAAiBC,UAAU,QAAQ,gBAAgB;AAExE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AAEpE,SAASC,mBAAmB,QAAQ,sCAAsC;AAC1E,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,iBAAiB,MAAM,0EAA0E;AACxG,SAASC,MAAM,QAAQ,4BAA4B;AAGnD,OAAO,MAAMC,eAAe,SAASH,uBAAuB,CAAkB;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBAC/D,CAAC;IAAAA,eAAA,sBACA,CAAC;IAAAA,eAAA,qBACF,EAAE;IAAAA,eAAA,sBACD,CAAC;IAAAA,eAAA,uBACA,CAAC;IAAAA,eAAA,kBACN,CAAC;EAAA;AACb;AAEA,eAAe,MAAMC,UAAU,SAASR,kBAAkB,CAAqD;EAE7GK,WAAWA,CAACI,KAAsB,EAAE;I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AI,CAACU;IAAyB,gBAC7CpG,KAAA,CAAAyF,aAAA,CAAC3E,MAAM;MAACsC,IAAI,EAAEiC,UAAW;MACvBgB,SAAS,EAAE,IAAI,CAAC7B,MAAM,CAAC8B,UAAW;MAClCC,QAAQ,EAAE,IAAI,CAAC/B,MAAM,CAACgC;IAAW,CAAS,CACxC,CAAC,GAAI,IACT,CAAC;EAEX;AACF"}
1
+ {"version":3,"names":["React","View","Text","Platform","Svg","VictoryLabel","VictoryPie","WmPieChartProps","DEFAULT_CLASS","formatCompactNumber","WmIcon","BaseChartComponent","BaseChartComponentState","WmDonutChartProps","Legend","WmPieChartState","constructor","arguments","_defineProperty","WmPieChart","props","type","e","_e$nativeEvent","viewWidth","nativeEvent","layout","width","updateState","chartWidth","totalHeight","height","_e$nativeEvent2","infoHeight","opacity","_e$nativeEvent3","_e$nativeEvent4","legendWidth","legendHeight","componentDidMount","getLabel","d","labeltype","Math","round","y","state","total","xaxisDatakeyArr","x","onSelect","event","data","value","slice","label","datum","selectedItem","dataset","index","selectedChartItem","color","style","fill","_dataObj","invokeEventCallback","proxy","renderWidget","length","pieData","showlegend","chartHeight","styles","root","radius","min","innerRadius","donutratio","styleProp","labelRadius","showlabels","labels","display","origin","orientation","legendData","map","name","colors","createElement","onLayout","onViewLayoutChange","onInfoViewLayoutChange","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","onLegendViewLayoutChange","testStyle","legendText","dotStyle","legenedDot","justifyContent","flex","standalone","colorScale","_ref","endAngle","theme","key","labelPlacement","labelplacement","events","target","eventHandlers","OS","onClick","bind","onPress","textAnchor","text","centerlabel","maxWidth"],"sources":["pie-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\n\nimport { VictoryLabel, VictoryLegend, VictoryPie } from 'victory-native';\n\nimport WmPieChartProps from './pie-chart.props';\nimport { DEFAULT_CLASS, WmPieChartStyles } from './pie-chart.styles';\n\nimport { formatCompactNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\nimport WmDonutChartProps from '@wavemaker/app-rn-runtime/components/chart/donut-chart/donut-chart.props';\nimport { Legend } from '../legend/legend.component';\n\nexport class WmPieChartState extends BaseChartComponentState<WmPieChartProps> {\n chartWidth = 0;\n totalHeight = 0;\n infoHeight = 10;\n legendWidth = 0;\n legendHeight = 0;\n opacity = 0;\n}\n\nexport default class WmPieChart extends BaseChartComponent<WmPieChartProps, WmPieChartState, WmPieChartStyles> {\n\n constructor(props: WmPieChartProps) {\n super(props, DEFAULT_CLASS, props.type === 'Donut' ? new WmDonutChartProps() : new WmPieChartProps(), new WmPieChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth,\n totalHeight: e.nativeEvent?.layout.height\n } as WmPieChartState)\n }\n\n onInfoViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n infoHeight: e.nativeEvent?.layout.height,\n opacity: 1\n } as WmPieChartState);\n }\n\n onLegendViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n legendWidth: e.nativeEvent?.layout.width,\n legendHeight: e.nativeEvent?.layout.height\n } as WmPieChartState);\n }\n\n getLabel(d: {x: any, y: any}, props: WmPieChartProps): string {\n switch(props.labeltype) {\n case 'percent': {\n return Math.round(d.y * 100 /this.state.total) + '%';\n }\n case 'key': {\n return this.state.xaxisDatakeyArr[d.x];\n }\n case 'value': {\n return formatCompactNumber(d.y);\n }\n case 'key-value': {\n return this.state.xaxisDatakeyArr[d.x] + ' ' + d.y;\n }\n }\n }\n\n onSelect(event: any, data: any){\n let value = data.slice.value;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = data.slice;\n selectedChartItem[\"data\"] = {x: label, y: value, color: data.style.fill, _dataObj: selectedItem}\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmPieChartProps) {\n if (!this.state.data.length) {\n return null;\n }\n const pieData = this.state.data[0];\n const chartWidth = this.state.chartWidth \n - (props.showlegend === 'right' ? this.state.legendWidth : 0);\n const chartHeight = (this.styles.root.height ? this.state.totalHeight : chartWidth) \n - this.state.infoHeight \n - (props.showlegend === 'right' ? 0 : this.state.legendHeight);\n let radius = (Math.min(chartWidth, chartHeight) - 40)/ 2;\n let innerRadius = props.donutratio * radius;\n let styleProp = {};\n let labelRadius;\n if (props.showlabels === 'hide') {\n styleProp={labels: { display: \"none\" }};\n } else if (props.showlabels === 'inside') {\n labelRadius = radius/2;\n } else {\n labelRadius = radius + 8;\n }\n const origin = {x: (chartWidth/2), y: (chartHeight/2)};\n const orientation = props.showlegend === 'right' ? 'vertical' : 'horizontal';\n let legendData = pieData.map((d: {x: any, y: any}, index: number) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x],\n color: this.state.colors[index % (this.state.colors.length)]\n };\n });\n return (\n <View style={[{opacity: this.state.opacity}, this.styles.root]}\n onLayout={this.onViewLayoutChange}>\n <View onLayout={this.onInfoViewLayoutChange}>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n {props.showlegend === 'top' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n <View style={{flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>\n <View style={{flex: 1}}>\n {chartWidth ? (\n <Svg\n width={chartWidth}\n height={chartHeight}\n >\n <VictoryPie\n style={styleProp}\n standalone={false}\n colorScale={this.state.colors}\n labels={({datum}) => this.getLabel(datum, props)}\n endAngle={this.state.endAngle || 0}\n radius={radius}\n innerRadius={innerRadius}\n theme={this.state.theme}\n key={props.name}\n name={props.name}\n data={pieData}\n origin={origin}\n labelPlacement={props.labelplacement}\n labelRadius={labelRadius}\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 <VictoryLabel\n textAnchor=\"middle\"\n style={this.styles.title as any}\n x={origin.x} y={origin.y}\n text={props.centerlabel}\n />\n </Svg>) : null}\n </View>\n {props.showlegend === 'right' ? \n (<View style={{maxWidth: '50%'}} onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}\n orientation='vertical'></Legend>\n </View>) : null }\n </View>\n {props.showlegend === 'bottom' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACtE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,SAASC,YAAY,EAAiBC,UAAU,QAAQ,gBAAgB;AAExE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AAEpE,SAASC,mBAAmB,QAAQ,sCAAsC;AAC1E,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,iBAAiB,MAAM,0EAA0E;AACxG,SAASC,MAAM,QAAQ,4BAA4B;AAEnD,OA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AC3E,MAAM;MAACsC,IAAI,EAAEiC,UAAW;MACvBgB,SAAS,EAAE,IAAI,CAAC7B,MAAM,CAAC8B,UAAW;MAClCC,QAAQ,EAAE,IAAI,CAAC/B,MAAM,CAACgC,UAAW;MACjCpB,WAAW,EAAC;IAAU,CAAS,CAC7B,CAAC,GAAI,IACT,CAAC,EACNhE,KAAK,CAACkD,UAAU,KAAK,QAAQ,gBAC3BtE,KAAA,CAAAyF,aAAA,CAACxF,IAAI;MAACyF,QAAQ,EAAE,IAAI,CAACU;IAAyB,gBAC7CpG,KAAA,CAAAyF,aAAA,CAAC3E,MAAM;MAACsC,IAAI,EAAEiC,UAAW;MACvBgB,SAAS,EAAE,IAAI,CAAC7B,MAAM,CAAC8B,UAAW;MAClCC,QAAQ,EAAE,IAAI,CAAC/B,MAAM,CAACgC;IAAW,CAAS,CACxC,CAAC,GAAI,IACT,CAAC;EAEX;AACF"}
@@ -2,7 +2,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
2
2
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
3
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
4
  import React from 'react';
5
- import { Text, View, TouchableOpacity, Platform } from 'react-native';
5
+ import { Text, View, TouchableOpacity, Platform, TouchableWithoutFeedback } from 'react-native';
6
6
  import { isArray, merge } from 'lodash';
7
7
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
8
8
  import WmWizardProps from './wizard.props';
@@ -10,6 +10,9 @@ import { DEFAULT_CLASS } from './wizard.styles';
10
10
  import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';
11
11
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
12
12
  import WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';
13
+ import WmProgressCircle from '@wavemaker/app-rn-runtime/components/basic/progress-circle/progress-circle.component';
14
+ import WmPopover from '@wavemaker/app-rn-runtime/components/navigation/popover/popover.component';
15
+ import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
13
16
  export class WmWizardState extends BaseComponentState {
14
17
  constructor() {
15
18
  super(...arguments);
@@ -22,6 +25,14 @@ export default class WmWizard extends BaseComponent {
22
25
  super(props, DEFAULT_CLASS, new WmWizardProps());
23
26
  _defineProperty(this, "numberOfSteps", null);
24
27
  _defineProperty(this, "steps", []);
28
+ _defineProperty(this, "popOverRef", null);
29
+ _defineProperty(this, "listener", {
30
+ onComponentInit: c => {
31
+ if (c instanceof WmPopover) {
32
+ this.popOverRef = c;
33
+ }
34
+ }
35
+ });
25
36
  const steps = props.children;
26
37
  let defaultStepIndex = 0;
27
38
  if (isArray(steps) && props.defaultstep) {
@@ -63,12 +74,91 @@ export default class WmWizard extends BaseComponent {
63
74
  }
64
75
  return style;
65
76
  }
77
+ renderMenuPopover() {
78
+ const menuDataset = this.props.getmenudataexpression || ((item, index) => '');
79
+ const Labels = this.steps.map(step => step.state.props.title);
80
+ return /*#__PURE__*/React.createElement(WmPopover, {
81
+ id: this.getTestId('menu'),
82
+ styles: this.styles.popover,
83
+ contentanimation: 'slideInDown',
84
+ caption: '',
85
+ popoverheight: this.styles.popover.popover.height || null,
86
+ popoverwidth: this.styles.popover.popover.width || null,
87
+ listener: this.listener,
88
+ iconclass: this.props.popovericonclass || 'fa fa-caret-down',
89
+ iconposition: "right",
90
+ type: "dropdown"
91
+ }, /*#__PURE__*/React.createElement(View, {
92
+ style: this.styles.popover.popover
93
+ }, Labels.map((item, index) => {
94
+ const currentMenuItem = index == this.state.currentStep;
95
+ const caption = menuDataset({
96
+ "count": this.steps.length
97
+ }, index);
98
+ return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
99
+ key: 'wizard_menu_item_' + index,
100
+ onPress: () => {
101
+ this.popOverRef.hide();
102
+ }
103
+ }, /*#__PURE__*/React.createElement(View, {
104
+ style: [this.styles.stepMenu, currentMenuItem ? this.styles.activeStepMenu : {}]
105
+ }, /*#__PURE__*/React.createElement(WmIcon, {
106
+ caption: caption,
107
+ iconclass: currentMenuItem ? "wi wi-radio-button-checked" : 'wi wi-radio-button-unchecked',
108
+ styles: currentMenuItem ? this.styles.stepMenuActiveIcon : this.styles.stepMenuIcon
109
+ }), /*#__PURE__*/React.createElement(WmLabel, {
110
+ caption: item,
111
+ styles: currentMenuItem ? this.styles.stepMenuActiveLabel : this.styles.stepMenuLabel
112
+ })));
113
+ })));
114
+ }
115
+ renderProgressCircleHeader(item, index) {
116
+ const progressTitle = this.props.progresstitle || index + 1 + '/' + this.steps.length;
117
+ return /*#__PURE__*/React.createElement(View, {
118
+ style: [this.styles.headerWrapper],
119
+ key: index + 1
120
+ }, /*#__PURE__*/React.createElement(View, {
121
+ style: this.styles.stepWrapper
122
+ }, /*#__PURE__*/React.createElement(View, {
123
+ style: {
124
+ flex: 1,
125
+ alignItems: 'flex-start',
126
+ justifyContent: 'center',
127
+ flexDirection: 'row'
128
+ }
129
+ }, /*#__PURE__*/React.createElement(WmProgressCircle, {
130
+ minvalue: 0,
131
+ maxvalue: this.steps.length,
132
+ datavalue: index + 1,
133
+ captionplacement: 'inside',
134
+ type: this.props.progresstype,
135
+ title: progressTitle,
136
+ subtitle: '',
137
+ styles: this.styles.progressCircle
138
+ })), /*#__PURE__*/React.createElement(View, {
139
+ style: {
140
+ flex: 2,
141
+ justifyContent: 'center',
142
+ flexDirection: 'column'
143
+ }
144
+ }, /*#__PURE__*/React.createElement(Text, {
145
+ style: this.styles.stepTitle
146
+ }, item.props.title || 'Step Title'), /*#__PURE__*/React.createElement(Text, {
147
+ style: this.styles.stepSubTitle
148
+ }, item.props.subtitle || 'Step Sub Title')), /*#__PURE__*/React.createElement(View, {
149
+ style: {
150
+ flexDirection: 'row',
151
+ alignItems: 'flex-end',
152
+ justifyContent: 'flex-end'
153
+ }
154
+ }, this.renderMenuPopover())));
155
+ }
66
156
  renderWizardHeader(item, index) {
67
157
  const isLastStep = index === this.numberOfSteps - 1;
68
158
  const isFirstStep = index === 0;
69
159
  const isActiveStep = index === this.state.currentStep;
70
160
  const isNumberTextLayout = this.state.props.classname === 'number-text-inline';
71
- return item.state.props.show != false ? /*#__PURE__*/React.createElement(View, {
161
+ return item.props.show != false ? /*#__PURE__*/React.createElement(View, {
72
162
  style: [this.styles.headerWrapper, isNumberTextLayout ? {
73
163
  paddingRight: isActiveStep ? 0 : 5,
74
164
  paddingLeft: index === this.state.currentStep + 1 ? 0 : 5
@@ -88,10 +178,10 @@ export default class WmWizard extends BaseComponent {
88
178
  color: this.styles.activeStep.color
89
179
  }
90
180
  }),
91
- iconclass: item.state.props.iconclass || 'wm-sl-l sl-check'
181
+ iconclass: item.props.iconclass || 'wm-sl-l sl-check'
92
182
  })), (isNumberTextLayout && isActiveStep || !isNumberTextLayout) && /*#__PURE__*/React.createElement(Text, {
93
183
  style: this.styles.stepTitle
94
- }, item.state.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
184
+ }, item.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
95
185
  style: [this.styles.numberTextStepConnector, {
96
186
  width: isLastStep ? 0 : 50
97
187
  }]
@@ -131,14 +221,16 @@ export default class WmWizard extends BaseComponent {
131
221
  this.onNext(steps, 'skip');
132
222
  }
133
223
  renderWidget(props) {
224
+ var _this$state$props$cla;
134
225
  this.numberOfSteps = this.steps.length;
135
226
  const activeStep = this.steps[this.state.currentStep];
136
227
  const isSkippable = this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip;
228
+ 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');
137
229
  return /*#__PURE__*/React.createElement(View, {
138
230
  style: this.styles.root
139
231
  }, this._background, /*#__PURE__*/React.createElement(View, {
140
232
  style: this.styles.wizardHeader
141
- }, this.steps ? this.steps.map((step, i) => this.renderWizardHeader(step, i)) : null), /*#__PURE__*/React.createElement(View, {
233
+ }, activeStep && isProgressCircleHeader ? this.renderProgressCircleHeader(activeStep, this.state.currentStep) : this.steps ? this.steps.map((step, i) => this.renderWizardHeader(step, i)) : null), /*#__PURE__*/React.createElement(View, {
142
234
  style: this.styles.wizardBody
143
235
  }, props.children), /*#__PURE__*/React.createElement(View, {
144
236
  style: [this.styles.wizardFooter, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","TouchableOpacity","Platform","isArray","merge","BaseComponent","BaseComponentState","WmWizardProps","DEFAULT_CLASS","WmButton","WmIcon","WmAnchor","WmWizardState","constructor","arguments","_defineProperty","WmWizard","props","steps","children","defaultStepIndex","defaultstep","map","item","index","name","updateCurrentStep","addWizardStep","step","forceUpdate","componentDidMount","showActiveStep","_this$steps$this$stat","state","currentStep","setActive","_this$steps$this$stat2","isDone","length","undefined","setInActive","updateState","getStepStyle","style","styles","push","doneStep","activeStep","renderWizardHeader","isLastStep","numberOfSteps","isFirstStep","isActiveStep","isNumberTextLayout","classname","show","createElement","headerWrapper","paddingRight","paddingLeft","key","stepWrapper","onPress","bind","disabled","stepCounter","stepIcon","icon","color","iconclass","stepTitle","title","numberTextStepConnector","width","stepConnector","left","OS","isRTL","onPrev","invokePrevCB","onNext","eventName","invokeSkipCB","invokeNextCB","onDone","$event","invokeEventCallback","proxy","onCancel","onSkip","renderWidget","isSkippable","enableskip","root","_background","wizardHeader","i","wizardBody","wizardFooter","flexDirection","actionsalignment","wizardActions","theme","getStyle","doneButton","id","getTestId","caption","donebtnlabel","onTap","nextButton","iconposition","nextbtnlabel","prevButton","previousbtnlabel","cancelable","cancelbtnlabel","cancelButton","skipLink"],"sources":["wizard.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, Platform } from 'react-native';\nimport { isArray, merge } from 'lodash';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmWizardProps from './wizard.props';\nimport { DEFAULT_CLASS, WmWizardStyles } from './wizard.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmWizardstep from './wizardstep/wizardstep.component';\n\nexport class WmWizardState extends BaseComponentState<WmWizardProps> {\n currentStep: number = 0;\n isDone: boolean = false;\n}\n\nexport default class WmWizard extends BaseComponent<WmWizardProps, WmWizardState, WmWizardStyles> {\n private numberOfSteps: number = null as any;\n private steps = [] as WmWizardstep[];\n constructor(props: WmWizardProps) {\n super(props, DEFAULT_CLASS, new WmWizardProps());\n const steps = props.children;\n let defaultStepIndex = 0;\n if (isArray(steps) && props.defaultstep) {\n steps.map((item: any, index: any) => {\n if (props.defaultstep === item.props.name) {\n defaultStepIndex = index;\n }\n })\n }\n this.updateCurrentStep(defaultStepIndex);\n }\n\n addWizardStep(step: WmWizardstep) {\n this.steps[step.props.index] = step;\n this.forceUpdate();\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.showActiveStep();\n }\n\n showActiveStep() {\n this.steps[this.state.currentStep]?.setActive();\n }\n\n updateCurrentStep(index: number, isDone = false) {\n this.steps[this.state.currentStep]?.setInActive();\n this.updateState({\n currentStep: index,\n isDone: isDone\n } as WmWizardState, () => this.showActiveStep());\n }\n\n getStepStyle(index: number) {\n const style = [this.styles.step];\n if (this.state.isDone || index < this.state.currentStep) {\n style.push(this.styles.doneStep);\n } else if (this.state.currentStep === index) {\n style.push(this.styles.activeStep);\n }\n return style;\n }\n\n renderWizardHeader(item: any, index: number) {\n const isLastStep = index === this.numberOfSteps - 1;\n const isFirstStep = index === 0;\n const isActiveStep = index === this.state.currentStep;\n const isNumberTextLayout = this.state.props.classname === 'number-text-inline';\n return item.state.props.show != false ? (\n <View style={[this.styles.headerWrapper, isNumberTextLayout ?\n {paddingRight: isActiveStep ? 0 : 5, paddingLeft: index === this.state.currentStep + 1 ? 0 : 5}: {}]} key={index+1}>\n <TouchableOpacity style={this.styles.stepWrapper}\n onPress={this.updateCurrentStep.bind(this, index, false)} disabled={index >= this.state.currentStep}>\n <View style={this.getStepStyle(index)}>\n {index >= this.state.currentStep && !this.state.isDone &&\n <Text style={isActiveStep ? this.styles.activeStep : this.styles.stepCounter}>{index+1}</Text>}\n {(index < this.state.currentStep || this.state.isDone) &&\n <WmIcon styles={merge({}, this.styles.stepIcon, {icon: {color: this.styles.activeStep.color}})}\n iconclass={item.state.props.iconclass || 'wm-sl-l sl-check'}></WmIcon>}\n </View>\n {((isNumberTextLayout && isActiveStep) || !isNumberTextLayout) &&\n <Text style={this.styles.stepTitle}>\n {item.state.props.title || 'Step Title'}</Text> }\n {this.numberOfSteps > 1 && isActiveStep &&\n <View style={[this.styles.numberTextStepConnector, {width: isLastStep ? 0 : 50}]}></View>}\n </TouchableOpacity>\n {this.numberOfSteps > 1 && <View style={[this.styles.stepConnector, { width: isFirstStep || isLastStep ? '50%' : '100%',\n left: Platform.OS == \"web\"?(!this.isRTL && isFirstStep) || (this.isRTL && isLastStep) ? '50%': '0%': isFirstStep ? '50%': '0%'}]}></View>}\n </View>\n ) : null;\n }\n\n onPrev(steps: any) {\n const index = this.state.currentStep;\n const currentStep = this.steps[index];\n currentStep.invokePrevCB(index);\n this.updateCurrentStep(index - 1);\n }\n\n onNext(steps: any, eventName?: string) {\n const index = this.state.currentStep;\n const currentStep = this.steps[index];\n if (eventName === 'skip') {\n currentStep.invokeSkipCB(index);\n } else {\n currentStep.invokeNextCB(index);\n }\n this.updateCurrentStep(index + 1);\n }\n\n onDone($event: any) {\n this.updateState({\n isDone: true\n } as WmWizardState);\n this.invokeEventCallback('onDone', [$event, this.proxy]);\n }\n\n onCancel() {\n this.invokeEventCallback('onCancel', [null, this.proxy]);\n }\n onSkip(steps: any) {\n this.onNext(steps, 'skip');\n }\n\n renderWidget(props: WmWizardProps) {\n this.numberOfSteps = this.steps.length;\n const activeStep = this.steps[this.state.currentStep];\n const isSkippable = this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip;\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.wizardHeader}>\n {this.steps ? this.steps.map((step, i) => this.renderWizardHeader(step, i)) : null}\n </View>\n <View style={this.styles.wizardBody}>\n {props.children}\n </View>\n <View style={[this.styles.wizardFooter,\n {flexDirection: props.actionsalignment === 'right' ? 'row-reverse': 'row'}]}>\n {(this.state.currentStep+1) === this.numberOfSteps &&\n <WmButton iconclass={'wm-sl-l sl-check'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.doneButton)}\n id = {this.getTestId('donebtn')} caption={props.donebtnlabel} onTap={this.onDone.bind(this)}></WmButton>\n }\n {(this.state.currentStep+1) < this.numberOfSteps &&\n <WmButton iconclass={'wi wi-chevron-right'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.nextButton)}\n id = {this.getTestId('nextbtn')} \n iconposition={'right'} caption={props.nextbtnlabel} onTap={this.onNext.bind(this, this.steps)}></WmButton>\n }\n {this.state.currentStep > 0 &&\n <WmButton iconclass={'wi wi-chevron-left'} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.prevButton)} caption={props.previousbtnlabel}\n id = {this.getTestId('prevbtn')}\n onTap={this.onPrev.bind(this, this.steps)}></WmButton>\n }\n {props.cancelable ?\n <WmButton id = {this.getTestId('cancelbtn')} caption={props.cancelbtnlabel} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.cancelButton)} onTap={this.onCancel.bind(this)}></WmButton>\n : null\n }\n {isSkippable &&\n <WmAnchor iconclass={'wi wi-chevron-right'} iconposition={'right'} caption={'Skip'}\n id = {this.getTestId('skip')} \n styles={merge({}, this.styles.wizardActions, this.styles.skipLink)} onTap={this.onSkip.bind(this, this.steps)}></WmAnchor>\n }\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,QAAQ,cAAc;AACrE,SAASC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,QAAQ,MAAM,oEAAoE;AAGzF,OAAO,MAAMC,aAAa,SAASN,kBAAkB,CAAgB;EAAAO,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBAC7C,CAAC;IAAAA,eAAA,iBACL,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,QAAQ,SAASX,aAAa,CAA+C;EAGhGQ,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAET,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;IAACQ,eAAA,wBAHnB,IAAI;IAAAA,eAAA,gBACpB,EAAE;IAGhB,MAAMG,KAAK,GAAGD,KAAK,CAACE,QAAQ;IAC5B,IAAIC,gBAAgB,GAAG,CAAC;IACxB,IAAIjB,OAAO,CAACe,KAAK,CAAC,IAAID,KAAK,CAACI,WAAW,EAAE;MACvCH,KAAK,CAACI,GAAG,CAAC,CAACC,IAAS,EAAEC,KAAU,KAAK;QACnC,IAAIP,KAAK,CAACI,WAAW,KAAKE,IAAI,CAACN,KAAK,CAACQ,IAAI,EAAE;UACzCL,gBAAgB,GAAGI,KAAK;QAC1B;MACF,CAAC,CAAC;IACJ;IACA,IAAI,CAACE,iB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AAC0E,QAAQ,CAAE;MAACT,KAAK,EAAE,IAAI,CAACpB,MAAM,CAAC1B,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC7C,KAAK;IAAE,CAAW,CAE3H,CACF,CAAC;EAEX;AACF"}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","Platform","TouchableWithoutFeedback","isArray","merge","BaseComponent","BaseComponentState","WmWizardProps","DEFAULT_CLASS","WmButton","WmIcon","WmAnchor","WmProgressCircle","WmPopover","WmLabel","WmWizardState","constructor","arguments","_defineProperty","WmWizard","props","onComponentInit","c","popOverRef","steps","children","defaultStepIndex","defaultstep","map","item","index","name","updateCurrentStep","addWizardStep","step","forceUpdate","componentDidMount","showActiveStep","_this$steps$this$stat","state","currentStep","setActive","_this$steps$this$stat2","isDone","length","undefined","setInActive","updateState","getStepStyle","style","styles","push","doneStep","activeStep","renderMenuPopover","menuDataset","getmenudataexpression","Labels","title","createElement","id","getTestId","popover","contentanimation","caption","popoverheight","height","popoverwidth","width","listener","iconclass","popovericonclass","iconposition","type","currentMenuItem","key","onPress","hide","stepMenu","activeStepMenu","stepMenuActiveIcon","stepMenuIcon","stepMenuActiveLabel","stepMenuLabel","renderProgressCircleHeader","progressTitle","progresstitle","headerWrapper","stepWrapper","flex","alignItems","justifyContent","flexDirection","minvalue","maxvalue","datavalue","captionplacement","progresstype","subtitle","progressCircle","stepTitle","stepSubTitle","renderWizardHeader","isLastStep","numberOfSteps","isFirstStep","isActiveStep","isNumberTextLayout","classname","show","paddingRight","paddingLeft","bind","disabled","stepCounter","stepIcon","icon","color","numberTextStepConnector","stepConnector","left","OS","isRTL","onPrev","invokePrevCB","onNext","eventName","invokeSkipCB","invokeNextCB","onDone","$event","invokeEventCallback","proxy","onCancel","onSkip","renderWidget","_this$state$props$cla","isSkippable","enableskip","isProgressCircleHeader","includes","root","_background","wizardHeader","i","wizardBody","wizardFooter","actionsalignment","wizardActions","theme","getStyle","doneButton","donebtnlabel","onTap","nextButton","nextbtnlabel","prevButton","previousbtnlabel","cancelable","cancelbtnlabel","cancelButton","skipLink"],"sources":["wizard.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, Platform, TouchableWithoutFeedback } from 'react-native';\nimport { isArray, merge } from 'lodash';\nimport { BaseComponent, BaseComponentState, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmWizardProps from './wizard.props';\nimport { DEFAULT_CLASS, WmWizardStyles } from './wizard.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmWizardstep from './wizardstep/wizardstep.component';\nimport WmProgressCircle from '@wavemaker/app-rn-runtime/components/basic/progress-circle/progress-circle.component';\nimport WmPopover from '@wavemaker/app-rn-runtime/components/navigation/popover/popover.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nexport class WmWizardState extends BaseComponentState<WmWizardProps> {\n currentStep: number = 0;\n isDone: boolean = false;\n}\n\nexport default class WmWizard extends BaseComponent<WmWizardProps, WmWizardState, WmWizardStyles> {\n private numberOfSteps: number = null as any;\n private steps = [] as WmWizardstep[];\n private popOverRef: WmPopover = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmPopover) {\n this.popOverRef = c;\n }\n }\n };\n\n constructor(props: WmWizardProps) {\n super(props, DEFAULT_CLASS, new WmWizardProps());\n const steps = props.children;\n let defaultStepIndex = 0;\n if (isArray(steps) && props.defaultstep) {\n steps.map((item: any, index: any) => {\n if (props.defaultstep === item.props.name) {\n defaultStepIndex = index;\n }\n })\n }\n this.updateCurrentStep(defaultStepIndex);\n }\n\n addWizardStep(step: WmWizardstep) {\n this.steps[step.props.index] = step;\n this.forceUpdate();\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.showActiveStep();\n }\n\n showActiveStep() {\n this.steps[this.state.currentStep]?.setActive();\n }\n\n updateCurrentStep(index: number, isDone = false) {\n this.steps[this.state.currentStep]?.setInActive();\n this.updateState({\n currentStep: index,\n isDone: isDone\n } as WmWizardState, () => this.showActiveStep());\n }\n\n getStepStyle(index: number) {\n const style = [this.styles.step];\n if (this.state.isDone || index < this.state.currentStep) {\n style.push(this.styles.doneStep);\n } else if (this.state.currentStep === index) {\n style.push(this.styles.activeStep);\n }\n return style;\n }\n\n renderMenuPopover(){\n const menuDataset = this.props.getmenudataexpression || ((item: any, index: number) => '') ;\n const Labels = this.steps.map((step: WmWizardstep) => step.state.props.title);\n return (\n <WmPopover\n id={this.getTestId('menu')}\n styles={this.styles.popover}\n contentanimation={'slideInDown'}\n caption={''}\n popoverheight={this.styles.popover.popover.height as string | number | undefined || null}\n popoverwidth={this.styles.popover.popover.width as string | number | undefined || null}\n listener={this.listener}\n iconclass={this.props.popovericonclass || 'fa fa-caret-down'}\n iconposition=\"right\"\n type='dropdown'>\n <View style={this.styles.popover.popover}>\n {Labels.map((item: any, index: number) => {\n const currentMenuItem = index==this.state.currentStep;\n const caption = menuDataset({\"count\":this.steps.length}, index); \n return (\n <TouchableWithoutFeedback key={'wizard_menu_item_'+index} onPress={()=>{this.popOverRef.hide();}}>\n <View style={[this.styles.stepMenu, currentMenuItem?this.styles.activeStepMenu:{}]}>\n <WmIcon caption={caption} iconclass={currentMenuItem? \"wi wi-radio-button-checked\" : 'wi wi-radio-button-unchecked'} styles={currentMenuItem?this.styles.stepMenuActiveIcon:this.styles.stepMenuIcon}/>\n <WmLabel caption={item} styles={currentMenuItem?this.styles.stepMenuActiveLabel:this.styles.stepMenuLabel}/>\n </View>\n </TouchableWithoutFeedback>\n )})}\n </View>\n </WmPopover>\n );\n }\n\n renderProgressCircleHeader(item: any, index: number) {\n const progressTitle = this.props.progresstitle || (index + 1 + '/' + this.steps.length);\n return (\n <View style={[this.styles.headerWrapper]} key={index + 1}>\n <View style={this.styles.stepWrapper}>\n <View style={{ flex: 1, alignItems: 'flex-start', justifyContent: 'center', flexDirection:'row' }}>\n <WmProgressCircle minvalue={0} maxvalue={this.steps.length} datavalue={index + 1} captionplacement={'inside'} type={this.props.progresstype} title={progressTitle} subtitle={''} styles={this.styles.progressCircle} />\n </View>\n <View style={{ flex: 2, justifyContent: 'center', flexDirection: 'column' }}>\n <Text style={this.styles.stepTitle}>\n {item.props.title || 'Step Title'}</Text>\n <Text style={this.styles.stepSubTitle}>\n {item.props.subtitle || 'Step Sub Title'}</Text>\n </View>\n <View style={{ flexDirection: 'row', alignItems: 'flex-end', justifyContent: 'flex-end' }}>\n {this.renderMenuPopover()}\n </View>\n </View>\n </View>\n );\n }\n\n renderWizardHeader(item: any, index: number) {\n const isLastStep = index === this.numberOfSteps - 1;\n const isFirstStep = index === 0;\n const isActiveStep = index === this.state.currentStep;\n const isNumberTextLayout = this.state.props.classname === 'number-text-inline';\n return item.props.show != false ? (\n <View style={[this.styles.headerWrapper, isNumberTextLayout ?\n {paddingRight: isActiveStep ? 0 : 5, paddingLeft: index === this.state.currentStep + 1 ? 0 : 5}: {}]} key={index+1}>\n <TouchableOpacity style={this.styles.stepWrapper}\n onPress={this.updateCurrentStep.bind(this, index, false)} disabled={index >= this.state.currentStep}>\n <View style={this.getStepStyle(index)}>\n {index >= this.state.currentStep && !this.state.isDone &&\n <Text style={isActiveStep ? this.styles.activeStep : this.styles.stepCounter}>{index+1}</Text>}\n {(index < this.state.currentStep || this.state.isDone) &&\n <WmIcon styles={merge({}, this.styles.stepIcon, {icon: {color: this.styles.activeStep.color}})}\n iconclass={item.props.iconclass || 'wm-sl-l sl-check'}></WmIcon>}\n </View>\n {((isNumberTextLayout && isActiveStep) || !isNumberTextLayout) &&\n <Text style={this.styles.stepTitle}>\n {item.props.title || 'Step Title'}</Text> }\n {this.numberOfSteps > 1 && isActiveStep &&\n <View style={[this.styles.numberTextStepConnector, {width: isLastStep ? 0 : 50}]}></View>}\n </TouchableOpacity>\n {this.numberOfSteps > 1 && <View style={[this.styles.stepConnector, { width: isFirstStep || isLastStep ? '50%' : '100%',\n left: Platform.OS == \"web\"?(!this.isRTL && isFirstStep) || (this.isRTL && isLastStep) ? '50%': '0%': isFirstStep ? '50%': '0%'}]}></View>}\n </View>\n ) : null;\n }\n\n onPrev(steps: any) {\n const index = this.state.currentStep;\n const currentStep = this.steps[index];\n currentStep.invokePrevCB(index);\n this.updateCurrentStep(index - 1);\n }\n\n onNext(steps: any, eventName?: string) {\n const index = this.state.currentStep;\n const currentStep = this.steps[index];\n if (eventName === 'skip') {\n currentStep.invokeSkipCB(index);\n } else {\n currentStep.invokeNextCB(index);\n }\n this.updateCurrentStep(index + 1);\n }\n\n onDone($event: any) {\n this.updateState({\n isDone: true\n } as WmWizardState);\n this.invokeEventCallback('onDone', [$event, this.proxy]);\n }\n\n onCancel() {\n this.invokeEventCallback('onCancel', [null, this.proxy]);\n }\n onSkip(steps: any) {\n this.onNext(steps, 'skip');\n }\n\n renderWidget(props: WmWizardProps) {\n this.numberOfSteps = this.steps.length;\n const activeStep = this.steps[this.state.currentStep];\n const isSkippable = this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip;\n const isProgressCircleHeader = this.state.props.classname?.includes('progress-circle-header');\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.wizardHeader}>\n {activeStep && isProgressCircleHeader ? (this.renderProgressCircleHeader(activeStep, this.state.currentStep)) : (this.steps ? this.steps.map((step, i) => this.renderWizardHeader(step, i)) : null)}\n </View>\n <View style={this.styles.wizardBody}>\n {props.children}\n </View>\n <View style={[this.styles.wizardFooter,\n {flexDirection: props.actionsalignment === 'right' ? 'row-reverse': 'row'}]}>\n {(this.state.currentStep+1) === this.numberOfSteps &&\n <WmButton iconclass={'wm-sl-l sl-check'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.doneButton)}\n id = {this.getTestId('donebtn')} caption={props.donebtnlabel} onTap={this.onDone.bind(this)}></WmButton>\n }\n {(this.state.currentStep+1) < this.numberOfSteps &&\n <WmButton iconclass={'wi wi-chevron-right'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.nextButton)}\n id = {this.getTestId('nextbtn')} \n iconposition={'right'} caption={props.nextbtnlabel} onTap={this.onNext.bind(this, this.steps)}></WmButton>\n }\n {this.state.currentStep > 0 &&\n <WmButton iconclass={'wi wi-chevron-left'} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.prevButton)} caption={props.previousbtnlabel}\n id = {this.getTestId('prevbtn')}\n onTap={this.onPrev.bind(this, this.steps)}></WmButton>\n }\n {props.cancelable ?\n <WmButton id = {this.getTestId('cancelbtn')} caption={props.cancelbtnlabel} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.cancelButton)} onTap={this.onCancel.bind(this)}></WmButton>\n : null\n }\n {isSkippable &&\n <WmAnchor iconclass={'wi wi-chevron-right'} iconposition={'right'} caption={'Skip'}\n id = {this.getTestId('skip')} \n styles={merge({}, this.styles.wizardActions, this.styles.skipLink)} onTap={this.onSkip.bind(this, this.steps)}></WmAnchor>\n }\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,EAAEC,wBAAwB,QAAQ,cAAc;AAC/F,SAASC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAA2B,+CAA+C;AAEpH,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAOC,gBAAgB,MAAM,sFAAsF;AACnH,OAAOC,SAAS,MAAM,2EAA2E;AACjG,OAAOC,OAAO,MAAM,kEAAk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I,EAAE,IAAI,CAACxF,KAAK;IAAE,CAAW,CAE3H,CACF,CAAC;EAEX;AACF"}
@@ -13,6 +13,10 @@ export default class WmWizardProps extends BaseProps {
13
13
  _defineProperty(this, "nextbtnlabel", 'Next');
14
14
  _defineProperty(this, "previousbtnlabel", 'Previous');
15
15
  _defineProperty(this, "defaultstep", 'none');
16
+ _defineProperty(this, "progresstitle", '');
17
+ _defineProperty(this, "progresstype", 'default');
18
+ _defineProperty(this, "getmenudataexpression", undefined);
19
+ _defineProperty(this, "popovericonclass", 'fa fa-caret-down');
16
20
  }
17
21
  }
18
22
  //# sourceMappingURL=wizard.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmWizardProps","constructor","arguments","_defineProperty"],"sources":["wizard.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmWizardProps extends BaseProps {\n actionsalignment: string = 'right';\n children: any;\n cancelable: boolean = true;\n cancelbtnlabel: string = 'Cancel';\n donebtnlabel: string = 'Done';\n nextbtnlabel: string = 'Next';\n previousbtnlabel: string = 'Previous';\n defaultstep: string = 'none';\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,2BACxB,OAAO;IAAAA,eAAA;IAAAA,eAAA,qBAEZ,IAAI;IAAAA,eAAA,yBACD,QAAQ;IAAAA,eAAA,uBACV,MAAM;IAAAA,eAAA,uBACN,MAAM;IAAAA,eAAA,2BACF,UAAU;IAAAA,eAAA,sBACf,MAAM;EAAA;AAC9B"}
1
+ {"version":3,"names":["BaseProps","WmWizardProps","constructor","arguments","_defineProperty","undefined"],"sources":["wizard.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmWizardProps extends BaseProps {\n actionsalignment: string = 'right';\n children: any;\n cancelable: boolean = true;\n cancelbtnlabel: string = 'Cancel';\n donebtnlabel: string = 'Done';\n nextbtnlabel: string = 'Next';\n previousbtnlabel: string = 'Previous';\n defaultstep: string = 'none';\n progresstitle: string = '';\n progresstype: 'default' | 'success' | 'info' | 'warning' | 'error' = 'default';\n getmenudataexpression: any = undefined;\n popovericonclass: string = 'fa fa-caret-down';\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,2BACxB,OAAO;IAAAA,eAAA;IAAAA,eAAA,qBAEZ,IAAI;IAAAA,eAAA,yBACD,QAAQ;IAAAA,eAAA,uBACV,MAAM;IAAAA,eAAA,uBACN,MAAM;IAAAA,eAAA,2BACF,UAAU;IAAAA,eAAA,sBACf,MAAM;IAAAA,eAAA,wBACJ,EAAE;IAAAA,eAAA,uBAC2C,SAAS;IAAAA,eAAA,gCACjDC,SAAS;IAAAD,eAAA,2BACX,kBAAkB;EAAA;AAC/C"}