@wavemaker-ai/app-rn-runtime 1.0.0-rc.330 → 1.0.0-rc.334
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.
- package/components/basic/anchor/anchor.component.js +4 -4
- package/components/basic/anchor/anchor.component.js.map +1 -1
- package/components/basic/anchor/anchor.props.js +1 -0
- package/components/basic/anchor/anchor.props.js.map +1 -1
- package/components/basic/icon/icon.component.js +31 -4
- package/components/basic/icon/icon.component.js.map +1 -1
- package/components/basic/icon/svg-url-icon.component.js +80 -0
- package/components/basic/icon/svg-url-icon.component.js.map +1 -0
- package/components/basic/search/search.component.js +8 -2
- package/components/basic/search/search.component.js.map +1 -1
- package/components/basic/search/search.props.js +3 -0
- package/components/basic/search/search.props.js.map +1 -1
- package/components/basic/spinner/spinner.component.js +1 -0
- package/components/basic/spinner/spinner.component.js.map +1 -1
- package/components/basic/spinner/spinner.props.js +1 -0
- package/components/basic/spinner/spinner.props.js.map +1 -1
- package/components/chart/area-chart/area-chart.component.js +12 -6
- package/components/chart/area-chart/area-chart.component.js.map +1 -1
- package/components/chart/bar-chart/bar-chart.component.js +14 -7
- package/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- package/components/chart/basechart.props.js +1 -0
- package/components/chart/basechart.props.js.map +1 -1
- package/components/chart/basechart.styles.js +0 -1
- package/components/chart/basechart.styles.js.map +1 -1
- package/components/chart/bubble-chart/bubble-chart.component.js +25 -6
- package/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- package/components/chart/line-chart/line-chart.component.js +12 -6
- package/components/chart/line-chart/line-chart.component.js.map +1 -1
- package/components/chart/pie-chart/pie-chart.component.js +24 -4
- package/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- package/components/chart/pie-chart/pie-chart.props.js +1 -1
- package/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- package/components/container/accordion/accordion.component.js +11 -3
- package/components/container/accordion/accordion.component.js.map +1 -1
- package/components/container/accordion/accordion.props.js +2 -0
- package/components/container/accordion/accordion.props.js.map +1 -1
- package/components/container/accordion/accordionpane/accordionpane.props.js +1 -0
- package/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
- package/components/container/panel/panel.component.js +3 -1
- package/components/container/panel/panel.component.js.map +1 -1
- package/components/container/panel/panel.props.js +2 -0
- package/components/container/panel/panel.props.js.map +1 -1
- package/components/container/wizard/wizard.component.js +7 -3
- package/components/container/wizard/wizard.component.js.map +1 -1
- package/components/container/wizard/wizard.props.js +1 -0
- package/components/container/wizard/wizard.props.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.props.js +3 -0
- package/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- package/components/data/form/form-field/form-field.component.js +37 -17
- package/components/data/form/form-field/form-field.component.js.map +1 -1
- package/components/data/form/form.component.js +3 -2
- package/components/data/form/form.component.js.map +1 -1
- package/components/data/form/form.props.js +1 -0
- package/components/data/form/form.props.js.map +1 -1
- package/components/data/list/list.component.js +5 -3
- package/components/data/list/list.component.js.map +1 -1
- package/components/data/list/list.props.js +2 -0
- package/components/data/list/list.props.js.map +1 -1
- package/components/input/basedataset/basedataset.component.js +2 -1
- package/components/input/basedataset/basedataset.component.js.map +1 -1
- package/components/input/basedataset/basedataset.props.js +1 -0
- package/components/input/basedataset/basedataset.props.js.map +1 -1
- package/components/input/epoch/base-datetime.component.js +4 -1
- package/components/input/epoch/base-datetime.component.js.map +1 -1
- package/components/input/fileupload/fileupload.component.js +1 -0
- package/components/input/fileupload/fileupload.component.js.map +1 -1
- package/components/input/fileupload/fileupload.props.js +1 -0
- package/components/input/fileupload/fileupload.props.js.map +1 -1
- package/components/input/rating/rating.component.js +4 -2
- package/components/input/rating/rating.component.js.map +1 -1
- package/components/input/rating/rating.props.js +4 -0
- package/components/input/rating/rating.props.js.map +1 -1
- package/components/input/select/select.component.js +9 -2
- package/components/input/select/select.component.js.map +1 -1
- package/components/input/switch/switch.component.js +2 -1
- package/components/input/switch/switch.component.js.map +1 -1
- package/components/input/text/text.component.js +24 -4
- package/components/input/text/text.component.js.map +1 -1
- package/components/input/text/text.props.js +2 -0
- package/components/input/text/text.props.js.map +1 -1
- package/components/navigation/basenav/basenav.component.js +2 -0
- package/components/navigation/basenav/basenav.component.js.map +1 -1
- package/components/navigation/basenav/basenav.props.js +1 -0
- package/components/navigation/basenav/basenav.props.js.map +1 -1
- package/components/navigation/menu/menu.component.js +3 -0
- package/components/navigation/menu/menu.component.js.map +1 -1
- package/components/navigation/menu/menu.props.js +2 -0
- package/components/navigation/menu/menu.props.js.map +1 -1
- package/components/navigation/popover/popover.component.js +1 -0
- package/components/navigation/popover/popover.component.js.map +1 -1
- package/components/navigation/popover/popover.props.js +1 -0
- package/components/navigation/popover/popover.props.js.map +1 -1
- package/components/page/tabbar/tabbar.component.js +2 -1
- package/components/page/tabbar/tabbar.component.js.map +1 -1
- package/components-prism/basic/search/search.component.js +6 -4
- package/components-prism/basic/search/search.component.js.map +1 -1
- package/components-prism/basic/search/search.props.js +2 -0
- package/components-prism/basic/search/search.props.js.map +1 -1
- package/core/components/floatinglabel.component.js +2 -2
- package/core/components/floatinglabel.component.js.map +1 -1
- package/core/components/textinput.component.js +1 -0
- package/core/components/textinput.component.js.map +1 -1
- package/core/utils.js +16 -0
- package/core/utils.js.map +1 -1
- package/npm-shrinkwrap.json +446 -400
- package/package-lock.json +446 -400
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SkeletonAnimationProps","BaseChartComponentProps","constructor","args","_defineProperty","undefined"],"sources":["basechart.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker-ai/app-rn-runtime/core/base.component';\nimport { SkeletonAnimationProps } from '@wavemaker-ai/app-rn-runtime/runtime/base-fragment.component';\nimport { CartesianGrid } from '@wavemaker/react-native-echarts/props/cartesian';\nimport { ChartTooltipOption } from '@wavemaker/react-native-echarts/tooltip';\nimport { AccessibilityRole } from 'react-native';\n\nexport default class BaseChartComponentProps extends SkeletonAnimationProps {\n xaxisdatakey: string = '';\n yaxisdatakey: string = '';\n iconclass = '';\n dataset: any;\n type: string = '';\n title: string = '';\n subheading: string = '';\n theme: string = '';\n xaxislabel: string = '';\n xunits: string = '';\n staggerlabels: boolean = false;\n yaxislabel: string = '';\n yunits: string = '';\n yaxislabeldistance?: number = undefined;\n xaxislabeldistance?: number = undefined;\n offsetxaxis?: number = undefined;\n offsetyaxis?: number = undefined;\n customcolors: string | Array<string> = '';\n labelcolors: string | Array<string> = '';\n legendheight: number = 0;\n labellegendheight: number = 0;\n labeltype: 'percent' | 'value' | 'key-value' | 'key' = 'percent';\n bubblesize: string= '';\n shape: string = '';\n loadingicon='fa fa-circle-o-notch fa-pulse';\n loadingdatamsg = 'Loading...';\n nodatamessage = 'No data found';\n offsetbottom: number = 50;\n offsettop: number = 70;\n offsetleft: number = 65;\n offsetright: number = 25;\n showlegend: string = 'top';\n showlabels: 'inside' | 'outside' | 'hide' = 'outside';\n tooltips: boolean = true;\n interpolation: string = 'linear';\n highlightpoints: boolean = false;\n showvalues: boolean = false;\n showyaxis: boolean = true;\n showxaxis: boolean = true;\n ydomain: string = 'Min';\n xdomain: string = 'Min';\n labelangle: number = 0;\n xtickexpr?: (item: any, index: number, length: number) => any;\n ytickexpr?: (item: any, index: number, length: number) => any;\n hidegridxaxis: boolean = false;\n hidegridyaxis: boolean = false;\n autoadjustlabels: boolean = false;\n accessible?: boolean = true;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole;\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n ynumberformat?: string = '';\n showxaxislabels: boolean = true;\n showyaxislabels: boolean = true;\n chartheight?: number;\n showxaxisticks?: boolean;\n showyaxisticks?: boolean;\n boundarygap?: boolean;\n grid?: CartesianGrid;\n tooltip?: ChartTooltipOption;\n showhighlighter: boolean = true;\n stacknormalize?: boolean = false;\n ticksymbol?: 'none' | 'circle' | 'rect' | 'roundRect' | 'triangle' | 'diamond' | 'pin' | 'arrow' | string;\n stepposition?: 'start' | 'middle' | 'end' | false;\n symbolsize?: number = 5;\n intervalx?: number = undefined;\n intervaly?: number = undefined\n}\n"],"mappings":";;;AACA,SAASA,sBAAsB,QAAQ,8DAA8D;AAKrG,eAAe,MAAMC,uBAAuB,SAASD,sBAAsB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBACnD,EAAE;IAAAA,eAAA,uBACF,EAAE;IAAAA,eAAA,oBACb,EAAE;IAAAA,eAAA;IAAAA,eAAA,
|
|
1
|
+
{"version":3,"names":["SkeletonAnimationProps","BaseChartComponentProps","constructor","args","_defineProperty","undefined"],"sources":["basechart.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker-ai/app-rn-runtime/core/base.component';\nimport { SkeletonAnimationProps } from '@wavemaker-ai/app-rn-runtime/runtime/base-fragment.component';\nimport { CartesianGrid } from '@wavemaker/react-native-echarts/props/cartesian';\nimport { ChartTooltipOption } from '@wavemaker/react-native-echarts/tooltip';\nimport { AccessibilityRole } from 'react-native';\n\nexport default class BaseChartComponentProps extends SkeletonAnimationProps {\n xaxisdatakey: string = '';\n yaxisdatakey: string = '';\n iconclass = '';\n iconurl = '';\n dataset: any;\n type: string = '';\n title: string = '';\n subheading: string = '';\n theme: string = '';\n xaxislabel: string = '';\n xunits: string = '';\n staggerlabels: boolean = false;\n yaxislabel: string = '';\n yunits: string = '';\n yaxislabeldistance?: number = undefined;\n xaxislabeldistance?: number = undefined;\n offsetxaxis?: number = undefined;\n offsetyaxis?: number = undefined;\n customcolors: string | Array<string> = '';\n labelcolors: string | Array<string> = '';\n legendheight: number = 0;\n labellegendheight: number = 0;\n labeltype: 'percent' | 'value' | 'key-value' | 'key' = 'percent';\n bubblesize: string= '';\n shape: string = '';\n loadingicon='fa fa-circle-o-notch fa-pulse';\n loadingdatamsg = 'Loading...';\n nodatamessage = 'No data found';\n offsetbottom: number = 50;\n offsettop: number = 70;\n offsetleft: number = 65;\n offsetright: number = 25;\n showlegend: string = 'top';\n showlabels: 'inside' | 'outside' | 'hide' = 'outside';\n tooltips: boolean = true;\n interpolation: string = 'linear';\n highlightpoints: boolean = false;\n showvalues: boolean = false;\n showyaxis: boolean = true;\n showxaxis: boolean = true;\n ydomain: string = 'Min';\n xdomain: string = 'Min';\n labelangle: number = 0;\n xtickexpr?: (item: any, index: number, length: number) => any;\n ytickexpr?: (item: any, index: number, length: number) => any;\n hidegridxaxis: boolean = false;\n hidegridyaxis: boolean = false;\n autoadjustlabels: boolean = false;\n accessible?: boolean = true;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole;\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n ynumberformat?: string = '';\n showxaxislabels: boolean = true;\n showyaxislabels: boolean = true;\n chartheight?: number;\n showxaxisticks?: boolean;\n showyaxisticks?: boolean;\n boundarygap?: boolean;\n grid?: CartesianGrid;\n tooltip?: ChartTooltipOption;\n showhighlighter: boolean = true;\n stacknormalize?: boolean = false;\n ticksymbol?: 'none' | 'circle' | 'rect' | 'roundRect' | 'triangle' | 'diamond' | 'pin' | 'arrow' | string;\n stepposition?: 'start' | 'middle' | 'end' | false;\n symbolsize?: number = 5;\n intervalx?: number = undefined;\n intervaly?: number = undefined\n}\n"],"mappings":";;;AACA,SAASA,sBAAsB,QAAQ,8DAA8D;AAKrG,eAAe,MAAMC,uBAAuB,SAASD,sBAAsB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBACnD,EAAE;IAAAA,eAAA,uBACF,EAAE;IAAAA,eAAA,oBACb,EAAE;IAAAA,eAAA,kBACJ,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEG,EAAE;IAAAA,eAAA,gBACD,EAAE;IAAAA,eAAA,qBACG,EAAE;IAAAA,eAAA,gBACP,EAAE;IAAAA,eAAA,qBACG,EAAE;IAAAA,eAAA,i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I;IAAAA,eAAA,yBACJ,KAAK;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,qBAGV,CAAC;IAAAA,eAAA,oBACFC,SAAS;IAAAD,eAAA,oBACTC,SAAS;EAAA;AAChC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Color","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","icon","fontSize","line","color","chartLineColor","title","chartTitleColor","lineHeight","paddingLeft","subHeading","chartSubTitleColor","legendText","legenedDot","axis","stroke","chartAxisColor","fade","rgb","toString","xAxis","yAxis","axisLabel","xAxisLabel","yAxisLabel","grid","strokeDasharray","xGrid","yGrid","ticks","xTicks","yTicks","tickLabels","xTickLabels","yTickLabels","barChart","tooltipXText","tooltipYText","bar","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","tooltipContainer","position","
|
|
1
|
+
{"version":3,"names":["Color","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","icon","fontSize","line","color","chartLineColor","title","chartTitleColor","lineHeight","paddingLeft","subHeading","chartSubTitleColor","legendText","legenedDot","axis","stroke","chartAxisColor","fade","rgb","toString","xAxis","yAxis","axisLabel","xAxisLabel","yAxisLabel","grid","strokeDasharray","xGrid","yGrid","ticks","xTicks","yTicks","tickLabels","xTickLabels","yTickLabels","barChart","tooltipXText","tooltipYText","bar","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","tooltipContainer","position","flex","minWidth","minHeight","opacity","borderRadius","justifyContent","alignItems","elevation","zIndex","tooltipPointer","width","height","backgroundColor","transparent","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderLeftColor","borderRightColor","borderBottomColor","tooltipBgColor","overflow","centerLabel"],"sources":["basechart.styles.ts"],"sourcesContent":["import { TextStyle, ViewStyle } from 'react-native';\nimport Color from \"color\";\nimport BASE_THEME from '@wavemaker-ai/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker-ai/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\n\n\nexport type ChartStyleObject = {\n stroke?: string;\n strokeWidth?: number;\n strokeDasharray?: string;\n fill?: string;\n fontSize?: number;\n [key: string]: any;\n};\n\nexport type BaseChartComponentStyles = BaseStyles & {\n title: TextStyle,\n icon: WmIconStyles,\n subHeading: TextStyle,\n axis: ChartStyleObject,\n xAxis: ChartStyleObject,\n yAxis: ChartStyleObject,\n axisLabel: ChartStyleObject,\n xAxisLabel: ChartStyleObject,\n yAxisLabel: ChartStyleObject,\n ticks: ChartStyleObject,\n xTicks: ChartStyleObject,\n yTicks: ChartStyleObject,\n tickLabels: ChartStyleObject,\n xTickLabels: ChartStyleObject,\n yTickLabels: ChartStyleObject,\n grid: ChartStyleObject,\n xGrid: ChartStyleObject,\n yGrid: ChartStyleObject,\n legendText: TextStyle,\n legenedDot: ViewStyle,\n tooltipContainer: any,\n tooltipPointer: any\n tooltipXText: any,\n tooltipYText: any,\n bar: any;\n centerLabel: ChartStyleObject,\n skeleton?: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-chart';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: BaseChartComponentStyles = defineStyles({\n root: {},\n text: {},\n icon: {\n icon: {\n fontSize: 20\n }\n } as WmIconStyles,\n line: {\n color: themeVariables.chartLineColor\n },\n title: {\n color: themeVariables.chartTitleColor,\n fontSize: 20,\n lineHeight: 24,\n paddingLeft: 10,\n },\n subHeading: {\n fontSize: 12,\n lineHeight: 16,\n color: themeVariables.chartSubTitleColor\n },\n legendText: {},\n legenedDot: {},\n axis: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.3).rgb().toString()\n } as ChartStyleObject,\n xAxis: {},\n yAxis: {},\n axisLabel: {},\n xAxisLabel: {},\n yAxisLabel: {},\n grid: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n strokeDasharray: '16 4'\n } as ChartStyleObject,\n xGrid: {},\n yGrid: {},\n ticks: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n } as ChartStyleObject,\n xTicks: {},\n yTicks: {},\n tickLabels: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n } as ChartStyleObject,\n xTickLabels: {},\n yTickLabels: {},\n barChart: {},\n tooltipXText:{},\n tooltipYText:{},\n bar:{\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n },\n tooltipContainer: {\n position: 'absolute',\n flex: 1,\n minWidth: 100,\n minHeight: 60,\n opacity: 0.9,\n borderRadius: 12,\n justifyContent: 'center',\n alignItems: 'center',\n elevation: 2,\n zIndex: 99\n } as any,\n tooltipPointer: {\n position: 'absolute',\n width: 0,\n height: 0,\n backgroundColor: themeVariables.transparent,\n borderStyle: 'solid',\n borderLeftWidth: 8,\n borderRightWidth: 8,\n borderBottomWidth: 12,\n borderLeftColor: themeVariables.transparent,\n borderRightColor: themeVariables.transparent,\n borderBottomColor: themeVariables.tooltipBgColor,\n overflow: 'hidden',\n } as any,\n centerLabel: {\n color: themeVariables.chartTitleColor,\n fontSize: 20,\n },\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AACA,OAAOA,KAAK,MAAO,OAAO;AAC1B,OAAOC,UAAU,MAAM,2CAA2C;AAClE,SAAqBC,YAAY,QAAQ,kDAAkD;AA4C3F,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAuC,GAAGL,YAAY,CAAC;IAC3DM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CA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EAEFL,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
|
|
@@ -10,6 +10,19 @@ import { BaseChartComponent, BaseChartComponentState } from "@wavemaker-ai/app-r
|
|
|
10
10
|
import WmBubbleChartProps from './bubble-chart.props';
|
|
11
11
|
import { DEFAULT_CLASS } from './bubble-chart.styles';
|
|
12
12
|
import WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';
|
|
13
|
+
const SHAPE_TO_SYMBOL = {
|
|
14
|
+
'circle': 'circle',
|
|
15
|
+
'rect': 'rect',
|
|
16
|
+
'square': 'rect',
|
|
17
|
+
'roundRect': 'roundRect',
|
|
18
|
+
'triangle': 'triangle',
|
|
19
|
+
'triangle-up': 'triangle',
|
|
20
|
+
'triangle-down': 'path://M0,500L500,-500L-500,-500Z',
|
|
21
|
+
'diamond': 'diamond',
|
|
22
|
+
'pin': 'pin',
|
|
23
|
+
'arrow': 'arrow',
|
|
24
|
+
'cross': 'path://M-70,-500L70,-500L70,-220L350,-220L350,-80L70,-80L70,500L-70,500L-70,-80L-350,-80L-350,-220L-70,-220Z M500,0L500,0Z M-500,0L-500,0Z'
|
|
25
|
+
};
|
|
13
26
|
export class WmBubbleChartState extends BaseChartComponentState {}
|
|
14
27
|
export default class WmBubbleChart extends BaseChartComponent {
|
|
15
28
|
constructor(props) {
|
|
@@ -57,17 +70,23 @@ export default class WmBubbleChart extends BaseChartComponent {
|
|
|
57
70
|
const series = ((_this$state$colors = this.state.colors) !== null && _this$state$colors !== void 0 && _this$state$colors.length ? this.state.colors : ['#000']).map(color => ({
|
|
58
71
|
color
|
|
59
72
|
}));
|
|
73
|
+
const {
|
|
74
|
+
height: rootHeight,
|
|
75
|
+
...wrapperStyle
|
|
76
|
+
} = this.styles.root;
|
|
77
|
+
const symbol = SHAPE_TO_SYMBOL[props.shape] || 'circle';
|
|
60
78
|
return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
|
|
61
|
-
style:
|
|
79
|
+
style: wrapperStyle,
|
|
62
80
|
onLayout: this.onViewLayoutChange.bind(this)
|
|
63
|
-
}), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass ? /*#__PURE__*/React.createElement(View, {
|
|
81
|
+
}), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
64
82
|
testID: "title-icon-container",
|
|
65
83
|
style: {
|
|
66
84
|
flexDirection: 'row',
|
|
67
85
|
alignItems: 'center'
|
|
68
86
|
}
|
|
69
|
-
}, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
87
|
+
}, props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
70
88
|
iconclass: props.iconclass,
|
|
89
|
+
iconurl: props.iconurl,
|
|
71
90
|
styles: this.styles.icon
|
|
72
91
|
}) : null, props.title ? /*#__PURE__*/React.createElement(Text, {
|
|
73
92
|
style: this.styles.title
|
|
@@ -100,10 +119,10 @@ export default class WmBubbleChart extends BaseChartComponent {
|
|
|
100
119
|
showYAxisSplitLines: !props.hidegridyaxis,
|
|
101
120
|
xAxisLabel: this.state.xLabel || '',
|
|
102
121
|
yAxisLabel: this.state.yLabel || '',
|
|
103
|
-
xAxisTickLabelFormatter: this.getXAxisTickLabelFormatter(),
|
|
104
|
-
yAxisTickLabelFormatter: this.getYAxisTickLabelFormatter(),
|
|
122
|
+
xAxisTickLabelFormatter: props.showxaxis !== false ? this.getXAxisTickLabelFormatter() : undefined,
|
|
123
|
+
yAxisTickLabelFormatter: props.showyaxis !== false ? this.getYAxisTickLabelFormatter() : undefined,
|
|
105
124
|
showLegend: showLegend,
|
|
106
|
-
symbol:
|
|
125
|
+
symbol: symbol,
|
|
107
126
|
legendPosition: legendPosition,
|
|
108
127
|
tooltip: props.tooltips ? this.hasCustomTooltip ? 'none' : (_props$tooltip = props.tooltip) !== null && _props$tooltip !== void 0 ? _props$tooltip : 'card' : 'none',
|
|
109
128
|
renderTooltip: this.getRenderTooltip(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","BubbleChart","AccessibilityWidgetType","getAccessibilityProps","BaseChartComponent","BaseChartComponentState","WmBubbleChartProps","DEFAULT_CLASS","WmIcon","WmBubbleChartState","WmBubbleChart","constructor","props","_defineProperty","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","updateState","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$intervalx","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","_pt$size","size","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","xaxisticks","getXAxisTickLabelFormatter","colors","color","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","title","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","chartWidth","ref","viewRef","width","screenWidth","height","theme","getChartTheme","sizeRange","sizerange","minY","minX","intervalX","intervalx","intervalY","intervaly","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","symbol","ticksymbol","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect"],"sources":["bubble-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BubbleChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmBubbleChartProps from './bubble-chart.props';\nimport { DEFAULT_CLASS, WmBubbleChartStyles } from './bubble-chart.styles';\nimport WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';\nimport isEmpty from 'lodash-es/isEmpty';\n\nexport class WmBubbleChartState extends BaseChartComponentState<WmBubbleChartProps> {}\n\nexport default class WmBubbleChart extends BaseChartComponent<WmBubbleChartProps, WmBubbleChartState, WmBubbleChartStyles> {\n\n constructor(props: WmBubbleChartProps) {\n super(props, DEFAULT_CLASS, new WmBubbleChartProps(), new WmBubbleChartState());\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmBubbleChartState);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n}\n renderWidget(props: WmBubbleChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n \n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number; size?: number }) =>\n [pt.x, pt.y, pt.size ?? 5] as [number, number, number]\n ),\n }));\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const xaxisticks = this.getXAxisTickLabelFormatter();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n }));\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n {(props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <BubbleChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n sizeRange={props.sizerange}\n minY={minDomain.y}\n minX={minDomain.x}\n intervalX={props.intervalx ?? 1} \n intervalY={props.intervaly}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={this.getXAxisTickLabelFormatter()}\n yAxisTickLabelFormatter={this.getYAxisTickLabelFormatter()}\n showLegend={showLegend}\n symbol={props.ticksymbol}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,WAAW,QAAmC,iCAAiC;AACxF,SAASC,uBAAuB,EAAEC,qBAA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,CAAC,CAAE;MAC3D+D,uBAAuB,EAAE,IAAI,CAACC,0BAA0B,CAAC,CAAE;MAC3DvE,UAAU,EAAEA,UAAW;MACvBwE,MAAM,EAAExG,KAAK,CAACyG,UAAW;MACzBvE,cAAc,EAAEA,cAAe;MAC/BwE,OAAO,EAAE1G,KAAK,CAAC2G,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAAvF,cAAA,GAAIrB,KAAK,CAAC0G,OAAO,cAAArF,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChGwF,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAE/G,KAAK,CAACgH,eAAgB;MACvCC,QAAQ,EAAE,IAAI,CAACA;IAAS,CACzB,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Text","View","BubbleChart","AccessibilityWidgetType","getAccessibilityProps","BaseChartComponent","BaseChartComponentState","WmBubbleChartProps","DEFAULT_CLASS","WmIcon","SHAPE_TO_SYMBOL","WmBubbleChartState","WmBubbleChart","constructor","props","_defineProperty","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","updateState","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$intervalx","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","_pt$size","size","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","xaxisticks","getXAxisTickLabelFormatter","colors","color","height","rootHeight","wrapperStyle","styles","root","symbol","shape","createElement","_extends","LINECHART","style","onLayout","onViewLayoutChange","bind","title","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","chartWidth","ref","viewRef","width","screenWidth","theme","getChartTheme","sizeRange","sizerange","minY","minX","intervalX","intervalx","intervalY","intervaly","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","undefined","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect"],"sources":["bubble-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BubbleChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmBubbleChartProps from './bubble-chart.props';\nimport { DEFAULT_CLASS, WmBubbleChartStyles } from './bubble-chart.styles';\nimport WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';\nimport isEmpty from 'lodash-es/isEmpty';\n\n\nconst SHAPE_TO_SYMBOL: {[key: string]: string} = {\n 'circle': 'circle',\n 'rect': 'rect',\n 'square': 'rect',\n 'roundRect': 'roundRect',\n 'triangle': 'triangle',\n 'triangle-up': 'triangle',\n 'triangle-down': 'path://M0,500L500,-500L-500,-500Z',\n 'diamond': 'diamond',\n 'pin': 'pin',\n 'arrow': 'arrow',\n 'cross': 'path://M-70,-500L70,-500L70,-220L350,-220L350,-80L70,-80L70,500L-70,500L-70,-80L-350,-80L-350,-220L-70,-220Z M500,0L500,0Z M-500,0L-500,0Z',\n};\n\nexport class WmBubbleChartState extends BaseChartComponentState<WmBubbleChartProps> {}\n\nexport default class WmBubbleChart extends BaseChartComponent<WmBubbleChartProps, WmBubbleChartState, WmBubbleChartStyles> {\n\n constructor(props: WmBubbleChartProps) {\n super(props, DEFAULT_CLASS, new WmBubbleChartProps(), new WmBubbleChartState());\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmBubbleChartState);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n}\n renderWidget(props: WmBubbleChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n \n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number; size?: number }) =>\n [pt.x, pt.y, pt.size ?? 5] as [number, number, number]\n ),\n }));\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const xaxisticks = this.getXAxisTickLabelFormatter();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n }));\n const { height: rootHeight, ...wrapperStyle } = this.styles.root as any;\n const symbol = SHAPE_TO_SYMBOL[props.shape] || 'circle';\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={wrapperStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n {(props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <BubbleChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n sizeRange={props.sizerange}\n minY={minDomain.y}\n minX={minDomain.x}\n intervalX={props.intervalx ?? 1} \n intervalY={props.intervaly}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={props.showxaxis !== false ? this.getXAxisTickLabelFormatter() : undefined}\n yAxisTickLabelFormatter={props.showyaxis !== false ? this.getYAxisTickLabelFormatter() : undefined}\n showLegend={showLegend}\n symbol={symbol}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,WAAW,QAAmC,iCAAiC;AACxF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAC1E,OAAOC,MAAM,MAAM,mEAAmE;AAItF,MAAMC,eAAwC,GAAG;EAC/C,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,MAAM;E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MAC3BC,cAAc,EAAEhG,KAAK,CAACiG,cAAe;MACrCC,mBAAmB,EAAE,CAAClG,KAAK,CAACmG,aAAc;MAC1CC,mBAAmB,EAAE,CAACpG,KAAK,CAACqG,aAAc;MAC1CC,UAAU,EAAE,IAAI,CAACnG,KAAK,CAACoG,MAAM,IAAI,EAAG;MACpCC,UAAU,EAAE,IAAI,CAACrG,KAAK,CAACsG,MAAM,IAAI,EAAG;MACpCC,uBAAuB,EAAE1G,KAAK,CAAC2F,SAAS,KAAK,KAAK,GAAG,IAAI,CAACpD,0BAA0B,CAAC,CAAC,GAAGoE,SAAU;MACnGC,uBAAuB,EAAE5G,KAAK,CAAC+F,SAAS,KAAK,KAAK,GAAG,IAAI,CAACc,0BAA0B,CAAC,CAAC,GAAGF,SAAU;MACnG3E,UAAU,EAAEA,UAAW;MACvBe,MAAM,EAAEA,MAAO;MACfb,cAAc,EAAEA,cAAe;MAC/B4E,OAAO,EAAE9G,KAAK,CAAC+G,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAA3F,cAAA,GAAIrB,KAAK,CAAC8G,OAAO,cAAAzF,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChG4F,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAEnH,KAAK,CAACoH,eAAgB;MACvCC,QAAQ,EAAE,IAAI,CAACA;IAAS,CACzB,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ import WmLineChartProps from './line-chart.props';
|
|
|
10
10
|
import { DEFAULT_CLASS } from './line-chart.styles';
|
|
11
11
|
import { BaseChartComponent, BaseChartComponentState } from "@wavemaker-ai/app-rn-runtime/components/chart/basechart.component";
|
|
12
12
|
import WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';
|
|
13
|
+
import { parseDimension } from '@wavemaker-ai/app-rn-runtime/core/utils';
|
|
13
14
|
|
|
14
15
|
/** Maps Victory interpolation strings to ECharts LineChart curve types. */
|
|
15
16
|
const getLineType = interpolation => {
|
|
@@ -80,21 +81,26 @@ export default class WmLineChart extends BaseChartComponent {
|
|
|
80
81
|
const minDomain = this.getMinDomain();
|
|
81
82
|
const series = ((_this$state$colors = this.state.colors) !== null && _this$state$colors !== void 0 && _this$state$colors.length ? this.state.colors : ['#000']).map(color => ({
|
|
82
83
|
color,
|
|
83
|
-
lineWidth:
|
|
84
|
+
lineWidth: parseDimension(props.linethickness)
|
|
84
85
|
}));
|
|
85
86
|
const symbol = this.getSeriesSymbol(props.highlightpoints, props.ticksymbol);
|
|
87
|
+
const {
|
|
88
|
+
height: rootHeight,
|
|
89
|
+
...wrapperStyle
|
|
90
|
+
} = this.styles.root;
|
|
86
91
|
return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
|
|
87
|
-
style:
|
|
92
|
+
style: wrapperStyle,
|
|
88
93
|
onLayout: this.onViewLayoutChange.bind(this),
|
|
89
94
|
key: `${props.title}_line_chart`
|
|
90
|
-
}), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass ? /*#__PURE__*/React.createElement(View, {
|
|
95
|
+
}), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
91
96
|
testID: "title-icon-container",
|
|
92
97
|
style: {
|
|
93
98
|
flexDirection: 'row',
|
|
94
99
|
alignItems: 'center'
|
|
95
100
|
}
|
|
96
|
-
}, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
101
|
+
}, props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
97
102
|
iconclass: props.iconclass,
|
|
103
|
+
iconurl: props.iconurl,
|
|
98
104
|
styles: this.styles.icon
|
|
99
105
|
}) : null, props.title ? /*#__PURE__*/React.createElement(Text, {
|
|
100
106
|
style: this.styles.title
|
|
@@ -129,8 +135,8 @@ export default class WmLineChart extends BaseChartComponent {
|
|
|
129
135
|
showYAxisSplitLines: !props.hidegridyaxis,
|
|
130
136
|
xAxisLabel: this.state.xLabel || '',
|
|
131
137
|
yAxisLabel: this.state.yLabel || '',
|
|
132
|
-
xAxisTickLabelFormatter: this.getXAxisTickLabelFormatter(),
|
|
133
|
-
yAxisTickLabelFormatter: this.getYAxisTickLabelFormatter(),
|
|
138
|
+
xAxisTickLabelFormatter: props.showxaxis !== false ? this.getXAxisTickLabelFormatter() : undefined,
|
|
139
|
+
yAxisTickLabelFormatter: props.showyaxis !== false ? this.getYAxisTickLabelFormatter() : undefined,
|
|
134
140
|
showLegend: showLegend,
|
|
135
141
|
legendPosition: legendPosition,
|
|
136
142
|
tooltip: props.tooltips ? this.hasCustomTooltip ? 'none' : (_props$tooltip = props.tooltip) !== null && _props$tooltip !== void 0 ? _props$tooltip : 'card' : 'none',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","AccessibilityWidgetType","getAccessibilityProps","LineChart","WmLineChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmIcon","getLineType","interpolation","includes","startsWith","WmLineChartState","constructor","args","_defineProperty","WmLineChart","props","e","viewWidth","nativeEvent","layout","width","handleLayout","updateState","chartWidth","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","type","showLegend","showlegend","legendPosition","minDomain","getMinDomain","colors","color","lineWidth","Number","linethickness","symbol","getSeriesSymbol","highlightpoints","ticksymbol","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","key","title","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","viewRef","screenWidth","height","theme","getChartTheme","step","stepposition","stackNormalize","stacknormalize","symbolSize","symbolsize","minY","minX","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","getXAxisTickLabelFormatter","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect","intervalX","intervalx","intervalY","intervaly"],"sources":["line-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, LayoutChangeEvent } from 'react-native';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport { LineChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\n\nimport WmLineChartProps from './line-chart.props';\nimport { DEFAULT_CLASS, WmLineChartStyles } from './line-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';\n\n/** Maps Victory interpolation strings to ECharts LineChart curve types. */\nconst getLineType = (interpolation: string): 'default' | 'smooth' | 'step' => {\n if (['natural', 'cardinal', 'catmullRom', 'basis', 'monotoneX', 'monotoneY'].includes(interpolation)) {\n return 'smooth';\n }\n if (interpolation && interpolation.startsWith('step')) {\n return 'step';\n }\n return 'default';\n};\n\nexport class WmLineChartState extends BaseChartComponentState<WmLineChartProps> {\n chartWidth = 0;\n}\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 onViewLayoutChange = (e: LayoutChangeEvent) => {\n const viewWidth = e.nativeEvent.layout.width;\n this.handleLayout(e);\n this.updateState({\n chartWidth: viewWidth\n } as WmLineChartState);\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmLineChartState);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n }\n\n renderWidget(props: WmLineChartProps) {\n\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n\n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number }) => pt.y),\n }));\n\n const type = getLineType(props.interpolation);\n // step sub-mode: only relevant when type resolves to 'step'\n // const step: 'start' | 'middle' | 'end' | false =\n // type === 'step' ? (props.stepmode ?? 'start') : false;\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n lineWidth: Number(props.linethickness),\n }));\n const symbol = this.getSeriesSymbol(props.highlightpoints, props.ticksymbol);\n\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n key={`${props.title}_line_chart`}\n >\n <View>\n {(props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <LineChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n type={type}\n step={props.stepposition}\n stackNormalize={props.stacknormalize}\n symbol={symbol}\n symbolSize={props.symbolsize}\n minY={minDomain.y}\n minX={minDomain.x}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={this.getXAxisTickLabelFormatter()}\n yAxisTickLabelFormatter={this.getYAxisTickLabelFormatter()}\n showLegend={showLegend}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={this.props.showhighlighter}\n onSelect={this.onSelect}\n intervalX={props.intervalx}\n intervalY={props.intervaly}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAA2B,cAAc;AAC5D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SAASC,SAAS,QAAmC,iCAAiC;AAEtF,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,MAAM,MAAM,mEAAmE;;AAEtF;AACA,MAAMC,WAAW,GAAIC,aAA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GAAGxF,KAAK,CAAC0F,UAAU,GAAG1F,KAAK,CAACyF;MAC/C,CAAE;MACFG,SAAS,EAAE5F,KAAK,CAAC6F,SAAU;MAC3BC,cAAc,EAAE9F,KAAK,CAAC+F,cAAe;MACrCC,SAAS,EAAEhG,KAAK,CAACiG,SAAU;MAC3BC,cAAc,EAAElG,KAAK,CAACmG,cAAe;MACrCC,mBAAmB,EAAE,CAACpG,KAAK,CAACqG,aAAc;MAC1CC,mBAAmB,EAAE,CAACtG,KAAK,CAACuG,aAAc;MAC1CC,UAAU,EAAE,IAAI,CAAC9F,KAAK,CAAC+F,MAAM,IAAI,EAAG;MACpCC,UAAU,EAAE,IAAI,CAAChG,KAAK,CAACiG,MAAM,IAAI,EAAG;MACpCC,uBAAuB,EAAE,IAAI,CAACC,0BAA0B,CAAC,CAAE;MAC3DC,uBAAuB,EAAE,IAAI,CAACC,0BAA0B,CAAC,CAAE;MAC3D3E,UAAU,EAAEA,UAAW;MACvBE,cAAc,EAAEA,cAAe;MAC/B0E,OAAO,EAAEhH,KAAK,CAACiH,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAAxF,cAAA,GAAI1B,KAAK,CAACgH,OAAO,cAAAtF,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChGyF,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAE,IAAI,CAACrH,KAAK,CAACsH,eAAgB;MAC5CC,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBC,SAAS,EAAExH,KAAK,CAACyH,SAAU;MAC3BC,SAAS,EAAE1H,KAAK,CAAC2H;IAAU,CAC5B,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Text","View","AccessibilityWidgetType","getAccessibilityProps","LineChart","WmLineChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmIcon","parseDimension","getLineType","interpolation","includes","startsWith","WmLineChartState","constructor","args","_defineProperty","WmLineChart","props","e","viewWidth","nativeEvent","layout","width","handleLayout","updateState","chartWidth","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","type","showLegend","showlegend","legendPosition","minDomain","getMinDomain","colors","color","lineWidth","linethickness","symbol","getSeriesSymbol","highlightpoints","ticksymbol","height","rootHeight","wrapperStyle","styles","root","createElement","_extends","LINECHART","style","onLayout","onViewLayoutChange","bind","key","title","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","viewRef","screenWidth","theme","getChartTheme","step","stepposition","stackNormalize","stacknormalize","symbolSize","symbolsize","minY","minX","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","getXAxisTickLabelFormatter","undefined","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect","intervalX","intervalx","intervalY","intervaly"],"sources":["line-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, LayoutChangeEvent } from 'react-native';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport { LineChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\n\nimport WmLineChartProps from './line-chart.props';\nimport { DEFAULT_CLASS, WmLineChartStyles } from './line-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';\nimport { parseDimension } from '@wavemaker-ai/app-rn-runtime/core/utils';\n\n/** Maps Victory interpolation strings to ECharts LineChart curve types. */\nconst getLineType = (interpolation: string): 'default' | 'smooth' | 'step' => {\n if (['natural', 'cardinal', 'catmullRom', 'basis', 'monotoneX', 'monotoneY'].includes(interpolation)) {\n return 'smooth';\n }\n if (interpolation && interpolation.startsWith('step')) {\n return 'step';\n }\n return 'default';\n};\n\nexport class WmLineChartState extends BaseChartComponentState<WmLineChartProps> {\n chartWidth = 0;\n}\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 onViewLayoutChange = (e: LayoutChangeEvent) => {\n const viewWidth = e.nativeEvent.layout.width;\n this.handleLayout(e);\n this.updateState({\n chartWidth: viewWidth\n } as WmLineChartState);\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmLineChartState);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n }\n\n renderWidget(props: WmLineChartProps) {\n\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n\n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number }) => pt.y),\n }));\n\n const type = getLineType(props.interpolation);\n // step sub-mode: only relevant when type resolves to 'step'\n // const step: 'start' | 'middle' | 'end' | false =\n // type === 'step' ? (props.stepmode ?? 'start') : false;\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n lineWidth: parseDimension(props.linethickness),\n }));\n const symbol = this.getSeriesSymbol(props.highlightpoints, props.ticksymbol);\n\n const { height: rootHeight, ...wrapperStyle } = this.styles.root as any;\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={wrapperStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n key={`${props.title}_line_chart`}\n >\n <View>\n {(props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <LineChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n type={type}\n step={props.stepposition}\n stackNormalize={props.stacknormalize}\n symbol={symbol}\n symbolSize={props.symbolsize}\n minY={minDomain.y}\n minX={minDomain.x}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={props.showxaxis !== false ? this.getXAxisTickLabelFormatter() : undefined}\n yAxisTickLabelFormatter={props.showyaxis !== false ? this.getYAxisTickLabelFormatter() : undefined}\n showLegend={showLegend}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={this.props.showhighlighter}\n onSelect={this.onSelect}\n intervalX={props.intervalx}\n intervalY={props.intervaly}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAA2B,cAAc;AAC5D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SAASC,SAAS,QAAmC,iCAAiC;AAEtF,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,MAAM,MAAM,mEAAmE;AACtF,SAASC,cAAc,QAAQ,yCAAyC;;AAExE;AACA,MAAMC,WAAW,GAAIC,aAAqB,IAAoC;EAC5E,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAACC,QAAQ,CAACD,aAAa,CAAC,EAAE;IACpG,OAAO,QAAQ;EACjB;EACA,IAAIA,aAAa,IAAIA,aAAa,CAACE,UAAU,CAAC,MAAM,CAAC,EAAE;IACrD,OAAO,MAAM;EACf;EACA,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,MAAMC,gBAAgB,SAASP,uBAAuB,CAAmB;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBACjE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,WAAW,SAASZ,kBAAkB,CAAwD;EAEjHS,WAAWA,CAACI,KAAuB,EA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CAACyG,aAAc;MAC1CC,UAAU,EAAE,IAAI,CAAChG,KAAK,CAACiG,MAAM,IAAI,EAAG;MACpCC,UAAU,EAAE,IAAI,CAAClG,KAAK,CAACmG,MAAM,IAAI,EAAG;MACpCC,uBAAuB,EAAE9G,KAAK,CAAC+F,SAAS,KAAK,KAAK,GAAG,IAAI,CAACgB,0BAA0B,CAAC,CAAC,GAAGC,SAAU;MACnGC,uBAAuB,EAAEjH,KAAK,CAACmG,SAAS,KAAK,KAAK,GAAG,IAAI,CAACe,0BAA0B,CAAC,CAAC,GAAGF,SAAU;MACnG5E,UAAU,EAAEA,UAAW;MACvBE,cAAc,EAAEA,cAAe;MAC/B6E,OAAO,EAAEnH,KAAK,CAACoH,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAA3F,cAAA,GAAI1B,KAAK,CAACmH,OAAO,cAAAzF,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChG4F,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAE,IAAI,CAACxH,KAAK,CAACyH,eAAgB;MAC5CC,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBC,SAAS,EAAE3H,KAAK,CAAC4H,SAAU;MAC3BC,SAAS,EAAE7H,KAAK,CAAC8H;IAAU,CAC5B,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ import { DEFAULT_CLASS } from './pie-chart.styles';
|
|
|
11
11
|
import WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';
|
|
12
12
|
import { BaseChartComponent, BaseChartComponentState } from '@wavemaker-ai/app-rn-runtime/components/chart/basechart.component';
|
|
13
13
|
import WmDonutChartProps from '@wavemaker-ai/app-rn-runtime/components/chart/donut-chart/donut-chart.props';
|
|
14
|
+
import { formatCompactNumber } from '@wavemaker-ai/app-rn-runtime/core/utils';
|
|
14
15
|
export class WmPieChartState extends BaseChartComponentState {
|
|
15
16
|
constructor(...args) {
|
|
16
17
|
super(...args);
|
|
@@ -63,6 +64,24 @@ export default class WmPieChart extends BaseChartComponent {
|
|
|
63
64
|
});
|
|
64
65
|
this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);
|
|
65
66
|
});
|
|
67
|
+
_defineProperty(this, "getLabel", params => {
|
|
68
|
+
const {
|
|
69
|
+
name,
|
|
70
|
+
value
|
|
71
|
+
} = params;
|
|
72
|
+
switch (this.state.props.labeltype) {
|
|
73
|
+
case 'percent':
|
|
74
|
+
return Math.round(value * 100 / this.state.total) + '%';
|
|
75
|
+
case 'key':
|
|
76
|
+
return name;
|
|
77
|
+
case 'value':
|
|
78
|
+
return formatCompactNumber(value);
|
|
79
|
+
case 'key-value':
|
|
80
|
+
return `${name} ${value}`;
|
|
81
|
+
default:
|
|
82
|
+
return name;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
66
85
|
}
|
|
67
86
|
componentDidMount() {
|
|
68
87
|
super.componentDidMount();
|
|
@@ -89,7 +108,6 @@ export default class WmPieChart extends BaseChartComponent {
|
|
|
89
108
|
const radius = props.donutratio > 0 ? [`${Math.round(props.donutratio * 75)}%`, '75%'] : '75%';
|
|
90
109
|
const showLabel = props.showlabels !== 'hide';
|
|
91
110
|
const labelPosition = props.showlabels === 'inside' ? 'inside' : 'outside';
|
|
92
|
-
const labelFormat = props.labeltype === 'percent' ? 'percentage' : props.labeltype;
|
|
93
111
|
const showLegend = props.showlegend !== 'hide';
|
|
94
112
|
const legendPosition = ['top', 'bottom', 'left', 'right'].includes(props.showlegend) ? props.showlegend : 'bottom';
|
|
95
113
|
const chartWidth = this.state.chartWidth;
|
|
@@ -103,14 +121,15 @@ export default class WmPieChart extends BaseChartComponent {
|
|
|
103
121
|
key: `${props.title}_pie_chart`
|
|
104
122
|
}), /*#__PURE__*/React.createElement(View, {
|
|
105
123
|
onLayout: this.onInfoViewLayoutChange
|
|
106
|
-
}, props.title || props.iconclass ? /*#__PURE__*/React.createElement(View, {
|
|
124
|
+
}, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
107
125
|
testID: "title-icon-container",
|
|
108
126
|
style: {
|
|
109
127
|
flexDirection: 'row',
|
|
110
128
|
alignItems: 'center'
|
|
111
129
|
}
|
|
112
|
-
}, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
130
|
+
}, props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
113
131
|
iconclass: props.iconclass,
|
|
132
|
+
iconurl: props.iconurl,
|
|
114
133
|
styles: this.styles.icon
|
|
115
134
|
}) : null, props.title ? /*#__PURE__*/React.createElement(Text, {
|
|
116
135
|
style: this.styles.title
|
|
@@ -129,7 +148,8 @@ export default class WmPieChart extends BaseChartComponent {
|
|
|
129
148
|
theme: this.getChartTheme(),
|
|
130
149
|
showLabel: showLabel,
|
|
131
150
|
labelPosition: labelPosition,
|
|
132
|
-
showLabelLine: props.
|
|
151
|
+
showLabelLine: props.showlabelline,
|
|
152
|
+
labelFormatter: this.getLabel,
|
|
133
153
|
showLegend: showLegend,
|
|
134
154
|
legendPosition: legendPosition,
|
|
135
155
|
renderTooltip: this.getRenderTooltip(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","AccessibilityWidgetType","getAccessibilityProps","PieChart","WmPieChartProps","DEFAULT_CLASS","WmIcon","BaseChartComponent","BaseChartComponentState","WmDonutChartProps","WmPieChartState","constructor","args","_defineProperty","WmPieChart","props","type","e","_e$nativeEvent","viewWidth","nativeEvent","layout","width","handleLayout","updateState","chartWidth","totalHeight","height","_e$nativeEvent2","infoHeight","opacity","event","state","dataset","dataIndex","name","value","seriesIndex","selectedItem","selectedChartItem","data","x","y","_dataObj","index","invokeEventCallback","proxy","componentDidMount","renderWidget","_props$tooltip","length","pieData","chartData","map","d","xaxisDatakeyArr","itemStyle","color","colors","orderedData","isRTL","reverse","radius","donutratio","Math","round","showLabel","showlabels","labelPosition","labelFormat","labeltype","showLegend","showlegend","legendPosition","includes","chartHeight","styles","root","createElement","_extends","style","LINECHART","onLayout","onViewLayoutChange","key","title","onInfoViewLayoutChange","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","position","ref","viewRef","theme","getChartTheme","showLabelLine","renderTooltip","getRenderTooltip","tooltip","tooltips","hasCustomTooltip","showHighlighter","showhighlighter","onSelect","centerlabel","pointerEvents","top","left","right","bottom","justifyContent","centerLabel"],"sources":["pie-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\n\nimport { PieChart, PieDataItem, PieChartSelectEvent } from '@wavemaker/react-native-echarts';\n\nimport WmPieChartProps from './pie-chart.props';\nimport { DEFAULT_CLASS, WmPieChartStyles } from './pie-chart.styles';\n\nimport WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker-ai/app-rn-runtime/components/chart/basechart.component';\nimport WmDonutChartProps from '@wavemaker-ai/app-rn-runtime/components/chart/donut-chart/donut-chart.props';\n\nexport class WmPieChartState extends BaseChartComponentState<WmPieChartProps> {\n chartWidth = 0;\n totalHeight = 0;\n infoHeight = 10;\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\n this.handleLayout(e)\n\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 onSelect = (event: PieChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, name, value, seriesIndex } = event; \n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = {\n data: { x: name, y: value, _dataObj: selectedItem }\n };\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as any);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n }\n renderWidget(props: WmPieChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n const pieData = this.state.data[0];\n\n // Build PieDataItem[] with per-slice colors embedded so RTL reversal keeps color-to-slice binding correct\n const chartData: PieDataItem[] = pieData.map((d: {x: any, y: any}, index: number) => ({\n name: this.state.xaxisDatakeyArr[d.x],\n value: d.y,\n itemStyle: { color: this.state.colors[index % this.state.colors.length] }\n }));\n const orderedData = this.isRTL ? [...chartData].reverse() : chartData;\n\n // Donut: [inner%, outer%] tuple; Pie: single percentage string\n const radius: string | (string | number)[] = props.donutratio > 0\n ? [`${Math.round(props.donutratio * 75)}%`, '75%']\n : '75%';\n\n const showLabel = props.showlabels !== 'hide';\n const labelPosition: 'outside' | 'inside' | 'center' =\n props.showlabels === 'inside' ? 'inside' : 'outside';\n\n const labelFormat = props.labeltype === 'percent' ? 'percentage' : props.labeltype;\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n\n const chartWidth = this.state.chartWidth;\n const chartHeight = (this.styles.root.height ? this.state.totalHeight : chartWidth)\n - this.state.infoHeight;\n\n return (\n <View style={[{opacity: this.state.opacity}, this.styles.root]}\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n onLayout={this.onViewLayoutChange}\n key={`${props.title}_pie_chart`}\n >\n <View onLayout={this.onInfoViewLayoutChange}>\n {(props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n <View style={{position: 'relative'}} ref={this.viewRef}\n >\n {chartWidth ? (\n <PieChart\n data={orderedData}\n width={chartWidth}\n height={chartHeight}\n radius={radius}\n theme={this.getChartTheme()}\n showLabel={showLabel}\n labelPosition={labelPosition}\n showLabelLine={props.showLabelLine}\n showLegend={showLegend}\n legendPosition={legendPosition}\n renderTooltip={this.getRenderTooltip()}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n />\n ) : null}\n {props.centerlabel ? (\n <View\n pointerEvents=\"none\"\n style={{\n position: 'absolute',\n top: 0, left: 0, right: 0, bottom: 0,\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n <Text style={this.styles.centerLabel as any}>\n {props.centerlabel}\n </Text>\n </View>\n ) : null}\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAEhH,SAASC,QAAQ,QAA0C,iCAAiC;AAE5F,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AAEpE,OAAOC,MAAM,MAAM,mEAAmE;AACtF,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,iBAAiB,MAAM,6EAA6E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gD,WAAY;MACpBb,MAAM,EAAEA,MAAO;MACfmC,KAAK,EAAE,IAAI,CAACC,aAAa,CAAC,CAAE;MAC5BhC,SAAS,EAAEA,SAAU;MACrBE,aAAa,EAAEA,aAAc;MAC7B+B,aAAa,EAAEpF,KAAK,CAACoF,aAAc;MACnC5B,UAAU,EAAEA,UAAW;MACvBE,cAAc,EAAEA,cAAe;MAC/B2B,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,OAAO,EAAEvF,KAAK,CAACwF,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAAvD,cAAA,GAAIlC,KAAK,CAACuF,OAAO,cAAArD,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChGwD,eAAe,EAAE1F,KAAK,CAAC2F,eAAgB;MACvCC,QAAQ,EAAE,IAAI,CAACA;IAAS,CACzB,CAAC,GACA,IAAI,EACP5F,KAAK,CAAC6F,WAAW,gBAChB9G,KAAA,CAAAgF,aAAA,CAAC/E,IAAI;MACH8G,aAAa,EAAC,MAAM;MACpB7B,KAAK,EAAE;QACLc,QAAQ,EAAE,UAAU;QACpBgB,GAAG,EAAE,CAAC;QAAEC,IAAI,EAAE,CAAC;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE,CAAC;QACpCC,cAAc,EAAE,QAAQ;QACxBxB,UAAU,EAAE;MACd;IAAE,gBAEF5F,KAAA,CAAAgF,aAAA,CAAC9E,IAAI;MAACgF,KAAK,EAAE,IAAI,CAACJ,MAAM,CAACuC;IAAmB,GACzCpG,KAAK,CAAC6F,WACH,CACF,CAAC,GACL,IACA,CACF,CAAC;EAEX;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","View","Text","AccessibilityWidgetType","getAccessibilityProps","PieChart","WmPieChartProps","DEFAULT_CLASS","WmIcon","BaseChartComponent","BaseChartComponentState","WmDonutChartProps","formatCompactNumber","WmPieChartState","constructor","args","_defineProperty","WmPieChart","props","type","e","_e$nativeEvent","viewWidth","nativeEvent","layout","width","handleLayout","updateState","chartWidth","totalHeight","height","_e$nativeEvent2","infoHeight","opacity","event","state","dataset","dataIndex","name","value","seriesIndex","selectedItem","selectedChartItem","data","x","y","_dataObj","index","invokeEventCallback","proxy","params","labeltype","Math","round","total","componentDidMount","renderWidget","_props$tooltip","length","pieData","chartData","map","d","xaxisDatakeyArr","itemStyle","color","colors","orderedData","isRTL","reverse","radius","donutratio","showLabel","showlabels","labelPosition","showLegend","showlegend","legendPosition","includes","chartHeight","styles","root","createElement","_extends","style","LINECHART","onLayout","onViewLayoutChange","key","title","onInfoViewLayoutChange","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","position","ref","viewRef","theme","getChartTheme","showLabelLine","showlabelline","labelFormatter","getLabel","renderTooltip","getRenderTooltip","tooltip","tooltips","hasCustomTooltip","showHighlighter","showhighlighter","onSelect","centerlabel","pointerEvents","top","left","right","bottom","justifyContent","centerLabel"],"sources":["pie-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\n\nimport { PieChart, PieDataItem, PieChartSelectEvent } from '@wavemaker/react-native-echarts';\n\nimport WmPieChartProps from './pie-chart.props';\nimport { DEFAULT_CLASS, WmPieChartStyles } from './pie-chart.styles';\n\nimport WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker-ai/app-rn-runtime/components/chart/basechart.component';\nimport WmDonutChartProps from '@wavemaker-ai/app-rn-runtime/components/chart/donut-chart/donut-chart.props';\nimport { formatCompactNumber } from '@wavemaker-ai/app-rn-runtime/core/utils';\n\nexport class WmPieChartState extends BaseChartComponentState<WmPieChartProps> {\n chartWidth = 0;\n totalHeight = 0;\n infoHeight = 10;\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\n this.handleLayout(e)\n\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 onSelect = (event: PieChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, name, value, seriesIndex } = event; \n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = {\n data: { x: name, y: value, _dataObj: selectedItem }\n };\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as any);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n }\n\n getLabel = (params: any): string => {\n const { name, value } = params;\n switch (this.state.props.labeltype) {\n case 'percent':\n return Math.round(value * 100 / this.state.total) + '%';\n case 'key':\n return name;\n case 'value':\n return formatCompactNumber(value);\n case 'key-value':\n return `${name} ${value}`;\n default:\n return name;\n }\n }\n\n renderWidget(props: WmPieChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n const pieData = this.state.data[0];\n\n // Build PieDataItem[] with per-slice colors embedded so RTL reversal keeps color-to-slice binding correct\n const chartData: PieDataItem[] = pieData.map((d: {x: any, y: any}, index: number) => ({\n name: this.state.xaxisDatakeyArr[d.x],\n value: d.y,\n itemStyle: { color: this.state.colors[index % this.state.colors.length] }\n }));\n const orderedData = this.isRTL ? [...chartData].reverse() : chartData;\n\n // Donut: [inner%, outer%] tuple; Pie: single percentage string\n const radius: string | (string | number)[] = props.donutratio > 0\n ? [`${Math.round(props.donutratio * 75)}%`, '75%']\n : '75%';\n\n const showLabel = props.showlabels !== 'hide';\n const labelPosition: 'outside' | 'inside' | 'center' =\n props.showlabels === 'inside' ? 'inside' : 'outside';\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n\n const chartWidth = this.state.chartWidth;\n const chartHeight = (this.styles.root.height ? this.state.totalHeight : chartWidth)\n - this.state.infoHeight;\n\n return (\n <View style={[{opacity: this.state.opacity}, this.styles.root]}\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n onLayout={this.onViewLayoutChange}\n key={`${props.title}_pie_chart`}\n >\n <View onLayout={this.onInfoViewLayoutChange}>\n {(props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n <View style={{position: 'relative'}} ref={this.viewRef}\n >\n {chartWidth ? (\n <PieChart\n data={orderedData}\n width={chartWidth}\n height={chartHeight}\n radius={radius}\n theme={this.getChartTheme()}\n showLabel={showLabel}\n labelPosition={labelPosition}\n showLabelLine={props.showlabelline}\n labelFormatter={this.getLabel}\n showLegend={showLegend}\n legendPosition={legendPosition}\n renderTooltip={this.getRenderTooltip()}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n />\n ) : null}\n {props.centerlabel ? (\n <View\n pointerEvents=\"none\"\n style={{\n position: 'absolute',\n top: 0, left: 0, right: 0, bottom: 0,\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n <Text style={this.styles.centerLabel as any}>\n {props.centerlabel}\n </Text>\n </View>\n ) : null}\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAEhH,SAASC,QAAQ,QAA0C,iCAAiC;AAE5F,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AAEpE,OAAOC,MAAM,MAAM,mEAAmE;AACtF,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,iBAAiB,MAAM,6EAA6E;AAC3G,SAASC,mBAAmB,QAAQ,yCAAyC;AAE7E,OAAO,MAAMC,eAAe,SAASH,uBAAuB,CAAkB;EAAAI,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBAC/D,CAAC;IAAAA,eAAA,sBACA,CAAC;IAAAA,eAAA,qBACF,EAAE;IAAAA,eAAA,kBACL,CAAC;EAAA;AACb;AAEA,eAAe,MAAMC,UAAU,SAASR,kBAAkB,CAAqD;EAE7GK,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAEW,KAAK,CAACC,IAAI,KAAK,OAAO,GAAG,IAAIR,iBAAiB,CAAC,CAAC,GAAG,IAAIL,eAAe,CAAC,CAAC,EAAE,IAAIO,eAAe,CAAC,CAAC,CAAC;IAACG,eAAA,6BAOzGI,CAAoB,IAAK;MAAA,IAAAC,cAAA;MAC7C,IAAIC,SAAS,GAAGF,CAAC,CAACG,WAAW,CAACC,MAAM,CAACC,KAAK;MAE1C,IAAI,CAACC,YAAY,CAACN,CAAC,CAAC;MAEpB,IAAI,CAACO,WAAW,CAAC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CAACuF,aAAc;MACnCC,cAAc,EAAE,IAAI,CAACC,QAAS;MAC9BhC,UAAU,EAAEA,UAAW;MACvBE,cAAc,EAAEA,cAAe;MAC/B+B,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,OAAO,EAAE5F,KAAK,CAAC6F,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAAvD,cAAA,GAAIvC,KAAK,CAAC4F,OAAO,cAAArD,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChGwD,eAAe,EAAE/F,KAAK,CAACgG,eAAgB;MACvCC,QAAQ,EAAE,IAAI,CAACA;IAAS,CACzB,CAAC,GACA,IAAI,EACPjG,KAAK,CAACkG,WAAW,gBAChBpH,KAAA,CAAAkF,aAAA,CAACjF,IAAI;MACHoH,aAAa,EAAC,MAAM;MACpBjC,KAAK,EAAE;QACLe,QAAQ,EAAE,UAAU;QACpBmB,GAAG,EAAE,CAAC;QAAEC,IAAI,EAAE,CAAC;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE,CAAC;QACpCC,cAAc,EAAE,QAAQ;QACxB3B,UAAU,EAAE;MACd;IAAE,gBAEF/F,KAAA,CAAAkF,aAAA,CAAChF,IAAI;MAACkF,KAAK,EAAE,IAAI,CAACJ,MAAM,CAAC2C;IAAmB,GACzCzG,KAAK,CAACkG,WACH,CACF,CAAC,GACL,IACA,CACF,CAAC;EAEX;AACF","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ export default class WmPieChartProps extends BaseChartComponentProps {
|
|
|
9
9
|
_defineProperty(this, "labelplacement", 'vertical');
|
|
10
10
|
_defineProperty(this, "centerlabel", '');
|
|
11
11
|
_defineProperty(this, "onSelect", void 0);
|
|
12
|
-
_defineProperty(this, "
|
|
12
|
+
_defineProperty(this, "showlabelline", true);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=pie-chart.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseChartComponentProps","WmPieChartProps","constructor","args","_defineProperty"],"sources":["pie-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from '@wavemaker-ai/app-rn-runtime/components/chart/basechart.props';\n\nexport default class WmPieChartProps extends BaseChartComponentProps {\n donutratio: number = 0;\n labelplacement: string = 'vertical';\n centerlabel = '';\n onSelect?: any;\n
|
|
1
|
+
{"version":3,"names":["BaseChartComponentProps","WmPieChartProps","constructor","args","_defineProperty"],"sources":["pie-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from '@wavemaker-ai/app-rn-runtime/components/chart/basechart.props';\n\nexport default class WmPieChartProps extends BaseChartComponentProps {\n donutratio: number = 0;\n labelplacement: string = 'vertical';\n centerlabel = '';\n onSelect?: any;\n showlabelline: boolean = true;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,+DAA+D;AAEnG,eAAe,MAAMC,eAAe,SAASD,uBAAuB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBAC9C,CAAC;IAAAA,eAAA,yBACG,UAAU;IAAAA,eAAA,sBACrB,EAAE;IAAAA,eAAA;IAAAA,eAAA,wBAES,IAAI;EAAA;AAC/B","ignoreList":[]}
|
|
@@ -58,6 +58,9 @@ export default class WmAccordion extends BaseComponent {
|
|
|
58
58
|
const collapsedIconClass = collapsedIcon || (useChevron ? 'wi wi-chevron-up' : 'wi wi-plus');
|
|
59
59
|
return isExpanded ? expandedIconClass : collapsedIconClass;
|
|
60
60
|
}
|
|
61
|
+
getExpandCollapseIconUrl(isExpanded, expandedIconUrl, collapsedIconUrl) {
|
|
62
|
+
return isExpanded ? expandedIconUrl : collapsedIconUrl;
|
|
63
|
+
}
|
|
61
64
|
expandCollapseIcon(item, index, showBadge = true, showIcon = true, useChevron = true, isExpanded = false) {
|
|
62
65
|
const widgetProps = item.props;
|
|
63
66
|
//@ts-ignore
|
|
@@ -67,6 +70,9 @@ export default class WmAccordion extends BaseComponent {
|
|
|
67
70
|
const expandedIconOverride = this.state.props.expandediconclass;
|
|
68
71
|
const collapsedIconOverride = this.state.props.collapsediconclass;
|
|
69
72
|
const iconclass = this.getExpandCollapseIconClass(isExpanded, useChevron, expandedIconOverride, collapsedIconOverride);
|
|
73
|
+
const expandedIconUrlOverride = this.state.props.expandediconurl;
|
|
74
|
+
const collapsedIconUrlOverride = this.state.props.collapsediconurl;
|
|
75
|
+
const iconurl = this.getExpandCollapseIconUrl(isExpanded, expandedIconUrlOverride, collapsedIconUrlOverride);
|
|
70
76
|
return /*#__PURE__*/React.createElement(View, {
|
|
71
77
|
style: {
|
|
72
78
|
flexDirection: 'row'
|
|
@@ -75,7 +81,8 @@ export default class WmAccordion extends BaseComponent {
|
|
|
75
81
|
id: this.getTestId('icon' + index),
|
|
76
82
|
styles: this.theme.mergeStyle({}, this.styles.icon, isExpanded ? this.styles.activeIcon : null),
|
|
77
83
|
name: 'expand_collapse_icon',
|
|
78
|
-
iconclass: iconclass
|
|
84
|
+
iconclass: iconclass,
|
|
85
|
+
iconurl: iconurl
|
|
79
86
|
}) : null);
|
|
80
87
|
}
|
|
81
88
|
renderAccordionpane(item, index, accordionpanes = []) {
|
|
@@ -100,11 +107,12 @@ export default class WmAccordion extends BaseComponent {
|
|
|
100
107
|
onPress: this.toggle.bind(this, index + 1, !isExpanded)
|
|
101
108
|
}), this.expandCollapseIcon(item, index, false, showIconOnLeft, true, isExpanded), /*#__PURE__*/React.createElement(View, {
|
|
102
109
|
style: [this.styles.titleWrapper, dynamicTitleWrapperStyles]
|
|
103
|
-
}, item.props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
110
|
+
}, item.props.iconclass || item.props.iconurl ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
104
111
|
id: this.getTestId('icon'),
|
|
105
112
|
styles: titleIconStyles,
|
|
106
113
|
name: item.props.name + '_icon',
|
|
107
|
-
iconclass: item.props.iconclass
|
|
114
|
+
iconclass: item.props.iconclass,
|
|
115
|
+
iconurl: item.props.iconurl
|
|
108
116
|
}) : null, /*#__PURE__*/React.createElement(View, {
|
|
109
117
|
style: {
|
|
110
118
|
flexDirection: 'column',
|