@wavemaker/app-rn-runtime 11.5.3-rc.5463 → 11.5.4-rc.5464

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. app-rn-runtime/components/basic/button/button.component.js +13 -1
  2. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  3. app-rn-runtime/components/basic/button/button.styles.js +3 -3
  4. app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
  5. app-rn-runtime/components/basic/icon/icon.styles.js +2 -1
  6. app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
  7. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -2
  8. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  9. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +7 -1
  10. app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  11. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +0 -2
  12. app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  13. app-rn-runtime/components/chart/basechart.component.js +19 -6
  14. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  15. app-rn-runtime/components/chart/basechart.props.js +4 -2
  16. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  17. app-rn-runtime/components/chart/basechart.styles.js +7 -1
  18. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  19. app-rn-runtime/components/chart/line-chart/line-chart.component.js +2 -2
  20. app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
  21. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +1 -1
  22. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  23. app-rn-runtime/components/data/list/list.component.js +53 -1
  24. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  25. app-rn-runtime/components/dialogs/dialog/dialog.styles.js +10 -2
  26. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  27. app-rn-runtime/components/input/basenumber/basenumber.component.js +11 -5
  28. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  29. app-rn-runtime/components/input/currency/currency.component.js +17 -2
  30. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  31. app-rn-runtime/components/input/currency/currency.props.js +1 -0
  32. app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
  33. app-rn-runtime/components/input/currency/currency.styles.js +19 -1
  34. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  35. app-rn-runtime/components/input/epoch/base-datetime.component.js +13 -5
  36. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  37. app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
  38. app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
  39. app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
  40. app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
  41. app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
  42. app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
  43. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
  44. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  45. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +21 -1
  46. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  47. app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
  48. app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
  49. app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
  50. app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
  51. app-rn-runtime/components/input/number/number.component.js +11 -0
  52. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  53. app-rn-runtime/components/input/number/number.props.js +1 -0
  54. app-rn-runtime/components/input/number/number.props.js.map +1 -1
  55. app-rn-runtime/components/input/number/number.styles.js +17 -0
  56. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  57. app-rn-runtime/components/input/slider/slider.styles.js +3 -3
  58. app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
  59. app-rn-runtime/components/input/switch/switch.component.js +3 -0
  60. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  61. app-rn-runtime/components/input/switch/switch.styles.js +8 -5
  62. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  63. app-rn-runtime/components/input/text/text.component.js +11 -0
  64. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  65. app-rn-runtime/components/input/text/text.props.js +1 -0
  66. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  67. app-rn-runtime/components/input/text/text.styles.js +17 -0
  68. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  69. app-rn-runtime/components/input/textarea/textarea.component.js +11 -0
  70. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  71. app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
  72. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  73. app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
  74. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  75. app-rn-runtime/components/input/toggle/toggle.component.js +43 -5
  76. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  77. app-rn-runtime/components/input/toggle/toggle.styles.js +5 -12
  78. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  79. app-rn-runtime/components/page/tabbar/curve.js +84 -0
  80. app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
  81. app-rn-runtime/components/page/tabbar/tabbar.component.js +43 -9
  82. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  83. app-rn-runtime/components/page/tabbar/tabbar.styles.js +54 -1
  84. app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
  85. app-rn-runtime/core/base.component.js +5 -1
  86. app-rn-runtime/core/base.component.js.map +1 -1
  87. app-rn-runtime/core/components/floatinglabel.component.js +45 -0
  88. app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
  89. app-rn-runtime/core/components/textinput.component.js +25 -2
  90. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  91. app-rn-runtime/core/tappable.component.js +41 -15
  92. app-rn-runtime/core/tappable.component.js.map +1 -1
  93. app-rn-runtime/package.json +5 -3
  94. app-rn-runtime/styles/theme.js +36 -0
  95. app-rn-runtime/styles/theme.js.map +1 -1
  96. app-rn-runtime/styles/theme.variables.js +7 -0
  97. app-rn-runtime/styles/theme.variables.js.map +1 -1
@@ -38,8 +38,20 @@ export default class WmButton extends BaseComponent {
38
38
  renderWidget(props) {
39
39
  return /*#__PURE__*/React.createElement(Animatedview, {
40
40
  entryanimation: props.animation,
41
- style: this.styles.root
41
+ style: [this.styles.root, {
42
+ paddingTop: 0,
43
+ paddingBottom: 0,
44
+ paddingLeft: 0,
45
+ paddingRight: 0,
46
+ overflow: 'hidden'
47
+ }]
42
48
  }, this._background, /*#__PURE__*/React.createElement(Tappable, _extends({
49
+ styles: {
50
+ paddingTop: this.styles.root.paddingTop,
51
+ paddingBottom: this.styles.root.paddingBottom,
52
+ paddingLeft: this.styles.root.paddingLeft,
53
+ paddingRight: this.styles.root.paddingRight
54
+ },
43
55
  target: this
44
56
  }, this.getTestPropsForAction()), /*#__PURE__*/React.createElement(View, {
45
57
  style: [this.styles.content, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","WmButtonState","WmButton","constructor","props","prepareIcon","iconclass","createElement","_extends","getTestPropsForLabel","styles","icon","name","iconsize","prepareBadge","style","badge","badgevalue","renderSkeleton","prop","theme","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","entryanimation","animation","_background","target","getTestPropsForAction","content","flexDirection","iconposition","caption","text"],"sources":["button.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Badge } from 'react-native-paper';\n\nimport WmButtonProps from './button.props';\nimport { DEFAULT_CLASS, WmButtonStyles } from './button.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmButtonState extends BaseComponentState<WmButtonProps> {\n\n}\n\nexport default class WmButton extends BaseComponent<WmButtonProps, WmButtonState, WmButtonStyles> {\n\n constructor(props: WmButtonProps) {\n super(props, DEFAULT_CLASS, new WmButtonProps());\n }\n\n private prepareIcon(props: any) {\n return (props.iconclass? <WmIcon\n {...this.getTestPropsForLabel('icon')}\n styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass} iconsize={props.iconsize}></WmIcon>: null);\n }\n\n private prepareBadge(props: any) {\n //@ts-ignore\n return (<Badge style={this.styles.badge}>{props.badgevalue}</Badge>);\n }\n\n public renderSkeleton(prop: WmButtonProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.styles.root.width)as DimensionValue,\n height: (this.props.skeletonheight || this.styles.root.height) as DimensionValue\n });\n }\n\n renderWidget(props: WmButtonProps) {\n return (\n <Animatedview entryanimation={props.animation} style={this.styles.root}>\n {this._background}\n <Tappable target={this} {...this.getTestPropsForAction()}>\n <View style={[this.styles.content, {flexDirection: props.iconposition === 'top' ? 'column': 'row'}]}>\n {props.iconposition === 'top' && this.prepareIcon(props)}\n {props.iconposition === 'left' && this.prepareIcon(props)}\n {props.caption ? (<Text style={this.styles.text} \n {...this.getTestPropsForLabel('caption')}>{props.caption}</Text>): null}\n {props.iconposition === 'right' && this.prepareIcon(props)}\n {props.badgevalue && this.prepareBadge(props)}\n </View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"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O,IAAI,IAAI,CAAC9B,WAAW,CAACD,KAAK,CAAC,EACzDA,KAAK,CAACa,UAAU,IAAI,IAAI,CAACH,YAAY,CAACV,KAAK,CACxC,CACE,CACE,CAAC;EAEnB;AACF"}
1
+ {"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","Badge","WmButtonProps","DEFAULT_CLASS","WmIcon","Animatedview","createSkeleton","WmButtonState","WmButton","constructor","props","prepareIcon","iconclass","createElement","_extends","getTestPropsForLabel","styles","icon","name","iconsize","prepareBadge","style","badge","badgevalue","renderSkeleton","prop","theme","skeleton","root","width","skeletonwidth","height","skeletonheight","renderWidget","entryanimation","animation","paddingTop","paddingBottom","paddingLeft","paddingRight","overflow","_background","target","getTestPropsForAction","content","flexDirection","iconposition","caption","text"],"sources":["button.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Badge } from 'react-native-paper';\n\nimport WmButtonProps from './button.props';\nimport { DEFAULT_CLASS, WmButtonStyles } from './button.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmButtonState extends BaseComponentState<WmButtonProps> {\n\n}\n\nexport default class WmButton extends BaseComponent<WmButtonProps, WmButtonState, WmButtonStyles> {\n\n constructor(props: WmButtonProps) {\n super(props, DEFAULT_CLASS, new WmButtonProps());\n }\n\n private prepareIcon(props: any) {\n return (props.iconclass? <WmIcon\n {...this.getTestPropsForLabel('icon')}\n styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass} iconsize={props.iconsize}></WmIcon>: null);\n }\n\n private prepareBadge(props: any) {\n //@ts-ignore\n return (<Badge style={this.styles.badge}>{props.badgevalue}</Badge>);\n }\n\n public renderSkeleton(prop: WmButtonProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.styles.root.width)as DimensionValue,\n height: (this.props.skeletonheight || this.styles.root.height) as DimensionValue\n });\n }\n\n renderWidget(props: WmButtonProps) {\n return (\n <Animatedview entryanimation={props.animation}\n style={[\n this.styles.root,\n {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n overflow: 'hidden'\n }\n ]}>\n {this._background}\n <Tappable\n styles={{\n paddingTop: this.styles.root.paddingTop,\n paddingBottom: this.styles.root.paddingBottom,\n paddingLeft: this.styles.root.paddingLeft,\n paddingRight: this.styles.root.paddingRight\n }}\n target={this}\n {...this.getTestPropsForAction()}>\n <View\n style={[\n this.styles.content,\n { flexDirection: props.iconposition === 'top' ? 'column' : 'row' }\n ]}>\n {props.iconposition === 'top' && this.prepareIcon(props)}\n {props.iconposition === 'left' && this.prepareIcon(props)}\n {props.caption ? (\n <Text\n style={this.styles.text}\n {...this.getTestPropsForLabel('caption')}>\n {props.caption}\n </Text>\n ) : null}\n {props.iconposition === 'right' && this.prepareIcon(props)}\n {props.badgevalue && this.prepareBadge(props)}\n </View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,OAAO,MAAMC,aAAa,SAASR,kBAAkB,CAAgB;AAIrE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W,CAACD,KAAK,CAAC,EACzDA,KAAK,CAACa,UAAU,IAAI,IAAI,CAACH,YAAY,CAACV,KAAK,CACxC,CACE,CACE,CAAC;EAEnB;AACF"}
@@ -5,9 +5,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
5
5
  const defaultStyles = defineStyles({
6
6
  root: {
7
7
  minHeight: 40,
8
- borderRadius: 6,
9
- paddingTop: 11,
10
- paddingBottom: 11,
8
+ borderRadius: 50,
9
+ paddingTop: 12,
10
+ paddingBottom: 14,
11
11
  paddingLeft: 24,
12
12
  paddingRight: 24,
13
13
  alignSelf: 'flex-start'
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderRadius","paddingTop","paddingBottom","paddingLeft","paddingRight","alignSelf","content","flexDirection","alignItems","justifyContent","text","fontSize","fontFamily","baseFont","fontWeight","textAlign","textTransform","marginHorizontal","badge","backgroundColor","buttonBadgeBackgroundColor","color","buttonBadgeTextColor","position","top","marginLeft","borderWidth","borderStyle","icon","buttonTextPadding","skeleton","width","height","opacity","getButtonStyles","bgColor","borderColor","arguments","length","undefined","linkBtnStyle","buttonLinkColor","buttonLinkTextColor","buttonWithOnlyLabel","paddingVertical","textDecorationColor","textDecorationLine","textDecorationStyle","buttonDefaultColor","buttonDefaultTextColor","buttonBorderColor","buttonInfoColor","buttonInfoTextColor","buttonPrimaryColor","buttonPrimaryTextColor","buttonSecondaryColor","buttonSecondaryTextColor","buttonDangerColor","buttonDangerTextColor","buttonSuccessColor","buttonSuccessTextColor","buttonWarningColor","buttonWarningTextColor","buttonDarkColor","buttonDarkTextColor","buttonLightColor","buttonLightTextColor","getStyle","bottom","right","marginRight"],"sources":["button.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '../icon/icon.styles';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmButtonStyles = BaseStyles & {\n content: AllStyle,\n badge: AllStyle,\n icon: WmIconStyles,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-button';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmButtonStyles = defineStyles<WmButtonStyles>({\n root: {\n minHeight: 40,\n borderRadius: 6,\n paddingTop: 11,\n paddingBottom: 11,\n paddingLeft: 24,\n paddingRight: 24,\n alignSelf: 'flex-start'\n },\n content: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center'\n },\n text: {\n fontSize: 14,\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n textAlign: 'center',\n textTransform: 'capitalize',\n marginHorizontal: 4\n },\n badge: {\n backgroundColor: themeVariables.buttonBadgeBackgroundColor,\n color: themeVariables.buttonBadgeTextColor,\n alignSelf: 'flex-start',\n position: 'relative',\n minHeight: 6,\n top: -20,\n marginLeft: -16,\n borderWidth: 1,\n borderStyle: 'solid'\n },\n icon: {\n root : {\n alignSelf: 'auto',\n paddingLeft: -8,\n paddingRight: -8\n },\n text: {\n paddingRight: themeVariables.buttonTextPadding,\n fontSize: 16\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: 96,\n height: 48,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.5\n }\n });\n\n const getButtonStyles = (bgColor: string, color: string, borderColor = bgColor) => {\n return {\n root: {\n borderWidth: 1,\n borderColor: borderColor,\n borderStyle: 'solid',\n backgroundColor: bgColor\n },\n text: {\n color: color\n },\n badge: {\n backgroundColor: color,\n color: bgColor,\n borderColor: bgColor\n },\n icon: {\n text: {\n color: color\n }\n }\n } as WmButtonStyles;\n }\n\n const linkBtnStyle = getButtonStyles(themeVariables.buttonLinkColor, themeVariables.buttonLinkTextColor );\nconst buttonWithOnlyLabel = getButtonStyles(themeVariables.buttonLinkColor, themeVariables.buttonLinkTextColor );\n\n linkBtnStyle.root.paddingVertical = 4;\n linkBtnStyle.text.textDecorationColor = themeVariables.buttonLinkTextColor;\n linkBtnStyle.text.textDecorationLine = 'underline';\n linkBtnStyle.text.textDecorationStyle = 'solid';\n\n addStyle('btn-default', '', getButtonStyles(themeVariables.buttonDefaultColor, themeVariables.buttonDefaultTextColor, themeVariables.buttonBorderColor));\n addStyle('btn-info', '', getButtonStyles(themeVariables.buttonInfoColor, themeVariables.buttonInfoTextColor));\n addStyle('btn-primary', '', getButtonStyles(themeVariables.buttonPrimaryColor, themeVariables.buttonPrimaryTextColor));\n addStyle('btn-secondary', '', getButtonStyles(themeVariables.buttonSecondaryColor, themeVariables.buttonSecondaryTextColor, themeVariables.buttonSecondaryTextColor));\n addStyle('btn-danger', '', getButtonStyles(themeVariables.buttonDangerColor, themeVariables.buttonDangerTextColor));\n addStyle('btn-success', '', getButtonStyles(themeVariables.buttonSuccessColor, themeVariables.buttonSuccessTextColor));\n addStyle('btn-warning', '', getButtonStyles(themeVariables.buttonWarningColor, themeVariables.buttonWarningTextColor));\n addStyle('btn-link', '', linkBtnStyle);\n addStyle('btn-only-label', '', buttonWithOnlyLabel);\n addStyle('btn-dark', '', getButtonStyles(themeVariables.buttonDarkColor, themeVariables.buttonDarkTextColor));\n addStyle('btn-light', '', getButtonStyles(themeVariables.buttonLightColor, themeVariables.buttonLightTextColor));\n addStyle('fab-btn', 'btn-primary', {\n root : {\n ...BASE_THEME.getStyle('elevate2').root,\n position: 'fixed' as any,\n bottom: 160,\n right: 48,\n width: 56,\n height: 56,\n borderRadius: 56,\n justifyContent: 'center',\n alignItems: 'center'\n },\n text: {\n marginLeft: 0,\n marginRight: 0\n },\n icon: {\n icon: {\n fontSize: 24\n }\n } as WmIconStyles\n } as WmButtonStyles);\n addStyle('mini-fab-btn', 'fab-btn', {\n root : {\n width: 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eAAe,CAACvC,cAAc,CAACoE,eAAe,EAAEpE,cAAc,CAACqE,mBAAmB,CAAC,CAAC;EAC7GpE,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAEsC,eAAe,CAACvC,cAAc,CAACsE,gBAAgB,EAAEtE,cAAc,CAACuE,oBAAoB,CAAC,CAAC;EAChHtE,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE;IACjCE,IAAI,EAAG;MACL,GAAGP,UAAU,CAAC4E,QAAQ,CAAC,UAAU,CAAC,CAACrE,IAAI;MACvCyB,QAAQ,EAAE,OAAc;MACxB6C,MAAM,EAAE,GAAG;MACXC,KAAK,EAAE,EAAE;MACTtC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVhC,YAAY,EAAE,EAAE;MAChBS,cAAc,EAAE,QAAQ;MACxBD,UAAU,EAAE;IACd,CAAC;IACDE,IAAI,EAAE;MACJe,UAAU,EAAE,CAAC;MACb6C,WAAW,EAAE;IACf,CAAC;IACD1C,IAAI,EAAE;MACJA,IAAI,EAAE;QACJjB,QAAQ,EAAE;MACZ;IACF;EACF,CAAmB,CAAC;EACpBf,QAAQ,CAAC,cAAc,EAAE,SAAS,EAAE;IAClCE,IAAI,EAAG;MACLiC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE;IACV;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderRadius","paddingTop","paddingBottom","paddingLeft","paddingRight","alignSelf","content","flexDirection","alignItems","justifyContent","text","fontSize","fontFamily","baseFont","fontWeight","textAlign","textTransform","marginHorizontal","badge","backgroundColor","buttonBadgeBackgroundColor","color","buttonBadgeTextColor","position","top","marginLeft","borderWidth","borderStyle","icon","buttonTextPadding","skeleton","width","height","opacity","getButtonStyles","bgColor","borderColor","arguments","length","undefined","linkBtnStyle","buttonLinkColor","buttonLinkTextColor","buttonWithOnlyLabel","paddingVertical","textDecorationColor","textDecorationLine","textDecorationStyle","buttonDefaultColor","buttonDefaultTextColor","buttonBorderColor","buttonInfoColor","buttonInfoTextColor","buttonPrimaryColor","buttonPrimaryTextColor","buttonSecondaryColor","buttonSecondaryTextColor","buttonDangerColor","buttonDangerTextColor","buttonSuccessColor","buttonSuccessTextColor","buttonWarningColor","buttonWarningTextColor","buttonDarkColor","buttonDarkTextColor","buttonLightColor","buttonLightTextColor","getStyle","bottom","right","marginRight"],"sources":["button.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '../icon/icon.styles';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmButtonStyles = BaseStyles & {\n content: AllStyle,\n badge: AllStyle,\n icon: WmIconStyles,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-button';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmButtonStyles = defineStyles<WmButtonStyles>({\n root: {\n minHeight: 40,\n borderRadius: 50,\n paddingTop: 12,\n paddingBottom: 14,\n paddingLeft: 24,\n paddingRight: 24,\n alignSelf: 'flex-start'\n },\n content: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center'\n },\n text: {\n fontSize: 14,\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n textAlign: 'center',\n textTransform: 'capitalize',\n marginHorizontal: 4\n },\n badge: {\n backgroundColor: themeVariables.buttonBadgeBackgroundColor,\n color: themeVariables.buttonBadgeTextColor,\n alignSelf: 'flex-start',\n position: 'relative',\n minHeight: 6,\n top: -20,\n marginLeft: -16,\n borderWidth: 1,\n borderStyle: 'solid'\n },\n icon: {\n root : {\n alignSelf: 'auto',\n paddingLeft: -8,\n paddingRight: -8\n },\n text: {\n paddingRight: themeVariables.buttonTextPadding,\n fontSize: 16\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n width: 96,\n height: 48,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.5\n }\n });\n\n const getButtonStyles = (bgColor: string, color: string, borderColor = bgColor) => {\n return {\n root: {\n borderWidth: 1,\n borderColor: borderColor,\n borderStyle: 'solid',\n backgroundColor: bgColor\n },\n text: {\n color: color\n },\n badge: {\n backgroundColor: color,\n color: bgColor,\n borderColor: bgColor\n },\n icon: {\n text: {\n color: color\n }\n }\n } as WmButtonStyles;\n }\n\n const linkBtnStyle = getButtonStyles(themeVariables.buttonLinkColor, themeVariables.buttonLinkTextColor );\nconst buttonWithOnlyLabel = getButtonStyles(themeVariables.buttonLinkColor, themeVariables.buttonLinkTextColor );\n\n linkBtnStyle.root.paddingVertical = 4;\n linkBtnStyle.text.textDecorationColor = themeVariables.buttonLinkTextColor;\n linkBtnStyle.text.textDecorationLine = 'underline';\n linkBtnStyle.text.textDecorationStyle = 'solid';\n\n addStyle('btn-default', '', getButtonStyles(themeVariables.buttonDefaultColor, themeVariables.buttonDefaultTextColor, themeVariables.buttonBorderColor));\n addStyle('btn-info', '', getButtonStyles(themeVariables.buttonInfoColor, themeVariables.buttonInfoTextColor));\n addStyle('btn-primary', '', getButtonStyles(themeVariables.buttonPrimaryColor, themeVariables.buttonPrimaryTextColor));\n addStyle('btn-secondary', '', getButtonStyles(themeVariables.buttonSecondaryColor, themeVariables.buttonSecondaryTextColor, themeVariables.buttonSecondaryTextColor));\n addStyle('btn-danger', '', getButtonStyles(themeVariables.buttonDangerColor, themeVariables.buttonDangerTextColor));\n addStyle('btn-success', '', getButtonStyles(themeVariables.buttonSuccessColor, themeVariables.buttonSuccessTextColor));\n addStyle('btn-warning', '', getButtonStyles(themeVariables.buttonWarningColor, themeVariables.buttonWarningTextColor));\n addStyle('btn-link', '', linkBtnStyle);\n addStyle('btn-only-label', '', buttonWithOnlyLabel);\n addStyle('btn-dark', '', getButtonStyles(themeVariables.buttonDarkColor, themeVariables.buttonDarkTextColor));\n addStyle('btn-light', '', getButtonStyles(themeVariables.buttonLightColor, themeVariables.buttonLightTextColor));\n addStyle('fab-btn', 'btn-primary', {\n root : {\n ...BASE_THEME.getStyle('elevate2').root,\n position: 'fixed' as any,\n bottom: 160,\n right: 48,\n width: 56,\n height: 56,\n borderRadius: 56,\n justifyContent: 'center',\n alignItems: 'center'\n },\n text: {\n marginLeft: 0,\n marginRight: 0\n },\n icon: {\n icon: {\n fontSize: 24\n }\n } as WmIconStyles\n } as WmButtonStyles);\n addStyle('mini-fab-btn', 'fab-btn', {\n root : {\n width: 40,\n height: 40\n }\n } as WmButtonStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAWxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACFC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE,EAAE;MAChBC,UAAU,EAAE,EAAE;MACdC,aAAa,EAAE,EAAE;MACjBC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,SAAS,EAAE;IACf,CAAC;IACDC,OAAO,EAAE;MACPC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAEjB,cAAc,CAACkB,QAAQ;MACnCC,UAAU,EAAE,KAAK;MACjBC,SAAS,EAAE,QAAQ;MACnBC,aAAa,EAAE,YAAY;MAC3BC,gBAAgB,EAAE;IACpB,CAAC;IACDC,KAAK,EAAE;MACLC,e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AAE,EAAE;MACTC,MAAM,EAAE;IACV;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
@@ -9,7 +9,8 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
9
9
  alignItems: 'center'
10
10
  },
11
11
  icon: {
12
- paddingLeft: 0
12
+ paddingLeft: 0,
13
+ paddingRight: 8
13
14
  },
14
15
  text: {
15
16
  paddingLeft: 8
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignSelf","alignItems","icon","paddingLeft","text","skeleton","width","height","borderRadius","paddingRight"],"sources":["icon.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmIconStyles = BaseStyles & {\n icon?: AllStyle,\n skeleton: WmSkeletonStyles\n};\nexport const DEFAULT_CLASS = 'app-icon';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmIconStyles = defineStyles({\n root: {\n flexDirection: 'row',\n alignSelf: 'flex-start',\n alignItems: 'center'\n },\n icon: {\n paddingLeft: 0\n },\n text: {\n paddingLeft: 8\n },\n skeleton:{\n root: {\n width: 32,\n height: 32,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n text: {\n paddingRight: 8 \n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE,YAAY;MACvBC,UAAU,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACFC,WAAW,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACFD,WAAW,EAAE;IACjB,CAAC;IACDE,QAAQ,EAAC;MACLP,IAAI,EAAE;QACFQ,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAClB;IACJ;EACJ,CAAC,CAAC;EAEFZ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCW,IAAI,EAAE;MACFK,YAAY,EAAE;IAClB;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignSelf","alignItems","icon","paddingLeft","paddingRight","text","skeleton","width","height","borderRadius"],"sources":["icon.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmIconStyles = BaseStyles & {\n icon?: AllStyle,\n skeleton: WmSkeletonStyles\n};\nexport const DEFAULT_CLASS = 'app-icon';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmIconStyles = defineStyles({\n root: {\n flexDirection: 'row',\n alignSelf: 'flex-start',\n alignItems: 'center'\n },\n icon: {\n paddingLeft: 0,\n paddingRight: 8\n },\n text: {\n paddingLeft: 8\n },\n skeleton:{\n root: {\n width: 32,\n height: 32,\n borderRadius: 4\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n text: {\n paddingRight: 8 \n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,SAAS,EAAE,YAAY;MACvBC,UAAU,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACFC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE;IAClB,CAAC;IACDC,IAAI,EAAE;MACFF,WAAW,EAAE;IACjB,CAAC;IACDG,QAAQ,EAAC;MACLR,IAAI,EAAE;QACFS,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAClB;IACJ;EACJ,CAAC,CAAC;EAEFb,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCY,IAAI,EAAE;MACFD,YAAY,EAAE;IAClB;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -102,7 +102,7 @@ export default class WmAreaChart extends BaseChartComponent {
102
102
  strokeWidth: props.linethickness
103
103
  }
104
104
  },
105
- data: d
105
+ data: this.isRTL ? d.toReversed() : d
106
106
  }), props.highlightpoints ? /*#__PURE__*/React.createElement(VictoryScatter, {
107
107
  size: 5,
108
108
  key: props.name + '_scatter' + i,
@@ -111,7 +111,7 @@ export default class WmAreaChart extends BaseChartComponent {
111
111
  fill: Color(this.state.colors[i]).darken(0.2).rgb().toString()
112
112
  }
113
113
  },
114
- data: d,
114
+ data: this.isRTL ? d.toReversed() : d,
115
115
  events: [{
116
116
  target: 'data',
117
117
  eventHandlers: Platform.OS == "web" ? {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Color","View","Platform","Defs","LinearGradient","Stop","Svg","VictoryArea","VictoryChart","VictoryLegend","VictoryStack","VictoryScatter","VictoryGroup","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","isNumber","WmAreaChartState","constructor","arguments","_defineProperty","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","onSelect","event","data","value","index","y","label","state","xaxisDatakeyArr","datum","x","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","_this$state$data","length","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","chartName","name","gradientStop","chartMaxY","createElement","style","styles","root","onLayout","onViewLayoutChange","bind","theme","height","padding","top","bottom","left","right","minDomain","containerComponent","getTooltip","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","map","d","i","key","id","x1","y1","x2","y2","offset","stopColor","colors","lighten","rgb","toString","interpolation","fill","stroke","strokeWidth","linethickness","highlightpoints","size","darken","events","target","eventHandlers","OS","onClick","onPress"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport Color from \"color\";\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';\nimport { VictoryArea, VictoryLine, VictoryChart, VictoryLegend, VictoryStack, VictoryScatter, VictoryGroup } from \"victory-native\";\nimport { InterpolationPropType } from 'victory-core';\nimport WmAreaChartProps from './area-chart.props';\nimport { DEFAULT_CLASS, WmAreaChartStyles } from './area-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { isNil, isNumber } from 'lodash-es';\n\nexport class WmAreaChartState extends BaseChartComponentState<WmAreaChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmAreaChart extends BaseChartComponent<WmAreaChartProps, WmAreaChartState, WmAreaChartStyles> {\n\n constructor(props: WmAreaChartProps) {\n super(props, DEFAULT_CLASS, new WmAreaChartProps(), new WmAreaChartState());\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth\n } as WmAreaChartState)\n }\n\n onSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmAreaChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n let mindomain={\n x: props.xdomain === 'Min' ? this.state.chartMinX: undefined,\n y: props.ydomain === 'Min' ? this.state.chartMinY: undefined\n };\n const chartName = this.props.name ?? 'nonameAreachart';\n let gradientStop = '100%';\n if (isNumber(this.state.chartMaxY) && isNumber(this.state.chartMinY) && this.state.chartMaxY > 0) {\n gradientStop = (this.state.chartMaxY - this.state.chartMinY) * 100 / this.state.chartMaxY + '%';\n }\n return (\n <View\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n {this.state.chartWidth ? \n (\n <VictoryChart\n theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.state.chartWidth || 120}\n padding={{ top: 70, bottom: 50, left: 50, right: 30 }}\n minDomain={mindomain}\n containerComponent={\n this.getTooltip(props)\n }\n > \n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n <VictoryStack>\n {\n this.state.data.map((d: any, i: number) => {\n return <VictoryGroup key={props.name + '_area_group_' + i}>\n <Defs>\n <LinearGradient id={`${chartName}Gradient${i}`} x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <Stop offset=\"0%\" stopColor={Color(this.state.colors[i]).lighten(0.2).rgb().toString()}/>\n <Stop offset={gradientStop} stopColor={Color(this.state.colors[i]).lighten(0.6).rgb().toString()}/>\n </LinearGradient>\n </Defs>\n <VictoryArea\n interpolation={props.interpolation as InterpolationPropType}\n key={props.name + '_' + i}\n name={props.name + '_' + i}\n style={{\n data: {\n fill: `url(#${chartName}Gradient${i})`,\n stroke: this.state.colors[i],\n strokeWidth: props.linethickness,\n }\n }}\n data={d}\n />\n {props.highlightpoints ?\n <VictoryScatter\n size={5}\n key={props.name + '_scatter' + i}\n style={{\n data: { \n fill: Color(this.state.colors[i]).darken(0.2).rgb().toString()}\n }} \n data={d}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n />\n : null}\n </VictoryGroup>\n })\n }\n </VictoryStack>\n </VictoryChart>\n )\n : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAQC,QAAQ,QAAQ,cAAc;AACtE,SAASC,IAAI,EAAEC,cAAc,EAAEC,IAAI,EAAEC,GAAG,QAAQ,kBAAkB;AAClE,SAASC,WAAW,EAAeC,YAAY,EAAEC,aAAa,EAAEC,YAAY,EAAEC,cAAc,EAAEC,YAAY,QAAQ,gBAAgB;AAElI,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AAEvE,SAAgBC,QAAQ,QAAQ,WAAW;AAE3C,OAAO,MAAMC,gBAAgB,SAASF,uBAAuB,CAAmB;EAAAG,YAAA;IAAA,SAAAC,SAAA;IAAAC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AC,CAACoB,MAAM,CAAC,GAAG,CAAC,CAACT,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC;UAAC;QAClE,CAAE;QACFnE,IAAI,EAAEsD,CAAE;QACRsB,MAAM,EAAE,CAAC;UACPC,MAAM,EAAE,MAAM;UACdC,aAAa,EAAE7G,QAAQ,CAAC8G,EAAE,IAAI,KAAK,GAAG;YACpCC,OAAO,EAAE,IAAI,CAAClF,QAAQ,CAACqC,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACA8C,OAAO,EAAE,IAAI,CAACnF,QAAQ,CAACqC,IAAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACF,CAAC,GACJ,IACU,CAAC;IACjB,CAAC,CAEW,CACF,CAAC,GAEjB,IACE,CAAC;EACT;AACF"}
1
+ {"version":3,"names":["React","Color","View","Platform","Defs","LinearGradient","Stop","Svg","VictoryArea","VictoryChart","VictoryLegend","VictoryStack","VictoryScatter","VictoryGroup","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","isNumber","WmAreaChartState","constructor","arguments","_defineProperty","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","updateState","chartWidth","onSelect","event","data","value","index","y","label","state","xaxisDatakeyArr","datum","x","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","proxy","renderWidget","_this$state$data","length","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","chartName","name","gradientStop","chartMaxY","createElement","style","styles","root","onLayout","onViewLayoutChange","bind","theme","height","padding","top","bottom","left","right","minDomain","containerComponent","getTooltip","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","map","d","i","key","id","x1","y1","x2","y2","offset","stopColor","colors","lighten","rgb","toString","interpolation","fill","stroke","strokeWidth","linethickness","isRTL","toReversed","highlightpoints","size","darken","events","target","eventHandlers","OS","onClick","onPress"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport Color from \"color\";\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';\nimport { VictoryArea, VictoryLine, VictoryChart, VictoryLegend, VictoryStack, VictoryScatter, VictoryGroup } from \"victory-native\";\nimport { InterpolationPropType } from 'victory-core';\nimport WmAreaChartProps from './area-chart.props';\nimport { DEFAULT_CLASS, WmAreaChartStyles } from './area-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { isNil, isNumber } from 'lodash-es';\n\nexport class WmAreaChartState extends BaseChartComponentState<WmAreaChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmAreaChart extends BaseChartComponent<WmAreaChartProps, WmAreaChartState, WmAreaChartStyles> {\n\n constructor(props: WmAreaChartProps) {\n super(props, DEFAULT_CLASS, new WmAreaChartProps(), new WmAreaChartState());\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth\n } as WmAreaChartState)\n }\n\n onSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmAreaChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n let mindomain={\n x: props.xdomain === 'Min' ? this.state.chartMinX: undefined,\n y: props.ydomain === 'Min' ? this.state.chartMinY: undefined\n };\n const chartName = this.props.name ?? 'nonameAreachart';\n let gradientStop = '100%';\n if (isNumber(this.state.chartMaxY) && isNumber(this.state.chartMinY) && this.state.chartMaxY > 0) {\n gradientStop = (this.state.chartMaxY - this.state.chartMinY) * 100 / this.state.chartMaxY + '%';\n }\n return (\n <View\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n {this.state.chartWidth ? \n (\n <VictoryChart\n theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.state.chartWidth || 120}\n padding={{ top: 70, bottom: 50, left: 50, right: 30 }}\n minDomain={mindomain}\n containerComponent={\n this.getTooltip(props)\n }\n > \n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n <VictoryStack>\n {\n this.state.data.map((d: any, i: number) => {\n return <VictoryGroup key={props.name + '_area_group_' + i}>\n <Defs>\n <LinearGradient id={`${chartName}Gradient${i}`} x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <Stop offset=\"0%\" stopColor={Color(this.state.colors[i]).lighten(0.2).rgb().toString()}/>\n <Stop offset={gradientStop} stopColor={Color(this.state.colors[i]).lighten(0.6).rgb().toString()}/>\n </LinearGradient>\n </Defs>\n <VictoryArea\n interpolation={props.interpolation as InterpolationPropType}\n key={props.name + '_' + i}\n name={props.name + '_' + i}\n style={{\n data: {\n fill: `url(#${chartName}Gradient${i})`,\n stroke: this.state.colors[i],\n strokeWidth: props.linethickness,\n }\n }}\n data={this.isRTL?d.toReversed():d}\n />\n {props.highlightpoints ?\n <VictoryScatter\n size={5}\n key={props.name + '_scatter' + i}\n style={{\n data: { \n fill: Color(this.state.colors[i]).darken(0.2).rgb().toString()}\n }} \n data={this.isRTL?d.toReversed():d}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n />\n : null}\n </VictoryGroup>\n })\n }\n </VictoryStack>\n </VictoryChart>\n )\n : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OA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B,IAAI,EAAE;YACJqE,IAAI,EAAG,QAAO5C,SAAU,WAAU8B,CAAE,GAAE;YACtCe,MAAM,EAAE,IAAI,CAACjE,KAAK,CAAC2D,MAAM,CAACT,CAAC,CAAC;YAC5BgB,WAAW,EAAEjF,KAAK,CAACkF;UACrB;QACF,CAAE;QACFxE,IAAI,EAAE,IAAI,CAACyE,KAAK,GAACnB,CAAC,CAACoB,UAAU,CAAC,CAAC,GAACpB;MAAE,CACnC,CAAC,EACDhE,KAAK,CAACqF,eAAe,gBACpB7G,KAAA,CAAA+D,aAAA,CAACnD,cAAc;QACbkG,IAAI,EAAE,CAAE;QACRpB,GAAG,EAAElE,KAAK,CAACoC,IAAI,GAAG,UAAU,GAAG6B,CAAE;QACjCzB,KAAK,EAAE;UACL9B,IAAI,EAAE;YACJqE,IAAI,EAAEtG,KAAK,CAAC,IAAI,CAACsC,KAAK,CAAC2D,MAAM,CAACT,CAAC,CAAC,CAAC,CAACsB,MAAM,CAAC,GAAG,CAAC,CAACX,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC;UAAC;QAClE,CAAE;QACFnE,IAAI,EAAE,IAAI,CAACyE,KAAK,GAACnB,CAAC,CAACoB,UAAU,CAAC,CAAC,GAACpB,CAAE;QAClCwB,MAAM,EAAE,CAAC;UACPC,MAAM,EAAE,MAAM;UACdC,aAAa,EAAE/G,QAAQ,CAACgH,EAAE,IAAI,KAAK,GAAG;YACpCC,OAAO,EAAE,IAAI,CAACpF,QAAQ,CAACqC,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACAgD,OAAO,EAAE,IAAI,CAACrF,QAAQ,CAACqC,IAAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACF,CAAC,GACJ,IACU,CAAC;IACjB,CAAC,CAEW,CACF,CAAC,GAEjB,IACE,CAAC;EACT;AACF"}
@@ -19,7 +19,7 @@ export default class WmBarChart extends BaseChartComponent {
19
19
  key: props.name + '_' + i,
20
20
  horizontal: props.horizontal,
21
21
  labels: props.showvalues ? this.labelFn.bind(this) : undefined,
22
- data: d,
22
+ data: this.isRTL ? d.toReversed() : d,
23
23
  height: 100,
24
24
  style: props.customcolors ? {
25
25
  data: {
@@ -31,6 +31,12 @@ export default class WmBarChart extends BaseChartComponent {
31
31
  }
32
32
  }
33
33
  } : {},
34
+ cornerRadius: {
35
+ topLeft: this.styles.bar.borderTopLeftRadius,
36
+ topRight: this.styles.bar.borderTopRightRadius,
37
+ bottomLeft: this.styles.bar.borderBottomLeftRadius,
38
+ bottomRight: this.styles.bar.borderBottomRightRadius
39
+ },
34
40
  events: [{
35
41
  target: 'data',
36
42
  eventHandlers: Platform.OS == "web" ? {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Platform","VictoryChart","VictoryBar","VictoryLegend","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","Svg","WmBarChartState","WmBarChart","constructor","props","labelFn","data","abbreviateNumber","datum","y","getBarChart","state","map","d","i","createElement","key","name","horizontal","labels","showvalues","bind","undefined","height","style","customcolors","fill","_ref","colors","x","length","events","target","eventHandlers","OS","onClick","onSelect","onPress","event","value","index","label","xaxisDatakeyArr","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","nativeEvent","proxy","renderWidget","mindomain","xdomain","chartMinX","ydomain","chartMinY","styles","root","theme","width","screenWidth","minDomain","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","viewtype","colorScale","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Platform } from 'react-native';\n\nimport {\n VictoryChart,\n VictoryBar,\n VictoryLegend,\n VictoryStack,\n VictoryGroup\n} from \"victory-native\";\n\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport { Svg } from \"react-native-svg\";\n\nexport class WmBarChartState extends BaseChartComponentState<WmBarChartProps> {}\n\nexport default class WmBarChart extends BaseChartComponent<WmBarChartProps, WmBarChartState, WmBarChartStyles> {\n\n constructor(props: WmBarChartProps) {\n super(props, DEFAULT_CLASS, new WmBarChartProps(), new WmBarChartState());\n }\n\n labelFn(data: any): string | number | string[] | number[] | null {\n return this.abbreviateNumber(data.datum.y);\n }\n\n getBarChart(props: WmBarChartProps) {\n return this.state.data.map((d: any, i: number) => {\n return <VictoryBar key={props.name + '_' + i}\n horizontal={props.horizontal} labels={props.showvalues ? this.labelFn.bind(this) : undefined}\n data={d}\n height={100}\n style={props.customcolors?{\n data: {\n fill: ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length]\n }\n }:{}}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}/>\n });\n}\n\nonSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n}\n\n renderWidget(props: WmBarChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (<View\n style={this.styles.root}\n ><VictoryChart theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.screenWidth}\n minDomain={mindomain}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}\n containerComponent={\n this.getTooltip(props)\n }>\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {\n props.viewtype === 'Stacked' ? <VictoryStack colorScale={this.state.colors}>\n {\n this.getBarChart(props)\n }\n </VictoryStack> : <VictoryGroup colorScale={this.state.colors} offset={5}>\n {\n this.getBarChart(props)\n }\n </VictoryGroup>\n }\n </VictoryChart></View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAE7C,SACEC,YAAY,EACZC,UAAU,EACVC,aAAa,EACbC,YAAY,EACZC,YAAY,QACP,gBAAgB;AAEvB,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AACpE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,OAAO,MAAMC,eAAe,SAASJ,uBAAuB,CAAkB;AAE9E,eAAe,MAAMK,UAAU,SAASN,kBAAkB,CAAqD;EAE7GO,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIG,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAI,OAAOA,CAACC,IAAS,EAAgD;IAC/D,OAAO,IAAI,CAACC,gBAAgB,CAACD,IAAI,CAACE,KAAK,CAACC,CAAC,CAAC;EAC5C;EAEAC,WAAWA,CAACN,KAAsB,EAAE;IACpC,OAAO,IAAI,CAACO,KAAK,CAACL,IAAI,CAACM,GAAG,CAAC,CAACC,CAAM,EAAEC,CAAS,KAAK;MAChD,oBAAO1B,KAAA,CAAA2B,aAAA,CAACvB,UAAU;QAACwB,GAAG,EAAEZ,KAAK,CAACa,IAAI,GAAG,GA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,EAAE;QAAEC,GAAG,EAAE5D,KAAK,CAAC6D,SAAS;QAAEC,MAAM,EAAE9D,KAAK,CAAC+D,YAAY;QAAEC,IAAI,EAAEhE,KAAK,CAACiE,UAAU;QAAEC,KAAK,EAAElE,KAAK,CAACmE;MAAY,CAAE;MAChHC,kBAAkB,EAChB,IAAI,CAACC,UAAU,CAACrE,KAAK;IACtB,gBACrBhB,KAAA,CAAA2B,aAAA,CAACtB,aAAa;MACZwB,IAAI,EAAE,QAAS;MACfuD,kBAAkB,eAAEpF,KAAA,CAAA2B,aAAA,CAACf,GAAG,MAAE,CAAE;MAC5B0E,KAAK,EAAE,CAACtE,KAAK,CAACsE,KAAK,EAAEtE,KAAK,CAACuE,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACXvE,IAAI,EAAE,EAAG;MACTqD,KAAK,EAAE,IAAI,CAAChD,KAAK,CAACgD;IAAM,CACzB,CAAC,EACD,IAAI,CAACmB,aAAa,CAAC,CAAC,EACpB,IAAI,CAACC,QAAQ,CAAC,CAAC,EACf,IAAI,CAACC,QAAQ,CAAC,CAAC,EAEd5E,KAAK,CAAC6E,QAAQ,KAAK,SAAS,gBAAG7F,KAAA,CAAA2B,aAAA,CAACrB,YAAY;MAACwF,UAAU,EAAE,IAAI,CAACvE,KAAK,CAACiB;IAAO,GAEvE,IAAI,CAAClB,WAAW,CAACN,KAAK,CAEZ,CAAC,gBAAGhB,KAAA,CAAA2B,aAAA,CAACpB,YAAY;MAACuF,UAAU,EAAE,IAAI,CAACvE,KAAK,CAACiB,MAAO;MAACuD,MAAM,EAAE;IAAE,GAErE,IAAI,CAACzE,WAAW,CAACN,KAAK,CAEZ,CAEJ,CAAO,CAAC;EACxB;AACF"}
1
+ {"version":3,"names":["React","View","Platform","VictoryChart","VictoryBar","VictoryLegend","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","Svg","WmBarChartState","WmBarChart","constructor","props","labelFn","data","abbreviateNumber","datum","y","getBarChart","state","map","d","i","createElement","key","name","horizontal","labels","showvalues","bind","undefined","isRTL","toReversed","height","style","customcolors","fill","_ref","colors","x","length","cornerRadius","topLeft","styles","bar","borderTopLeftRadius","topRight","borderTopRightRadius","bottomLeft","borderBottomLeftRadius","bottomRight","borderBottomRightRadius","events","target","eventHandlers","OS","onClick","onSelect","onPress","event","value","index","label","xaxisDatakeyArr","selectedItem","dataset","selectedChartItem","series","_dataObj","invokeEventCallback","nativeEvent","proxy","renderWidget","mindomain","xdomain","chartMinX","ydomain","chartMinY","root","theme","width","screenWidth","minDomain","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","viewtype","colorScale","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Platform } from 'react-native';\n\nimport {\n VictoryChart,\n VictoryBar,\n VictoryLegend,\n VictoryStack,\n VictoryGroup\n} from \"victory-native\";\n\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport { Svg } from \"react-native-svg\";\n\nexport class WmBarChartState extends BaseChartComponentState<WmBarChartProps> {}\n\nexport default class WmBarChart extends BaseChartComponent<WmBarChartProps, WmBarChartState, WmBarChartStyles> {\n\n constructor(props: WmBarChartProps) {\n super(props, DEFAULT_CLASS, new WmBarChartProps(), new WmBarChartState());\n }\n\n labelFn(data: any): string | number | string[] | number[] | null {\n return this.abbreviateNumber(data.datum.y);\n }\n\n getBarChart(props: WmBarChartProps) {\n return this.state.data.map((d: any, i: number) => {\n return <VictoryBar key={props.name + '_' + i}\n horizontal={props.horizontal} labels={props.showvalues ? this.labelFn.bind(this) : undefined}\n data={this.isRTL?d.toReversed():d}\n height={100}\n style={props.customcolors?{\n data: {\n fill: ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length]\n }\n }:{}}\n cornerRadius={{topLeft: this.styles.bar.borderTopLeftRadius, topRight: this.styles.bar.borderTopRightRadius, bottomLeft: this.styles.bar.borderBottomLeftRadius, bottomRight: this.styles.bar.borderBottomRightRadius}}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}/>\n });\n}\n\nonSelect(event: any, data: any){\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n}\n\n renderWidget(props: WmBarChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (<View\n style={this.styles.root}\n ><VictoryChart theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.styles.root.width as number || this.screenWidth}\n minDomain={mindomain}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}\n containerComponent={\n this.getTooltip(props)\n }>\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {\n props.viewtype === 'Stacked' ? <VictoryStack colorScale={this.state.colors}>\n {\n this.getBarChart(props)\n }\n </VictoryStack> : <VictoryGroup colorScale={this.state.colors} offset={5}>\n {\n this.getBarChart(props)\n }\n </VictoryGroup>\n }\n </VictoryChart></View>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AC5DC,SAAS,EAAET,SAAU;MACrBU,OAAO,EAAE;QAAEC,GAAG,EAAExE,KAAK,CAACyE,SAAS;QAAEC,MAAM,EAAE1E,KAAK,CAAC2E,YAAY;QAAEC,IAAI,EAAE5E,KAAK,CAAC6E,UAAU;QAAEC,KAAK,EAAE9E,KAAK,CAAC+E;MAAY,CAAE;MAChHC,kBAAkB,EAChB,IAAI,CAACC,UAAU,CAACjF,KAAK;IACtB,gBACrBhB,KAAA,CAAA2B,aAAA,CAACtB,aAAa;MACZwB,IAAI,EAAE,QAAS;MACfmE,kBAAkB,eAAEhG,KAAA,CAAA2B,aAAA,CAACf,GAAG,MAAE,CAAE;MAC5BsF,KAAK,EAAE,CAAClF,KAAK,CAACkF,KAAK,EAAElF,KAAK,CAACmF,UAAU,CAAE;MACvCC,WAAW,EAAC,YAAY;MACxBC,MAAM,EAAE,EAAG;MACXnF,IAAI,EAAE,EAAG;MACTiE,KAAK,EAAE,IAAI,CAAC5D,KAAK,CAAC4D;IAAM,CACzB,CAAC,EACD,IAAI,CAACmB,aAAa,CAAC,CAAC,EACpB,IAAI,CAACC,QAAQ,CAAC,CAAC,EACf,IAAI,CAACC,QAAQ,CAAC,CAAC,EAEdxF,KAAK,CAACyF,QAAQ,KAAK,SAAS,gBAAGzG,KAAA,CAAA2B,aAAA,CAACrB,YAAY;MAACoG,UAAU,EAAE,IAAI,CAACnF,KAAK,CAACmB;IAAO,GAEvE,IAAI,CAACpB,WAAW,CAACN,KAAK,CAEZ,CAAC,gBAAGhB,KAAA,CAAA2B,aAAA,CAACpB,YAAY;MAACmG,UAAU,EAAE,IAAI,CAACnF,KAAK,CAACmB,MAAO;MAACiE,MAAM,EAAE;IAAE,GAErE,IAAI,CAACrF,WAAW,CAACN,KAAK,CAEZ,CAEJ,CAAO,CAAC;EACxB;AACF"}
@@ -7,8 +7,6 @@ export default class WmBarChartProps extends BaseChartComponentProps {
7
7
  super(...arguments);
8
8
  _defineProperty(this, "horizontal", true);
9
9
  _defineProperty(this, "viewtype", 'Grouped');
10
- _defineProperty(this, "yaxislabeldistance", 30);
11
- _defineProperty(this, "xaxislabeldistance", 50);
12
10
  _defineProperty(this, "onSelect", void 0);
13
11
  }
14
12
  }
@@ -1 +1 @@
1
- {"version":3,"names":["BaseChartComponentProps","WmBarChartProps","constructor","arguments","_defineProperty"],"sources":["bar-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmBarChartProps extends BaseChartComponentProps {\n horizontal?: boolean = true;\n viewtype: string = 'Grouped';\n yaxislabeldistance: number = 30;\n xaxislabeldistance: number = 50;\n onSelect?: any;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,eAAe,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBAC5C,IAAI;IAAAA,eAAA,mBACR,SAAS;IAAAA,eAAA,6BACC,EAAE;IAAAA,eAAA,6BACF,EAAE;IAAAA,eAAA;EAAA;AAEjC"}
1
+ {"version":3,"names":["BaseChartComponentProps","WmBarChartProps","constructor","arguments","_defineProperty"],"sources":["bar-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmBarChartProps extends BaseChartComponentProps {\n horizontal?: boolean = true;\n viewtype: string = 'Grouped';\n onSelect?: any;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,eAAe,SAASD,uBAAuB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBAC5C,IAAI;IAAAA,eAAA,mBACR,SAAS;IAAAA,eAAA;EAAA;AAE9B"}
@@ -119,13 +119,16 @@ export class BaseChartComponent extends BaseComponent {
119
119
  const maxIndex = this.state.xaxisDatakeyArr.length - 1;
120
120
  const props = this.state.props;
121
121
  const getTickValueLabel = props.xtickexpr;
122
+ let height = this.styles.root.height || 250;
123
+ let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height - 20;
124
+ if (height && typeof height === 'string') {
125
+ height = parseInt(height);
126
+ }
122
127
  return /*#__PURE__*/React.createElement(VictoryAxis, {
123
128
  crossAxis: false,
124
129
  label: (props.xaxislabel || props.xaxisdatakey || "name") + (props.xunits ? `(${props.xunits})` : ''),
125
130
  style: {
126
- axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel, {
127
- padding: props.yaxislabeldistance
128
- }),
131
+ axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),
129
132
  grid: props.hidegridxaxis ? {
130
133
  stroke: null
131
134
  } : this.theme.mergeStyle(this.styles.grid, this.styles.xGrid),
@@ -136,7 +139,11 @@ export class BaseChartComponent extends BaseComponent {
136
139
  tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.xTickLabels)
137
140
  },
138
141
  fixLabelOverlap: props.autoadjustlabels ? true : false,
142
+ axisLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
143
+ y: yaxislabeldistance
144
+ }),
139
145
  tickLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
146
+ y: props.offsetyaxis ? props.offsetyaxis : height - 30,
140
147
  angle: props.labelangle || 0
141
148
  }),
142
149
  theme: this.state.theme,
@@ -160,13 +167,12 @@ export class BaseChartComponent extends BaseComponent {
160
167
  return null;
161
168
  }
162
169
  const getTickValueLabel = props.ytickexpr;
170
+ let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20;
163
171
  return /*#__PURE__*/React.createElement(VictoryAxis, {
164
172
  crossAxis: false,
165
173
  label: (props.yaxislabel || props.yaxisdatakey) + (props.yunits ? `(${props.yunits})` : ''),
166
174
  style: {
167
- axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel, {
168
- padding: props.yaxislabeldistance
169
- }),
175
+ axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),
170
176
  grid: props.hidegridyaxis ? {
171
177
  stroke: null
172
178
  } : this.theme.mergeStyle(this.styles.grid, this.styles.yGrid),
@@ -177,6 +183,12 @@ export class BaseChartComponent extends BaseComponent {
177
183
  tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)
178
184
  },
179
185
  fixLabelOverlap: props.autoadjustlabels ? true : false,
186
+ axisLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
187
+ x: xaxislabeldistance
188
+ }),
189
+ tickLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
190
+ x: props.offsetxaxis ? props.offsetxaxis : 50
191
+ }),
180
192
  theme: this.state.theme,
181
193
  tickFormat: (d, i, ticks) => {
182
194
  if (getTickValueLabel) {
@@ -184,6 +196,7 @@ export class BaseChartComponent extends BaseComponent {
184
196
  }
185
197
  return this.abbreviateNumber(d);
186
198
  },
199
+ orientation: this.isRTL ? "right" : "left",
187
200
  dependentAxis: true
188
201
  });
189
202
  }