@wavemaker/app-rn-runtime 11.6.0-next.40753 → 11.6.0-next.41002
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.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +10 -7
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +6 -3
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +27 -11
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +0 -1
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +19 -6
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js +4 -0
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +1 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +32 -6
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js +4 -0
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +6 -6
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +13 -5
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +63 -12
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +4 -0
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +32 -25
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +4 -5
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +3 -1
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +1 -0
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.styles.js +2 -1
- app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +6 -5
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +20 -15
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +26 -15
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +0 -2
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +33 -7
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +4 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +9 -2
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +20 -17
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +28 -7
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +1 -0
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/staticdata.js +215 -0
- app-rn-runtime/components/chart/staticdata.js.map +1 -0
- app-rn-runtime/components/container/container.component.js +11 -2
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +6 -2
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js +4 -0
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +14 -11
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +19 -3
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +27 -2
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +3 -0
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +7 -3
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js +4 -0
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js +2 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +58 -6
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +13 -6
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +12 -4
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +4 -0
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +4 -0
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +2 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +4 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +4 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +7 -3
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js +4 -0
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +11 -2
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +12 -6
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -5
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +35 -5
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +6 -6
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +39 -10
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +17 -2
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +1 -0
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +19 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +70 -8
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +49 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +11 -0
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +1 -0
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +17 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +5 -1
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +3 -3
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +3 -0
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +10 -5
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +11 -0
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +1 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +17 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +11 -0
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +43 -5
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +5 -12
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +6 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +1 -0
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +9 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +1 -2
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +8 -5
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +4 -0
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js +4 -0
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +8 -2
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/curve.js +84 -0
- app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.component.js +42 -8
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +82 -16
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +5 -1
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/floatinglabel.component.js +45 -0
- app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
- app-rn-runtime/core/components/textinput.component.js +25 -2
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +36 -9
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/package.json +5 -3
- app-rn-runtime/runtime/services/webprocess.service.js +0 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +36 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +26 -3
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +2 -1
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +1 -0
- app-rn-runtime/variables/service-variable.js.map +1 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
const dataTypeJSON = ['Column', 'Line', 'Pie', 'Bar', 'Donut', 'Bubble'];
|
|
3
|
+
const SAMPLE_DATA1 = {
|
|
4
|
+
'group1': 'Europe',
|
|
5
|
+
'group2': 'Asia',
|
|
6
|
+
'group3': 'America',
|
|
7
|
+
'group4': 'Australia'
|
|
8
|
+
};
|
|
9
|
+
const SAMPLE_DATA = {
|
|
10
|
+
'group1': '01/01/2001',
|
|
11
|
+
'group2': '01/01/2002',
|
|
12
|
+
'group3': '01/01/2003'
|
|
13
|
+
};
|
|
14
|
+
const SAMPLE_DATA2 = {
|
|
15
|
+
'group1': '78.6',
|
|
16
|
+
'group2': '79',
|
|
17
|
+
'group3': '80',
|
|
18
|
+
'group4': '80.66'
|
|
19
|
+
};
|
|
20
|
+
export const chartTypes = ['Column', 'Line', 'Area', 'Cumulative Line', 'Bar', 'Pie', 'Donut', 'Bubble'];
|
|
21
|
+
export const isPieChart = type => type === 'Pie';
|
|
22
|
+
|
|
23
|
+
// returns true if chart type is line
|
|
24
|
+
export const isLineChart = type => type === 'Line';
|
|
25
|
+
|
|
26
|
+
// returns true if chart type is bar
|
|
27
|
+
export const isBarChart = type => type === 'Bar';
|
|
28
|
+
|
|
29
|
+
// returns true if chart type is donut
|
|
30
|
+
export const isDonutChart = type => type === 'Donut';
|
|
31
|
+
|
|
32
|
+
// returns true if chart type is bubble
|
|
33
|
+
export const isBubbleChart = type => type === 'Bubble';
|
|
34
|
+
export const isAreaChart = type => type === 'Area';
|
|
35
|
+
|
|
36
|
+
// returns true if chart type is column
|
|
37
|
+
export const isColumnChart = type => type === 'Column';
|
|
38
|
+
export const isPieType = type => isPieChart(type) || isDonutChart(type);
|
|
39
|
+
|
|
40
|
+
// The format of chart data is array of json objects in case of the following types of chart
|
|
41
|
+
export const isChartDataJSON = type => _.includes(dataTypeJSON, type) || !_.includes(chartTypes, type);
|
|
42
|
+
export const constructSampleData = (dataType, yaxisLength, shape) => {
|
|
43
|
+
let first_series = [],
|
|
44
|
+
second_series = [],
|
|
45
|
+
third_series = [],
|
|
46
|
+
first_series_array = [],
|
|
47
|
+
second_series_array = [],
|
|
48
|
+
third_series_array = [],
|
|
49
|
+
data = [];
|
|
50
|
+
switch (dataType) {
|
|
51
|
+
case 'jsonFormat':
|
|
52
|
+
first_series = [{
|
|
53
|
+
'x': '01/01/2001',
|
|
54
|
+
'y': 4000000
|
|
55
|
+
}, {
|
|
56
|
+
'x': '01/01/2002',
|
|
57
|
+
'y': 1000000
|
|
58
|
+
}, {
|
|
59
|
+
'x': '01/01/2003',
|
|
60
|
+
'y': 5000000
|
|
61
|
+
}];
|
|
62
|
+
second_series = [{
|
|
63
|
+
'x': '01/01/2001',
|
|
64
|
+
'y': 3000000
|
|
65
|
+
}, {
|
|
66
|
+
'x': '01/01/2002',
|
|
67
|
+
'y': 4000000
|
|
68
|
+
}, {
|
|
69
|
+
'x': '01/01/2003',
|
|
70
|
+
'y': 7000000
|
|
71
|
+
}];
|
|
72
|
+
third_series = [{
|
|
73
|
+
'x': '01/01/2001',
|
|
74
|
+
'y': 2000000
|
|
75
|
+
}, {
|
|
76
|
+
'x': '01/01/2002',
|
|
77
|
+
'y': 8000000
|
|
78
|
+
}, {
|
|
79
|
+
'x': '01/01/2003',
|
|
80
|
+
'y': 6000000
|
|
81
|
+
}];
|
|
82
|
+
data[0] = {
|
|
83
|
+
values: first_series,
|
|
84
|
+
key: SAMPLE_DATA.group1
|
|
85
|
+
};
|
|
86
|
+
if (yaxisLength >= 2) {
|
|
87
|
+
data[1] = {
|
|
88
|
+
values: second_series,
|
|
89
|
+
key: SAMPLE_DATA.group2
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
if (yaxisLength >= 3) {
|
|
93
|
+
data[2] = {
|
|
94
|
+
values: third_series,
|
|
95
|
+
key: SAMPLE_DATA.group3
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case 'arrayFormat':
|
|
100
|
+
first_series_array = [[1, 4000000], [2, 1000000], [3, 5000000]];
|
|
101
|
+
second_series_array = [[1, 3000000], [2, 4000000], [3, 7000000]];
|
|
102
|
+
third_series_array = [[1, 2000000], [2, 8000000], [3, 6000000]];
|
|
103
|
+
data[0] = {
|
|
104
|
+
values: first_series_array,
|
|
105
|
+
key: SAMPLE_DATA.group1
|
|
106
|
+
};
|
|
107
|
+
if (yaxisLength >= 2) {
|
|
108
|
+
data[1] = {
|
|
109
|
+
values: second_series_array,
|
|
110
|
+
key: SAMPLE_DATA.group2
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
if (yaxisLength >= 3) {
|
|
114
|
+
data[2] = {
|
|
115
|
+
values: third_series_array,
|
|
116
|
+
key: SAMPLE_DATA.group3
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
break;
|
|
120
|
+
case 'columnChartFormat':
|
|
121
|
+
data = [{
|
|
122
|
+
'x': SAMPLE_DATA.group1,
|
|
123
|
+
'y': 3
|
|
124
|
+
}];
|
|
125
|
+
break;
|
|
126
|
+
case 'barChartFormat':
|
|
127
|
+
data = [{
|
|
128
|
+
'x': SAMPLE_DATA.group1,
|
|
129
|
+
'y': 2000000
|
|
130
|
+
}, {
|
|
131
|
+
'x': SAMPLE_DATA.group2,
|
|
132
|
+
'y': 1000000
|
|
133
|
+
}, {
|
|
134
|
+
'x': SAMPLE_DATA.group3,
|
|
135
|
+
'y': 3000000
|
|
136
|
+
}];
|
|
137
|
+
break;
|
|
138
|
+
case 'lineChartFormat':
|
|
139
|
+
data = [{
|
|
140
|
+
'x': SAMPLE_DATA1.group1,
|
|
141
|
+
'y': 2
|
|
142
|
+
}, {
|
|
143
|
+
'x': SAMPLE_DATA1.group2,
|
|
144
|
+
'y': 0
|
|
145
|
+
}, {
|
|
146
|
+
'x': SAMPLE_DATA1.group3,
|
|
147
|
+
'y': 3
|
|
148
|
+
}];
|
|
149
|
+
break;
|
|
150
|
+
case 'bubbleFormat':
|
|
151
|
+
// shape = shape === 'random' ? shapes[Math.floor(Math.random() * shapes.length)] : shape;
|
|
152
|
+
data = [{
|
|
153
|
+
'x': SAMPLE_DATA2.group1,
|
|
154
|
+
'y': 1000000
|
|
155
|
+
}, {
|
|
156
|
+
'x': SAMPLE_DATA2.group2,
|
|
157
|
+
'y': 2000000
|
|
158
|
+
}, {
|
|
159
|
+
'x': SAMPLE_DATA2.group3,
|
|
160
|
+
'y': 3000000
|
|
161
|
+
}, {
|
|
162
|
+
'x': SAMPLE_DATA2.group4,
|
|
163
|
+
'y': 4000000
|
|
164
|
+
}];
|
|
165
|
+
break;
|
|
166
|
+
case 'pieChartFormat':
|
|
167
|
+
data = [{
|
|
168
|
+
'x': SAMPLE_DATA1.group1,
|
|
169
|
+
'y': 1000000
|
|
170
|
+
}, {
|
|
171
|
+
'x': SAMPLE_DATA1.group2,
|
|
172
|
+
'y': 2000000
|
|
173
|
+
}, {
|
|
174
|
+
'x': SAMPLE_DATA1.group3,
|
|
175
|
+
'y': 3000000
|
|
176
|
+
}, {
|
|
177
|
+
'x': SAMPLE_DATA1.group4,
|
|
178
|
+
'y': 4000000
|
|
179
|
+
}];
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
return data;
|
|
183
|
+
};
|
|
184
|
+
export const getChartType = widgetContext => {
|
|
185
|
+
const type = widgetContext.type;
|
|
186
|
+
if (isLineChart(type)) {
|
|
187
|
+
return 'lineChartFormat';
|
|
188
|
+
}
|
|
189
|
+
if (isAreaChart(type)) {
|
|
190
|
+
return 'lineChartFormat';
|
|
191
|
+
}
|
|
192
|
+
if (isBarChart(type)) {
|
|
193
|
+
return 'barChartFormat';
|
|
194
|
+
}
|
|
195
|
+
if (isColumnChart(type)) {
|
|
196
|
+
return 'columnChartFormat';
|
|
197
|
+
}
|
|
198
|
+
if (isPieChart(type)) {
|
|
199
|
+
return 'pieChartFormat';
|
|
200
|
+
}
|
|
201
|
+
if (isBubbleChart(type)) {
|
|
202
|
+
return 'bubbleFormat';
|
|
203
|
+
}
|
|
204
|
+
if (isDonutChart(type)) {
|
|
205
|
+
return 'pieChartFormat';
|
|
206
|
+
}
|
|
207
|
+
return isChartDataJSON(type) ? 'jsonFormat' : 'arrayFormat';
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
// Sample data to populate when no data is bound
|
|
211
|
+
export const getSampleData = widgetContext => constructSampleData(getDataType(widgetContext), _.split(widgetContext.yaxisdatakey, ',').length, widgetContext.shape);
|
|
212
|
+
function getDataType(widgetContext) {
|
|
213
|
+
throw new Error("Function not implemented.");
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=staticdata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_","dataTypeJSON","SAMPLE_DATA1","SAMPLE_DATA","SAMPLE_DATA2","chartTypes","isPieChart","type","isLineChart","isBarChart","isDonutChart","isBubbleChart","isAreaChart","isColumnChart","isPieType","isChartDataJSON","includes","constructSampleData","dataType","yaxisLength","shape","first_series","second_series","third_series","first_series_array","second_series_array","third_series_array","data","values","key","group1","group2","group3","group4","getChartType","widgetContext","getSampleData","getDataType","split","yaxisdatakey","length","Error"],"sources":["staticdata.tsx"],"sourcesContent":["import _ from \"lodash\";\n\nconst dataTypeJSON = ['Column', 'Line', 'Pie', 'Bar', 'Donut', 'Bubble']\n\nconst SAMPLE_DATA1 = {\n 'group1' : 'Europe',\n 'group2' : 'Asia',\n 'group3' : 'America',\n 'group4' : 'Australia'\n}\n\nconst SAMPLE_DATA = {\n 'group1' : '01/01/2001',\n 'group2' : '01/01/2002',\n 'group3' : '01/01/2003',\n};\nconst SAMPLE_DATA2 = {\n 'group1' : '78.6',\n 'group2' : '79',\n 'group3' : '80',\n 'group4' : '80.66'\n};\nexport const chartTypes = ['Column', 'Line', 'Area', 'Cumulative Line', 'Bar', 'Pie', 'Donut', 'Bubble']\n\nexport const isPieChart = (type: string) => type === 'Pie';\n\n// returns true if chart type is line\nexport const isLineChart = (type: string) => type === 'Line';\n\n// returns true if chart type is bar\nexport const isBarChart = (type: string) => type === 'Bar';\n\n// returns true if chart type is donut\nexport const isDonutChart = (type: string) => type === 'Donut';\n\n// returns true if chart type is bubble\nexport const isBubbleChart = (type: string) => type === 'Bubble';\n\nexport const isAreaChart = (type: string) => type === 'Area';\n\n// returns true if chart type is column\nexport const isColumnChart = (type: string) => type === 'Column';\n\nexport const isPieType = (type: string) => isPieChart(type) || isDonutChart(type);\n\n// The format of chart data is array of json objects in case of the following types of chart\nexport const isChartDataJSON = (type: any) => _.includes(dataTypeJSON, type) || !_.includes(chartTypes, type);\n\n\nexport const constructSampleData = (dataType: any, yaxisLength: any, shape: string) => {\n let first_series = [],\n second_series = [],\n third_series = [],\n first_series_array = [],\n second_series_array = [],\n third_series_array = [],\n data: { values?: { x: string | number; y?: string | number; size?: number; shape?: any; }[] | number[][]; key: any; }[] | { x: any; y?: number; }[] = [];\n switch (dataType) {\n case 'jsonFormat':\n first_series = [\n {'x': '01/01/2001', 'y': 4000000},\n {'x': '01/01/2002', 'y': 1000000},\n {'x': '01/01/2003', 'y': 5000000}\n ];\n second_series = [\n {'x': '01/01/2001', 'y': 3000000},\n {'x': '01/01/2002', 'y': 4000000},\n {'x': '01/01/2003', 'y': 7000000}\n ];\n third_series = [\n {'x': '01/01/2001', 'y': 2000000},\n {'x': '01/01/2002', 'y': 8000000},\n {'x': '01/01/2003', 'y': 6000000}\n ];\n data[0] = {\n values: first_series,\n key: SAMPLE_DATA.group1\n };\n if (yaxisLength >= 2) {\n data[1] = {\n values: second_series,\n key: SAMPLE_DATA.group2\n };\n }\n if (yaxisLength >= 3) {\n data[2] = {\n values: third_series,\n key: SAMPLE_DATA.group3\n };\n }\n break;\n case 'arrayFormat':\n first_series_array = [\n [1, 4000000],\n [2, 1000000],\n [3, 5000000]\n ];\n second_series_array = [\n [1, 3000000],\n [2, 4000000],\n [3, 7000000]\n ];\n third_series_array = [\n [1, 2000000],\n [2, 8000000],\n [3, 6000000]\n ];\n data[0] = {\n values: first_series_array,\n key: SAMPLE_DATA.group1\n };\n if (yaxisLength >= 2) {\n data[1] = {\n values: second_series_array,\n key: SAMPLE_DATA.group2\n };\n }\n if (yaxisLength >= 3) {\n data[2] = {\n values: third_series_array,\n key: SAMPLE_DATA.group3\n };\n }\n break;\n case 'columnChartFormat':\n data = [\n {'x': SAMPLE_DATA.group1, 'y': 3}\n ];\n break;\n case 'barChartFormat':\n data = [\n {'x': SAMPLE_DATA.group1, 'y': 2000000},\n {'x': SAMPLE_DATA.group2, 'y': 1000000},\n {'x': SAMPLE_DATA.group3, 'y': 3000000}\n ];\n break;\n case 'lineChartFormat':\n data = [\n {'x': SAMPLE_DATA1.group1, 'y': 2},\n {'x': SAMPLE_DATA1.group2, 'y': 0},\n {'x': SAMPLE_DATA1.group3, 'y': 3}\n ];\n break;\n case 'bubbleFormat':\n // shape = shape === 'random' ? shapes[Math.floor(Math.random() * shapes.length)] : shape;\n data = [\n {'x': SAMPLE_DATA2.group1, 'y': 1000000},\n {'x': SAMPLE_DATA2.group2, 'y': 2000000},\n {'x': SAMPLE_DATA2.group3, 'y': 3000000},\n {'x': SAMPLE_DATA2.group4, 'y': 4000000}\n ];\n break;\n case 'pieChartFormat':\n data = [\n {'x': SAMPLE_DATA1.group1, 'y': 1000000},\n {'x': SAMPLE_DATA1.group2, 'y': 2000000},\n {'x': SAMPLE_DATA1.group3, 'y': 3000000},\n {'x': SAMPLE_DATA1.group4, 'y': 4000000}\n ];\n break;\n \n }\n return data;\n\n};\n\nexport const getChartType = (widgetContext: { type: any; }) => {\n const type = widgetContext.type;\n if (isLineChart(type)) {\n return 'lineChartFormat';\n }\n if (isAreaChart(type)) {\n return 'lineChartFormat'; \n }\n if (isBarChart(type)) {\n return 'barChartFormat'; \n }\n if (isColumnChart(type)) {\n return 'columnChartFormat'; \n }\n if (isPieChart(type)) {\n return 'pieChartFormat';\n }\n if (isBubbleChart(type)) {\n return 'bubbleFormat';\n }\n if (isDonutChart(type)) {\n return 'pieChartFormat';\n}\n return isChartDataJSON(type) ? 'jsonFormat' : 'arrayFormat';\n};\n\n// Sample data to populate when no data is bound\nexport const getSampleData = (widgetContext: { yaxisdatakey: any; shape: any; }) => constructSampleData(getDataType(widgetContext), _.split(widgetContext.yaxisdatakey, ',').length, widgetContext.shape);\n\nfunction getDataType(widgetContext: { yaxisdatakey: any; shape: any; }): any {\n throw new Error(\"Function not implemented.\");\n}\n"],"mappings":"AAAA,OAAOA,CAAC,MAAM,QAAQ;AAEtB,MAAMC,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;AAExE,MAAMC,YAAY,GAAG;EACnB,QAAQ,EAAG,QAAQ;EACnB,QAAQ,EAAG,MAAM;EACjB,QAAQ,EAAG,SAAS;EACpB,QAAQ,EAAG;AACb,CAAC;AAED,MAAMC,WAAW,GAAG;EAChB,QAAQ,EAAG,YAAY;EACvB,QAAQ,EAAG,YAAY;EACvB,QAAQ,EAAG;AACf,CAAC;AACD,MAAMC,YAAY,GAAG;EACnB,QAAQ,EAAG,MAAM;EACjB,QAAQ,EAAG,IAAI;EACf,QAAQ,EAAG,IAAI;EACf,QAAQ,EAAG;AACb,CAAC;AACD,OAAO,MAAMC,UAAU,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;AAExG,OAAO,MAAMC,UAAU,GAAIC,IAAY,IAAKA,IAAI,KAAK,KAAK;;AAE1D;AACA,OAAO,MAAMC,WAAW,GAAID,IAAY,IAAKA,IAAI,KAAK,MAAM;;AAE5D;AACA,OAAO,MAAME,UAAU,GAAIF,IAAY,IAAKA,IAAI,KAAK,KAAK;;AAE1D;AACA,OAAO,MAAMG,YAAY,GAAIH,IAAY,IAAKA,IAAI,KAAK,OAAO;;AAE9D;AACA,OAAO,MAAMI,aAAa,GAAIJ,IAAY,IAAKA,IAA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ASiB,WAAWA,CAACF,aAAiD,EAAO;EAC3E,MAAM,IAAIM,KAAK,CAAC,2BAA2B,CAAC;AAC9C"}
|
|
@@ -13,18 +13,27 @@ export class WmContainerState extends PartialHostState {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
_defineProperty(this, "isPartialLoaded", false);
|
|
16
|
+
_defineProperty(this, "showContent", false);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
export default class WmContainer extends PartialHost {
|
|
19
20
|
constructor(props) {
|
|
20
|
-
super(props, DEFAULT_CLASS, new WmContainerProps());
|
|
21
|
+
super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());
|
|
22
|
+
this.updateState({
|
|
23
|
+
showContent: !this.state.props.deferload
|
|
24
|
+
});
|
|
21
25
|
}
|
|
22
26
|
renderWidget(props) {
|
|
27
|
+
if (!this.state.showContent && this.isVisible()) {
|
|
28
|
+
this.updateState({
|
|
29
|
+
showContent: true
|
|
30
|
+
});
|
|
31
|
+
}
|
|
23
32
|
const dimensions = {
|
|
24
33
|
width: this.styles.root.width ? '100%' : undefined,
|
|
25
34
|
height: this.styles.root.height ? '100%' : undefined
|
|
26
35
|
};
|
|
27
|
-
return /*#__PURE__*/React.createElement(Animatedview, {
|
|
36
|
+
return this.state.showContent && /*#__PURE__*/React.createElement(Animatedview, {
|
|
28
37
|
entryanimation: props.animation,
|
|
29
38
|
style: this.styles.root
|
|
30
39
|
}, 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","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;
|
|
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;A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ACH;AACF"}
|
|
@@ -7,6 +7,7 @@ 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);
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
//# 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}\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;
|
|
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"}
|
|
@@ -73,10 +73,14 @@ 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 ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
76
|
+
}), props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
77
77
|
styles: this.styles.icon,
|
|
78
78
|
name: props.name + '_icon',
|
|
79
|
-
iconclass: props.iconclass
|
|
79
|
+
iconclass: props.iconclass,
|
|
80
|
+
iconheight: props.iconheight,
|
|
81
|
+
iconwidth: props.iconwidth,
|
|
82
|
+
iconmargin: props.iconmargin,
|
|
83
|
+
iconurl: props.iconurl
|
|
80
84
|
}) : null, /*#__PURE__*/React.createElement(View, {
|
|
81
85
|
style: {
|
|
82
86
|
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","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
|
|
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,SAAS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ACN,IAAI,CAAC9B,kBAAkB,CAACf,KAAK,CAACa,QAAQ,CACvB,CAAC;EAEvB;EAEAiC,UAAUA,CAACC,OAAwB,EAAE;IACnC,MAAMlC,QAAQ,GAAG,IAAI,CAACR,KAAK,CAACL,KAAK,CAACa,QAAQ;IAC1C,OAAOpB,gBAAgB,CAAC,CAAC,gBACtBX,KAAA,CAAAuC,aAAA,CAACrC,IAAI;MAACsC,KAAK,EAAET,QAAQ,GAAG,CAAC,CAAC,GAAG;QAACmC,SAAS,EAAE,CAAC;QAAEC,QAAQ,EAAE;MAAQ;IAAE,GAC9DF,OACG,CAAC,gBACNjE,KAAA,CAAAuC,aAAA,CAAC3B,eAAe;MAACwD,KAAK,EAAE,CAACrC;IAAS,GAChCkC,OACc,CAAE;EACvB;EAEAI,YAAYA,CAACnD,KAAmB,EAAE;IAChC,oBAAQlB,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"}
|
|
@@ -15,6 +15,10 @@ 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);
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
//# 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}\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;
|
|
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 +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: -
|
|
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\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I,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"}
|
|
@@ -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.props.show != false ? /*#__PURE__*/React.createElement(View, {
|
|
167
|
+
return item.state.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.props.iconclass || 'wm-sl-l sl-check'
|
|
187
|
+
iconclass: item.state.props.iconclass || 'wm-sl-l sl-check'
|
|
188
188
|
})), (isNumberTextLayout && isActiveStep || !isNumberTextLayout) && /*#__PURE__*/React.createElement(Text, {
|
|
189
189
|
style: this.styles.stepTitle
|
|
190
|
-
}, item.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
|
|
190
|
+
}, item.state.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,7 +204,9 @@ export default class WmWizard extends BaseComponent {
|
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
206
|
const currentStep = this.steps[index];
|
|
207
|
-
currentStep.invokePrevCB(index)
|
|
207
|
+
if (currentStep.invokePrevCB(index) == false) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
208
210
|
this.updateCurrentStep(index - 1);
|
|
209
211
|
}
|
|
210
212
|
next(eventName) {
|
|
@@ -233,15 +235,13 @@ export default class WmWizard extends BaseComponent {
|
|
|
233
235
|
this.invokeEventCallback('onCancel', [null, this.proxy]);
|
|
234
236
|
}
|
|
235
237
|
skip() {
|
|
236
|
-
|
|
237
|
-
this.next('skip');
|
|
238
|
-
}
|
|
238
|
+
this.next('skip');
|
|
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 =
|
|
244
|
+
const isSkippable = activeStep && activeStep.state.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,20 +258,23 @@ 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)
|
|
261
|
+
onTap: this.done.bind(this),
|
|
262
|
+
disabled: activeStep.state.props.disabledone
|
|
262
263
|
}), this.state.currentStep + 1 < this.numberOfSteps && /*#__PURE__*/React.createElement(WmButton, {
|
|
263
264
|
iconclass: 'wi wi-chevron-right',
|
|
264
265
|
styles: merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.nextButton),
|
|
265
266
|
id: this.getTestId('nextbtn'),
|
|
266
267
|
iconposition: 'right',
|
|
267
268
|
caption: props.nextbtnlabel,
|
|
268
|
-
onTap: this.next.bind(this)
|
|
269
|
+
onTap: this.next.bind(this),
|
|
270
|
+
disabled: activeStep.state.props.disablenext
|
|
269
271
|
}), this.state.currentStep > 0 && /*#__PURE__*/React.createElement(WmButton, {
|
|
270
272
|
iconclass: 'wi wi-chevron-left',
|
|
271
273
|
styles: merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.prevButton),
|
|
272
274
|
caption: props.previousbtnlabel,
|
|
273
275
|
id: this.getTestId('prevbtn'),
|
|
274
|
-
onTap: this.prev.bind(this)
|
|
276
|
+
onTap: this.prev.bind(this),
|
|
277
|
+
disabled: activeStep.state.props.disableprev
|
|
275
278
|
}), props.cancelable ? /*#__PURE__*/React.createElement(WmButton, {
|
|
276
279
|
id: this.getTestId('cancelbtn'),
|
|
277
280
|
caption: props.cancelbtnlabel,
|