@wavemaker-ai/app-rn-runtime 12.0.1-rc.647755 → 12.0.2-rc.344
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/advanced/carousel/carousel.component.js +1 -1
- package/components/advanced/carousel/carousel.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
- package/components/basic/icon/svg-url-icon.component.js +26 -1
- package/components/basic/icon/svg-url-icon.component.js.map +1 -1
- package/components/basic/label/label.component.js +11 -1
- package/components/basic/label/label.component.js.map +1 -1
- package/components/basic/label/label.props.js +1 -0
- package/components/basic/label/label.props.js.map +1 -1
- package/components/chart/area-chart/area-chart.component.js +1 -1
- package/components/chart/area-chart/area-chart.component.js.map +1 -1
- package/components/chart/bar-chart/bar-chart.component.js +1 -1
- package/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- package/components/chart/bubble-chart/bubble-chart.component.js +1 -1
- package/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- package/components/chart/line-chart/line-chart.component.js +1 -1
- package/components/chart/line-chart/line-chart.component.js.map +1 -1
- package/components/chart/pie-chart/pie-chart.component.js +1 -1
- package/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- package/components/chart/stack-chart/stack-chart.component.js +1 -1
- package/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- package/components/container/accordion/accordionpane/accordionpane.component.js +2 -2
- package/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- package/components/container/container.component.js +1 -1
- package/components/container/container.component.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +7 -3
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- package/components/container/panel/panel.component.js +1 -1
- package/components/container/panel/panel.component.js.map +1 -1
- package/components/container/tabs/tabpane/tabpane.component.js +1 -1
- package/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
- package/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- package/components/data/form/form-field/form-field.component.js +20 -3
- package/components/data/form/form-field/form-field.component.js.map +1 -1
- package/components/data/form/form-field/form-field.props.js +1 -0
- package/components/data/form/form-field/form-field.props.js.map +1 -1
- package/components/data/form/form.component.js +7 -2
- package/components/data/form/form.component.js.map +1 -1
- package/components/data/form/form.props.js +1 -0
- package/components/data/form/form.props.js.map +1 -1
- package/components/data/list/list.component.js +2 -2
- package/components/data/list/list.component.js.map +1 -1
- package/components/input/baseinput/baseinput.component.js +2 -0
- package/components/input/baseinput/baseinput.component.js.map +1 -1
- package/components/input/basenumber/basenumber.props.js +1 -0
- package/components/input/basenumber/basenumber.props.js.map +1 -1
- package/components/input/calendar/calendar.component.js +1 -1
- package/components/input/calendar/calendar.component.js.map +1 -1
- package/components/input/checkboxset/checkboxset.component.js +1 -1
- package/components/input/checkboxset/checkboxset.component.js.map +1 -1
- package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +6 -1
- package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +6 -1
- package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
- package/components/input/radioset/radioset.component.js +2 -2
- package/components/input/radioset/radioset.component.js.map +1 -1
- package/components/input/text/text.component.js +1 -0
- package/components/input/text/text.component.js.map +1 -1
- package/components/page/left-panel/left-panel.component.js +1 -1
- package/components/page/left-panel/left-panel.component.js.map +1 -1
- package/components-prism/input/slider/slider.styles.js +1 -1
- package/components-prism/input/slider/slider.styles.js.map +1 -1
- package/core/AppConfig.js.map +1 -1
- package/core/base.component.js +23 -0
- package/core/base.component.js.map +1 -1
- package/core/components/textinput.component.js +2 -1
- package/core/components/textinput.component.js.map +1 -1
- package/core/environment.js +25 -0
- package/core/environment.js.map +1 -0
- package/npm-shrinkwrap.json +88 -89
- package/package-lock.json +88 -89
- package/package.json +2 -2
- package/runtime/App.js +1 -0
- package/runtime/App.js.map +1 -1
- package/runtime/base-fragment.component.js +28 -5
- package/runtime/base-fragment.component.js.map +1 -1
- package/runtime/base-page.component.js +2 -1
- package/runtime/base-page.component.js.map +1 -1
- package/runtime/navigator/stack.navigator.js +6 -0
- package/runtime/navigator/stack.navigator.js.map +1 -1
- package/styles/theme.js +21 -2
- package/styles/theme.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","SvgXml","svgCache","Map","inFlightRequests","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","SvgXml","svgCache","Map","inFlightRequests","getDistinctSvgColors","svg","colors","Set","patterns","forEach","pattern","match","exec","value","trim","toLowerCase","add","normalizeSvg","size","replace","SvgUrlIcon","uri","width","height","color","style","xml","setXml","_svgCache$get","get","cached","undefined","cancelled","request","fetch","then","res","text","normalized","set","delete","catch","createElement"],"sources":["svg-url-icon.component.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { SvgXml } from 'react-native-svg';\n\n/**\n * Module-level cache for normalized SVG markup keyed by URL.\n * Shared across all instances so the same URL is only fetched once.\n */\nconst svgCache = new Map<string, string>();\n\n/**\n * In-flight fetch promises to avoid duplicate network requests when multiple\n * instances mount simultaneously with the same URL.\n */\nconst inFlightRequests = new Map<string, Promise<string>>();\n\n/**\n * Collects the distinct fill/stroke color values used in an SVG string,\n * ignoring `none`. Used to tell a monochrome icon (safe to recolor via\n * `currentColor`) apart from an intentionally multi-color icon.\n */\nfunction getDistinctSvgColors(svg: string): Set<string> {\n const colors = new Set<string>();\n const patterns = [\n /fill\\s*=\\s*\"(?!\\s*none\\s*\")([^\"]*)\"/gi,\n /fill\\s*=\\s*'(?!\\s*none\\s*')([^']*)'/gi,\n /stroke\\s*=\\s*\"(?!\\s*none\\s*\")([^\"]*)\"/gi,\n /stroke\\s*=\\s*'(?!\\s*none\\s*')([^']*)'/gi,\n /(?:fill|stroke)\\s*:\\s*(?!\\s*none\\b)([^;\"']+)/gi,\n ];\n patterns.forEach((pattern) => {\n let match: RegExpExecArray | null;\n while ((match = pattern.exec(svg)) !== null) {\n const value = match[1].trim().toLowerCase();\n if (value) {\n colors.add(value);\n }\n }\n });\n return colors;\n}\n\n/**\n * Replaces hardcoded fill/stroke color values with `currentColor` so the\n * icon color can be controlled via the `color` prop in react-native-svg.\n * Values of `none` are preserved as-is. Left unchanged if the SVG uses more\n * than one distinct color, since forcing every color to the same value\n * would destroy an intentionally multi-color icon.\n */\nfunction normalizeSvg(svg: string): string {\n if (getDistinctSvgColors(svg).size > 1) {\n return svg;\n }\n return svg\n .replace(/fill\\s*=\\s*\"(?!\\s*none\\s*\")[^\"]*\"/gi, 'fill=\"currentColor\"')\n .replace(/fill\\s*=\\s*'(?!\\s*none\\s*')[^']*'/gi, \"fill='currentColor'\")\n .replace(/stroke\\s*=\\s*\"(?!\\s*none\\s*\")[^\"]*\"/gi, 'stroke=\"currentColor\"')\n .replace(/stroke\\s*=\\s*'(?!\\s*none\\s*')[^']*'/gi, \"stroke='currentColor'\")\n .replace(/(fill|stroke)\\s*:\\s*(?!\\s*none\\b)[^;\"']+/gi, '$1: currentColor');\n}\n\ninterface SvgUrlIconProps {\n uri: string;\n width: number;\n height: number;\n color?: string;\n style?: StyleProp<ViewStyle>;\n}\n\n/**\n * Fetches an SVG from a URL, normalizes hardcoded colors to `currentColor`,\n * then renders it via SvgXml so the `color` prop controls the icon color —\n * the same behaviour as the web SvgIconDirective.\n */\nconst SvgUrlIcon: React.FC<SvgUrlIconProps> = ({ uri, width, height, color, style }) => {\n const [xml, setXml] = useState<string | null>(() => svgCache.get(uri) ?? null);\n\n useEffect(() => {\n if (!uri) return;\n\n const cached = svgCache.get(uri);\n if (cached !== undefined) {\n setXml(cached);\n return;\n }\n\n let cancelled = false;\n\n let request = inFlightRequests.get(uri);\n if (!request) {\n request = fetch(uri)\n .then(res => res.text())\n .then(text => {\n const normalized = normalizeSvg(text);\n svgCache.set(uri, normalized);\n inFlightRequests.delete(uri);\n return normalized;\n })\n .catch(() => {\n inFlightRequests.delete(uri);\n return '';\n });\n inFlightRequests.set(uri, request);\n }\n\n request.then(normalized => {\n if (!cancelled) {\n setXml(normalized);\n }\n });\n\n return () => {\n cancelled = true;\n };\n }, [uri]);\n\n if (!xml) return null;\n\n return (\n <SvgXml\n xml={xml}\n width={width}\n height={height}\n color={color}\n style={style}\n />\n );\n};\n\nexport default SvgUrlIcon;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAElD,SAASC,MAAM,QAAQ,kBAAkB;;AAEzC;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAAiB,CAAC;;AAE1C;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,IAAID,GAAG,CAA0B,CAAC;;AAE3D;AACA;AACA;AACA;AACA;AACA,SAASE,oBAAoBA,CAACC,GAAW,EAAe;EACtD,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAS,CAAC;EAChC,MAAMC,QAAQ,GAAG,CACf,uCAAuC,EACvC,uCAAuC,EACvC,yCAAyC,EACzC,yCAAyC,EACzC,gDAAgD,CACjD;EACDA,QAAQ,CAACC,OAAO,CAAEC,OAAO,IAAK;IAC5B,IAAIC,KAA6B;IACjC,OAAO,CAACA,KAAK,GAAGD,OAAO,CAACE,IAAI,CAACP,GAAG,CAAC,MAAM,IAAI,EAAE;MAC3C,MAAMQ,KAAK,GAAGF,KAAK,CAAC,CAAC,CAAC,CAACG,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;MAC3C,IAAIF,KAAK,EAAE;QACTP,MAAM,CAACU,GAAG,CAACH,KAAK,CAAC;MACnB;IACF;EACF,CAAC,CAAC;EACF,OAAOP,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASW,YAAYA,CAACZ,GAAW,EAAU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QACrCpC,QAAQ,CAACsC,GAAG,CAAClB,GAAG,EAAEiB,UAAU,CAAC;QAC7BnC,gBAAgB,CAACqC,MAAM,CAACnB,GAAG,CAAC;QAC5B,OAAOiB,UAAU;MACnB,CAAC,CAAC,CACDG,KAAK,CAAC,MAAM;QACXtC,gBAAgB,CAACqC,MAAM,CAACnB,GAAG,CAAC;QAC5B,OAAO,EAAE;MACX,CAAC,CAAC;MACJlB,gBAAgB,CAACoC,GAAG,CAAClB,GAAG,EAAEY,OAAO,CAAC;IACpC;IAEAA,OAAO,CAACE,IAAI,CAACG,UAAU,IAAI;MACzB,IAAI,CAACN,SAAS,EAAE;QACdL,MAAM,CAACW,UAAU,CAAC;MACpB;IACF,CAAC,CAAC;IAEF,OAAO,MAAM;MACXN,SAAS,GAAG,IAAI;IAClB,CAAC;EACH,CAAC,EAAE,CAACX,GAAG,CAAC,CAAC;EAET,IAAI,CAACK,GAAG,EAAE,OAAO,IAAI;EAErB,oBACE7B,KAAA,CAAA6C,aAAA,CAAC1C,MAAM;IACL0B,GAAG,EAAEA,GAAI;IACTJ,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbC,KAAK,EAAEA;EAAM,CACd,CAAC;AAEN,CAAC;AAED,eAAeL,UAAU","ignoreList":[]}
|
|
@@ -178,6 +178,10 @@ export default class WmLabel extends BaseComponent {
|
|
|
178
178
|
}
|
|
179
179
|
return numOfLines;
|
|
180
180
|
}
|
|
181
|
+
getEllipsizeMode(props) {
|
|
182
|
+
var _props$ellipsizemode;
|
|
183
|
+
return (_props$ellipsizemode = props.ellipsizemode) !== null && _props$ellipsizemode !== void 0 ? _props$ellipsizemode : 'tail';
|
|
184
|
+
}
|
|
181
185
|
|
|
182
186
|
// Helpers to dedupe common logic
|
|
183
187
|
tokenizeWords(text) {
|
|
@@ -296,6 +300,7 @@ export default class WmLabel extends BaseComponent {
|
|
|
296
300
|
};
|
|
297
301
|
const showWebTextGradient = hasLinearGradient && Platform.OS === 'web';
|
|
298
302
|
const numOfLines = this.getNumberOfLines(this.state.props);
|
|
303
|
+
const ellipsizeMode = this.getEllipsizeMode(this.state.props);
|
|
299
304
|
const useAndroidEllipsis = this.shouldUseAndroidEllipsis(this.state.props);
|
|
300
305
|
|
|
301
306
|
// Shared styles
|
|
@@ -340,11 +345,16 @@ export default class WmLabel extends BaseComponent {
|
|
|
340
345
|
...hiddenStyle,
|
|
341
346
|
...gradientStyle
|
|
342
347
|
};
|
|
348
|
+
|
|
349
|
+
// **NOTE: using "userSelect" style property breaks the layout engine's native ellipse calculation in Android
|
|
350
|
+
if (Platform.OS === 'android' && this.props.nooflines === 1) {
|
|
351
|
+
combinedTextStyle === null || combinedTextStyle === void 0 || delete combinedTextStyle['userSelect'];
|
|
352
|
+
}
|
|
343
353
|
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
344
354
|
style: combinedTextStyle
|
|
345
355
|
}, this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}, getAccessibilityProps(AccessibilityWidgetType.LABEL, this.state.props), {
|
|
346
356
|
numberOfLines: numOfLines,
|
|
347
|
-
ellipsizeMode:
|
|
357
|
+
ellipsizeMode: ellipsizeMode
|
|
348
358
|
}), ((_this$state$parts2 = this.state.parts) === null || _this$state$parts2 === void 0 ? void 0 : _this$state$parts2.length) === 1 && !this.state.parts[0].link && !this.state.parts[0].bold ? toString(this.state.props.caption) : (_this$state$parts3 = this.state.parts) === null || _this$state$parts3 === void 0 ? void 0 : _this$state$parts3.map((part, index) => {
|
|
349
359
|
const isLink = !isNil(part.link);
|
|
350
360
|
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","Platform","Animated","BaseComponent","BaseComponentState","Tappable","NavigationServiceConsumer","AccessibilityWidgetType","getAccessibilityProps","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","LinearGradient","MaskedView","parseLinearGradient","WmLabelState","constructor","args","_defineProperty","WmLabel","props","updateState","parts","parseCaption","caption","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","String","animationId","Date","now","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","replace","lastIndex","match","pattern","exec","index","push","text","substring","undefined","boldContent","linkPattern","linkMatch","beforeLink","bold","link","afterLink","length","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","root","skeletonheight","_this$styles$root2","fontSize","multilineskeleton","shouldUseAndroidEllipsis","OS","enableandroidellipsis","getNumberOfLines","numOfLines","wrap","nooflines","tokenizeWords","split","filter","t","map","token","isSpace","test","isTextAnimationExists","state","textanimation","getWordAnimConfig","_Number","step","Number","animationspeed","fadeDuration","Math","max","renderWordswithAnimation","navigationService","isHidden","_this$state$parts","shouldAnimate","runningIndex","containerStyle","flexDirection","flexWrap","alignItems","opacity","getBaseStyle","part","fontWeight","isValid","color","onTokenPress","startsWith","openUrl","eventName","invokeEventCallback","proxy","renderToken","key","baseStyle","onPress","Value","delay","timing","toValue","duration","useNativeDriver","start","_extends","LABEL","getTestPropsForLabel","flatMap","pIdx","_raw$","raw","merged","leadingSpace","firstWordEmitted","i","_raw","tk","nextIsSpace","prefix","required","renderLabelTextContent","hasLinearGradient","_this$styles","_this$state$parts2","_this$state$parts3","gradientTextWebStyle","backgroundImage","backgroundClip","showWebTextGradient","useAndroidEllipsis","hiddenStyle","gradientStyle","isSinglePart","androidEllipsisTextStyle","userSelect","textAlign","content","join","numberOfLines","ellipsizeMode","combinedTextStyle","isLink","selectable","renderWidget","_this$styles2","linkStyles","mergeStyle","end","gradientColors","colorStops","entryanimation","animation","animationdelay","onLayout","event","handleLayout","_background","target","disableTouchEffect","disabletoucheffect","maskElement","colors","locations"],"sources":["label.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, LayoutChangeEvent, Text, View,Platform, Animated } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker-ai/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker-ai/app-rn-runtime/core/tappable.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker-ai/app-rn-runtime/core/navigation.service';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\n\nimport WmLabelProps from './label.props';\nimport { DEFAULT_CLASS, WmLabelStyles } from './label.styles';\nimport { isNil, toString } from 'lodash-es';\nimport { Animatedview } from '@wavemaker-ai/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\nimport { LinearGradient } from 'expo-linear-gradient';\nimport MaskedView from '@react-native-masked-view/masked-view';\nimport { parseLinearGradient } from '@wavemaker-ai/app-rn-runtime/core/utils';\n\n\ntype PartType = {\n text?: string,\n link?: string,\n bold?: boolean;\n};\n\nexport class WmLabelState extends BaseComponentState<WmLabelProps> {\n parts: PartType[] = []\n}\n\nexport default class WmLabel extends BaseComponent<WmLabelProps, WmLabelState, WmLabelStyles> {\n\n constructor(props: WmLabelProps) {\n super(props, DEFAULT_CLASS, new WmLabelProps(), new WmLabelState());\n this.updateState({\n parts: this.parseCaption(props.caption || '')\n } as WmLabelState);\n }\n\n private getAsterisk() {\n return <Text style={this.styles.asterisk}>*</Text>;\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n\n switch (name) {\n case \"caption\":\n this.updateState({\n parts: this.parseCaption(String($new)),\n animationId: Date.now()\n } as WmLabelState);\n break;\n }\n }\n private getMultilineSkeleton(width: any, height: any) {\n const styles = {\n borderRadius: 4,\n marginBottom: 10,\n height: height\n };\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...styles,\n width: width,\n height: height\n });\n }\n\n parseCaption(caption: string) {\n if (!caption) {\n return [];\n }\n caption += '';\n caption = caption.replace(/\\s*\\(\\s*\\$event,\\s*\\$widget\\s*\\)\\s*/, '');\n caption = caption.replace(/\\(\\s*\\)/, '(#/__EMPTY__)');\n\n let parts: PartType[] = [];\n let lastIndex = 0;\n let match;\n\n // Updated pattern to handle asterisks properly - using lazy matching and proper boundaries\n const pattern = /\\*\\*(.*?)\\*\\*|\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n\n while ((match = pattern.exec(caption)) !== null) {\n // Add any text before the match\n if (match.index > lastIndex) {\n parts.push({ text: caption.substring(lastIndex, match.index) });\n }\n\n if (match[1] !== undefined) {\n // This is a bold section (first capture group)\n const boldContent = match[1];\n\n // Check if the bold content contains a link\n const linkPattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/;\n const linkMatch = boldContent.match(linkPattern);\n\n if (linkMatch) {\n // If there's text before the link\n const beforeLink = boldContent.substring(0, linkMatch.index);\n if (beforeLink) {\n parts.push({ text: beforeLink, bold: true });\n }\n\n // Add the link part\n parts.push({ text: linkMatch[1], link: linkMatch[2], bold: true });\n\n // If there's text after the link\n if(linkMatch.index !== undefined) {\n const afterLink = boldContent.substring(linkMatch.index + linkMatch[0].length);\n if (afterLink) {\n parts.push({ text: afterLink, bold: true });\n }\n }\n } else {\n // If no link, just add the entire content as bold\n parts.push({ text: boldContent, bold: true });\n }\n } else if (match[2] !== undefined && match[3] !== undefined) {\n // This is a standalone link (second and third capture groups)\n parts.push({ text: match[2], link: match[3] });\n }\n\n lastIndex = pattern.lastIndex;\n }\n\n // Add any remaining text after the last match\n if (lastIndex < caption.length) {\n parts.push({ text: caption.substring(lastIndex) });\n }\n\n return parts;\n }\n\n public renderSkeleton(props: WmLabelProps) {\n\n let skeletonWidth, skeletonHeight;\n if (this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if (this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\n }\n\n if (this.props.multilineskeleton) {\n return (<View style={{\n width: skeletonWidth as DimensionValue\n }}>\n {this.getMultilineSkeleton('100%', skeletonHeight)}\n {this.getMultilineSkeleton('70%', skeletonHeight)}\n {this.getMultilineSkeleton('40%', skeletonHeight)}\n </View>)\n }\n else {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n }\n private shouldUseAndroidEllipsis(props: WmLabelProps): boolean {\n return Platform.OS === 'android' && props.enableandroidellipsis !== false;\n }\n\n // Helper to get the proper number of lines\n private getNumberOfLines(props: WmLabelProps): number | undefined {\n let numOfLines: number | undefined = undefined;\n if (props.wrap === false) {\n numOfLines = 1;\n } else if (typeof props.nooflines === 'number' && props.nooflines > 0) {\n numOfLines = props.nooflines;\n }\n return numOfLines;\n }\n\n // Helpers to dedupe common logic\n private tokenizeWords(text?: string) {\n return (text ? text.split(/(\\s+)/) : [])\n .filter(t => t !== '')\n .map(t => ({ token: t, isSpace: /^\\s+$/.test(t) }));\n }\n\n private isTextAnimationExists(): boolean {\n return this.state.props.textanimation === 'fadeIn';\n }\n\n private getWordAnimConfig() {\n const step = Number(this.state.props.animationspeed) ?? 80;\n const fadeDuration = Math.max(120, step * 2);\n return { step, fadeDuration };\n }\n\n private renderWordswithAnimation(navigationService: NavigationService, isHidden: boolean) {\n const shouldAnimate = this.isTextAnimationExists();\n const { step, fadeDuration } = this.getWordAnimConfig();\n let runningIndex = 0;\n\n const containerStyle: any = {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'flex-start',\n opacity: isHidden ? 0 : 1,\n width: '100%'\n };\n\n const getBaseStyle = (part: { link?: string; bold?: boolean }) => ([\n this.styles.text,\n part.link ? this.styles.link.text : null,\n part.bold ? { fontWeight: 'bold' } : null,\n this.state.props.isValid ? null : { color: 'red' },\n ]);\n\n const onTokenPress = (part: { link?: string }) => {\n if (part.link) {\n if (part.link.startsWith('http:') || part.link.startsWith('https:') || part.link.startsWith('#')) {\n navigationService.openUrl(part.link, '_blank');\n } else if (part.link.startsWith('javascript:')) {\n const eventName = part.link.substring(11);\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n };\n\n const renderToken = (part: any, t: { token: string; isSpace: boolean }, key: string) => {\n if (t.isSpace) return <Text key={key} style={this.styles.text}>{t.token}</Text>;\n\n const baseStyle = getBaseStyle(part);\n if (!shouldAnimate) {\n return <Text key={key} style={baseStyle as any} onPress={() => onTokenPress(part)}>{t.token}</Text>;\n }\n\n const opacity = new Animated.Value(0);\n const delay = step * (runningIndex++);\n Animated.timing(opacity, { toValue: 1, duration: fadeDuration, delay, useNativeDriver: true }).start();\n\n return (\n <Animated.Text key={key} style={[baseStyle as any, { opacity }]} onPress={() => onTokenPress(part)}>\n {t.token}\n </Animated.Text>\n );\n };\n\n return (\n <View style={containerStyle} {...getAccessibilityProps(AccessibilityWidgetType.LABEL, this.state.props)} {...this.getTestPropsForLabel('caption')}>\n {this.state.parts?.flatMap((part, pIdx) => {\n const raw = this.tokenizeWords(toString(part.text));\n const merged: { token: string; isSpace: boolean }[] = [];\n const leadingSpace = !!raw[0]?.isSpace;\n let firstWordEmitted = false;\n for (let i = 0; i < raw.length; i++) {\n const tk = raw[i];\n if (tk.isSpace) { continue; }\n const nextIsSpace = !!raw[i + 1]?.isSpace;\n const prefix = (!firstWordEmitted && leadingSpace) ? ' ' : '';\n merged.push({ token: prefix + tk.token + (nextIsSpace ? ' ' : ''), isSpace: false });\n firstWordEmitted = true;\n if (nextIsSpace) { i++; }\n }\n return merged.map((t, i) => renderToken(part, t, `p${pIdx}_${i}`));\n })}\n {this.state.props.required && this.getAsterisk()}\n </View>\n );\n }\n\n private renderLabelTextContent(navigationService: NavigationService, isHidden: boolean = false, hasLinearGradient: boolean = false) {\n //gradient text support for web\n const gradientTextWebStyle = {\n backgroundImage: (this.styles?.text.color as string),\n color: 'transparent',\n backgroundClip: 'text',\n }\n const showWebTextGradient = (hasLinearGradient && Platform.OS === 'web');\n const numOfLines = this.getNumberOfLines(this.state.props);\n const useAndroidEllipsis = this.shouldUseAndroidEllipsis(this.state.props);\n\n // Shared styles\n const baseStyle = this.styles.text;\n const hiddenStyle = isHidden ? { opacity: 0 } : {};\n const gradientStyle = showWebTextGradient ? gradientTextWebStyle : {};\n\n // Determine if it's a single part\n const isSinglePart = this.state.parts.length <= 1;\n // if numOfLines is exists then the animation won't work.\n if (numOfLines === undefined && this.isTextAnimationExists()) {\n return this.renderWordswithAnimation(navigationService, isHidden);\n }\n\n if (useAndroidEllipsis) {\n const androidEllipsisTextStyle: any = {\n ...baseStyle,\n ...hiddenStyle,\n ...gradientStyle,\n userSelect: 'none',\n width: '100%',\n textAlign: baseStyle.textAlign,\n };\n // Keep single-string content in Android ellipsis branch to ensure reliable truncation\n const content = this.state.parts.length === 1\n ? toString(this.state.props.caption)\n : this.state.parts.map(part => toString(part.text)).join('');\n return (\n <Text\n style={androidEllipsisTextStyle}\n numberOfLines={numOfLines}\n ellipsizeMode=\"tail\"\n {...(this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {})}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, this.state.props)}\n >\n {content}\n {this.state.props.required && this.getAsterisk()}\n </Text>\n );\n }\n\n\n // Compose final style\n const combinedTextStyle = isSinglePart\n ? { ...baseStyle, ...hiddenStyle, ...gradientStyle }\n : {\n flexWrap: 'wrap',\n textAlign: baseStyle.textAlign,\n ...hiddenStyle,\n ...gradientStyle,\n };\n\n\n\n return (\n <Text style={combinedTextStyle}\n {...this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, this.state.props)}\n numberOfLines={numOfLines} ellipsizeMode=\"tail\">\n {(this.state.parts?.length === 1 && !this.state.parts[0].link && !this.state.parts[0].bold) ? toString(this.state.props.caption) : this.state.parts?.map((part, index) => {\n const isLink = !isNil(part.link);\n return (\n <Text\n key={`part_${index}`}\n style={[\n this.styles.text,\n isLink ? this.styles.link.text : null,\n part.bold ? { fontWeight: 'bold'} : null,\n this.state.props.isValid ? null : { color: 'red' }\n ]}\n {...this.getTestPropsForLabel(isLink ? `link_${index}` : `caption_${index}`)}\n selectable={this.styles.text.userSelect === 'text'}\n onPress={() => {\n if (part.link) {\n if (part.link.startsWith('http:')\n || part.link.startsWith('https:')\n || part.link.startsWith('#')) {\n navigationService.openUrl(part.link, '_blank');\n } else if (part.link.startsWith('javascript:')) {\n const eventName = part.link.substring(11);\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n }}\n // {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n >\n {toString(part.text)}\n </Text>\n );\n })}\n {this.state.props.required && this.getAsterisk()}\n </Text>\n )\n\n }\n renderWidget(props: WmLabelProps) {\n const linkStyles = this.theme.mergeStyle({ text: this.styles.text }, this.styles.link);\n const { hasLinearGradient, start, end, gradientColors,colorStops } = parseLinearGradient((this.styles?.text.color) as string);\n\n return !isNil(props.caption) ? (\n <Animatedview\n entryanimation={props.animation}\n delay={props.animationdelay}\n style={this.styles.root}\n onLayout={(event: LayoutChangeEvent) => this.handleLayout(event)}\n >\n {this._background}\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) => {\n return (<Tappable target={this} disableTouchEffect={this.state.props.disabletoucheffect} >\n {hasLinearGradient ? <MaskedView\n maskElement={this.renderLabelTextContent(navigationService, false, hasLinearGradient)}\n >\n <LinearGradient colors={gradientColors as any} start={start} end={end} locations={colorStops.length > 0 ? colorStops as any : undefined}>\n {this.renderLabelTextContent(navigationService, true)}\n </LinearGradient>\n </MaskedView> : this.renderLabelTextContent(navigationService)}\n </Tappable>)\n }}\n </NavigationServiceConsumer>\n </Animatedview>\n ) : null;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4CC,IAAI,EAAEC,IAAI,EAACC,QAAQ,EAAEC,QAAQ,QAAQ,cA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KAAA,CAAA+B,aAAA,CAAChB,YAAY;MACXwK,cAAc,EAAE9J,KAAK,CAAC+J,SAAU;MAChCrD,KAAK,EAAE1G,KAAK,CAACgK,cAAe;MAC5BzJ,KAAK,EAAE,IAAI,CAACC,MAAM,CAACwC,IAAK;MACxBiH,QAAQ,EAAGC,KAAwB,IAAK,IAAI,CAACC,YAAY,CAACD,KAAK;IAAE,GAEhE,IAAI,CAACE,WAAW,eACjB7L,KAAA,CAAA+B,aAAA,CAACvB,yBAAyB,QACtBiG,iBAAoC,IAAK;MACzC,oBAAQzG,KAAA,CAAA+B,aAAA,CAACxB,QAAQ;QAACuL,MAAM,EAAE,IAAK;QAACC,kBAAkB,EAAE,IAAI,CAACjG,KAAK,CAACrE,KAAK,CAACuK;MAAmB,GACrFtC,iBAAiB,gBAAG1J,KAAA,CAAA+B,aAAA,CAACb,UAAU;QAC9B+K,WAAW,EAAE,IAAI,CAACxC,sBAAsB,CAAChD,iBAAiB,EAAE,KAAK,EAAEiD,iBAAiB;MAAE,gBAEtF1J,KAAA,CAAA+B,aAAA,CAACd,cAAc;QAACiL,MAAM,EAAEb,cAAsB;QAAC7C,KAAK,EAAEA,KAAM;QAAC4C,GAAG,EAAEA,GAAI;QAAEe,SAAS,EAAEb,UAAU,CAACnH,MAAM,GAAG,CAAC,GAAGmH,UAAU,GAAU3H;MAAU,GACtI,IAAI,CAAC8F,sBAAsB,CAAChD,iBAAiB,EAAE,IAAI,CACtC,CACN,CAAC,GAAG,IAAI,CAACgD,sBAAsB,CAAChD,iBAAiB,CACrD,CAAC;IACb,CACyB,CACf,CAAC,GACb,IAAI;EACV;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Text","View","Platform","Animated","BaseComponent","BaseComponentState","Tappable","NavigationServiceConsumer","AccessibilityWidgetType","getAccessibilityProps","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","LinearGradient","MaskedView","parseLinearGradient","WmLabelState","constructor","args","_defineProperty","WmLabel","props","updateState","parts","parseCaption","caption","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","String","animationId","Date","now","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","replace","lastIndex","match","pattern","exec","index","push","text","substring","undefined","boldContent","linkPattern","linkMatch","beforeLink","bold","link","afterLink","length","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","root","skeletonheight","_this$styles$root2","fontSize","multilineskeleton","shouldUseAndroidEllipsis","OS","enableandroidellipsis","getNumberOfLines","numOfLines","wrap","nooflines","getEllipsizeMode","_props$ellipsizemode","ellipsizemode","tokenizeWords","split","filter","t","map","token","isSpace","test","isTextAnimationExists","state","textanimation","getWordAnimConfig","_Number","step","Number","animationspeed","fadeDuration","Math","max","renderWordswithAnimation","navigationService","isHidden","_this$state$parts","shouldAnimate","runningIndex","containerStyle","flexDirection","flexWrap","alignItems","opacity","getBaseStyle","part","fontWeight","isValid","color","onTokenPress","startsWith","openUrl","eventName","invokeEventCallback","proxy","renderToken","key","baseStyle","onPress","Value","delay","timing","toValue","duration","useNativeDriver","start","_extends","LABEL","getTestPropsForLabel","flatMap","pIdx","_raw$","raw","merged","leadingSpace","firstWordEmitted","i","_raw","tk","nextIsSpace","prefix","required","renderLabelTextContent","hasLinearGradient","_this$styles","_this$state$parts2","_this$state$parts3","gradientTextWebStyle","backgroundImage","backgroundClip","showWebTextGradient","ellipsizeMode","useAndroidEllipsis","hiddenStyle","gradientStyle","isSinglePart","androidEllipsisTextStyle","userSelect","textAlign","content","join","numberOfLines","combinedTextStyle","isLink","selectable","renderWidget","_this$styles2","linkStyles","mergeStyle","end","gradientColors","colorStops","entryanimation","animation","animationdelay","onLayout","event","handleLayout","_background","target","disableTouchEffect","disabletoucheffect","maskElement","colors","locations"],"sources":["label.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, LayoutChangeEvent, Text, View,Platform, Animated } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker-ai/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker-ai/app-rn-runtime/core/tappable.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker-ai/app-rn-runtime/core/navigation.service';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\n\nimport WmLabelProps from './label.props';\nimport { DEFAULT_CLASS, WmLabelStyles } from './label.styles';\nimport { isNil, toString } from 'lodash-es';\nimport { Animatedview } from '@wavemaker-ai/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\nimport { LinearGradient } from 'expo-linear-gradient';\nimport MaskedView from '@react-native-masked-view/masked-view';\nimport { parseLinearGradient } from '@wavemaker-ai/app-rn-runtime/core/utils';\n\n\ntype PartType = {\n text?: string,\n link?: string,\n bold?: boolean;\n};\n\nexport class WmLabelState extends BaseComponentState<WmLabelProps> {\n parts: PartType[] = []\n}\n\nexport default class WmLabel extends BaseComponent<WmLabelProps, WmLabelState, WmLabelStyles> {\n\n constructor(props: WmLabelProps) {\n super(props, DEFAULT_CLASS, new WmLabelProps(), new WmLabelState());\n this.updateState({\n parts: this.parseCaption(props.caption || '')\n } as WmLabelState);\n }\n\n private getAsterisk() {\n return <Text style={this.styles.asterisk}>*</Text>;\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n\n switch (name) {\n case \"caption\":\n this.updateState({\n parts: this.parseCaption(String($new)),\n animationId: Date.now()\n } as WmLabelState);\n break;\n }\n }\n private getMultilineSkeleton(width: any, height: any) {\n const styles = {\n borderRadius: 4,\n marginBottom: 10,\n height: height\n };\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...styles,\n width: width,\n height: height\n });\n }\n\n parseCaption(caption: string) {\n if (!caption) {\n return [];\n }\n caption += '';\n caption = caption.replace(/\\s*\\(\\s*\\$event,\\s*\\$widget\\s*\\)\\s*/, '');\n caption = caption.replace(/\\(\\s*\\)/, '(#/__EMPTY__)');\n\n let parts: PartType[] = [];\n let lastIndex = 0;\n let match;\n\n // Updated pattern to handle asterisks properly - using lazy matching and proper boundaries\n const pattern = /\\*\\*(.*?)\\*\\*|\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n\n while ((match = pattern.exec(caption)) !== null) {\n // Add any text before the match\n if (match.index > lastIndex) {\n parts.push({ text: caption.substring(lastIndex, match.index) });\n }\n\n if (match[1] !== undefined) {\n // This is a bold section (first capture group)\n const boldContent = match[1];\n\n // Check if the bold content contains a link\n const linkPattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/;\n const linkMatch = boldContent.match(linkPattern);\n\n if (linkMatch) {\n // If there's text before the link\n const beforeLink = boldContent.substring(0, linkMatch.index);\n if (beforeLink) {\n parts.push({ text: beforeLink, bold: true });\n }\n\n // Add the link part\n parts.push({ text: linkMatch[1], link: linkMatch[2], bold: true });\n\n // If there's text after the link\n if(linkMatch.index !== undefined) {\n const afterLink = boldContent.substring(linkMatch.index + linkMatch[0].length);\n if (afterLink) {\n parts.push({ text: afterLink, bold: true });\n }\n }\n } else {\n // If no link, just add the entire content as bold\n parts.push({ text: boldContent, bold: true });\n }\n } else if (match[2] !== undefined && match[3] !== undefined) {\n // This is a standalone link (second and third capture groups)\n parts.push({ text: match[2], link: match[3] });\n }\n\n lastIndex = pattern.lastIndex;\n }\n\n // Add any remaining text after the last match\n if (lastIndex < caption.length) {\n parts.push({ text: caption.substring(lastIndex) });\n }\n\n return parts;\n }\n\n public renderSkeleton(props: WmLabelProps) {\n\n let skeletonWidth, skeletonHeight;\n if (this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if (this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\n }\n\n if (this.props.multilineskeleton) {\n return (<View style={{\n width: skeletonWidth as DimensionValue\n }}>\n {this.getMultilineSkeleton('100%', skeletonHeight)}\n {this.getMultilineSkeleton('70%', skeletonHeight)}\n {this.getMultilineSkeleton('40%', skeletonHeight)}\n </View>)\n }\n else {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n }\n \n private shouldUseAndroidEllipsis(props: WmLabelProps): boolean {\n return Platform.OS === 'android' && props.enableandroidellipsis !== false;\n }\n\n // Helper to get the proper number of lines\n private getNumberOfLines(props: WmLabelProps): number | undefined {\n let numOfLines: number | undefined = undefined;\n if (props.wrap === false) {\n numOfLines = 1;\n } else if (typeof props.nooflines === 'number' && props.nooflines > 0) {\n numOfLines = props.nooflines;\n }\n return numOfLines;\n }\n\n private getEllipsizeMode(props: WmLabelProps): 'head' | 'middle' | 'tail' {\n return props.ellipsizemode ?? 'tail';\n }\n\n // Helpers to dedupe common logic\n private tokenizeWords(text?: string) {\n return (text ? text.split(/(\\s+)/) : [])\n .filter(t => t !== '')\n .map(t => ({ token: t, isSpace: /^\\s+$/.test(t) }));\n }\n\n private isTextAnimationExists(): boolean {\n return this.state.props.textanimation === 'fadeIn';\n }\n\n private getWordAnimConfig() {\n const step = Number(this.state.props.animationspeed) ?? 80;\n const fadeDuration = Math.max(120, step * 2);\n return { step, fadeDuration };\n }\n\n private renderWordswithAnimation(navigationService: NavigationService, isHidden: boolean) {\n const shouldAnimate = this.isTextAnimationExists();\n const { step, fadeDuration } = this.getWordAnimConfig();\n let runningIndex = 0;\n\n const containerStyle: any = {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'flex-start',\n opacity: isHidden ? 0 : 1,\n width: '100%'\n };\n\n const getBaseStyle = (part: { link?: string; bold?: boolean }) => ([\n this.styles.text,\n part.link ? this.styles.link.text : null,\n part.bold ? { fontWeight: 'bold' } : null,\n this.state.props.isValid ? null : { color: 'red' },\n ]);\n\n const onTokenPress = (part: { link?: string }) => {\n if (part.link) {\n if (part.link.startsWith('http:') || part.link.startsWith('https:') || part.link.startsWith('#')) {\n navigationService.openUrl(part.link, '_blank');\n } else if (part.link.startsWith('javascript:')) {\n const eventName = part.link.substring(11);\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n };\n\n const renderToken = (part: any, t: { token: string; isSpace: boolean }, key: string) => {\n if (t.isSpace) return <Text key={key} style={this.styles.text}>{t.token}</Text>;\n\n const baseStyle = getBaseStyle(part);\n if (!shouldAnimate) {\n return <Text key={key} style={baseStyle as any} onPress={() => onTokenPress(part)}>{t.token}</Text>;\n }\n\n const opacity = new Animated.Value(0);\n const delay = step * (runningIndex++);\n Animated.timing(opacity, { toValue: 1, duration: fadeDuration, delay, useNativeDriver: true }).start();\n\n return (\n <Animated.Text key={key} style={[baseStyle as any, { opacity }]} onPress={() => onTokenPress(part)}>\n {t.token}\n </Animated.Text>\n );\n };\n\n return (\n <View style={containerStyle} {...getAccessibilityProps(AccessibilityWidgetType.LABEL, this.state.props)} {...this.getTestPropsForLabel('caption')}>\n {this.state.parts?.flatMap((part, pIdx) => {\n const raw = this.tokenizeWords(toString(part.text));\n const merged: { token: string; isSpace: boolean }[] = [];\n const leadingSpace = !!raw[0]?.isSpace;\n let firstWordEmitted = false;\n for (let i = 0; i < raw.length; i++) {\n const tk = raw[i];\n if (tk.isSpace) { continue; }\n const nextIsSpace = !!raw[i + 1]?.isSpace;\n const prefix = (!firstWordEmitted && leadingSpace) ? ' ' : '';\n merged.push({ token: prefix + tk.token + (nextIsSpace ? ' ' : ''), isSpace: false });\n firstWordEmitted = true;\n if (nextIsSpace) { i++; }\n }\n return merged.map((t, i) => renderToken(part, t, `p${pIdx}_${i}`));\n })}\n {this.state.props.required && this.getAsterisk()}\n </View>\n );\n }\n\n private renderLabelTextContent(navigationService: NavigationService, isHidden: boolean = false, hasLinearGradient: boolean = false) {\n //gradient text support for web\n const gradientTextWebStyle = {\n backgroundImage: (this.styles?.text.color as string),\n color: 'transparent',\n backgroundClip: 'text',\n }\n const showWebTextGradient = (hasLinearGradient && Platform.OS === 'web');\n const numOfLines = this.getNumberOfLines(this.state.props);\n const ellipsizeMode = this.getEllipsizeMode(this.state.props);\n const useAndroidEllipsis = this.shouldUseAndroidEllipsis(this.state.props);\n\n // Shared styles\n const baseStyle = this.styles.text;\n const hiddenStyle = isHidden ? { opacity: 0 } : {};\n const gradientStyle = showWebTextGradient ? gradientTextWebStyle : {};\n\n // Determine if it's a single part\n const isSinglePart = this.state.parts.length <= 1;\n // if numOfLines is exists then the animation won't work.\n if (numOfLines === undefined && this.isTextAnimationExists()) {\n return this.renderWordswithAnimation(navigationService, isHidden);\n }\n\n if (useAndroidEllipsis) {\n const androidEllipsisTextStyle: any = {\n ...baseStyle,\n ...hiddenStyle,\n ...gradientStyle,\n userSelect: 'none',\n width: '100%',\n textAlign: baseStyle.textAlign,\n };\n // Keep single-string content in Android ellipsis branch to ensure reliable truncation\n const content = this.state.parts.length === 1\n ? toString(this.state.props.caption)\n : this.state.parts.map(part => toString(part.text)).join('');\n return (\n <Text\n style={androidEllipsisTextStyle}\n numberOfLines={numOfLines}\n ellipsizeMode=\"tail\"\n {...(this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {})}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, this.state.props)}\n >\n {content}\n {this.state.props.required && this.getAsterisk()}\n </Text>\n );\n }\n\n\n // Compose final style\n const combinedTextStyle: any = isSinglePart\n ? { ...baseStyle, ...hiddenStyle, ...gradientStyle }\n : {\n flexWrap: 'wrap',\n textAlign: baseStyle.textAlign,\n ...hiddenStyle,\n ...gradientStyle,\n };\n\n\n // **NOTE: using \"userSelect\" style property breaks the layout engine's native ellipse calculation in Android\n if(Platform.OS === 'android' && this.props.nooflines === 1) {\n delete combinedTextStyle?.['userSelect'];\n }\n\n return (\n <Text style={combinedTextStyle}\n {...this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, this.state.props)}\n numberOfLines={numOfLines} \n ellipsizeMode={ellipsizeMode}\n >\n {(this.state.parts?.length === 1 && !this.state.parts[0].link && !this.state.parts[0].bold) ? toString(this.state.props.caption) : this.state.parts?.map((part, index) => {\n const isLink = !isNil(part.link);\n return (\n <Text\n key={`part_${index}`}\n style={[\n this.styles.text,\n isLink ? this.styles.link.text : null,\n part.bold ? { fontWeight: 'bold'} : null,\n this.state.props.isValid ? null : { color: 'red' }\n ]}\n {...this.getTestPropsForLabel(isLink ? `link_${index}` : `caption_${index}`)}\n selectable={this.styles.text.userSelect === 'text'}\n onPress={() => {\n if (part.link) {\n if (part.link.startsWith('http:')\n || part.link.startsWith('https:')\n || part.link.startsWith('#')) {\n navigationService.openUrl(part.link, '_blank');\n } else if (part.link.startsWith('javascript:')) {\n const eventName = part.link.substring(11);\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n }}\n // {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n >\n {toString(part.text)}\n </Text>\n );\n })}\n {this.state.props.required && this.getAsterisk()}\n </Text>\n )\n\n }\n renderWidget(props: WmLabelProps) {\n const linkStyles = this.theme.mergeStyle({ text: this.styles.text }, this.styles.link);\n const { hasLinearGradient, start, end, gradientColors,colorStops } = parseLinearGradient((this.styles?.text.color) as string);\n\n return !isNil(props.caption) ? (\n <Animatedview\n entryanimation={props.animation}\n delay={props.animationdelay}\n style={this.styles.root}\n onLayout={(event: LayoutChangeEvent) => this.handleLayout(event)}\n >\n {this._background}\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) => {\n return (<Tappable target={this} disableTouchEffect={this.state.props.disabletoucheffect} >\n {hasLinearGradient ? <MaskedView\n maskElement={this.renderLabelTextContent(navigationService, false, hasLinearGradient)}\n >\n <LinearGradient colors={gradientColors as any} start={start} end={end} locations={colorStops.length > 0 ? colorStops as any : undefined}>\n {this.renderLabelTextContent(navigationService, true)}\n </LinearGradient>\n </MaskedView> : this.renderLabelTextContent(navigationService)}\n </Tappable>)\n }}\n </NavigationServiceConsumer>\n </Animatedview>\n ) : null;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4CC,IAAI,EAAEC,IAAI,EAACC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAC/F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,kDAAkD;AACpG,SAASC,QAAQ,QAAQ,sDAAsD;AAC/E,SAA4BC,yBAAyB,QAAQ,sDAAsD;AACnH,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAEhH,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,KAAK,EAAEC,QAAQ,QAAQ,WAAW;AAC3C,SAASC,YAAY,QAAQ,sEAAsE;AACnG,SAAqBC,cAAc,QAAQ,gCAAgC;AAC3E,SAASC,cAAc,QAAQ,sBAAsB;AACrD,OAAOC,UAAU,MAAM,uCAAuC;AAC9D,SAASC,mBAAmB,QAAQ,yCAAyC;AAS7E,OAAO,MAAMC,YAAY,SAASd,kBAAkB,CAAe;EAAAe,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,gBAC7C,EAAE;EAAA;AACxB;AAEA,eAAe,MAAMC,OAAO,SAASnB,aAAa,CAA4C;EAE5FgB,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEb,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAIS,YAAY,CAAC,CAAC,CAAC;IACnE,IAAI,CAACM,WAAW,CAAC;MACfC,KAAK,EAAE,IAAI,CAACC,YAAY,CAACH,KAAK,CAACI,OAAO,IAAI,EAAE;IAC9C,CAAiB,CAAC;EACpB;EAEQC,WAAWA,CAAA,EAAG;IACpB,oBAAO9B,KAAA,CAAA+B,aAAA,CAAC9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AAU;QAC9BkL,WAAW,EAAE,IAAI,CAACxC,sBAAsB,CAAChD,iBAAiB,EAAE,KAAK,EAAEiD,iBAAiB;MAAE,gBAEtF7J,KAAA,CAAA+B,aAAA,CAACd,cAAc;QAACoL,MAAM,EAAEb,cAAsB;QAAC7C,KAAK,EAAEA,KAAM;QAAC4C,GAAG,EAAEA,GAAI;QAAEe,SAAS,EAAEb,UAAU,CAACtH,MAAM,GAAG,CAAC,GAAGsH,UAAU,GAAU9H;MAAU,GACtI,IAAI,CAACiG,sBAAsB,CAAChD,iBAAiB,EAAE,IAAI,CACtC,CACN,CAAC,GAAG,IAAI,CAACgD,sBAAsB,CAAChD,iBAAiB,CACrD,CAAC;IACb,CACyB,CACf,CAAC,GACb,IAAI;EACV;AACF","ignoreList":[]}
|
|
@@ -12,6 +12,7 @@ export default class WmLabelProps extends BaseProps {
|
|
|
12
12
|
_defineProperty(this, "isValid", true);
|
|
13
13
|
_defineProperty(this, "wrap", true);
|
|
14
14
|
_defineProperty(this, "nooflines", undefined);
|
|
15
|
+
_defineProperty(this, "ellipsizemode", 'tail');
|
|
15
16
|
_defineProperty(this, "skeletonheight", null);
|
|
16
17
|
_defineProperty(this, "skeletonwidth", null);
|
|
17
18
|
_defineProperty(this, "multilineskeleton", false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmLabelProps","constructor","args","_defineProperty","undefined"],"sources":["label.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker-ai/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\nexport default class WmLabelProps extends BaseProps {\n animation?: string = null as any;\n animationdelay?: number = null as any;\n caption?: string = 'Label';\n required?: boolean = null as any;\n isValid?: boolean = true;\n wrap?: boolean = true;\n nooflines?: any = undefined;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n multilineskeleton?: boolean = false;\n accessible?: boolean = true;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'text';\n onTap?: Function = null as any;\n enableandroidellipsis?: boolean = false;\n textanimation?: string = undefined as any;\n animationspeed?: number = 0;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,kDAAkD;AAE5E,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC3B,IAAI;IAAAA,eAAA,yBACC,IAAI;IAAAA,eAAA,kBACX,OAAO;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,eACP,IAAI;IAAAA,eAAA,oBACHC,SAAS;IAAAD,eAAA,
|
|
1
|
+
{"version":3,"names":["BaseProps","WmLabelProps","constructor","args","_defineProperty","undefined"],"sources":["label.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker-ai/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\nexport default class WmLabelProps extends BaseProps {\n animation?: string = null as any;\n animationdelay?: number = null as any;\n caption?: string = 'Label';\n required?: boolean = null as any;\n isValid?: boolean = true;\n wrap?: boolean = true;\n nooflines?: any = undefined;\n ellipsizemode?: 'head' | 'middle' | 'tail' = 'tail';\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n multilineskeleton?: boolean = false;\n accessible?: boolean = true;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'text';\n onTap?: Function = null as any;\n enableandroidellipsis?: boolean = false;\n textanimation?: string = undefined as any;\n animationspeed?: number = 0;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,kDAAkD;AAE5E,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC3B,IAAI;IAAAA,eAAA,yBACC,IAAI;IAAAA,eAAA,kBACX,OAAO;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,eACP,IAAI;IAAAA,eAAA,oBACHC,SAAS;IAAAD,eAAA,wBACkB,MAAM;IAAAA,eAAA,yBACzB,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,4BACC,KAAK;IAAAA,eAAA,qBACZ,IAAI;IAAAA,eAAA,6BACGC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,MAAM;IAAAA,eAAA,gBAC3B,IAAI;IAAAA,eAAA,gCACW,KAAK;IAAAA,eAAA,wBACdC,SAAS;IAAAD,eAAA,yBACR,CAAC;EAAA;AAC/B","ignoreList":[]}
|
|
@@ -94,7 +94,7 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
94
94
|
style: wrapperStyle,
|
|
95
95
|
onLayout: this.onViewLayoutChange.bind(this),
|
|
96
96
|
key: `${props.title}_area_chart`
|
|
97
|
-
}), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
97
|
+
}), this.showSpinner(), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
98
98
|
testID: "title-icon-container",
|
|
99
99
|
style: {
|
|
100
100
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","AreaChart","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","parseDimension","WmAreaChartState","constructor","args","_defineProperty","getAreaType","interpolation","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","handleLayout","updateState","chartWidth","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","type","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","colors","color","lineWidth","linethickness","symbol","getSeriesSymbol","highlightpoints","ticksymbol","height","rootHeight","wrapperStyle","styles","root","createElement","_extends","LINECHART","style","onLayout","onViewLayoutChange","bind","key","title","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","viewRef","screenWidth","theme","getChartTheme","step","stepposition","stackNormalize","stacknormalize","symbolSize","symbolsize","areaFill","areafill","areaOpacity","areaopacity","minY","minX","maxX","chartMaxX","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","getXAxisTickLabelFormatter","undefined","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect","intervalX","intervalx","intervalY","intervaly"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { AreaChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\nimport WmAreaChartProps from './area-chart.props';\nimport { DEFAULT_CLASS, WmAreaChartStyles } from './area-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmIcon from \"@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component\";\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport { parseDimension } from '@wavemaker-ai/app-rn-runtime/core/utils';\nimport isEmpty from 'lodash-es/isEmpty';\n\nexport class WmAreaChartState extends BaseChartComponentState<WmAreaChartProps> {\n chartWidth = 0;\n}\n\n/** Maps Victory interpolation strings to ECharts AreaChart curve types. */\nconst getAreaType = (interpolation: string): 'default' | 'smooth' | 'step' => {\n if (interpolation === 'cardinal') return 'smooth';\n if (interpolation === 'step') return 'step';\n return 'default'; // 'linear' and anything else\n};\n\n\n// Migrated from victory-native <VictoryChart> + <VictoryArea> → <AreaChart>\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\n this.handleLayout(e);\n\n this.updateState({\n chartWidth: viewWidth\n } as WmAreaChartState);\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmAreaChartState);\n this.invokeEventCallback('onSelect', [null, 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 const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number }) => pt.y),\n }));\n\n const type = getAreaType(props.interpolation);\n // step sub-mode: only relevant when curve type resolves to 'step'\n // const step: 'start' | 'middle' | 'end' | false =\n // type === 'step'\n // ? props.step === false\n // ? false\n // : (props.step ?? 'start')\n // : false;\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n lineWidth: parseDimension(props.linethickness),\n }));\n const symbol = this.getSeriesSymbol(props.highlightpoints, props.ticksymbol);\n\n const { height: rootHeight, ...wrapperStyle } = this.styles.root as any;\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={wrapperStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n key={`${props.title}_area_chart`}\n >\n <View>\n { (props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon}></WmIcon>) : null }\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null }\n </View>\n ) : null }\n { props.subheading? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text> ) : null }\n </View>\n {this.state.chartWidth ?\n (\n <View ref={this.viewRef}>\n <AreaChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n type={type}\n step={props.stepposition}\n stackNormalize={props.stacknormalize}\n symbol={symbol}\n symbolSize={props.symbolsize}\n areaFill={props.areafill}\n areaOpacity={props.areaopacity}\n minY={minDomain.y}\n // maxY={this.state.chartMaxY}\n minX={minDomain.x}\n maxX={this.state.chartMaxX}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis !== false}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis !== false}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={props.showxaxis !== false ? this.getXAxisTickLabelFormatter() : undefined}\n yAxisTickLabelFormatter={props.showyaxis !== false ? this.getYAxisTickLabelFormatter() : undefined}\n showLegend={showLegend}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={this.props.showhighlighter}\n onSelect={this.onSelect}\n intervalX={props.intervalx}\n intervalY={props.intervaly}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,SAAS,QAAmC,iCAAiC;AACtF,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,MAAM,MAAM,mEAAmE;AACtF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SAASC,cAAc,QAAQ,yCAAyC;AAGxE,OAAO,MAAMC,gBAAgB,SAASL,uBAAuB,CAAmB;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBACjE,CAAC;EAAA;AAChB;;AAEA;AACA,MAAMC,WAAW,GAAIC,aAAqB,IAAoC;EAC5E,IAAIA,aAAa,KAAK,UAAU,EAAE,OAAO,QAAQ;EACjD,IAAIA,aAAa,KAAK,MAAM,EAAE,OAAO,MAAM;EAC3C,OAAO,SAAS,CAAC,CAAC;AACpB,CAAC;;AAGD;AACA,eAAe,MAAMC,WAAW,SAASZ,kBAAkB,CAAwD;EAEjHO,WAAWA,CAACM,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEd,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIQ,gBAAgB,CAAC,CAAC,CAAC;IAACG,eAAA,6BAGxDK,CAAoB,IAAK;MAC7C,IAAIC,SAAS,GAAGD,CAAC,CAACE,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aAAc;MAC1CC,UAAU,EAAE,IAAI,CAACvG,KAAK,CAACwG,MAAM,IAAI,EAAG;MACpCC,UAAU,EAAE,IAAI,CAACzG,KAAK,CAAC0G,MAAM,IAAI,EAAG;MACpCC,uBAAuB,EAAErH,KAAK,CAACsG,SAAS,KAAK,KAAK,GAAG,IAAI,CAACgB,0BAA0B,CAAC,CAAC,GAAGC,SAAU;MACnGC,uBAAuB,EAAExH,KAAK,CAAC0G,SAAS,KAAK,KAAK,GAAG,IAAI,CAACe,0BAA0B,CAAC,CAAC,GAAGF,SAAU;MACnGnF,UAAU,EAAEA,UAAW;MACvBE,cAAc,EAAEA,cAAe;MAC/BoF,OAAO,EAAE1H,KAAK,CAAC2H,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAAlG,cAAA,GAAI1B,KAAK,CAAC0H,OAAO,cAAAhG,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChGmG,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAE,IAAI,CAAC/H,KAAK,CAACgI,eAAgB;MAC5CC,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBC,SAAS,EAAElI,KAAK,CAACmI,SAAU;MAC3BC,SAAS,EAAEpI,KAAK,CAACqI;IAAU,CAC5B,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","View","Text","AreaChart","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","parseDimension","WmAreaChartState","constructor","args","_defineProperty","getAreaType","interpolation","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","handleLayout","updateState","chartWidth","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","type","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","colors","color","lineWidth","linethickness","symbol","getSeriesSymbol","highlightpoints","ticksymbol","height","rootHeight","wrapperStyle","styles","root","createElement","_extends","LINECHART","style","onLayout","onViewLayoutChange","bind","key","title","showSpinner","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","viewRef","screenWidth","theme","getChartTheme","step","stepposition","stackNormalize","stacknormalize","symbolSize","symbolsize","areaFill","areafill","areaOpacity","areaopacity","minY","minX","maxX","chartMaxX","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","getXAxisTickLabelFormatter","undefined","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect","intervalX","intervalx","intervalY","intervaly"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { AreaChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\nimport WmAreaChartProps from './area-chart.props';\nimport { DEFAULT_CLASS, WmAreaChartStyles } from './area-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmIcon from \"@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component\";\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport { parseDimension } from '@wavemaker-ai/app-rn-runtime/core/utils';\nimport isEmpty from 'lodash-es/isEmpty';\n\nexport class WmAreaChartState extends BaseChartComponentState<WmAreaChartProps> {\n chartWidth = 0;\n}\n\n/** Maps Victory interpolation strings to ECharts AreaChart curve types. */\nconst getAreaType = (interpolation: string): 'default' | 'smooth' | 'step' => {\n if (interpolation === 'cardinal') return 'smooth';\n if (interpolation === 'step') return 'step';\n return 'default'; // 'linear' and anything else\n};\n\n\n// Migrated from victory-native <VictoryChart> + <VictoryArea> → <AreaChart>\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\n this.handleLayout(e);\n\n this.updateState({\n chartWidth: viewWidth\n } as WmAreaChartState);\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmAreaChartState);\n this.invokeEventCallback('onSelect', [null, 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 const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number }) => pt.y),\n }));\n\n const type = getAreaType(props.interpolation);\n // step sub-mode: only relevant when curve type resolves to 'step'\n // const step: 'start' | 'middle' | 'end' | false =\n // type === 'step'\n // ? props.step === false\n // ? false\n // : (props.step ?? 'start')\n // : false;\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n lineWidth: parseDimension(props.linethickness),\n }));\n const symbol = this.getSeriesSymbol(props.highlightpoints, props.ticksymbol);\n\n const { height: rootHeight, ...wrapperStyle } = this.styles.root as any;\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={wrapperStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n key={`${props.title}_area_chart`}\n >\n {this.showSpinner()}\n <View>\n { (props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon}></WmIcon>) : null }\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null }\n </View>\n ) : null }\n { props.subheading? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text> ) : null }\n </View>\n {this.state.chartWidth ?\n (\n <View ref={this.viewRef}>\n <AreaChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n type={type}\n step={props.stepposition}\n stackNormalize={props.stacknormalize}\n symbol={symbol}\n symbolSize={props.symbolsize}\n areaFill={props.areafill}\n areaOpacity={props.areaopacity}\n minY={minDomain.y}\n // maxY={this.state.chartMaxY}\n minX={minDomain.x}\n maxX={this.state.chartMaxX}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis !== false}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis !== false}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={props.showxaxis !== false ? this.getXAxisTickLabelFormatter() : undefined}\n yAxisTickLabelFormatter={props.showyaxis !== false ? this.getYAxisTickLabelFormatter() : undefined}\n showLegend={showLegend}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={this.props.showhighlighter}\n onSelect={this.onSelect}\n intervalX={props.intervalx}\n intervalY={props.intervaly}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,SAAS,QAAmC,iCAAiC;AACtF,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,MAAM,MAAM,mEAAmE;AACtF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SAASC,cAAc,QAAQ,yCAAyC;AAGxE,OAAO,MAAMC,gBAAgB,SAASL,uBAAuB,CAAmB;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBACjE,CAAC;EAAA;AAChB;;AAEA;AACA,MAAMC,WAAW,GAAIC,aAAqB,IAAoC;EAC5E,IAAIA,aAAa,KAAK,UAAU,EAAE,OAAO,QAAQ;EACjD,IAAIA,aAAa,KAAK,MAAM,EAAE,OAAO,MAAM;EAC3C,OAAO,SAAS,CAAC,CAAC;AACpB,CAAC;;AAGD;AACA,eAAe,MAAMC,WAAW,SAASZ,kBAAkB,CAAwD;EAEjHO,WAAWA,CAACM,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEd,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIQ,gBAAgB,CAAC,CAAC,CAAC;IAACG,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AAe;MACrCC,mBAAmB,EAAE,CAAC9G,KAAK,CAAC+G,aAAc;MAC1CC,mBAAmB,EAAE,CAAChH,KAAK,CAACiH,aAAc;MAC1CC,UAAU,EAAE,IAAI,CAACxG,KAAK,CAACyG,MAAM,IAAI,EAAG;MACpCC,UAAU,EAAE,IAAI,CAAC1G,KAAK,CAAC2G,MAAM,IAAI,EAAG;MACpCC,uBAAuB,EAAEtH,KAAK,CAACuG,SAAS,KAAK,KAAK,GAAG,IAAI,CAACgB,0BAA0B,CAAC,CAAC,GAAGC,SAAU;MACnGC,uBAAuB,EAAEzH,KAAK,CAAC2G,SAAS,KAAK,KAAK,GAAG,IAAI,CAACe,0BAA0B,CAAC,CAAC,GAAGF,SAAU;MACnGpF,UAAU,EAAEA,UAAW;MACvBE,cAAc,EAAEA,cAAe;MAC/BqF,OAAO,EAAE3H,KAAK,CAAC4H,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAAnG,cAAA,GAAI1B,KAAK,CAAC2H,OAAO,cAAAjG,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChGoG,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAE,IAAI,CAAChI,KAAK,CAACiI,eAAgB;MAC5CC,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBC,SAAS,EAAEnI,KAAK,CAACoI,SAAU;MAC3BC,SAAS,EAAErI,KAAK,CAACsI;IAAU,CAC5B,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
@@ -72,7 +72,7 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
72
72
|
return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
|
|
73
73
|
style: wrapperStyle,
|
|
74
74
|
onLayout: this.onViewLayoutChange.bind(this)
|
|
75
|
-
}), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
75
|
+
}), this.showSpinner(), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
76
76
|
testID: "title-icon-container",
|
|
77
77
|
style: {
|
|
78
78
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","ColumnChart","AccessibilityWidgetType","getAccessibilityProps","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","WmIcon","WmBarChartState","WmBarChart","constructor","props","_defineProperty","event","viewRef","current","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","updateState","index","invokeEventCallback","proxy","labelFn","data","abbreviateNumber","datum","renderWidget","_this$state$data","_this$state$colors","_props$tooltip","length","chartData","map","i","name","yAxis","pt","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","isHorizontal","horizontal","colors","color","showXAxis","showyaxis","showxaxis","showYAxis","xAxisTickLabelFormatter","undefined","getYAxisTickLabelFormatter","getXAxisTickLabelFormatter","yAxisTickLabelFormatter","height","rootHeight","wrapperStyle","styles","root","createElement","_extends","LINECHART","style","onLayout","onViewLayoutChange","bind","title","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","chartWidth","ref","width","screenWidth","theme","getChartTheme","stack","viewtype","stackNormalize","stacknormalize","cornerRadius","bar","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","barOutsideLabelFormatter","showvalues","value","String","minY","maxY","chartMaxY","minX","maxX","chartMaxX","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxisTicks","showyaxisticks","showxaxisticks","showYAxisTicks","showXAxisSplitLines","hidegridyaxis","hidegridxaxis","showYAxisSplitLines","xAxisLabel","yLabel","xLabel","yAxisLabel","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect","intervalX","intervaly","intervalx","intervalY"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { ColumnChart, CartesianChartSelectEvent, AreaChartAxisTooltipParams } from '@wavemaker/react-native-echarts';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport WmIcon from \"@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component\";\nimport isEmpty from 'lodash-es/isEmpty';\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\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.viewRef.current) return;\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmBarChartState);\n this.invokeEventCallback('onSelect', [null, 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\n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number }) => pt.y),\n }));\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n\n // ColumnChart swaps category/value axes when horizontal=true. WaveMaker x-axis props\n // refer to categories (xaxisdatakey) and y-axis props refer to values (yaxisdatakey).\n const isHorizontal = !!props.horizontal;\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n }));\n const showXAxis = isHorizontal ? props.showyaxis : props.showxaxis;\n const showYAxis = isHorizontal ? props.showxaxis : props.showyaxis;\n const xAxisTickLabelFormatter = showXAxis === false\n ? undefined\n : (isHorizontal ? this.getYAxisTickLabelFormatter() : this.getXAxisTickLabelFormatter());\n const yAxisTickLabelFormatter = showYAxis === false\n ? undefined\n : (isHorizontal ? this.getXAxisTickLabelFormatter() : this.getYAxisTickLabelFormatter());\n\n const { height: rootHeight, ...wrapperStyle } = this.styles.root as any;\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={wrapperStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n {(props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <ColumnChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(isHorizontal, series)}\n horizontal={props.horizontal}\n stack={props.viewtype === 'Stacked' ? 'total' : false}\n stackNormalize={props.stacknormalize}\n cornerRadius={[\n this.styles.bar.borderTopLeftRadius,\n this.styles.bar.borderTopRightRadius,\n this.styles.bar.borderBottomRightRadius,\n this.styles.bar.borderBottomLeftRadius,\n ]}\n barOutsideLabelFormatter={props.showvalues\n ? (value: number) => String(this.abbreviateNumber(value))\n : undefined}\n minY={minDomain.y}\n maxY={this.state.chartMaxY}\n minX={minDomain.x}\n maxX={this.state.chartMaxX}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={showXAxis}\n showXAxisTicks={isHorizontal ? props.showyaxisticks : props.showxaxisticks}\n showYAxis={showYAxis}\n showYAxisTicks={isHorizontal ? props.showxaxisticks : props.showyaxisticks}\n showXAxisSplitLines={isHorizontal ? !props.hidegridyaxis : !props.hidegridxaxis}\n showYAxisSplitLines={isHorizontal ? !props.hidegridxaxis : !props.hidegridyaxis}\n xAxisLabel={isHorizontal ? (this.state.yLabel || '') : (this.state.xLabel || '')}\n yAxisLabel={isHorizontal ? (this.state.xLabel || '') : (this.state.yLabel || '')}\n xAxisTickLabelFormatter={xAxisTickLabelFormatter}\n yAxisTickLabelFormatter={yAxisTickLabelFormatter}\n showLegend={showLegend}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n intervalX={isHorizontal ? props.intervaly : props.intervalx}\n intervalY={isHorizontal ? props.intervalx : props.intervaly}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,WAAW,QAA+D,iCAAiC;AACpH,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,eAAe,MAAM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AK,IAAI,CAACnH,KAAK,CAACkH,MAAM,IAAI,EAAI;MACjFvE,uBAAuB,EAAEA,uBAAwB;MACjDI,uBAAuB,EAAEA,uBAAwB;MACjDlB,UAAU,EAAEA,UAAW;MACvBE,cAAc,EAAEA,cAAe;MAC/BsF,OAAO,EAAE1H,KAAK,CAAC2H,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAAlG,cAAA,GAAI1B,KAAK,CAAC0H,OAAO,cAAAhG,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChGmG,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAE/H,KAAK,CAACgI,eAAgB;MACvCC,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBC,SAAS,EAAE1F,YAAY,GAAGxC,KAAK,CAACmI,SAAS,GAAGnI,KAAK,CAACoI,SAAU;MAC5DC,SAAS,EAAE7F,YAAY,GAAGxC,KAAK,CAACoI,SAAS,GAAGpI,KAAK,CAACmI;IAAU,CAC7D,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","View","Text","ColumnChart","AccessibilityWidgetType","getAccessibilityProps","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","WmIcon","WmBarChartState","WmBarChart","constructor","props","_defineProperty","event","viewRef","current","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","updateState","index","invokeEventCallback","proxy","labelFn","data","abbreviateNumber","datum","renderWidget","_this$state$data","_this$state$colors","_props$tooltip","length","chartData","map","i","name","yAxis","pt","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","isHorizontal","horizontal","colors","color","showXAxis","showyaxis","showxaxis","showYAxis","xAxisTickLabelFormatter","undefined","getYAxisTickLabelFormatter","getXAxisTickLabelFormatter","yAxisTickLabelFormatter","height","rootHeight","wrapperStyle","styles","root","createElement","_extends","LINECHART","style","onLayout","onViewLayoutChange","bind","showSpinner","title","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","chartWidth","ref","width","screenWidth","theme","getChartTheme","stack","viewtype","stackNormalize","stacknormalize","cornerRadius","bar","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","barOutsideLabelFormatter","showvalues","value","String","minY","maxY","chartMaxY","minX","maxX","chartMaxX","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxisTicks","showyaxisticks","showxaxisticks","showYAxisTicks","showXAxisSplitLines","hidegridyaxis","hidegridxaxis","showYAxisSplitLines","xAxisLabel","yLabel","xLabel","yAxisLabel","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect","intervalX","intervaly","intervalx","intervalY"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { ColumnChart, CartesianChartSelectEvent, AreaChartAxisTooltipParams } from '@wavemaker/react-native-echarts';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport WmIcon from \"@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component\";\nimport isEmpty from 'lodash-es/isEmpty';\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\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.viewRef.current) return;\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmBarChartState);\n this.invokeEventCallback('onSelect', [null, 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\n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number }) => pt.y),\n }));\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n\n // ColumnChart swaps category/value axes when horizontal=true. WaveMaker x-axis props\n // refer to categories (xaxisdatakey) and y-axis props refer to values (yaxisdatakey).\n const isHorizontal = !!props.horizontal;\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n }));\n const showXAxis = isHorizontal ? props.showyaxis : props.showxaxis;\n const showYAxis = isHorizontal ? props.showxaxis : props.showyaxis;\n const xAxisTickLabelFormatter = showXAxis === false\n ? undefined\n : (isHorizontal ? this.getYAxisTickLabelFormatter() : this.getXAxisTickLabelFormatter());\n const yAxisTickLabelFormatter = showYAxis === false\n ? undefined\n : (isHorizontal ? this.getXAxisTickLabelFormatter() : this.getYAxisTickLabelFormatter());\n\n const { height: rootHeight, ...wrapperStyle } = this.styles.root as any;\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={wrapperStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n {this.showSpinner()}\n <View>\n {(props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <ColumnChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(isHorizontal, series)}\n horizontal={props.horizontal}\n stack={props.viewtype === 'Stacked' ? 'total' : false}\n stackNormalize={props.stacknormalize}\n cornerRadius={[\n this.styles.bar.borderTopLeftRadius,\n this.styles.bar.borderTopRightRadius,\n this.styles.bar.borderBottomRightRadius,\n this.styles.bar.borderBottomLeftRadius,\n ]}\n barOutsideLabelFormatter={props.showvalues\n ? (value: number) => String(this.abbreviateNumber(value))\n : undefined}\n minY={minDomain.y}\n maxY={this.state.chartMaxY}\n minX={minDomain.x}\n maxX={this.state.chartMaxX}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={showXAxis}\n showXAxisTicks={isHorizontal ? props.showyaxisticks : props.showxaxisticks}\n showYAxis={showYAxis}\n showYAxisTicks={isHorizontal ? props.showxaxisticks : props.showyaxisticks}\n showXAxisSplitLines={isHorizontal ? !props.hidegridyaxis : !props.hidegridxaxis}\n showYAxisSplitLines={isHorizontal ? !props.hidegridxaxis : !props.hidegridyaxis}\n xAxisLabel={isHorizontal ? (this.state.yLabel || '') : (this.state.xLabel || '')}\n yAxisLabel={isHorizontal ? (this.state.xLabel || '') : (this.state.yLabel || '')}\n xAxisTickLabelFormatter={xAxisTickLabelFormatter}\n yAxisTickLabelFormatter={yAxisTickLabelFormatter}\n showLegend={showLegend}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n intervalX={isHorizontal ? props.intervaly : props.intervalx}\n intervalY={isHorizontal ? props.intervalx : props.intervaly}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,WAAW,QAA+D,iCAAiC;AACpH,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AACpE,OAAOC,MAAM,MAAM,mEAAmE;AAGtF,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;IAACI,eAAA,mBAQhEC,KAAgC,IAAW;MACvD,IAAI,CAAC,IAAI,CAACC,OAAO,CAACC,OAAO,EAAE;MAC3B,IAAI,CAAC,IAAI,CAACC,KAAK,CAACL,KAAK,CAACM,OAAO,EAAE;MAC/B,MAAM;QAAEC,SAAS;QAAEC,CAAC;QAAEC;MAAY,CAAC,GAAGP,KAAK;MAC3C,MAAMQ,YAAY,GAAG,IAAI,CAACV,KAAK,CAACM,OAAO,CAACC,SAAS,CAAC;MAClD,MAAMI,iBAAiB,GAAG,CACxB;QAAEC,MAAM,EAAEH,WAAW;QAAEI,CAAC,EAAEN,SAAS;QAAEC,C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X;AACF","ignoreList":[]}
|
|
@@ -78,7 +78,7 @@ export default class WmBubbleChart extends BaseChartComponent {
|
|
|
78
78
|
return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
|
|
79
79
|
style: wrapperStyle,
|
|
80
80
|
onLayout: this.onViewLayoutChange.bind(this)
|
|
81
|
-
}), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
81
|
+
}), this.showSpinner(), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
82
82
|
testID: "title-icon-container",
|
|
83
83
|
style: {
|
|
84
84
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","BubbleChart","AccessibilityWidgetType","getAccessibilityProps","BaseChartComponent","BaseChartComponentState","WmBubbleChartProps","DEFAULT_CLASS","WmIcon","SHAPE_TO_SYMBOL","WmBubbleChartState","WmBubbleChart","constructor","props","_defineProperty","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","updateState","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$intervalx","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","_pt$size","size","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","xaxisticks","getXAxisTickLabelFormatter","colors","color","height","rootHeight","wrapperStyle","styles","root","symbol","shape","createElement","_extends","LINECHART","style","onLayout","onViewLayoutChange","bind","title","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","chartWidth","ref","viewRef","width","screenWidth","theme","getChartTheme","sizeRange","sizerange","minY","minX","intervalX","intervalx","intervalY","intervaly","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","undefined","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect"],"sources":["bubble-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BubbleChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmBubbleChartProps from './bubble-chart.props';\nimport { DEFAULT_CLASS, WmBubbleChartStyles } from './bubble-chart.styles';\nimport WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';\nimport isEmpty from 'lodash-es/isEmpty';\n\n\nconst SHAPE_TO_SYMBOL: {[key: string]: string} = {\n 'circle': 'circle',\n 'rect': 'rect',\n 'square': 'rect',\n 'roundRect': 'roundRect',\n 'triangle': 'triangle',\n 'triangle-up': 'triangle',\n 'triangle-down': 'path://M0,500L500,-500L-500,-500Z',\n 'diamond': 'diamond',\n 'pin': 'pin',\n 'arrow': 'arrow',\n 'cross': 'path://M-70,-500L70,-500L70,-220L350,-220L350,-80L70,-80L70,500L-70,500L-70,-80L-350,-80L-350,-220L-70,-220Z M500,0L500,0Z M-500,0L-500,0Z',\n};\n\nexport class WmBubbleChartState extends BaseChartComponentState<WmBubbleChartProps> {}\n\nexport default class WmBubbleChart extends BaseChartComponent<WmBubbleChartProps, WmBubbleChartState, WmBubbleChartStyles> {\n\n constructor(props: WmBubbleChartProps) {\n super(props, DEFAULT_CLASS, new WmBubbleChartProps(), new WmBubbleChartState());\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmBubbleChartState);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n}\n renderWidget(props: WmBubbleChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n \n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number; size?: number }) =>\n [pt.x, pt.y, pt.size ?? 5] as [number, number, number]\n ),\n }));\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const xaxisticks = this.getXAxisTickLabelFormatter();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n }));\n const { height: rootHeight, ...wrapperStyle } = this.styles.root as any;\n const symbol = SHAPE_TO_SYMBOL[props.shape] || 'circle';\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={wrapperStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n {(props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <BubbleChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n sizeRange={props.sizerange}\n minY={minDomain.y}\n minX={minDomain.x}\n intervalX={props.intervalx ?? 1} \n intervalY={props.intervaly}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={props.showxaxis !== false ? this.getXAxisTickLabelFormatter() : undefined}\n yAxisTickLabelFormatter={props.showyaxis !== false ? this.getYAxisTickLabelFormatter() : undefined}\n showLegend={showLegend}\n symbol={symbol}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,WAAW,QAAmC,iCAAiC;AACxF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAC1E,OAAOC,MAAM,MAAM,mEAAmE;AAItF,MAAMC,eAAwC,GAAG;EAC/C,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,MAAM;EACd,QAAQ,EAAE,MAAM;EAChB,WAAW,EAAE,WA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ACrCC,mBAAmB,EAAE,CAAClG,KAAK,CAACmG,aAAc;MAC1CC,mBAAmB,EAAE,CAACpG,KAAK,CAACqG,aAAc;MAC1CC,UAAU,EAAE,IAAI,CAACnG,KAAK,CAACoG,MAAM,IAAI,EAAG;MACpCC,UAAU,EAAE,IAAI,CAACrG,KAAK,CAACsG,MAAM,IAAI,EAAG;MACpCC,uBAAuB,EAAE1G,KAAK,CAAC2F,SAAS,KAAK,KAAK,GAAG,IAAI,CAACpD,0BAA0B,CAAC,CAAC,GAAGoE,SAAU;MACnGC,uBAAuB,EAAE5G,KAAK,CAAC+F,SAAS,KAAK,KAAK,GAAG,IAAI,CAACc,0BAA0B,CAAC,CAAC,GAAGF,SAAU;MACnG3E,UAAU,EAAEA,UAAW;MACvBe,MAAM,EAAEA,MAAO;MACfb,cAAc,EAAEA,cAAe;MAC/B4E,OAAO,EAAE9G,KAAK,CAAC+G,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAA3F,cAAA,GAAIrB,KAAK,CAAC8G,OAAO,cAAAzF,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChG4F,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAEnH,KAAK,CAACoH,eAAgB;MACvCC,QAAQ,EAAE,IAAI,CAACA;IAAS,CACzB,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Text","View","BubbleChart","AccessibilityWidgetType","getAccessibilityProps","BaseChartComponent","BaseChartComponentState","WmBubbleChartProps","DEFAULT_CLASS","WmIcon","SHAPE_TO_SYMBOL","WmBubbleChartState","WmBubbleChart","constructor","props","_defineProperty","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","updateState","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$intervalx","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","_pt$size","size","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","xaxisticks","getXAxisTickLabelFormatter","colors","color","height","rootHeight","wrapperStyle","styles","root","symbol","shape","createElement","_extends","LINECHART","style","onLayout","onViewLayoutChange","bind","showSpinner","title","iconclass","iconurl","testID","flexDirection","alignItems","icon","subheading","subHeading","chartWidth","ref","viewRef","width","screenWidth","theme","getChartTheme","sizeRange","sizerange","minY","minX","intervalX","intervalx","intervalY","intervaly","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","undefined","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect"],"sources":["bubble-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BubbleChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmBubbleChartProps from './bubble-chart.props';\nimport { DEFAULT_CLASS, WmBubbleChartStyles } from './bubble-chart.styles';\nimport WmIcon from '@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component';\nimport isEmpty from 'lodash-es/isEmpty';\n\n\nconst SHAPE_TO_SYMBOL: {[key: string]: string} = {\n 'circle': 'circle',\n 'rect': 'rect',\n 'square': 'rect',\n 'roundRect': 'roundRect',\n 'triangle': 'triangle',\n 'triangle-up': 'triangle',\n 'triangle-down': 'path://M0,500L500,-500L-500,-500Z',\n 'diamond': 'diamond',\n 'pin': 'pin',\n 'arrow': 'arrow',\n 'cross': 'path://M-70,-500L70,-500L70,-220L350,-220L350,-80L70,-80L70,500L-70,500L-70,-80L-350,-80L-350,-220L-70,-220Z M500,0L500,0Z M-500,0L-500,0Z',\n};\n\nexport class WmBubbleChartState extends BaseChartComponentState<WmBubbleChartProps> {}\n\nexport default class WmBubbleChart extends BaseChartComponent<WmBubbleChartProps, WmBubbleChartState, WmBubbleChartStyles> {\n\n constructor(props: WmBubbleChartProps) {\n super(props, DEFAULT_CLASS, new WmBubbleChartProps(), new WmBubbleChartState());\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmBubbleChartState);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n}\n renderWidget(props: WmBubbleChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n \n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number; size?: number }) =>\n [pt.x, pt.y, pt.size ?? 5] as [number, number, number]\n ),\n }));\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const xaxisticks = this.getXAxisTickLabelFormatter();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n }));\n const { height: rootHeight, ...wrapperStyle } = this.styles.root as any;\n const symbol = SHAPE_TO_SYMBOL[props.shape] || 'circle';\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={wrapperStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n {this.showSpinner()}\n <View>\n {(props.title || props.iconclass || props.iconurl) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {(props.iconclass || props.iconurl) ? (<WmIcon iconclass={props.iconclass} iconurl={props.iconurl} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <BubbleChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n sizeRange={props.sizerange}\n minY={minDomain.y}\n minX={minDomain.x}\n intervalX={props.intervalx ?? 1} \n intervalY={props.intervaly}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={props.showxaxis !== false ? this.getXAxisTickLabelFormatter() : undefined}\n yAxisTickLabelFormatter={props.showyaxis !== false ? this.getYAxisTickLabelFormatter() : undefined}\n showLegend={showLegend}\n symbol={symbol}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK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K,CAACqH,eAAgB;MACvCC,QAAQ,EAAE,IAAI,CAACA;IAAS,CACzB,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
@@ -92,7 +92,7 @@ export default class WmLineChart extends BaseChartComponent {
|
|
|
92
92
|
style: wrapperStyle,
|
|
93
93
|
onLayout: this.onViewLayoutChange.bind(this),
|
|
94
94
|
key: `${props.title}_line_chart`
|
|
95
|
-
}), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
95
|
+
}), this.showSpinner(), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass || props.iconurl ? /*#__PURE__*/React.createElement(View, {
|
|
96
96
|
testID: "title-icon-container",
|
|
97
97
|
style: {
|
|
98
98
|
flexDirection: 'row',
|