@wavemaker/app-rn-runtime 11.6.0-next.26273 → 11.6.0-next.40501
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +7 -9
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +11 -27
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +1 -0
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +6 -19
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js +0 -4
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +0 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +6 -31
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js +0 -4
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js +5 -4
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +5 -13
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +11 -61
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js +0 -4
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +1 -2
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +25 -32
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +5 -4
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +1 -3
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +4 -4
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +15 -20
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +15 -26
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +2 -0
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +7 -33
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -4
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +2 -9
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +17 -20
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +7 -28
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +0 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +2 -11
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +0 -1
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +2 -6
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js +0 -4
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +11 -14
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -19
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +2 -27
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +0 -3
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +3 -7
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js +0 -4
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +6 -58
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js +6 -13
- app-rn-runtime/components/device/barcodescanner/barcodescanner.styles.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.styles.js +4 -11
- app-rn-runtime/components/device/camera/camera.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +0 -4
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +0 -4
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js +1 -2
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +0 -4
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +0 -4
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +3 -7
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js +0 -4
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js +2 -10
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +6 -12
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -5
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +5 -35
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +6 -6
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +10 -39
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +2 -17
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +0 -1
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +1 -19
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +8 -70
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js +0 -8
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +0 -16
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js +0 -8
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +0 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +1 -49
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js +0 -8
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +0 -16
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.styles.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +0 -11
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +0 -1
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +0 -17
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +1 -5
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.styles.js +3 -3
- app-rn-runtime/components/input/slider/slider.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +0 -3
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +5 -10
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +0 -11
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +0 -1
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +0 -17
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +0 -11
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +0 -1
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +0 -17
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +5 -43
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +12 -5
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -6
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +0 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +0 -6
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +2 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +5 -8
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +0 -4
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js +0 -4
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.js +2 -8
- app-rn-runtime/components/navigation/popover/popover.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +8 -42
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +16 -82
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +1 -5
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +2 -25
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +9 -37
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/package.json +3 -5
- app-rn-runtime/runtime/services/webprocess.service.js +1 -0
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +0 -36
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +3 -26
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +1 -2
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +0 -1
- app-rn-runtime/variables/service-variable.js.map +1 -1
- app-rn-runtime/components/chart/staticdata.js +0 -215
- app-rn-runtime/components/chart/staticdata.js.map +0 -1
- app-rn-runtime/components/page/tabbar/curve.js +0 -84
- app-rn-runtime/components/page/tabbar/curve.js.map +0 -1
- app-rn-runtime/core/components/floatinglabel.component.js +0 -45
- app-rn-runtime/core/components/floatinglabel.component.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","
|
|
1
|
+
{"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","fontSize","color","labelDefaultColor","asterisk","labelAsteriskColor","marginLeft","skeleton","width","height","borderRadius","link","marginBottom","padding","flexDirection","textAlign","getLabelStyles","textColor","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","fontWeight","labelDangerColor","labelDangerContrastColor","labelDefaultContrastColor","labelInfoColor","labelInfoContrastColor","labelPrimaryColor","labelPrimaryContrastColor","labelSuccessColor","labelSuccessContrastColor","labelWarningColor","labelWarningContrastColor","getTextStyles","labelTextDangerColor","labelTextInfoColor","labelTextPrimaryColor","labelTextSuccessColor","labelTextWarningColor","getHeadingStyles","overrides","margin","labelHeaderColor","heading1FontSize","heading2FontSize","heading3FontSize","heading4FontSize","heading5FontSize","heading6FontSize","labelTextMutedColor"],"sources":["label.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\nimport { WmAnchorStyles } from '../anchor/anchor.styles';\n\nexport type WmLabelStyles = BaseStyles & {\n asterisk: AllStyle,\n skeleton: WmSkeletonStyles \n link: WmAnchorStyles\n};\n\nexport const DEFAULT_CLASS = 'app-label';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLabelStyles = defineStyles({\n root: {\n },\n text: {\n fontSize: 16,\n color: themeVariables.labelDefaultColor\n },\n asterisk: {\n color: themeVariables.labelAsteriskColor,\n marginLeft: 2\n },\n skeleton: {\n root:{\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n link: {\n root: {\n marginBottom: -4\n },\n text: {\n padding: 0\n }\n } as WmAnchorStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n flexDirection: 'row',\n textAlign: 'right'\n }\n });\n const getLabelStyles = (color: string, textColor: string): WmLabelStyles => {\n return {\n root: {\n backgroundColor: color,\n paddingLeft: 32,\n paddingTop: 16,\n paddingRight: 32,\n paddingBottom: 16,\n borderRadius: 6\n },\n text: {\n color: textColor,\n fontWeight: 'bold'\n }\n } as WmLabelStyles;\n };\n\n addStyle('label-danger', '', getLabelStyles(themeVariables.labelDangerColor, themeVariables.labelDangerContrastColor));\n addStyle('label-default', '', getLabelStyles(themeVariables.labelDefaultColor, themeVariables.labelDefaultContrastColor));\n addStyle('label-info', '', getLabelStyles(themeVariables.labelInfoColor, themeVariables.labelInfoContrastColor));\n addStyle('label-primary', '', getLabelStyles(themeVariables.labelPrimaryColor, themeVariables.labelPrimaryContrastColor));\n addStyle('label-success', '', getLabelStyles(themeVariables.labelSuccessColor, themeVariables.labelSuccessContrastColor));\n addStyle('label-warning', '', getLabelStyles(themeVariables.labelWarningColor, themeVariables.labelWarningContrastColor));\n addStyle('label-test', '', getLabelStyles('yellow', 'red'));\n addStyle('label-test1', '', getLabelStyles('blue', 'orange'));\n\n const getTextStyles = (color: string) => {\n return {\n text: {\n color: color\n }\n } as WmLabelStyles;\n };\n\n addStyle('text-danger', '', getTextStyles(themeVariables.labelTextDangerColor));\n addStyle('text-info', '', getTextStyles(themeVariables.labelTextInfoColor));\n addStyle('text-primary', '', getTextStyles(themeVariables.labelTextPrimaryColor));\n addStyle('text-success', '', getTextStyles(themeVariables.labelTextSuccessColor));\n addStyle('text-warning', '', getTextStyles(themeVariables.labelTextWarningColor));\n addStyle('text-center', '', {\n root: {\n textAlign: 'center'\n }\n } as WmLabelStyles);\n addStyle('text-left', '', {\n root: {\n textAlign: 'left'\n }\n } as WmLabelStyles);\n addStyle('text-right', '', {\n root: {\n textAlign: 'right'\n }\n } as WmLabelStyles);\n\n\n const getHeadingStyles = (fontSize: number, overrides?: WmLabelStyles) => {\n return deepCopy({\n text: {\n fontWeight: '400',\n fontSize: fontSize,\n margin: 4,\n color: themeVariables.labelHeaderColor\n }\n } as WmLabelStyles, overrides);\n };\n addStyle('h1', '', getHeadingStyles(themeVariables.heading1FontSize, {text: {fontWeight: 'bold'}} as WmLabelStyles));\n addStyle('h2', '', getHeadingStyles(themeVariables.heading2FontSize, {text: {fontWeight: '500'}} as WmLabelStyles));\n addStyle('h3', '', getHeadingStyles(themeVariables.heading3FontSize));\n addStyle('h4', '', getHeadingStyles(themeVariables.heading4FontSize));\n addStyle('h5', '', getHeadingStyles(themeVariables.heading5FontSize));\n addStyle('h6', '', getHeadingStyles(themeVariables.heading6FontSize));\n addStyle('media-heading', '', {\n text : {\n fontSize: 16\n }\n } as WmLabelStyles);\n addStyle('text-muted', '', {\n text : {\n color: themeVariables.labelTextMutedColor\n }\n } as WmLabelStyles);\n addStyle('p', '', {\n text : {\n fontSize: 12\n }\n } as WmLabelStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGL,YAAY,CAAC;IAC9CM,IAAI,EAAE,CACN,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEN,cAAc,CAACO;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRF,KAAK,EAAEN,cAAc,CAACS,kBAAkB;MACxCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRR,IAAI,EAAC;QACHS,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB;IACF,CAA4B;IAC5BC,IAAI,EAAE;MACJZ,IAAI,EAAE;QACJa,YAAY,EAAE,CAAC;MACjB,CAAC;MACDZ,IAAI,EAAE;QACJa,OAAO,EAAE;MACX;IACF;EACJ,CAAC,CAAC;EAEFhB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EA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LASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","alignItems","borderWidth","borderStyle","message","flex","justifyContent","alignContent","title","fontWeight","fontSize","text","icon","closeBtn","paddingHorizontal","alignSelf","getStyle","bgColor","closeBtnColor","iconcolor","textcolor","titleColor","borderColor","arguments","length","undefined","transparent","backgroundColor","color","OS","textAlign","messageSuccessColor","defaultColorF","messageErrorColor","messageWarningColor","messageInfoColor","messageLoadingColor","defaultColor6","defaultColor1","defaultColorD"],"sources":["message.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 '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { Platform } from 'react-native';\n\nexport type WmMessageStyles = BaseStyles & {\n message: AllStyle,\n icon: WmIconStyles\n closeBtn: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-message';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmMessageStyles = defineStyles({\n root: {\n flexDirection: 'row',\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n paddingRight: 8,\n borderRadius: 6,\n alignItems: 'center',\n borderWidth: 1,\n borderStyle: 'solid'\n },\n message: {\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'flex-start',\n alignContent: 'center',\n paddingLeft: 16\n },\n title: {\n fontWeight: 'bold',\n fontSize: 14,\n paddingBottom: 4\n },\n text: {\n fontSize: 12\n },\n icon: {\n root: {\n alignItems: 'flex-start',\n fontSize: 20\n }\n } as WmIconStyles,\n closeBtn: {\n root: {\n borderRadius: 0,\n paddingLeft: 8,\n paddingHorizontal: 0,\n paddingRight: 0,\n alignSelf: 'center'\n },\n icon: {\n text: {\n fontSize: 16\n }\n }\n } as WmButtonStyles\n }) as WmMessageStyles;\n\n const getStyle = (bgColor: string, \n closeBtnColor: string,\n iconcolor: string,\n textcolor: string,\n titleColor: string,\n borderColor = themeVariables.transparent) => {\n return {\n root: {\n backgroundColor: bgColor,\n borderColor: borderColor\n },\n message: {\n color: textcolor\n },\n title: {\n color: titleColor\n },\n text: {\n color: textcolor\n },\n icon: {\n root: {\n color: iconcolor\n }\n } as WmIconStyles,\n closeBtn: {\n icon: {\n root : {\n color: closeBtnColor,\n }\n }\n } as WmButtonStyles\n } as WmMessageStyles;\n };\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n title:{\n textAlign:'right',\n },\n text:{\n textAlign:'right',\n },\n message:{\n paddingRight: 16\n }\n }:{\n title:{\n textAlign:'left',\n },\n text:{\n textAlign:'left',\n },\n message:{\n paddingRight: 16\n }\n });\n addStyle('success-dark-message', '', getStyle(\n themeVariables.messageSuccessColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('error-dark-message', '', getStyle(\n themeVariables.messageErrorColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('warning-dark-message', '', getStyle(\n themeVariables.messageWarningColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF\n ));\n addStyle('info-dark-message', '', getStyle(\n themeVariables.messageInfoColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('loading-dark-message', '', getStyle(\n themeVariables.messageLoadingColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n\n\n addStyle('success-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageSuccessColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('error-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageErrorColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('warning-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageWarningColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('info-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageInfoColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('loading-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageLoadingColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAGxF,SAASC,QAAQ,QAAQ,cAAc;AAQvC,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA8B,GAAGN,YAAY,CAAC;IAChDO,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,QAAQ;MACpBC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE;IACjB,CAAC;IACDC,OAAO,EAAE;MACLC,IAAI,EAAE,CAAC;MACPV,aAAa,EAAE,QAAQ;MACvBW,cA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AAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,uBAAuB,EAAE,EAAE,EAAEwB,QAAQ,CAC1CzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC6C,mBAAmB,EAClC7C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;AACN,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","alignItems","borderWidth","borderStyle","message","flex","justifyContent","alignContent","title","fontWeight","fontSize","text","icon","closeBtn","paddingHorizontal","alignSelf","getStyle","bgColor","closeBtnColor","iconcolor","textcolor","titleColor","borderColor","arguments","length","undefined","transparent","backgroundColor","color","OS","textAlign","messageSuccessColor","defaultColorF","messageErrorColor","messageWarningColor","messageInfoColor","messageLoadingColor","defaultColor6","defaultColor1","defaultColorD"],"sources":["message.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 '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { Platform } from 'react-native';\n\nexport type WmMessageStyles = BaseStyles & {\n message: AllStyle,\n icon: WmIconStyles\n closeBtn: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-message';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmMessageStyles = defineStyles({\n root: {\n flexDirection: 'row',\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n paddingRight: 8,\n borderRadius: 6,\n alignItems: 'center',\n borderWidth: 1,\n borderStyle: 'solid'\n },\n message: {\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'flex-start',\n alignContent: 'center',\n paddingLeft: 16\n },\n title: {\n fontWeight: 'bold',\n fontSize: 14,\n paddingBottom: 4\n },\n text: {\n fontSize: 12\n },\n icon: {\n root: {\n alignItems: 'flex-start',\n fontSize: 20\n }\n } as WmIconStyles,\n closeBtn: {\n root: {\n paddingHorizontal: 0,\n paddingRight: 8,\n alignSelf: 'center'\n },\n icon: {\n text: {\n fontSize: 16\n }\n }\n } as WmButtonStyles\n }) as WmMessageStyles;\n\n const getStyle = (bgColor: string, \n closeBtnColor: string,\n iconcolor: string,\n textcolor: string,\n titleColor: string,\n borderColor = themeVariables.transparent) => {\n return {\n root: {\n backgroundColor: bgColor,\n borderColor: borderColor\n },\n message: {\n color: textcolor\n },\n title: {\n color: titleColor\n },\n text: {\n color: textcolor\n },\n icon: {\n root: {\n color: iconcolor\n }\n } as WmIconStyles,\n closeBtn: {\n icon: {\n root : {\n color: closeBtnColor,\n }\n }\n } as WmButtonStyles\n } as WmMessageStyles;\n };\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n title:{\n textAlign:'right',\n },\n text:{\n textAlign:'right',\n },\n message:{\n paddingRight: 16\n }\n }:{\n title:{\n textAlign:'left',\n },\n text:{\n textAlign:'left',\n },\n message:{\n paddingRight: 16\n }\n });\n addStyle('success-dark-message', '', getStyle(\n themeVariables.messageSuccessColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('error-dark-message', '', getStyle(\n themeVariables.messageErrorColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('warning-dark-message', '', getStyle(\n themeVariables.messageWarningColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF\n ));\n addStyle('info-dark-message', '', getStyle(\n themeVariables.messageInfoColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n addStyle('loading-dark-message', '', getStyle(\n themeVariables.messageLoadingColor,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n themeVariables.defaultColorF,\n ));\n\n\n addStyle('success-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageSuccessColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('error-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageErrorColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('warning-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageWarningColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('info-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageInfoColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n addStyle('loading-light-message', '', getStyle(\n themeVariables.defaultColorF,\n themeVariables.defaultColor6,\n themeVariables.messageLoadingColor,\n themeVariables.defaultColor6,\n themeVariables.defaultColor1,\n themeVariables.defaultColorD\n ));\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAGxF,SAASC,QAAQ,QAAQ,cAAc;AAQvC,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ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Ac,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC2C,mBAAmB,EAClC3C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAEwB,QAAQ,CACvCzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC4C,gBAAgB,EAC/B5C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;EACF/C,QAAQ,CAAC,uBAAuB,EAAE,EAAE,EAAEwB,QAAQ,CAC1CzB,cAAc,CAACyC,aAAa,EAC5BzC,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC6C,mBAAmB,EAClC7C,cAAc,CAAC8C,aAAa,EAC5B9C,cAAc,CAAC+C,aAAa,EAC5B/C,cAAc,CAACgD,aACnB,CAAC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -5,8 +5,7 @@ export const DEFAULT_CLASS = 'app-search';
|
|
|
5
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
6
6
|
const defaultStyles = defineStyles({
|
|
7
7
|
root: {
|
|
8
|
-
flexDirection: 'row'
|
|
9
|
-
borderRadius: 28
|
|
8
|
+
flexDirection: 'row'
|
|
10
9
|
},
|
|
11
10
|
text: {
|
|
12
11
|
minHeight: 56,
|
|
@@ -20,7 +19,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
20
19
|
borderTopLeftRadius: 28,
|
|
21
20
|
borderBottomLeftRadius: 28,
|
|
22
21
|
borderColor: themeVariables.searchBorderColor,
|
|
23
|
-
backgroundColor: themeVariables.
|
|
22
|
+
backgroundColor: themeVariables.searchDropdownBackgroundColor
|
|
24
23
|
},
|
|
25
24
|
invalid: {
|
|
26
25
|
borderBottomColor: themeVariables.inputInvalidBorderColor
|
|
@@ -33,9 +32,10 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
33
32
|
height: '100%'
|
|
34
33
|
},
|
|
35
34
|
modalContent: {
|
|
36
|
-
backgroundColor: themeVariables.
|
|
35
|
+
backgroundColor: themeVariables.searchDropdownBackgroundColor,
|
|
37
36
|
borderRadius: 6,
|
|
38
37
|
position: 'absolute',
|
|
38
|
+
borderWidth: 1,
|
|
39
39
|
borderStyle: 'solid',
|
|
40
40
|
borderColor: themeVariables.searchBorderColor,
|
|
41
41
|
width: '90%'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","borderRadius","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchBgContainerColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row',\n borderRadius: 28\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchBgContainerColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor,\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchBgContainerColor,\n borderRadius: 6,\n position: 'absolute',\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,OAAOC,UAAU,MAAoB,wCAAwC;AA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C;QACPtC,QAAQ,EAAE,UAAU;QACpBQ,UAAU,EAAE;MACd;IACF;EACF,CAAC,GAAC;IACA/B,IAAI,EAAG;MACL2D,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEFhE,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC/BK,IAAI,EAAE;MACJQ,gBAAgB,EAAE,CAAC;MACnB2B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchDropdownBackgroundColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","borderRadius","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row'\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchDropdownBackgroundColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchDropdownBackgroundColor,\n borderRadius: 6,\n position: 'absolute',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,OAAOC,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;A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;MACd;IACF;EACF,CAAC,GAAC;IACAhC,IAAI,EAAG;MACL4D,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEFhE,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC/BI,IAAI,EAAE;MACJQ,gBAAgB,EAAE,CAAC;MACnB4B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -3,13 +3,12 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Color from "color";
|
|
6
|
-
import { View,
|
|
7
|
-
import { Defs, LinearGradient, Stop } from 'react-native-svg';
|
|
8
|
-
import { VictoryArea, VictoryChart, VictoryStack, VictoryScatter, VictoryGroup } from "victory-native";
|
|
6
|
+
import { View, Platform } from 'react-native';
|
|
7
|
+
import { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';
|
|
8
|
+
import { VictoryArea, VictoryChart, VictoryLegend, VictoryStack, VictoryScatter, VictoryGroup } from "victory-native";
|
|
9
9
|
import WmAreaChartProps from './area-chart.props';
|
|
10
10
|
import { DEFAULT_CLASS } from './area-chart.styles';
|
|
11
11
|
import { BaseChartComponent, BaseChartComponentState } from "@wavemaker/app-rn-runtime/components/chart/basechart.component";
|
|
12
|
-
import WmIcon from "@wavemaker/app-rn-runtime/components/basic/icon/icon.component";
|
|
13
12
|
import { isNumber } from 'lodash-es';
|
|
14
13
|
export class WmAreaChartState extends BaseChartComponentState {
|
|
15
14
|
constructor() {
|
|
@@ -57,19 +56,7 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
57
56
|
return /*#__PURE__*/React.createElement(View, {
|
|
58
57
|
style: this.styles.root,
|
|
59
58
|
onLayout: this.onViewLayoutChange.bind(this)
|
|
60
|
-
},
|
|
61
|
-
style: {
|
|
62
|
-
flexDirection: 'row',
|
|
63
|
-
alignItems: 'center'
|
|
64
|
-
}
|
|
65
|
-
}, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
66
|
-
iconclass: props.iconclass,
|
|
67
|
-
styles: this.styles.icon
|
|
68
|
-
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
69
|
-
style: this.styles.title
|
|
70
|
-
}, props.title)), /*#__PURE__*/React.createElement(Text, {
|
|
71
|
-
style: this.styles.subHeading
|
|
72
|
-
}, props.subheading)), this.state.chartWidth ? /*#__PURE__*/React.createElement(VictoryChart, {
|
|
59
|
+
}, this.state.chartWidth ? /*#__PURE__*/React.createElement(VictoryChart, {
|
|
73
60
|
theme: this.state.theme,
|
|
74
61
|
height: this.styles.root.height,
|
|
75
62
|
width: this.state.chartWidth || 120,
|
|
@@ -81,7 +68,15 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
81
68
|
},
|
|
82
69
|
minDomain: mindomain,
|
|
83
70
|
containerComponent: this.getTooltip(props)
|
|
84
|
-
},
|
|
71
|
+
}, /*#__PURE__*/React.createElement(VictoryLegend, {
|
|
72
|
+
name: 'legend',
|
|
73
|
+
containerComponent: /*#__PURE__*/React.createElement(Svg, null),
|
|
74
|
+
title: [props.title, props.subheading],
|
|
75
|
+
orientation: "horizontal",
|
|
76
|
+
gutter: 20,
|
|
77
|
+
data: [],
|
|
78
|
+
theme: this.state.theme
|
|
79
|
+
}), this.getLegendView(), this.getXaxis(), this.getYAxis(), /*#__PURE__*/React.createElement(VictoryStack, null, this.state.data.map((d, i) => {
|
|
85
80
|
return /*#__PURE__*/React.createElement(VictoryGroup, {
|
|
86
81
|
key: props.name + '_area_group_' + i
|
|
87
82
|
}, /*#__PURE__*/React.createElement(Defs, null, /*#__PURE__*/React.createElement(LinearGradient, {
|
|
@@ -107,7 +102,7 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
107
102
|
strokeWidth: props.linethickness
|
|
108
103
|
}
|
|
109
104
|
},
|
|
110
|
-
data:
|
|
105
|
+
data: d
|
|
111
106
|
}), props.highlightpoints ? /*#__PURE__*/React.createElement(VictoryScatter, {
|
|
112
107
|
size: 5,
|
|
113
108
|
key: props.name + '_scatter' + i,
|
|
@@ -116,7 +111,7 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
116
111
|
fill: Color(this.state.colors[i]).darken(0.2).rgb().toString()
|
|
117
112
|
}
|
|
118
113
|
},
|
|
119
|
-
data:
|
|
114
|
+
data: d,
|
|
120
115
|
events: [{
|
|
121
116
|
target: 'data',
|
|
122
117
|
eventHandlers: Platform.OS == "web" ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Color","View","Text","Platform","Defs","LinearGradient","Stop","VictoryArea","VictoryChart","VictoryStack","VictoryScatter","VictoryGroup","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmIcon","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","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","theme","height","padding","top","bottom","left","right","minDomain","containerComponent","getTooltip","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 WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\n\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 <View>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n {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 {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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACtE,SAASC,IAAI,EAAEC,cAAc,EAAEC,IAAI,QAAa,kBAAkB;AAClE,SAASC,WAAW,EAAeC,YAAY,EAAiBC,YAAY,EAAEC,cAAc,EAAEC,YAAY,QAAQ,gBAAgB;AAElI,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,MAAM,MAAM,gEAAgE;AAGnF,SAAgBC,QAAQ,QAAQ,WAAW;AAE3C,OAAO,MAAMC,gBAAgB,SAASH,uBAAuB,CAAmB;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,qBACjE,CAAC;EAAA;AAChB;AAEA,eAAe,MAAMC,WAAW,SAASR,kBAAkB,CAAwD;EAEjHK,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIM,gBAAgB,CAAC,CAAC,CAAC;IAACG,eAAA,6BAGxDG,CAAoB,IAAK;MAC7C,IAAIC,SAAS,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM,CAACC,KAAK;MAC1C,IAAI,CAACC,WAAW,CAAC;QACfC,UAAU,EAAEL;MACd,CAAqB,CAAC;IACxB,CAAC;EAPD;EASAM,QAAQA,CAACC,KAAU,EAAEC,IAAS,EAAC;IAC7B,IAAIC,KAAK,GAAGD,IAAI,CAACA,IAAI,C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;QAClCwB,MAAM,EAAE,CAAC;UACPC,MAAM,EAAE,MAAM;UACdC,aAAa,EAAEjH,QAAQ,CAACkH,EAAE,IAAI,KAAK,GAAG;YACpCC,OAAO,EAAE,IAAI,CAACvF,QAAQ,CAACqC,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACAmD,OAAO,EAAE,IAAI,CAACxF,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","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,Q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F,KAAK,CAACkF;UACrB;QACF,CAAE;QACFxE,IAAI,EAAEsD;MAAE,CACT,CAAC,EACDhE,KAAK,CAACmF,eAAe,gBACpB3G,KAAA,CAAA+D,aAAA,CAACnD,cAAc;QACbgG,IAAI,EAAE,CAAE;QACRlB,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,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,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View,
|
|
3
|
-
import { VictoryChart, VictoryBar, VictoryStack, VictoryGroup } from "victory-native";
|
|
2
|
+
import { View, Platform } from 'react-native';
|
|
3
|
+
import { VictoryChart, VictoryBar, VictoryLegend, VictoryStack, VictoryGroup } from "victory-native";
|
|
4
4
|
import { BaseChartComponent, BaseChartComponentState } from "@wavemaker/app-rn-runtime/components/chart/basechart.component";
|
|
5
5
|
import WmBarChartProps from './bar-chart.props';
|
|
6
6
|
import { DEFAULT_CLASS } from './bar-chart.styles';
|
|
7
|
-
import
|
|
7
|
+
import { Svg } from "react-native-svg";
|
|
8
8
|
export class WmBarChartState extends BaseChartComponentState {}
|
|
9
9
|
export default class WmBarChart extends BaseChartComponent {
|
|
10
10
|
constructor(props) {
|
|
@@ -19,9 +19,8 @@ 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:
|
|
22
|
+
data: d,
|
|
23
23
|
height: 100,
|
|
24
|
-
alignment: "start",
|
|
25
24
|
style: props.customcolors ? {
|
|
26
25
|
data: {
|
|
27
26
|
fill: _ref => {
|
|
@@ -32,12 +31,6 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
} : {},
|
|
35
|
-
cornerRadius: {
|
|
36
|
-
topLeft: this.styles.bar.borderTopLeftRadius,
|
|
37
|
-
topRight: this.styles.bar.borderTopRightRadius,
|
|
38
|
-
bottomLeft: this.styles.bar.borderBottomLeftRadius,
|
|
39
|
-
bottomRight: this.styles.bar.borderBottomRightRadius
|
|
40
|
-
},
|
|
41
34
|
events: [{
|
|
42
35
|
target: 'data',
|
|
43
36
|
eventHandlers: Platform.OS == "web" ? {
|
|
@@ -72,19 +65,7 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
72
65
|
};
|
|
73
66
|
return /*#__PURE__*/React.createElement(View, {
|
|
74
67
|
style: this.styles.root
|
|
75
|
-
}, /*#__PURE__*/React.createElement(
|
|
76
|
-
style: {
|
|
77
|
-
flexDirection: 'row',
|
|
78
|
-
alignItems: 'center'
|
|
79
|
-
}
|
|
80
|
-
}, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
81
|
-
iconclass: props.iconclass,
|
|
82
|
-
styles: this.styles.icon
|
|
83
|
-
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
84
|
-
style: this.styles.title
|
|
85
|
-
}, props.title)), /*#__PURE__*/React.createElement(Text, {
|
|
86
|
-
style: this.styles.subHeading
|
|
87
|
-
}, props.subheading)), /*#__PURE__*/React.createElement(VictoryChart, {
|
|
68
|
+
}, /*#__PURE__*/React.createElement(VictoryChart, {
|
|
88
69
|
theme: this.state.theme,
|
|
89
70
|
height: this.styles.root.height,
|
|
90
71
|
width: this.styles.root.width || this.screenWidth,
|
|
@@ -96,11 +77,19 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
96
77
|
right: props.offsetright
|
|
97
78
|
},
|
|
98
79
|
containerComponent: this.getTooltip(props)
|
|
99
|
-
},
|
|
80
|
+
}, /*#__PURE__*/React.createElement(VictoryLegend, {
|
|
81
|
+
name: 'legend',
|
|
82
|
+
containerComponent: /*#__PURE__*/React.createElement(Svg, null),
|
|
83
|
+
title: [props.title, props.subheading],
|
|
84
|
+
orientation: "horizontal",
|
|
85
|
+
gutter: 20,
|
|
86
|
+
data: [],
|
|
87
|
+
theme: this.state.theme
|
|
88
|
+
}), this.getLegendView(), this.getXaxis(), this.getYAxis(), props.viewtype === 'Stacked' ? /*#__PURE__*/React.createElement(VictoryStack, {
|
|
100
89
|
colorScale: this.state.colors
|
|
101
90
|
}, this.getBarChart(props)) : /*#__PURE__*/React.createElement(VictoryGroup, {
|
|
102
91
|
colorScale: this.state.colors,
|
|
103
|
-
offset:
|
|
92
|
+
offset: 5
|
|
104
93
|
}, this.getBarChart(props))));
|
|
105
94
|
}
|
|
106
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","Platform","VictoryChart","VictoryBar","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","WmIcon","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","alignment","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","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","theme","width","screenWidth","minDomain","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","containerComponent","getTooltip","getLegendView","getXaxis","getYAxis","viewtype","colorScale","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, 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 WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport { min } from 'moment';\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 alignment='start'\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 >\n <View>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n <VictoryChart 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 {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={10} >\n {\n this.getBarChart(props) \n }\n </VictoryGroup>\n }\n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GhB,KAAA,CAAA2B,aAAA,CAACpB,YAAY;MAACuG,UAAU,EAAE,IAAI,CAACvF,KAAK,CAACoB,MAAO;MAAEoE,MAAM,EAAE;IAAG,GAEvE,IAAI,CAACzF,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","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,GAAG,GAAGH,CAAE;QACzCI,UAAU,EAAEd,KAAK,CAACc,UAAW;QAACC,MAAM,EAAEf,KAAK,CAACgB,UAAU,GAAG,IAAI,CAACf,OAAO,CAACgB,IAAI,CAAC,IAAI,CAAC,GAAGC,SAAU;QAC7FhB,IAAI,EAAEO,CAAE;QACRU,MAAM,EAAE,GAAI;QACZC,KAA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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"}
|
|
@@ -7,6 +7,8 @@ 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);
|
|
10
12
|
_defineProperty(this, "onSelect", void 0);
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -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 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;
|
|
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"}
|
|
@@ -10,7 +10,6 @@ import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/cor
|
|
|
10
10
|
import WmIcon from "@wavemaker/app-rn-runtime/components/basic/icon/icon.component";
|
|
11
11
|
import ThemeFactory from "@wavemaker/app-rn-runtime/components/chart/theme/chart.theme";
|
|
12
12
|
import { DEFAULT_CLASS } from "./basechart.styles";
|
|
13
|
-
import { constructSampleData, getChartType } from "./staticdata";
|
|
14
13
|
export class BaseChartComponentState extends BaseComponentState {
|
|
15
14
|
constructor() {
|
|
16
15
|
super(...arguments);
|
|
@@ -120,16 +119,13 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
120
119
|
const maxIndex = this.state.xaxisDatakeyArr.length - 1;
|
|
121
120
|
const props = this.state.props;
|
|
122
121
|
const getTickValueLabel = props.xtickexpr;
|
|
123
|
-
let height = this.styles.root.height || 250;
|
|
124
|
-
let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height - 20;
|
|
125
|
-
if (height && typeof height === 'string') {
|
|
126
|
-
height = parseInt(height);
|
|
127
|
-
}
|
|
128
122
|
return /*#__PURE__*/React.createElement(VictoryAxis, {
|
|
129
123
|
crossAxis: false,
|
|
130
124
|
label: (props.xaxislabel || props.xaxisdatakey || "name") + (props.xunits ? `(${props.xunits})` : ''),
|
|
131
125
|
style: {
|
|
132
|
-
axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel
|
|
126
|
+
axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel, {
|
|
127
|
+
padding: props.yaxislabeldistance
|
|
128
|
+
}),
|
|
133
129
|
grid: props.hidegridxaxis ? {
|
|
134
130
|
stroke: null
|
|
135
131
|
} : this.theme.mergeStyle(this.styles.grid, this.styles.xGrid),
|
|
@@ -140,11 +136,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
140
136
|
tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.xTickLabels)
|
|
141
137
|
},
|
|
142
138
|
fixLabelOverlap: props.autoadjustlabels ? true : false,
|
|
143
|
-
axisLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
|
|
144
|
-
y: yaxislabeldistance
|
|
145
|
-
}),
|
|
146
139
|
tickLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
|
|
147
|
-
y: props.offsetyaxis ? props.offsetyaxis : height - 30,
|
|
148
140
|
angle: props.labelangle || 0
|
|
149
141
|
}),
|
|
150
142
|
theme: this.state.theme,
|
|
@@ -168,12 +160,13 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
168
160
|
return null;
|
|
169
161
|
}
|
|
170
162
|
const getTickValueLabel = props.ytickexpr;
|
|
171
|
-
let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20;
|
|
172
163
|
return /*#__PURE__*/React.createElement(VictoryAxis, {
|
|
173
164
|
crossAxis: false,
|
|
174
165
|
label: (props.yaxislabel || props.yaxisdatakey) + (props.yunits ? `(${props.yunits})` : ''),
|
|
175
166
|
style: {
|
|
176
|
-
axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel
|
|
167
|
+
axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel, {
|
|
168
|
+
padding: props.yaxislabeldistance
|
|
169
|
+
}),
|
|
177
170
|
grid: props.hidegridyaxis ? {
|
|
178
171
|
stroke: null
|
|
179
172
|
} : this.theme.mergeStyle(this.styles.grid, this.styles.yGrid),
|
|
@@ -184,12 +177,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
184
177
|
tickLabels: this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)
|
|
185
178
|
},
|
|
186
179
|
fixLabelOverlap: props.autoadjustlabels ? true : false,
|
|
187
|
-
axisLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
|
|
188
|
-
x: xaxislabeldistance
|
|
189
|
-
}),
|
|
190
|
-
tickLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
|
|
191
|
-
x: props.offsetxaxis ? props.offsetxaxis : 50
|
|
192
|
-
}),
|
|
193
180
|
theme: this.state.theme,
|
|
194
181
|
tickFormat: (d, i, ticks) => {
|
|
195
182
|
if (getTickValueLabel) {
|
|
@@ -197,7 +184,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
197
184
|
}
|
|
198
185
|
return this.abbreviateNumber(d);
|
|
199
186
|
},
|
|
200
|
-
orientation: this.isRTL ? "right" : "left",
|
|
201
187
|
dependentAxis: true
|
|
202
188
|
});
|
|
203
189
|
}
|
|
@@ -395,9 +381,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
395
381
|
let themeToUse;
|
|
396
382
|
if (typeof themeName === 'string') {
|
|
397
383
|
if (!colorsToUse.length) {
|
|
398
|
-
colorsToUse = props.customcolors;
|
|
399
|
-
}
|
|
400
|
-
if (props.customcolors === undefined) {
|
|
401
384
|
colorsToUse = ThemeFactory.getColorsObj(themeName);
|
|
402
385
|
}
|
|
403
386
|
themeToUse = ThemeFactory.getTheme(themeName, props.styles, colorsToUse);
|
|
@@ -460,7 +443,7 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
460
443
|
// If date string is bound to xaxis then we are pushing the x values as indexes.
|
|
461
444
|
getxAxisVal(dataObj, xKey, index, xaxisDatakeyArr) {
|
|
462
445
|
const value = get(dataObj, xKey);
|
|
463
|
-
if (moment(value).isValid() || isNaN(value)
|
|
446
|
+
if (moment(value, true).isValid() || isNaN(value)) {
|
|
464
447
|
xaxisDatakeyArr.push(value);
|
|
465
448
|
return index;
|
|
466
449
|
}
|
|
@@ -472,12 +455,6 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
472
455
|
let yaxis = props.yaxisdatakey;
|
|
473
456
|
let xaxisDatakeyArr = [];
|
|
474
457
|
let datasets = [];
|
|
475
|
-
if (dataset.length === 0) {
|
|
476
|
-
var _yaxis;
|
|
477
|
-
dataset = constructSampleData(getChartType(this.props), (_yaxis = yaxis) === null || _yaxis === void 0 ? void 0 : _yaxis.split(','), this.props.shape);
|
|
478
|
-
xaxis = "x";
|
|
479
|
-
yaxis = "y";
|
|
480
|
-
}
|
|
481
458
|
if (xaxis && yaxis) {
|
|
482
459
|
let yPts = yaxis.split(',');
|
|
483
460
|
yPts.forEach(y => {
|
|
@@ -599,7 +576,4 @@ export class BaseChartComponent extends BaseComponent {
|
|
|
599
576
|
}
|
|
600
577
|
}
|
|
601
578
|
}
|
|
602
|
-
function getDataType(widgetContext) {
|
|
603
|
-
throw new Error("Function not implemented.");
|
|
604
|
-
}
|
|
605
579
|
//# sourceMappingURL=basechart.component.js.map
|