@wavemaker/app-rn-runtime 12.0.0-next.45503 → 12.0.0-rc.5849
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +13 -2
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +15 -2
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +10 -2
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +13 -3
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +9 -0
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +2 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +5 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +4 -3
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +23 -0
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +58 -11
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +36 -2
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js +7 -0
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +43 -4
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +3 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +41 -5
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +28 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js +6 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +18 -0
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +3 -0
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -1
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +1 -0
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +54 -33
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +21 -1
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +21 -0
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +2 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +19 -4
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/page.props.js.map +1 -1
- app-rn-runtime/components/page/page.styles.js +7 -1
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +27 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.styles.js +6 -1
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +3 -2
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/props.provider.js +1 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +10 -4
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +21 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/package.json +6 -4
- app-rn-runtime/runtime/App.js +2 -7
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +28 -13
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +42 -2
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +5 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +1 -0
- app-rn-runtime/styles/theme.variables.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Animated","Easing","Text","Image","View","FontAwesome","BaseComponent","BaseComponentState","isFullPathUrl","AccessibilityWidgetType","getAccessibilityProps","WmIconProps","DEFAULT_CLASS","WavIcon","StreamlineLightIcon","StreamlineRegularIcon","Tappable","Animatedview","createSkeleton","ICON_SIZES","Map","ICON_ROTATTION","WmIconState","constructor","args","_defineProperty","WmIcon","props","Value","getIconDef","iconClass","iconDef","rotate","splits","split","isFontAwesome","find","v","isStreamlineLightIcon","isStreamlineRegularIcon","_splits$find","type","startsWith","substring","_splits$find2","_splits$find3","_splits$find4","isWavIcon","indexOf","animation","size","map","get","spin","stopAnimation","spinValue","setValue","timing","toValue","duration","easing","linear","useNativeDriver","start","componentDidMount","componentWillUnmount","onPropertyChange","name","$new","$old","updateState","getCustomIcon","style","_this$theme$getStyle","customIcon","theme","mergeStyle","getStyle","iconclass","icon","styles","customIconContent","content","createElement","fontFamily","decodeURIComponent","renderSkeleton","skeleton","root","width","skeletonwidth","iconsize","height","skeletonheight","getElementToShow","iconSrc","iconmargin","iconheight","iconwidth","elementToshow","source","uri","testID","getTestId","margin","loadIcon","iconImage","loadAsset","iconImageSrc","renderIcon","iconJsx","_iconSource","iconurl","state","text","color","transform","iconSize","fontSize","show","_extends","getTestProps","_this$styles$icon","WMCustomIcon","interpolate","inputRange","outputRange","opacity","renderWidget","iterationCount","iterationcount","parseInt","undefined","target","rippleColor","getTestPropsForAction","accessibilityProps","ICON","entryanimation","delay","animationdelay","_background","iconposition","caption","getTestPropsForLabel","accessibilityRole","accessibilityrole"],"sources":["icon.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, DimensionValue, Easing, Text, Image, View } from 'react-native';\nimport { FontAwesome } from '@expo/vector-icons';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmIconProps from './icon.props';\nimport { DEFAULT_CLASS, WmIconStyles } from './icon.styles';\nimport WavIcon from './wavicon/wavicon.component';\nimport StreamlineLightIcon from './streamline-light-icon/streamline-light-icon.component';\nimport StreamlineRegularIcon from './streamline-regular-icon/streamline-regular-icon.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ninterface IconDef {\n isFontAwesome: boolean;\n isWavIcon: boolean;\n isStreamlineLightIcon: boolean;\n isStreamlineRegularIcon: boolean;\n type: string;\n rotate: string;\n size: number;\n animation: string;\n}\n\nconst ICON_SIZES = new Map([\n ['fa-lg', 24],\n ['fa-2x', 36],\n ['fa-3x', 48],\n ['fa-4x', 60],\n ['fa-5x', 72]\n]);\n\nconst ICON_ROTATTION = new Map([\n ['fa-rotate-90', '90deg'],\n ['fa-rotate-180', '180deg'],\n ['fa-rotate-270', '270deg']\n]);\n\nexport class WmIconState extends BaseComponentState<WmIconProps> {\n public iconDef = {} as IconDef;\n}\n\nexport default class WmIcon extends BaseComponent<WmIconProps, WmIconState, WmIconStyles> {\n spinValue = new Animated.Value(0);\n pulseValue = new Animated.Value(0);\n public stopAnimation = true;\n private _iconSource = null as any;\n\n constructor(props: WmIconProps) {\n super(props, DEFAULT_CLASS, new WmIconProps());\n }\n\n getIconDef(iconClass: string): IconDef {\n const iconDef = {\n rotate: '0'\n } as IconDef;\n const splits = iconClass.split(' ');\n iconDef.isFontAwesome = !!splits.find(v => v === 'fa');\n iconDef.isStreamlineLightIcon = !!splits.find(v => v === 'wm-sl-l');\n iconDef.isStreamlineRegularIcon = !!splits.find(v => v === 'wm-sl-r');\n if (iconDef.isFontAwesome) {\n iconDef.type = splits.find(v => v.startsWith('fa-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineLightIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineRegularIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else {\n iconDef.isWavIcon = !iconDef.isFontAwesome && !!splits.find(v => v === 'wi');\n iconDef.type = (iconDef.isWavIcon && splits.find(v => v.startsWith('wi-'))?.substring(3)) || '';\n }\n if (iconClass.indexOf('fa-spin') >= 0) {\n iconDef.animation = 'spin';\n } else if (iconClass.indexOf('fa-pulse') >= 0) {\n iconDef.animation = 'pulse';\n }\n iconDef.size = splits.map(v => ICON_SIZES.get(v)).find(v => !!v) || 12;\n iconDef.rotate = splits.map(v => ICON_ROTATTION.get(v)).find(v => !!v) || '0deg';\n return iconDef;\n }\n\n private spin () {\n if (this.stopAnimation) {\n return;\n }\n this.spinValue.setValue(0);\n Animated.timing(\n this.spinValue,\n {\n toValue: 1,\n duration: 1000,\n easing: Easing.linear,\n useNativeDriver: true\n }\n ).start(() => this.spin());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.spin();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stopAnimation = true;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'iconclass':\n $new && this.updateState({iconDef: this.getIconDef($new)} as WmIconState);\n break;\n }\n }\n\n private getCustomIcon(props: WmIconProps, style: any) {\n const customIcon = this.theme.mergeStyle({}, this.theme.getStyle(props?.iconclass || '')?.icon || this.styles.icon);\n const customIconContent = customIcon?.content;\n if (customIconContent) {\n delete customIcon.content;\n return (<Text\n style={[style, customIcon.fontFamily ? {fontFamily: customIcon.fontFamily}: null]}>\n {decodeURIComponent(customIconContent)}\n </Text>);\n }\n return null;\n }\n\n public renderSkeleton(props: WmIconProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: (this.props.skeletonwidth || this.props.iconsize || this.styles.root.width) as DimensionValue,\n height: (this.props.skeletonheight || this.props.iconsize || this.styles.root.height) as DimensionValue\n });\n }\n\n getElementToShow(props: WmIconProps, iconSrc: any) {\n\n const { iconmargin, iconheight, iconwidth } = props;\n let width, height;\n let elementToshow, source;\n\n if (iconwidth) width = iconwidth;\n else if (iconheight) width = iconheight;\n else width = 12;\n if (iconheight) height = iconheight;\n else if (iconwidth) height = iconwidth;\n else height = 12;\n\n if (isFullPathUrl(iconSrc)) {\n source = {\n uri: iconSrc\n };\n } else {\n source = iconSrc;\n }\n elementToshow = <Image testID={this.getTestId('icon')}\n style={{\n margin: iconmargin ?? 0,\n height: height,\n width: width\n }}\n source={source}/>;\n return elementToshow;\n }\n\n loadIcon(iconImage: string | undefined) {\n if (!iconImage || !this.loadAsset) {\n return null;\n }\n const iconImageSrc = this.loadAsset(iconImage);\n if (iconImageSrc && typeof iconImageSrc !== 'function') {\n return iconImageSrc;\n }\n return null;\n }\n\n renderIcon(props: WmIconProps) {\n let iconJsx = null;\n this._iconSource = this._iconSource || this.loadIcon(props.iconurl);\n const iconSrc: any = this._iconSource\n if (iconSrc) {\n return this.getElementToShow(props, iconSrc);\n }\n const iconDef = this.state.iconDef;\n if (!iconDef) {\n return null;\n }\n const { root, text, icon } = this.styles;\n const style = [{ color: root.color || text.color },\n icon,\n { transform: [{ rotate: iconDef.rotate }] }];\n\n const customIcon = this.getCustomIcon(props, style);\n const iconSize = props.iconsize || this.styles.root.fontSize || this.styles.text.fontSize || iconDef.size;\n if (props.show && iconDef && iconDef.isFontAwesome) {\n //@ts-ignore type information is not matching\n iconJsx = (<FontAwesome name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}\n {...this.getTestProps('icon')}>\n {customIcon}\n </FontAwesome>);\n } else if (props.show && iconDef) {\n let WMCustomIcon = WavIcon as unknown;\n if (iconDef.isStreamlineLightIcon) {\n WMCustomIcon = StreamlineLightIcon;\n } else if (iconDef.isStreamlineRegularIcon) {\n WMCustomIcon = StreamlineRegularIcon;\n } else if (!iconDef.isWavIcon && !customIcon && !this.styles.icon?.fontFamily) {\n return null;\n }\n //@ts-ignore type information is not matching\n iconJsx = WMCustomIcon ? (<WMCustomIcon name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}\n {...this.getTestProps('icon')}>\n {customIcon}\n </WMCustomIcon>) : null;\n }\n if (iconJsx && iconDef.animation === 'spin') {\n const rotate = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg']});\n const animation = { transform: [{ rotate }] };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else if (iconJsx && iconDef.animation === 'pulse') {\n const opacity = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: [0, 1]});\n const animation = { opacity: opacity };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else {\n this.stopAnimation = true;\n }\n return (\n <View\n // {...getAccessibilityProps(AccessibilityWidgetType.ICON, this.props)}\n >\n {iconJsx}\n </View>\n );\n }\n\n renderWidget(props: WmIconProps) {\n let icon = this.renderIcon(props);\n let iterationCount: any = props.iterationcount ? (props.iterationcount != 'infinite' ? parseInt(props.iterationcount): 'infinite') : undefined;\n return (\n <Tappable target={this} rippleColor = {this.styles.root.rippleColor} {...this.getTestPropsForAction()} accessibilityProps={{...getAccessibilityProps(AccessibilityWidgetType.ICON, props)}}>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={this.styles.root} iterationCount={iterationCount}>\n {this._background}\n {(props.iconposition === 'left' && icon) || null}\n {(props.caption && (<Text {...this.getTestPropsForLabel('caption')}style={this.styles.text} accessibilityRole={props?.accessibilityrole ? props?.accessibilityrole : 'text'}>{props.caption}</Text>)) || null}\n {(props.iconposition === 'right' && icon) || null}\n </Animatedview>\n </Tappable>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAkBC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,IAAI,QAAQ,cAAc;AAClF,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,aAAa,QAAQ,sCAAsC;AACpE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,OAAOC,OAAO,MAAM,6BAA6B;AACjD,OAAOC,mBAAmB,MAAM,yDAAyD;AACzF,OAAOC,qBAAqB,MAAM,6DAA6D;AAC/F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAa3E,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,CAAC,OAAO,EAAE,EAAE,CAAC,EACb,CAAC,OAAO,EAAE,EAAE,CAA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AAS;IAC9I,oBACErI,KAAA,CAAAoF,aAAA,CAACnE,QAAQ,EAAAwG,QAAA;MAACa,MAAM,EAAE,IAAK;MAACC,WAAW,EAAI,IAAI,CAACtD,MAAM,CAACQ,IAAI,CAAC8C;IAAY,GAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,kBAAkB,EAAE;QAAC,GAAG9H,qBAAqB,CAACD,uBAAuB,CAACgI,IAAI,EAAE9G,KAAK;MAAC;IAAE,iBACzL5B,KAAA,CAAAoF,aAAA,CAAClE,YAAY;MAACyH,cAAc,EAAE/G,KAAK,CAACsB,SAAU;MAAC0F,KAAK,EAAEhH,KAAK,CAACiH,cAAe;MAACpE,KAAK,EAAE,IAAI,CAACQ,MAAM,CAACQ,IAAK;MAACyC,cAAc,EAAEA;IAAe,GACjI,IAAI,CAACY,WAAW,EACflH,KAAK,CAACmH,YAAY,KAAK,MAAM,IAAI/D,IAAI,IAAK,IAAI,EAC9CpD,KAAK,CAACoH,OAAO,iBAAKhJ,KAAA,CAAAoF,aAAA,CAACjF,IAAI,EAAAsH,QAAA,KAAK,IAAI,CAACwB,oBAAoB,CAAC,SAAS,CAAC;MAACxE,KAAK,EAAE,IAAI,CAACQ,MAAM,CAACkC,IAAK;MAAC+B,iBAAiB,EAAEtH,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEuH,iBAAiB,GAAGvH,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEuH,iBAAiB,GAAG;IAAO,IAAEvH,KAAK,CAACoH,OAAc,CAAE,IAAK,IAAI,EAC3MpH,KAAK,CAACmH,YAAY,KAAK,OAAO,IAAI/D,IAAI,IAAK,IACjC,CACN,CAAC;EAEf;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Animated","Easing","Text","Image","View","FontAwesome","BaseComponent","BaseComponentState","isFullPathUrl","AccessibilityWidgetType","getAccessibilityProps","WmIconProps","DEFAULT_CLASS","WavIcon","StreamlineLightIcon","StreamlineRegularIcon","Tappable","Animatedview","createSkeleton","ICON_SIZES","Map","ICON_ROTATTION","WmIconState","constructor","args","_defineProperty","WmIcon","props","Value","getIconDef","iconClass","iconDef","rotate","splits","split","isFontAwesome","find","v","isStreamlineLightIcon","isStreamlineRegularIcon","_splits$find","type","startsWith","substring","_splits$find2","_splits$find3","_splits$find4","isWavIcon","indexOf","animation","size","map","get","spin","stopAnimation","spinValue","setValue","timing","toValue","duration","easing","linear","useNativeDriver","start","componentDidMount","componentWillUnmount","onPropertyChange","name","$new","$old","updateState","getCustomIcon","style","_this$theme$getStyle","customIcon","theme","mergeStyle","getStyle","iconclass","icon","styles","customIconContent","content","createElement","fontFamily","decodeURIComponent","renderSkeleton","skeletonWidth","skeletonwidth","iconsize","root","width","skeletonHeight","skeletonheight","height","skeleton","getElementToShow","iconSrc","iconmargin","iconheight","iconwidth","elementToshow","source","uri","testID","getTestId","margin","loadIcon","iconImage","loadAsset","iconImageSrc","renderIcon","iconJsx","_iconSource","iconurl","state","text","color","transform","iconSize","fontSize","show","_extends","getTestProps","_this$styles$icon","WMCustomIcon","interpolate","inputRange","outputRange","opacity","renderWidget","iterationCount","iterationcount","parseInt","undefined","target","rippleColor","getTestPropsForAction","accessibilityProps","ICON","entryanimation","delay","animationdelay","_background","iconposition","caption","getTestPropsForLabel","accessibilityRole","accessibilityrole"],"sources":["icon.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, DimensionValue, Easing, Text, Image, View } from 'react-native';\nimport { FontAwesome } from '@expo/vector-icons';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nimport WmIconProps from './icon.props';\nimport { DEFAULT_CLASS, WmIconStyles } from './icon.styles';\nimport WavIcon from './wavicon/wavicon.component';\nimport StreamlineLightIcon from './streamline-light-icon/streamline-light-icon.component';\nimport StreamlineRegularIcon from './streamline-regular-icon/streamline-regular-icon.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ninterface IconDef {\n isFontAwesome: boolean;\n isWavIcon: boolean;\n isStreamlineLightIcon: boolean;\n isStreamlineRegularIcon: boolean;\n type: string;\n rotate: string;\n size: number;\n animation: string;\n}\n\nconst ICON_SIZES = new Map([\n ['fa-lg', 24],\n ['fa-2x', 36],\n ['fa-3x', 48],\n ['fa-4x', 60],\n ['fa-5x', 72]\n]);\n\nconst ICON_ROTATTION = new Map([\n ['fa-rotate-90', '90deg'],\n ['fa-rotate-180', '180deg'],\n ['fa-rotate-270', '270deg']\n]);\n\nexport class WmIconState extends BaseComponentState<WmIconProps> {\n public iconDef = {} as IconDef;\n}\n\nexport default class WmIcon extends BaseComponent<WmIconProps, WmIconState, WmIconStyles> {\n spinValue = new Animated.Value(0);\n pulseValue = new Animated.Value(0);\n public stopAnimation = true;\n private _iconSource = null as any;\n\n constructor(props: WmIconProps) {\n super(props, DEFAULT_CLASS, new WmIconProps());\n }\n\n getIconDef(iconClass: string): IconDef {\n const iconDef = {\n rotate: '0'\n } as IconDef;\n const splits = iconClass.split(' ');\n iconDef.isFontAwesome = !!splits.find(v => v === 'fa');\n iconDef.isStreamlineLightIcon = !!splits.find(v => v === 'wm-sl-l');\n iconDef.isStreamlineRegularIcon = !!splits.find(v => v === 'wm-sl-r');\n if (iconDef.isFontAwesome) {\n iconDef.type = splits.find(v => v.startsWith('fa-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineLightIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else if (iconDef.isStreamlineRegularIcon) {\n iconDef.type = splits.find(v => v.startsWith('sl-'))?.substring(3) || '';\n } else {\n iconDef.isWavIcon = !iconDef.isFontAwesome && !!splits.find(v => v === 'wi');\n iconDef.type = (iconDef.isWavIcon && splits.find(v => v.startsWith('wi-'))?.substring(3)) || '';\n }\n if (iconClass.indexOf('fa-spin') >= 0) {\n iconDef.animation = 'spin';\n } else if (iconClass.indexOf('fa-pulse') >= 0) {\n iconDef.animation = 'pulse';\n }\n iconDef.size = splits.map(v => ICON_SIZES.get(v)).find(v => !!v) || 12;\n iconDef.rotate = splits.map(v => ICON_ROTATTION.get(v)).find(v => !!v) || '0deg';\n return iconDef;\n }\n\n private spin () {\n if (this.stopAnimation) {\n return;\n }\n this.spinValue.setValue(0);\n Animated.timing(\n this.spinValue,\n {\n toValue: 1,\n duration: 1000,\n easing: Easing.linear,\n useNativeDriver: true\n }\n ).start(() => this.spin());\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.spin();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.stopAnimation = true;\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'iconclass':\n $new && this.updateState({iconDef: this.getIconDef($new)} as WmIconState);\n break;\n }\n }\n\n private getCustomIcon(props: WmIconProps, style: any) {\n const customIcon = this.theme.mergeStyle({}, this.theme.getStyle(props?.iconclass || '')?.icon || this.styles.icon);\n const customIconContent = customIcon?.content;\n if (customIconContent) {\n delete customIcon.content;\n return (<Text\n style={[style, customIcon.fontFamily ? {fontFamily: customIcon.fontFamily}: null]}>\n {decodeURIComponent(customIconContent)}\n </Text>);\n }\n return null;\n }\n\n public renderSkeleton(props: WmIconProps) {\n let skeletonWidth = (this.props.skeletonwidth || this.props.iconsize || this.styles.root.width) as DimensionValue;\n let skeletonHeight = (this.props.skeletonheight || this.props.iconsize || this.styles.root.height) as DimensionValue\n\n if(this.props.skeletonheight == \"0\") {\n skeletonWidth = 0\n }\n \n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n }\n \n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth,\n height: skeletonHeight\n });\n }\n\n getElementToShow(props: WmIconProps, iconSrc: any) {\n\n const { iconmargin, iconheight, iconwidth } = props;\n let width, height;\n let elementToshow, source;\n\n if (iconwidth) width = iconwidth;\n else if (iconheight) width = iconheight;\n else width = 12;\n if (iconheight) height = iconheight;\n else if (iconwidth) height = iconwidth;\n else height = 12;\n\n if (isFullPathUrl(iconSrc)) {\n source = {\n uri: iconSrc\n };\n } else {\n source = iconSrc;\n }\n elementToshow = <Image testID={this.getTestId('icon')}\n style={{\n margin: iconmargin ?? 0,\n height: height,\n width: width\n }}\n source={source}/>;\n return elementToshow;\n }\n\n loadIcon(iconImage: string | undefined) {\n if (!iconImage || !this.loadAsset) {\n return null;\n }\n const iconImageSrc = this.loadAsset(iconImage);\n if (iconImageSrc && typeof iconImageSrc !== 'function') {\n return iconImageSrc;\n }\n return null;\n }\n\n renderIcon(props: WmIconProps) {\n let iconJsx = null;\n this._iconSource = this._iconSource || this.loadIcon(props.iconurl);\n const iconSrc: any = this._iconSource\n if (iconSrc) {\n return this.getElementToShow(props, iconSrc);\n }\n const iconDef = this.state.iconDef;\n if (!iconDef) {\n return null;\n }\n const { root, text, icon } = this.styles;\n const style = [{ color: root.color || text.color },\n icon,\n { transform: [{ rotate: iconDef.rotate }] }];\n\n const customIcon = this.getCustomIcon(props, style);\n const iconSize = props.iconsize || this.styles.root.fontSize || this.styles.text.fontSize || iconDef.size;\n if (props.show && iconDef && iconDef.isFontAwesome) {\n //@ts-ignore type information is not matching\n iconJsx = (<FontAwesome name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}\n {...this.getTestProps('icon')}>\n {customIcon}\n </FontAwesome>);\n } else if (props.show && iconDef) {\n let WMCustomIcon = WavIcon as unknown;\n if (iconDef.isStreamlineLightIcon) {\n WMCustomIcon = StreamlineLightIcon;\n } else if (iconDef.isStreamlineRegularIcon) {\n WMCustomIcon = StreamlineRegularIcon;\n } else if (!iconDef.isWavIcon && !customIcon && !this.styles.icon?.fontFamily) {\n return null;\n }\n //@ts-ignore type information is not matching\n iconJsx = WMCustomIcon ? (<WMCustomIcon name={customIcon ? '' : iconDef.type}\n style={style}\n size={iconSize}\n {...this.getTestProps('icon')}>\n {customIcon}\n </WMCustomIcon>) : null;\n }\n if (iconJsx && iconDef.animation === 'spin') {\n const rotate = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg']});\n const animation = { transform: [{ rotate }] };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else if (iconJsx && iconDef.animation === 'pulse') {\n const opacity = this.spinValue.interpolate({ inputRange: [0, 1], outputRange: [0, 1]});\n const animation = { opacity: opacity };\n this.stopAnimation = false;\n return (<Animated.View style={animation}>{iconJsx}</Animated.View>);\n } else {\n this.stopAnimation = true;\n }\n return (\n <View\n // {...getAccessibilityProps(AccessibilityWidgetType.ICON, this.props)}\n >\n {iconJsx}\n </View>\n );\n }\n\n renderWidget(props: WmIconProps) {\n let icon = this.renderIcon(props);\n let iterationCount: any = props.iterationcount ? (props.iterationcount != 'infinite' ? parseInt(props.iterationcount): 'infinite') : undefined;\n return (\n <Tappable target={this} rippleColor = {this.styles.root.rippleColor} {...this.getTestPropsForAction()} accessibilityProps={{...getAccessibilityProps(AccessibilityWidgetType.ICON, props)}}>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={this.styles.root} iterationCount={iterationCount}>\n {this._background}\n {(props.iconposition === 'left' && icon) || null}\n {(props.caption && (<Text {...this.getTestPropsForLabel('caption')}style={this.styles.text} accessibilityRole={props?.accessibilityrole ? props?.accessibilityrole : 'text'}>{props.caption}</Text>)) || null}\n {(props.iconposition === 'right' && icon) || null}\n </Animatedview>\n </Tappable>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAkBC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,IAAI,QAAQ,cAAc;AAClF,SAASC,WAAW,QAAQ,oBAAoB;AACh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Q,MAAM,CAACU,IAAK;MAACyC,cAAc,EAAEA;IAAe,GACjI,IAAI,CAACY,WAAW,EACfpH,KAAK,CAACqH,YAAY,KAAK,MAAM,IAAIjE,IAAI,IAAK,IAAI,EAC9CpD,KAAK,CAACsH,OAAO,iBAAKlJ,KAAA,CAAAoF,aAAA,CAACjF,IAAI,EAAAwH,QAAA,KAAK,IAAI,CAACwB,oBAAoB,CAAC,SAAS,CAAC;MAAC1E,KAAK,EAAE,IAAI,CAACQ,MAAM,CAACoC,IAAK;MAAC+B,iBAAiB,EAAExH,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEyH,iBAAiB,GAAGzH,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEyH,iBAAiB,GAAG;IAAO,IAAEzH,KAAK,CAACsH,OAAc,CAAE,IAAK,IAAI,EAC3MtH,KAAK,CAACqH,YAAY,KAAK,OAAO,IAAIjE,IAAI,IAAK,IACjC,CACN,CAAC;EAEf;AACF","ignoreList":[]}
|
@@ -80,9 +80,19 @@ export default class WmLabel extends BaseComponent {
|
|
80
80
|
return parts;
|
81
81
|
}
|
82
82
|
renderSkeleton(props) {
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
let skeletonWidth, skeletonHeight;
|
84
|
+
if (this.props.skeletonwidth == "0") {
|
85
|
+
skeletonWidth = 0;
|
86
|
+
} else {
|
87
|
+
var _this$styles$root;
|
88
|
+
skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
|
89
|
+
}
|
90
|
+
if (this.props.skeletonheight == "0") {
|
91
|
+
skeletonHeight = 0;
|
92
|
+
} else {
|
93
|
+
var _this$styles$root2;
|
94
|
+
skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height) || this.styles.text.fontSize;
|
95
|
+
}
|
86
96
|
if (this.props.multilineskeleton) {
|
87
97
|
return /*#__PURE__*/React.createElement(View, {
|
88
98
|
style: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","NavigationServiceConsumer","AccessibilityWidgetType","getAccessibilityProps","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","constructor","args","_defineProperty","WmLabel","props","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","updateState","parts","parseCaption","String","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","caption","replace","pattern","linkRegex","captionSplit","split","i","length","isLink","test","part","isNextTextALink","_captionSplit","text","link","push","renderSkeleton","_this$styles$root","_this$styles$root2","skeletonWidth","skeletonwidth","root","skeletonHeight","skeletonheight","fontSize","multilineskeleton","renderWidget","linkStyles","mergeStyle","entryanimation","animation","delay","animationdelay","_background","navigationService","_this$state$parts","_this$state$parts2","target","_extends","state","flexWrap","textAlign","getTestPropsForLabel","LABEL","numberOfLines","nooflines","ellipsizeMode","map","index","key","isValid","color","selectable","userSelect","onPress","startsWith","openUrl","eventName","substring","invokeEventCallback","proxy","required"],"sources":["label.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/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/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ntype PartType = {\n text?: string,\n link?: string,\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 }\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 } 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 const pattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n const linkRegex = /^(((http|https):\\/\\/)|javascript:|#).+$/;\n const captionSplit = caption.split(pattern);\n\n let parts = [];\n\n for (let i = 0; i < captionSplit.length; i++) {\n const isLink = linkRegex.test(captionSplit[i]);\n let part: PartType = {};\n\n const isNextTextALink = linkRegex.test(captionSplit[i + 1]);\n if (isLink) {\n part.text = captionSplit[i - 1] ?? '';\n part.link = captionSplit[i] === '#/__EMPTY__' ? '' : captionSplit[i];\n } else {\n part.text = isNextTextALink ? \"\" : captionSplit[i];\n };\n\n if (part.text) {\n parts.push(part);\n }\n }\n\n return parts;\n }\n\n public renderSkeleton(props: WmLabelProps){\n const skeletonWidth = this.props.skeletonwidth || this.styles.root?.width;\n const skeletonHeight = this.props.skeletonheight || this.styles.root?.height || this.styles.text.fontSize;\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 renderWidget(props: WmLabelProps) {\n const linkStyles = this.theme.mergeStyle({text: this.styles.text}, this.styles.link);\n return !isNil(props.caption) ? (\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={this.styles.root}>\n {this._background}\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) => {\n return (<Tappable target={this}>\n <Text style={ this.state.parts.length <= 1 ? this.styles.text : {flexWrap: \"wrap\", textAlign: this.styles.text.textAlign}}\n {...this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n numberOfLines={props.nooflines} ellipsizeMode=\"tail\">\n {this.state.parts?.length === 1 ? 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 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 {props.required && this.getAsterisk()}\n </Text>\n </Tappable>)}}\n </NavigationServiceConsumer>\n </Animatedview>\n ) : null;\n }\n}\n"],"mappings":";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sB,OAAO,CAAC9C,IAAI,CAACI,IAAI,EAAE,QAAQ,CAAC;cAChD,CAAC,MAAM,IAAIJ,IAAI,CAACI,IAAI,CAACyC,UAAU,CAAC,aAAa,CAAC,EAAE;gBAC9C,MAAME,SAAS,GAAG/C,IAAI,CAACI,IAAI,CAAC4C,SAAS,CAAC,EAAE,CAAC;gBACzC,IAAI,CAACC,mBAAmB,CAACF,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAACG,KAAK,CAAC,CAAC;cACzD;YACF;YACA,IAAI,CAACD,mBAAmB,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;UACvD;UACA;QAAA,IAECzF,QAAQ,CAACuC,IAAI,CAACG,IAAI,CACf,CAAC;MAEX,CAAC,CAAC,EACAlC,KAAK,CAACkF,QAAQ,IAAI,IAAI,CAACjF,WAAW,CAAC,CACjC,CACE,CAAC;IAAC,CACa,CACf,CAAC,GACb,IAAI;EACV;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","Tappable","NavigationServiceConsumer","AccessibilityWidgetType","getAccessibilityProps","WmLabelProps","DEFAULT_CLASS","isNil","toString","Animatedview","createSkeleton","WmLabelState","constructor","args","_defineProperty","WmLabel","props","getAsterisk","createElement","style","styles","asterisk","onPropertyChange","name","$new","$old","updateState","parts","parseCaption","String","getMultilineSkeleton","width","height","borderRadius","marginBottom","theme","skeleton","caption","replace","pattern","linkRegex","captionSplit","split","i","length","isLink","test","part","isNextTextALink","_captionSplit","text","link","push","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","root","skeletonheight","_this$styles$root2","fontSize","multilineskeleton","renderWidget","linkStyles","mergeStyle","entryanimation","animation","delay","animationdelay","_background","navigationService","_this$state$parts","_this$state$parts2","target","_extends","state","flexWrap","textAlign","getTestPropsForLabel","LABEL","numberOfLines","nooflines","ellipsizeMode","map","index","key","isValid","color","selectable","userSelect","onPress","startsWith","openUrl","eventName","substring","invokeEventCallback","proxy","required"],"sources":["label.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/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/app-rn-runtime/components/basic/animatedview.component';\nimport WmSkeleton, { createSkeleton } from '../skeleton/skeleton.component';\n\ntype PartType = {\n text?: string,\n link?: string,\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 }\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 } 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 const pattern = /\\[([^\\]]+)\\]\\(([^)]*)\\)/g;\n const linkRegex = /^(((http|https):\\/\\/)|javascript:|#).+$/;\n const captionSplit = caption.split(pattern);\n\n let parts = [];\n\n for (let i = 0; i < captionSplit.length; i++) {\n const isLink = linkRegex.test(captionSplit[i]);\n let part: PartType = {};\n\n const isNextTextALink = linkRegex.test(captionSplit[i + 1]);\n if (isLink) {\n part.text = captionSplit[i - 1] ?? '';\n part.link = captionSplit[i] === '#/__EMPTY__' ? '' : captionSplit[i];\n } else {\n part.text = isNextTextALink ? \"\" : captionSplit[i];\n };\n\n if (part.text) {\n parts.push(part);\n }\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 renderWidget(props: WmLabelProps) {\n const linkStyles = this.theme.mergeStyle({text: this.styles.text}, this.styles.link);\n return !isNil(props.caption) ? (\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={this.styles.root}>\n {this._background}\n <NavigationServiceConsumer>\n {(navigationService: NavigationService) => {\n return (<Tappable target={this}>\n <Text style={ this.state.parts.length <= 1 ? this.styles.text : {flexWrap: \"wrap\", textAlign: this.styles.text.textAlign}}\n {...this.state.parts.length <= 1 ? this.getTestPropsForLabel('caption') : {}}\n {...getAccessibilityProps(AccessibilityWidgetType.LABEL, props)}\n numberOfLines={props.nooflines} ellipsizeMode=\"tail\">\n {this.state.parts?.length === 1 ? 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 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 {props.required && this.getAsterisk()}\n </Text>\n </Tappable>)}}\n </NavigationServiceConsumer>\n </Animatedview>\n ) : null;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAChH,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,KAAK,EAAEC,QAAQ,QAAQ,WAAW;AAC3C,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAAqBC,cAAc,QAAQ,gCAAgC;AAO3E,OAAO,MAAMC,YAAY,SAASX,kBAAkB,CAAe;EAAAY,YAAA,GAAAC,IAAA;IAAA,SAAAA,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,CAACG,KAAK,CAAC,CAAC;cACzD;YACF;YACA,IAAI,CAACD,mBAAmB,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;UACvD;UACA;QAAA,IAECzF,QAAQ,CAACuC,IAAI,CAACG,IAAI,CACf,CAAC;MAEX,CAAC,CAAC,EACAlC,KAAK,CAACkF,QAAQ,IAAI,IAAI,CAACjF,WAAW,CAAC,CACjC,CACE,CAAC;IAAC,CACa,CACf,CAAC,GACb,IAAI;EACV;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","alignSelf","text","fontSize","color","labelDefaultColor","asterisk","labelAsteriskColor","marginLeft","skeleton","width","height","borderRadius","link","textDecorationLine","flexDirection","textAlign","getLabelStyles","textColor","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","fontWeight","labelDangerColor","labelDangerContrastColor","labelDefaultContrastColor","labelInfoColor","labelInfoContrastColor","labelPrimaryColor","labelPrimaryContrastColor","labelSuccessColor","labelSuccessContrastColor","labelWarningColor","labelWarningContrastColor","getTextStyles","labelTextDangerColor","labelTextInfoColor","labelTextPrimaryColor","labelTextSuccessColor","labelTextWarningColor","getHeadingStyles","overrides","margin","labelHeaderColor","heading1FontSize","heading2FontSize","heading3FontSize","heading4FontSize","heading5FontSize","heading6FontSize","labelTextMutedColor"],"sources":["label.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\nimport { WmAnchorStyles } from '../anchor/anchor.styles';\n\nexport type WmLabelStyles = BaseStyles & {\n asterisk: AllStyle,\n skeleton: WmSkeletonStyles \n link: WmAnchorStyles\n};\n\nexport const DEFAULT_CLASS = 'app-label';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLabelStyles = defineStyles({\n root: {\n alignSelf: 'flex-start',\n },\n text: {\n fontSize: 16,\n color: themeVariables.labelDefaultColor\n },\n asterisk: {\n color: themeVariables.labelAsteriskColor,\n marginLeft: 2\n },\n skeleton: {\n root:{\n width: '100%',\n height: 16,\n borderRadius: 4
|
1
|
+
{"version":3,"names":["BASE_THEME","deepCopy","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","alignSelf","text","fontSize","color","labelDefaultColor","asterisk","labelAsteriskColor","marginLeft","skeleton","width","height","borderRadius","link","textDecorationLine","flexDirection","textAlign","getLabelStyles","textColor","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","fontWeight","labelDangerColor","labelDangerContrastColor","labelDefaultContrastColor","labelInfoColor","labelInfoContrastColor","labelPrimaryColor","labelPrimaryContrastColor","labelSuccessColor","labelSuccessContrastColor","labelWarningColor","labelWarningContrastColor","getTextStyles","labelTextDangerColor","labelTextInfoColor","labelTextPrimaryColor","labelTextSuccessColor","labelTextWarningColor","getHeadingStyles","overrides","margin","labelHeaderColor","heading1FontSize","heading2FontSize","heading3FontSize","heading4FontSize","heading5FontSize","heading6FontSize","labelTextMutedColor"],"sources":["label.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\nimport { WmAnchorStyles } from '../anchor/anchor.styles';\n\nexport type WmLabelStyles = BaseStyles & {\n asterisk: AllStyle,\n skeleton: WmSkeletonStyles \n link: WmAnchorStyles\n};\n\nexport const DEFAULT_CLASS = 'app-label';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLabelStyles = defineStyles({\n root: {\n alignSelf: 'flex-start',\n },\n text: {\n fontSize: 16,\n color: themeVariables.labelDefaultColor\n },\n asterisk: {\n color: themeVariables.labelAsteriskColor,\n marginLeft: 2\n },\n skeleton: {\n root:{\n width: '100%',\n height: 16,\n borderRadius: 4,\n }\n } as any as WmSkeletonStyles,\n link: {\n text: {\n textDecorationLine: 'underline'\n }\n } as WmAnchorStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n flexDirection: 'row',\n textAlign: 'right'\n }\n });\n const getLabelStyles = (color: string, textColor: string): WmLabelStyles => {\n return {\n root: {\n backgroundColor: color,\n paddingLeft: 32,\n paddingTop: 16,\n paddingRight: 32,\n paddingBottom: 16,\n borderRadius: 6\n },\n text: {\n color: textColor,\n fontWeight: 'bold'\n }\n } as WmLabelStyles;\n };\n\n addStyle('label-danger', '', getLabelStyles(themeVariables.labelDangerColor, themeVariables.labelDangerContrastColor));\n addStyle('label-default', '', getLabelStyles(themeVariables.labelDefaultColor, themeVariables.labelDefaultContrastColor));\n addStyle('label-info', '', getLabelStyles(themeVariables.labelInfoColor, themeVariables.labelInfoContrastColor));\n addStyle('label-primary', '', getLabelStyles(themeVariables.labelPrimaryColor, themeVariables.labelPrimaryContrastColor));\n addStyle('label-success', '', getLabelStyles(themeVariables.labelSuccessColor, themeVariables.labelSuccessContrastColor));\n addStyle('label-warning', '', getLabelStyles(themeVariables.labelWarningColor, themeVariables.labelWarningContrastColor));\n addStyle('label-test', '', getLabelStyles('yellow', 'red'));\n addStyle('label-test1', '', getLabelStyles('blue', 'orange'));\n\n const getTextStyles = (color: string) => {\n return {\n text: {\n color: color\n }\n } as WmLabelStyles;\n };\n\n addStyle('text-danger', '', getTextStyles(themeVariables.labelTextDangerColor));\n addStyle('text-info', '', getTextStyles(themeVariables.labelTextInfoColor));\n addStyle('text-primary', '', getTextStyles(themeVariables.labelTextPrimaryColor));\n addStyle('text-success', '', getTextStyles(themeVariables.labelTextSuccessColor));\n addStyle('text-warning', '', getTextStyles(themeVariables.labelTextWarningColor));\n addStyle('text-center', '', {\n root: {\n textAlign: 'center'\n }\n } as WmLabelStyles);\n addStyle('text-left', '', {\n root: {\n textAlign: 'left'\n }\n } as WmLabelStyles);\n addStyle('text-right', '', {\n root: {\n textAlign: 'right'\n }\n } as WmLabelStyles);\n\n\n const getHeadingStyles = (fontSize: number, overrides?: WmLabelStyles) => {\n return deepCopy({\n text: {\n fontWeight: '400',\n fontSize: fontSize,\n margin: 4,\n color: themeVariables.labelHeaderColor\n }\n } as WmLabelStyles, overrides);\n };\n addStyle('h1', '', getHeadingStyles(themeVariables.heading1FontSize, {text: {fontWeight: 'bold'}} as WmLabelStyles));\n addStyle('h2', '', getHeadingStyles(themeVariables.heading2FontSize, {text: {fontWeight: '500'}} as WmLabelStyles));\n addStyle('h3', '', getHeadingStyles(themeVariables.heading3FontSize));\n addStyle('h4', '', getHeadingStyles(themeVariables.heading4FontSize));\n addStyle('h5', '', getHeadingStyles(themeVariables.heading5FontSize));\n addStyle('h6', '', getHeadingStyles(themeVariables.heading6FontSize));\n addStyle('media-heading', '', {\n text : {\n fontSize: 16\n }\n } as WmLabelStyles);\n addStyle('text-muted', '', {\n text : {\n color: themeVariables.labelTextMutedColor\n }\n } as WmLabelStyles);\n addStyle('p', '', {\n text : {\n fontSize: 12\n }\n } as WmLabelStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGL,YAAY,CAAC;IAChDM,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE;MACFC,QA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,gBAAgB,CAAC7C,cAAc,CAACsD,gBAAgB,CAAC,CAAC;EACrErD,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE;IAC5BI,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;EACnBL,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE;IACzBI,IAAI,EAAG;MACLE,KAAK,EAAEP,cAAc,CAACuD;IACxB;EACF,CAAkB,CAAC;EACnBtD,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE;IAChBI,IAAI,EAAG;MACLC,QAAQ,EAAE;IACZ;EACF,CAAkB,CAAC;AACrB,CAAC,CAAC","ignoreList":[]}
|
@@ -18,6 +18,7 @@ import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
|
18
18
|
import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';
|
19
19
|
import { get, isArray, isEmpty, isObject } from "lodash-es";
|
20
20
|
import { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';
|
21
|
+
import { createSkeleton } from '../skeleton/skeleton.component';
|
21
22
|
export class WmSearchState extends BaseDatasetState {
|
22
23
|
constructor(...args) {
|
23
24
|
super(...args);
|
@@ -270,6 +271,14 @@ export default class WmSearch extends BaseDatasetComponent {
|
|
270
271
|
}
|
271
272
|
this.hide();
|
272
273
|
}
|
274
|
+
renderSkeleton(props) {
|
275
|
+
const rootStyle = {
|
276
|
+
...this.styles.searchInputWrapper,
|
277
|
+
...this.styles.root,
|
278
|
+
...this.styles.text
|
279
|
+
};
|
280
|
+
return createSkeleton(this.theme, this.styles.skeleton, rootStyle);
|
281
|
+
}
|
273
282
|
renderSearchBar() {
|
274
283
|
var _this$state$dataItems;
|
275
284
|
const props = this.state.props;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Keyboard","Platform","Text","TextInput","View","ScrollView","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","WmSearchState","constructor","args","_defineProperty","top","left","WmSearch","props","Promise","resolve","position","view","measure","x","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","queryText","_filteredData","filterOptions","entries","filteredData","minchars","length","_this$dataProvider","searchkey","updateRequired","undefined","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","setTimeout","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","root","ref","onLayout","searchInputWrapper","_extends","text","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","template","renderitempartial","Fragment","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","setTemplate","partialName","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Keyboard, Platform, Text, TextInput, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n template: string = \"\";\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n setTimeout(() => {\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }, 300);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={'wm-sl-l sl-search'} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : (<>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </>)}\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmSearchState);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACxE,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,aAAa,QAAmC,8CAA8C;AACvG,SAASC,YAAY,QAAQ,uEAAuE;AACpG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,WAAW;AAC3D,SAASC,a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,KAAK,IAAM1K,KAAK,CAAC0K,KAAK,IAAI9B,KAAK,GAAC,CAAC,IAAI5I,KAAK,CAAC0K,KAAM,GACvD,IAAI,CAAC/B,gBAAgB,CAAClH,IAAI,EAAEmH,KAAK,CAAC,GAChC,IAAI,EAGRA,KAAK,KAAK9F,MAAM,CAACX,MAAM,GAAG,CAAC,gBAC3BpE,KAAA,CAAAyI,aAAA,CAACxH,QAAQ;QAAC2L,OAAO,EAAE3K,KAAK,CAAC4K,eAAgB;QAAChG,MAAM,EAAE,IAAI,CAACA,MAAM,CAACiG;MAAiB,CAAW,CAAC,GAAG,IAE5F,CACP,CACc,CACP,CAAC,EACZ,IAAI,CAACjG,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Keyboard","Platform","Text","TextInput","View","ScrollView","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","createSkeleton","WmSearchState","constructor","args","_defineProperty","top","left","WmSearch","props","Promise","resolve","position","view","measure","x","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","queryText","_filteredData","filterOptions","entries","filteredData","minchars","length","_this$dataProvider","searchkey","updateRequired","undefined","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","setTimeout","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSkeleton","rootStyle","searchInputWrapper","root","text","theme","skeleton","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","ref","onLayout","_extends","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","template","renderitempartial","Fragment","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","setTemplate","partialName","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Keyboard, Platform, Text, TextInput, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n template: string = \"\";\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n setTimeout(() => {\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }, 300);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n public renderSkeleton(props: WmSearchProps): React.ReactNode {\n \n const rootStyle = {\n ...this.styles.searchInputWrapper, \n ...this.styles.root, \n ...this.styles.text\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, rootStyle)\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={'wm-sl-l sl-search'} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : (<>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </>)}\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmSearchState);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACxF,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,aAAa,QAAmC,8CAA8C;AACvG,SAASC,YAAY,QAAQ,uEAAuE;AACpG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,WAAW;AAC3D,SAASC,aAAa,QAAQ,+CAA+C;AAC7E,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,OAAO,MAAMC,aAAa,SAASX,gBAAgB,CAAgB;EAAAY,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAC7C,KAAK;IAAAA,eAAA,uBACV,CAAC,CAAC;IAAAA,eAAA,mBACE,EAAE;IAAAA,eAAA,mBACV;MACTC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE;IACR,CAAC;IAAAF,eAAA,eACW,EAAE;EAAA;AAChB;AASA,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M,GAAG,EAAEpJ,IAAI,CAACoJ;MAAI,GAEf,CAAC7K,KAAK,CAAC8K,KAAK,IAAM9K,KAAK,CAAC8K,KAAK,IAAI9B,KAAK,GAAC,CAAC,IAAIhJ,KAAK,CAAC8K,KAAM,GACvD,IAAI,CAAC/B,gBAAgB,CAACtH,IAAI,EAAEuH,KAAK,CAAC,GAChC,IAAI,EAGRA,KAAK,KAAKlG,MAAM,CAACX,MAAM,GAAG,CAAC,gBAC3BrE,KAAA,CAAAiJ,aAAA,CAAChI,QAAQ;QAACgM,OAAO,EAAE/K,KAAK,CAACgL,eAAgB;QAACpG,MAAM,EAAE,IAAI,CAACA,MAAM,CAACqG;MAAiB,CAAW,CAAC,GAAG,IAE5F,CACP,CACc,CACP,CAAC,EACZ,IAAI,CAACrG,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF","ignoreList":[]}
|
@@ -28,6 +28,8 @@ export default class WmSearchProps extends BaseDatasetProps {
|
|
28
28
|
_defineProperty(this, "hint", undefined);
|
29
29
|
_defineProperty(this, "accessibilityrole", 'search');
|
30
30
|
_defineProperty(this, "renderitempartial", void 0);
|
31
|
+
_defineProperty(this, "skeletonheight", null);
|
32
|
+
_defineProperty(this, "skeletonwidth", null);
|
31
33
|
}
|
32
34
|
}
|
33
35
|
//# sourceMappingURL=search.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","args","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;IAAAA,eAAA;EAAA;
|
1
|
+
{"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","args","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;IAAAA,eAAA;IAAAA,eAAA,yBAEtB,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;AAC/B","ignoreList":[]}
|
@@ -108,6 +108,11 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
108
108
|
},
|
109
109
|
placeholderText: {
|
110
110
|
color: themeVariables.inputPlaceholderColor
|
111
|
+
},
|
112
|
+
skeleton: {
|
113
|
+
root: {
|
114
|
+
height: 56
|
115
|
+
}
|
111
116
|
}
|
112
117
|
});
|
113
118
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","borderRadius","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchBgContainerColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","rippleColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row',\n borderRadius: 28,\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchBgContainerColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor,\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchBgContainerColor,\n borderRadius: 6,\n position: 'absolute',\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56,\n rippleColor: themeVariables.rippleColor\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,OAAOC,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAiBxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC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,CAAC,GAAC;IACA/B,IAAI,EAAG;MACL4D,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEFjE,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC/BK,IAAI,EAAE;MACJQ,gBAAgB,EAAE,CAAC;MACnB2B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["Platform","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","borderRadius","text","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","width","borderWidth","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","borderColor","searchBorderColor","backgroundColor","searchBgContainerColor","invalid","borderBottomColor","inputInvalidBorderColor","focusedText","modal","transparent","height","modalContent","position","borderStyle","dropDownContent","searchInputWrapper","alignItems","justifyContent","flex","clearButton","marginLeft","padding","alignSelf","searchButton","borderTopRightRadius","borderBottomRightRadius","searchButtonColor","rippleColor","icon","fontSize","color","searchButtonTextColor","marginRight","searchItem","marginBottom","paddingHorizontal","paddingVertical","searchItemBorderColor","searchItemTextColor","searchItemText","fontFamily","baseFont","dataCompleteItem","searchDataCompleteItemBgColor","textDecorationLine","placeholderText","inputPlaceholderColor","skeleton","inputDisabledBgColor","OS","textAlign","borderLeftWidth","left"],"sources":["search.styles.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmSearchStyles = BaseStyles & {\n focusedText: TextStyle,\n modal: AllStyle;\n modalContent: AllStyle;\n searchItem: AllStyle;\n dropDownContent: AllStyle;\n searchItemText: AllStyle;\n clearButton: WmButtonStyles;\n searchButton: WmButtonStyles;\n searchInputWrapper: AllStyle;\n placeholderText: AllStyle;\n invalid: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-search';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSearchStyles = defineStyles({\n root: {\n flexDirection: 'row',\n borderRadius: 28,\n },\n text: {\n minHeight: 56,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingRight: 14,\n width: '100%',\n borderWidth: 1,\n borderRightWidth: 0,\n borderTopLeftRadius: 28,\n borderBottomLeftRadius: 28,\n borderColor: themeVariables.searchBorderColor,\n backgroundColor: themeVariables.searchBgContainerColor,\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor,\n },\n focusedText : {\n borderBottomLeftRadius: 28,\n },\n modal: {\n backgroundColor: themeVariables.transparent,\n height: '100%'\n },\n modalContent: {\n backgroundColor: themeVariables.searchBgContainerColor,\n borderRadius: 6,\n position: 'absolute',\n borderStyle: 'solid',\n borderColor: themeVariables.searchBorderColor,\n width: '90%'\n },\n dropDownContent: {\n width: '100%'\n },\n searchInputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 1\n },\n clearButton: {\n root: {\n marginLeft: -40,\n padding: 0,\n width: 36,\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n backgroundColor: 'transparent'\n }\n } as WmButtonStyles,\n searchButton: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 0,\n borderTopRightRadius: 28,\n borderBottomRightRadius: 28,\n backgroundColor: themeVariables.searchButtonColor,\n height: 56,\n rippleColor: themeVariables.rippleColor\n },\n icon: {\n icon: {\n fontSize: 24,\n color: themeVariables.searchButtonTextColor,\n marginRight: 4\n }\n }\n } as WmButtonStyles,\n searchItem: {\n width: '100%',\n marginBottom: 4,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderBottomColor: themeVariables.searchItemBorderColor,\n flexDirection: 'row',\n alignItems: 'center',\n color: themeVariables.searchItemTextColor\n },\n searchItemText: {\n fontSize: 16,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont\n },\n dataCompleteItem: {\n root: {\n backgroundColor: themeVariables.searchDataCompleteItemBgColor,\n justifyContent: 'center',\n padding: 8\n },\n text: {\n fontSize: 12,\n textDecorationLine: 'none',\n color: themeVariables.searchItemTextColor\n }\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n height: 56\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n text : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS=='android'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderLeftWidth: 0,\n borderRightWidth: 1,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n },\n }\n }:Platform.OS=='web'?{\n text : {\n textAlign: 'right',\n borderWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n },\n searchButton: {\n root: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n },\n },\n clearButton: {\n root: {\n left: 0,\n position: 'absolute',\n marginLeft: 0\n }\n } as WmButtonStyles,\n }:{\n text : {\n textAlign: 'right',\n }\n });\n\n addStyle('app-autocomplete', '', {\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4,\n }\n } as WmSearchStyles);\n});\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc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,uBAAuB,EAAE,CAAC;QAC1B3B,mBAAmB,EAAE,CAAC;QACtBC,sBAAsB,EAAE;MAC1B;IACF,CAAC;IACDoB,WAAW,EAAE;MACXjC,IAAI,EAAE;QACJkE,IAAI,EAAE,CAAC;QACPxC,QAAQ,EAAE,UAAU;QACpBQ,UAAU,EAAE;MACd;IACF;EACF,CAAC,GAAC;IACA/B,IAAI,EAAG;MACL6D,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEFlE,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC/BK,IAAI,EAAE;MACJQ,gBAAgB,EAAE,CAAC;MACnB2B,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B;EACF,CAAmB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
|
@@ -99,7 +99,7 @@ export default class WmSkeleton extends BaseComponent {
|
|
99
99
|
},
|
100
100
|
onLayout: this.onLayoutChange,
|
101
101
|
style: this.styles.root
|
102
|
-
}, this.state.animate ? /*#__PURE__*/React.createElement(Animated.View, {
|
102
|
+
}, props.children, this.state.animate ? /*#__PURE__*/React.createElement(Animated.View, {
|
103
103
|
style: [StyleSheet.absoluteFill, this.styles.animatedView, {
|
104
104
|
transform: [{
|
105
105
|
translateX
|
@@ -124,7 +124,7 @@ export default class WmSkeleton extends BaseComponent {
|
|
124
124
|
})) : null);
|
125
125
|
}
|
126
126
|
}
|
127
|
-
export const createSkeleton = (theme, skeletonStyles, wrapper) => {
|
127
|
+
export const createSkeleton = (theme, skeletonStyles, wrapper, children) => {
|
128
128
|
const style = {};
|
129
129
|
const addStyleProp = propName => {
|
130
130
|
if (!isUndefined(wrapper[propName])) {
|
@@ -142,7 +142,8 @@ export const createSkeleton = (theme, skeletonStyles, wrapper) => {
|
|
142
142
|
return /*#__PURE__*/React.createElement(WmSkeleton, {
|
143
143
|
styles: theme.mergeStyle(skeletonStyles, {
|
144
144
|
root: style
|
145
|
-
})
|
145
|
+
}),
|
146
|
+
children: children
|
146
147
|
});
|
147
148
|
};
|
148
149
|
//# sourceMappingURL=skeleton.component.js.map
|