@wavemaker/app-rn-runtime 11.4.3-next.140441 → 11.4.3-next.140443
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -4
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js +2 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.styles.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +68 -122
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +0 -3
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +9 -17
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +2 -2
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +0 -3
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +1 -3
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +8 -19
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +2 -6
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +2 -3
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +1 -1
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +2 -2
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +1 -3
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -15
- 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.styles.js +3 -7
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +25 -30
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +0 -6
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +2 -4
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js +1 -2
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.styles.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -8
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +0 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.styles.js +1 -16
- app-rn-runtime/components/input/composite/composite.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +3 -7
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +0 -6
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +8 -4
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +1 -2
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +1 -2
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +0 -2
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +1 -3
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +0 -22
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +0 -4
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +11 -34
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +3 -3
- app-rn-runtime/runtime/App.js +1 -4
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +0 -17
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +3 -14
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +1 -30
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/variables/http.service.js +1 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +0 -1
- app-rn-runtime/variables/live-variable.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +0 -11
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +0 -1
- app-rn-runtime/variables/service-variable.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +0 -213
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +0 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +0 -15
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +0 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js +0 -7
- app-rn-runtime/components/chart/stack-chart/stack-chart.styles.js.map +0 -1
- app-rn-runtime/core/key.extractor.js +0 -22
- app-rn-runtime/core/key.extractor.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","BaseComponent","BaseComponentState","WmAccordionpaneProps","DEFAULT_CLASS","View","isWebPreviewMode","Animated","require","WmAccordionpaneState","constructor","arguments","_defineProperty","AnimatedView","props","height","setHeight","offset","useSharedValue","value","close","onLayoutChange","e","_e$nativeEvent","nativeEvent","layout","animatedStyles","useAnimatedStyle","maxHeight","withTiming","createElement","default","style","onLayout","children","WmAccordionpane","isCollapsed","state","collapsed","show","updateState","invokeEventCallback","proxy","hide","expand","parent","name","collapse","componentDidMount","accordion","addAccordionPane","onPartialLoad","renderContent","renderPartial","isPartialLoaded","setTimeout","bind","renderWidget","
|
|
1
|
+
{"version":3,"names":["React","useState","BaseComponent","BaseComponentState","WmAccordionpaneProps","DEFAULT_CLASS","View","isWebPreviewMode","Animated","require","WmAccordionpaneState","constructor","arguments","_defineProperty","AnimatedView","props","height","setHeight","offset","useSharedValue","value","close","onLayoutChange","e","_e$nativeEvent","nativeEvent","layout","animatedStyles","useAnimatedStyle","maxHeight","withTiming","createElement","default","style","onLayout","children","WmAccordionpane","isCollapsed","state","collapsed","show","updateState","invokeEventCallback","proxy","hide","expand","parent","name","collapse","componentDidMount","accordion","addAccordionPane","onPartialLoad","renderContent","renderPartial","isPartialLoaded","setTimeout","bind","renderWidget","_background"],"sources":["accordionpane.component.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmAccordionpaneProps from './accordionpane.props';\nimport { DEFAULT_CLASS, WmAccordionpaneStyles } from './accordionpane.styles';\nimport WmAccordion from '../accordion.component';\nimport { LayoutChangeEvent, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nconst Animated: any = isWebPreviewMode() ? {} : require('react-native-reanimated');\n\nexport class WmAccordionpaneState extends BaseComponentState<WmAccordionpaneProps> {\n isPartialLoaded = false;\n collapsed = true;\n}\n\nconst AnimatedView = (props: {\n close: boolean,\n children: any\n}) => {\n const [height, setHeight] = useState(0);\n const offset = Animated.useSharedValue(0);\n offset.value = props.close ? 0 : 1;\n const onLayoutChange = (e: LayoutChangeEvent) => {\n setHeight((e.nativeEvent?.layout?.height || height || 100000000) + 1000);\n };\n const animatedStyles = Animated.useAnimatedStyle(() => {\n return {\n maxHeight: Animated.withTiming(offset.value * height)\n };\n });\n return (\n <Animated.default.View style={[animatedStyles]}>\n <View onLayout={onLayoutChange}>\n {props.children}\n </View>\n </Animated.default.View>\n );\n};\n\nexport default class WmAccordionpane extends BaseComponent<WmAccordionpaneProps, WmAccordionpaneState, WmAccordionpaneStyles> {\n\n constructor(props: WmAccordionpaneProps) {\n super(props, DEFAULT_CLASS, new WmAccordionpaneProps(), new WmAccordionpaneState());\n }\n\n isCollapsed() {\n return this.state.collapsed;\n }\n \n show() {\n this.updateState({\n collapsed: false\n } as WmAccordionpaneState);\n this.invokeEventCallback('onExpand', [null, this.proxy]);\n }\n\n hide() {\n this.updateState({\n collapsed: true\n } as WmAccordionpaneState);\n this.invokeEventCallback('onCollapse', [null, this.proxy]);\n }\n\n expand() {\n (this.parent as WmAccordion).expand(this.props.name || '');\n }\n\n collapse() {\n (this.parent as WmAccordion).expand(this.props.name || '');\n }\n\n componentDidMount() {\n const accordion = (this.parent) as WmAccordion;\n accordion.addAccordionPane(this);\n super.componentDidMount();\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmAccordionpaneProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmAccordionpaneState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n renderWidget(props: WmAccordionpaneProps) {\n return isWebPreviewMode() ? \n (<View style={this.state.collapsed ? {maxHeight: 0} : {}}>\n {this._background}\n {this.renderContent(props)}\n </View>) :\n (<AnimatedView close={this.state.collapsed}>\n {this._background}\n {this.renderContent(props)}\n </AnimatedView>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAA0BC,QAAQ,QAAQ,OAAO;AAC7D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAE7E,SAA4BC,IAAI,QAAQ,cAAc;AACtD,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,MAAMC,QAAa,GAAGD,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAGE,OAAO,CAAC,yBAAyB,CAAC;AAElF,OAAO,MAAMC,oBAAoB,SAASP,kBAAkB,CAAuB;EAAAQ,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BAC/D,KAAK;IAAAA,eAAA,oBACX,IAAI;EAAA;AAClB;AAEA,MAAMC,YAAY,GAAIC,KAGrB,IAAK;EACJ,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGhB,QAAQ,CAAC,CAAC,CAAC;EACvC,MAAMiB,MAAM,GAAGV,QAAQ,CAACW,cAAc,CAAC,CAAC,CAAC;EACzCD,MAAM,CAACE,KAAK,GAAGL,KAAK,CAACM,KAAK,GAAG,CAAC,GAAG,CAAC;EAClC,MAAMC,cAAc,GAAIC,CAAoB,IAAK;IAAA,IAAAC,cAA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AI,CAACN,aAAa,CAACtC,KAAK,CACrB,CAAC,gBACNf,KAAA,CAAA+B,aAAA,CAACjB,YAAY;MAACO,KAAK,EAAE,IAAI,CAACiB,KAAK,CAACC;IAAU,GACxC,IAAI,CAACoB,WAAW,EAChB,IAAI,CAACN,aAAa,CAACtC,KAAK,CACb,CAAE;EAClB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Badge","List","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","Animatedview","WmPanelState","constructor","arguments","_defineProperty","WmPanel","props","updateState","expandedId","state","expanded","onPartialLoad","invokeEventCallback","renderContent","renderPartial","isPartialLoaded","setTimeout","bind","onPanelPress","collapsible","paneId","eventName","animatedRef","triggerExit","then","res","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","style","styles","badgetype","iconclass","name","toggleIcon","flexDirection","renderPanel","icon","Accordion","title","header","id","titleStyle","text","descriptionStyle","subheading","description","right","_ref","left","marginLeft","ref","entryanimation","children","renderWidget","root","_background","AccordionGroup","onAccordionPress","animation"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { Badge, List } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n expandedId: any;\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n private animatedRef: any;\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n this.updateState({\n expandedId: this.state.props.expanded ? 1 : -1,\n } as WmPanelState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(
|
|
1
|
+
{"version":3,"names":["React","View","Badge","List","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","Animatedview","WmPanelState","constructor","arguments","_defineProperty","WmPanel","props","updateState","expandedId","state","expanded","onPartialLoad","invokeEventCallback","renderContent","renderPartial","isPartialLoaded","setTimeout","bind","onPanelPress","collapsible","paneId","eventName","animatedRef","triggerExit","then","res","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","style","styles","badgetype","iconclass","name","toggleIcon","flexDirection","renderPanel","icon","Accordion","title","header","id","titleStyle","text","descriptionStyle","subheading","description","right","_ref","left","marginLeft","ref","entryanimation","children","renderWidget","root","_background","AccordionGroup","onAccordionPress","animation"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { Badge, List } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n expandedId: any;\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n private animatedRef: any;\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n this.updateState({\n expandedId: this.state.props.expanded ? 1 : -1,\n } as WmPanelState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress(expandedId: any) {\n if (!this.state.props.collapsible) {\n return;\n }\n const paneId = expandedId === this.state.expandedId ? -1 : 1;\n const eventName = paneId === 1 ? 'onExpand' : 'onCollapse';\n\n if (eventName === 'onCollapse') {\n this.animatedRef.triggerExit().then((res: any) => {\n if (res) {\n this.updateState({\n expandedId: paneId,\n props: {\n expanded: false\n }\n } as WmPanelState);\n }\n })\n } else {\n this.updateState({\n expandedId: paneId,\n props: {\n expanded: true\n }\n } as WmPanelState);\n }\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderPanel(props: WmPanelProps) {\n const icon = (<WmIcon styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass}></WmIcon>);\n return (\n <List.Accordion title={props.title} style={this.styles.header} id={1}\n titleStyle={this.styles.text} descriptionStyle={this.styles.subheading}\n description={props.subheading}\n expanded={props.expanded} \n right={({isExpanded}) => this.expandCollapseIcon(isExpanded)} left={props => icon}>\n <Animatedview style={{marginLeft: -64}} ref={ref => this.animatedRef = ref} entryanimation={'fadeInDown'}>\n <View>{this.renderContent(props)}</View>\n <View>{props.children}</View>\n </Animatedview>\n </List.Accordion>\n );\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\n <List.AccordionGroup expandedId={this.state.expandedId} onAccordionPress={this.onPanelPress.bind(this)}>\n <Animatedview entryanimation={props.animation}>\n {this.renderPanel(props)}\n </Animatedview>\n </List.AccordionGroup>\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AACzC,SAASC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AAChD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,YAAY,QAAQ,mEAAmE;AAEhG,OAAO,MAAMC,YAAY,SAASL,kBAAkB,CAAe;EAAAM,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA,0BAE/C,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,OAAO,SAASV,aAAa,CAA4C;EAE5FO,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,CAAC;IAACM,eAAA;IAChD,IAAI,CAACG,WAAW,CAAC;MACfC,UAAU,EAAE,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,QAAQ,GAAG,CAAC,GAAG,CAAC;IAC/C,CAAiB,CAAC;EACpB;EAEAC,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC5C;EAEAC,aAAaA,CAACP,KAAmB,EAAE;IACjC,IAAIA,KAAK,CAACQ,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACL,KAAK,CAACM,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACT,WAA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OAAK,IAAI,CAAC1B,kBAAkB,CAACC,UAAU,CAAC;MAAA,CAAC;MAAC0B,IAAI,EAAEhD,KAAK,IAAIoC;IAAK,gBAChGnD,KAAA,CAAA0C,aAAA,CAACjC,YAAY;MAACkC,KAAK,EAAE;QAACqB,UAAU,EAAE,CAAC;MAAE,CAAE;MAACC,GAAG,EAAEA,GAAG,IAAI,IAAI,CAAClC,WAAW,GAAGkC,GAAI;MAACC,cAAc,EAAE;IAAa,gBACvGlE,KAAA,CAAA0C,aAAA,CAACzC,IAAI,QAAE,IAAI,CAACqB,aAAa,CAACP,KAAK,CAAQ,CAAC,eACxCf,KAAA,CAAA0C,aAAA,CAACzC,IAAI,QAAEc,KAAK,CAACoD,QAAe,CAChB,CACA,CAAC;EAErB;EAEAC,YAAYA,CAACrD,KAAmB,EAAE;IAChC,oBAAQf,KAAA,CAAA0C,aAAA,CAACzC,IAAI;MAAC0C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACyB;IAAK,GACvB,IAAI,CAACC,WAAW,eACjBtE,KAAA,CAAA0C,aAAA,CAACvC,IAAI,CAACoE,cAAc;MAACtD,UAAU,EAAE,IAAI,CAACC,KAAK,CAACD,UAAW;MAACuD,gBAAgB,EAAE,IAAI,CAAC7C,YAAY,CAACD,IAAI,CAAC,IAAI;IAAE,gBACnG1B,KAAA,CAAA0C,aAAA,CAACjC,YAAY;MAACyD,cAAc,EAAEnD,KAAK,CAAC0D;IAAU,GAC3C,IAAI,CAACvB,WAAW,CAACnC,KAAK,CACX,CACG,CACrB,CAAC;EACjB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseComponent","BaseComponentState","BaseProps","PartialHostState","constructor","arguments","_defineProperty","PartialHostProps","PartialHost","markupProps","defaultClass","defaultProps","defaultState","onPartialLoad","invokeEventCallback","renderContent","props","renderPartial","state","isPartialLoaded","isVisible","setTimeout","updateState","bind","children"],"sources":["partial-host.component.tsx"],"sourcesContent":["import { BaseComponent, BaseComponentState, BaseProps, BaseStyles } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport abstract class PartialHostState<T extends BaseProps> extends BaseComponentState<T> {\n isPartialLoaded = false;\n}\n\nexport abstract class PartialHostProps extends BaseProps {\n renderPartial?: Function;\n children?: any;\n}\n\nexport abstract class PartialHost<T extends BaseProps, S extends PartialHostState<T>, L extends BaseStyles>\n extends BaseComponent<T, S, L> {\n\n constructor(markupProps: T, defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps, defaultClass, defaultProps, defaultState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: PartialHostProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded && !this.isVisible()) {\n return null;\n }\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as any);\n });\n }\n return props.renderPartial(
|
|
1
|
+
{"version":3,"names":["BaseComponent","BaseComponentState","BaseProps","PartialHostState","constructor","arguments","_defineProperty","PartialHostProps","PartialHost","markupProps","defaultClass","defaultProps","defaultState","onPartialLoad","invokeEventCallback","renderContent","props","renderPartial","state","isPartialLoaded","isVisible","setTimeout","updateState","bind","children"],"sources":["partial-host.component.tsx"],"sourcesContent":["import { BaseComponent, BaseComponentState, BaseProps, BaseStyles } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport abstract class PartialHostState<T extends BaseProps> extends BaseComponentState<T> {\n isPartialLoaded = false;\n}\n\nexport abstract class PartialHostProps extends BaseProps {\n renderPartial?: Function;\n children?: any;\n}\n\nexport abstract class PartialHost<T extends BaseProps, S extends PartialHostState<T>, L extends BaseStyles>\n extends BaseComponent<T, S, L> {\n\n constructor(markupProps: T, defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps, defaultClass, defaultProps, defaultState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: PartialHostProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded && !this.isVisible()) {\n return null;\n }\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as any);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n}"],"mappings":";;;AAAA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,SAAS,QAAoB,+CAA+C;AAExH,OAAO,MAAeC,gBAAgB,SAA8BF,kBAAkB,CAAI;EAAAG,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BACpE,KAAK;EAAA;AAC3B;AAEA,OAAO,MAAeC,gBAAgB,SAASL,SAAS,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA;IAAAA,eAAA;EAAA;AAGzD;AAEA,OAAO,MAAeE,WAAW,SACrBR,aAAa,CAAU;EAE/BI,WAAWA,CAACK,WAAc,EAAEC,YAAoB,EAAEC,YAAgB,EAAEC,YAAgB,EAAE;IAClF,KAAK,CAACH,WAAW,EAAEC,YAAY,EAAEC,YAAY,EAAEC,YAAY,CAAC;EAChE;EAEAC,aAAaA,CAAA,EAAG;IACZ,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC9C;EAEAC,aAAaA,CAACC,KAAuB,EAAE;IACnC,IAAIA,KAAK,CAACC,aAAa,EAAE;MACrB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,IAAI,CAAC,IAAI,CAACC,SAAS,CAAC,CAAC,EAAE;QAClD,OAAO,IAAI;MACf;MACA,IAAI,CAAC,IAAI,CAACF,KAAK,CAACC,eAAe,EAAE;QAC7BE,UAAU,CAAC,MAAM;UACb,IAAI,CAACC,WAAW,CAAC;YACbH,eAAe,EAAE;UACrB,CAAQ,CAAC;QACb,CAAC,CAAC;MACN;MACA,OAAOH,KAAK,CAACC,aAAa,CAAC,IAAI,CAACJ,aAAa,CAACU,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D;IACA,OAAOP,KAAK,CAACQ,QAAQ;EACzB;AAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmTabpaneProps","DEFAULT_CLASS","WmTabpaneState","constructor","arguments","_defineProperty","WmTabpane","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","componentDidMount","tabs","parent","addTabPane","proxy","_onSelect","_onDeselect","select","selectTabPane","renderWidget","createElement","style","styles","root","_background"],"sources":["tabpane.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabpaneProps from './tabpane.props';\nimport { DEFAULT_CLASS, WmTabpaneStyles } from './tabpane.styles';\nimport WmTabs from '../tabs.component';\n\nexport class WmTabpaneState extends BaseComponentState<WmTabpaneProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmTabpane extends BaseComponent<WmTabpaneProps, WmTabpaneState, WmTabpaneStyles> {\n\n constructor(props: WmTabpaneProps) {\n super(props, DEFAULT_CLASS, new WmTabpaneProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmTabpaneProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmTabpaneState);\n });\n }\n return props.renderPartial(
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmTabpaneProps","DEFAULT_CLASS","WmTabpaneState","constructor","arguments","_defineProperty","WmTabpane","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","componentDidMount","tabs","parent","addTabPane","proxy","_onSelect","_onDeselect","select","selectTabPane","renderWidget","createElement","style","styles","root","_background"],"sources":["tabpane.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabpaneProps from './tabpane.props';\nimport { DEFAULT_CLASS, WmTabpaneStyles } from './tabpane.styles';\nimport WmTabs from '../tabs.component';\n\nexport class WmTabpaneState extends BaseComponentState<WmTabpaneProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmTabpane extends BaseComponent<WmTabpaneProps, WmTabpaneState, WmTabpaneStyles> {\n\n constructor(props: WmTabpaneProps) {\n super(props, DEFAULT_CLASS, new WmTabpaneProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmTabpaneProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmTabpaneState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n componentDidMount() {\n const tabs = (this.parent) as WmTabs;\n tabs.addTabPane(this.proxy as WmTabpane);\n super.componentDidMount();\n }\n\n _onSelect() {\n this.invokeEventCallback('onSelect', [null, this.proxy]);\n }\n _onDeselect() {\n this.invokeEventCallback('onDeselect', [null, this.proxy]);\n }\n\n select() {\n (this.parent as WmTabs).selectTabPane(this);\n }\n\n renderWidget(props: WmTabpaneProps) {\n return (<View style={this.styles.root}>{this._background}{this.renderContent(props)}</View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAGjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BACnD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,SAAS,SAASR,aAAa,CAAkD;EAEpGK,WA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ACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAE,IAAI,CAACtB,aAAa,CAACH,KAAK,CAAQ,CAAC;EAC7F;AACF"}
|
|
@@ -157,12 +157,12 @@ export default class WmWizard extends BaseComponent {
|
|
|
157
157
|
onTap: this.onNext.bind(this, this.steps)
|
|
158
158
|
}), this.state.currentStep > 0 && /*#__PURE__*/React.createElement(WmButton, {
|
|
159
159
|
iconclass: 'wi wi-chevron-left',
|
|
160
|
-
styles: merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions
|
|
160
|
+
styles: merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions),
|
|
161
161
|
caption: props.previousbtnlabel,
|
|
162
162
|
onTap: this.onPrev.bind(this, this.steps)
|
|
163
163
|
}), props.cancelable ? /*#__PURE__*/React.createElement(WmButton, {
|
|
164
164
|
caption: props.cancelbtnlabel,
|
|
165
|
-
styles: merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions
|
|
165
|
+
styles: merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions),
|
|
166
166
|
onTap: this.onCancel.bind(this)
|
|
167
167
|
}) : null, isSkippable && /*#__PURE__*/React.createElement(WmAnchor, {
|
|
168
168
|
iconclass: 'wi wi-chevron-right',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","TouchableOpacity","Platform","isArray","merge","BaseComponent","BaseComponentState","WmWizardProps","DEFAULT_CLASS","WmButton","WmIcon","WmAnchor","WmWizardState","constructor","arguments","_defineProperty","WmWizard","props","steps","children","defaultStepIndex","defaultstep","map","item","index","name","updateCurrentStep","addWizardStep","step","forceUpdate","componentDidMount","showActiveStep","_this$steps$this$stat","state","currentStep","setActive","_this$steps$this$stat2","isDone","length","undefined","setInActive","updateState","getStepStyle","style","styles","push","doneStep","activeStep","renderWizardHeader","isLastStep","numberOfSteps","isFirstStep","isActiveStep","isNumberTextLayout","classname","show","createElement","headerWrapper","paddingRight","paddingLeft","key","stepWrapper","onPress","bind","disabled","stepCounter","stepIcon","icon","color","iconclass","stepTitle","title","numberTextStepConnector","width","stepConnector","left","OS","isRTL","onPrev","invokePrevCB","onNext","eventName","invokeSkipCB","invokeNextCB","onDone","$event","invokeEventCallback","proxy","onCancel","onSkip","renderWidget","isSkippable","enableskip","root","_background","wizardHeader","i","wizardBody","wizardFooter","flexDirection","actionsalignment","wizardActions","theme","getStyle","doneButton","caption","donebtnlabel","onTap","nextButton","iconposition","nextbtnlabel","prevButton","previousbtnlabel","cancelable","cancelbtnlabel","cancelButton","skipLink"],"sources":["wizard.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, Platform } from 'react-native';\nimport { isArray, merge } from 'lodash';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmWizardProps from './wizard.props';\nimport { DEFAULT_CLASS, WmWizardStyles } from './wizard.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmWizardstep from './wizardstep/wizardstep.component';\n\nexport class WmWizardState extends BaseComponentState<WmWizardProps> {\n currentStep: number = 0;\n isDone: boolean = false;\n}\n\nexport default class WmWizard extends BaseComponent<WmWizardProps, WmWizardState, WmWizardStyles> {\n private numberOfSteps: number = null as any;\n private steps = [] as WmWizardstep[];\n constructor(props: WmWizardProps) {\n super(props, DEFAULT_CLASS, new WmWizardProps());\n const steps = props.children;\n let defaultStepIndex = 0;\n if (isArray(steps) && props.defaultstep) {\n steps.map((item: any, index: any) => {\n if (props.defaultstep === item.props.name) {\n defaultStepIndex = index;\n }\n })\n }\n this.updateCurrentStep(defaultStepIndex);\n }\n\n addWizardStep(step: WmWizardstep) {\n this.steps[step.props.index] = step;\n this.forceUpdate();\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.showActiveStep();\n }\n\n showActiveStep() {\n this.steps[this.state.currentStep]?.setActive();\n }\n\n updateCurrentStep(index: number, isDone = false) {\n this.steps[this.state.currentStep]?.setInActive();\n this.updateState({\n currentStep: index,\n isDone: isDone\n } as WmWizardState, () => this.showActiveStep());\n }\n\n getStepStyle(index: number) {\n const style = [this.styles.step];\n if (this.state.isDone || index < this.state.currentStep) {\n style.push(this.styles.doneStep);\n } else if (this.state.currentStep === index) {\n style.push(this.styles.activeStep);\n }\n return style;\n }\n\n renderWizardHeader(item: any, index: number) {\n const isLastStep = index === this.numberOfSteps - 1;\n const isFirstStep = index === 0;\n const isActiveStep = index === this.state.currentStep;\n const isNumberTextLayout = this.state.props.classname === 'number-text-inline';\n return item.props.show != false ? (\n <View style={[this.styles.headerWrapper, isNumberTextLayout ?\n {paddingRight: isActiveStep ? 0 : 5, paddingLeft: index === this.state.currentStep + 1 ? 0 : 5}: {}]} key={index+1}>\n <TouchableOpacity style={this.styles.stepWrapper}\n onPress={this.updateCurrentStep.bind(this, index, false)} disabled={index >= this.state.currentStep}>\n <View style={this.getStepStyle(index)}>\n {index >= this.state.currentStep && !this.state.isDone &&\n <Text style={isActiveStep ? this.styles.activeStep : this.styles.stepCounter}>{index+1}</Text>}\n {(index < this.state.currentStep || this.state.isDone) &&\n <WmIcon styles={merge({}, this.styles.stepIcon, {icon: {color: this.styles.activeStep.color}})}\n iconclass={item.props.iconclass || 'wm-sl-l sl-check'}></WmIcon>}\n </View>\n {((isNumberTextLayout && isActiveStep) || !isNumberTextLayout) &&\n <Text style={this.styles.stepTitle}>\n {item.props.title || 'Step Title'}</Text> }\n {this.numberOfSteps > 1 && isActiveStep &&\n <View style={[this.styles.numberTextStepConnector, {width: isLastStep ? 0 : 50}]}></View>}\n </TouchableOpacity>\n {this.numberOfSteps > 1 && <View style={[this.styles.stepConnector, { width: isFirstStep || isLastStep ? '50%' : '100%',\n left: Platform.OS == \"web\"?(!this.isRTL && isFirstStep) || (this.isRTL && isLastStep) ? '50%': '0%': isFirstStep ? '50%': '0%'}]}></View>}\n </View>\n ) : null;\n }\n\n onPrev(steps: any) {\n const index = this.state.currentStep;\n const currentStep = this.steps[index];\n currentStep.invokePrevCB(index);\n this.updateCurrentStep(index - 1);\n }\n\n onNext(steps: any, eventName?: string) {\n const index = this.state.currentStep;\n const currentStep = this.steps[index];\n if (eventName === 'skip') {\n currentStep.invokeSkipCB(index);\n } else {\n currentStep.invokeNextCB(index);\n }\n this.updateCurrentStep(index + 1);\n }\n\n onDone($event: any) {\n this.updateState({\n isDone: true\n } as WmWizardState);\n this.invokeEventCallback('onDone', [$event, this.proxy]);\n }\n\n onCancel() {\n this.invokeEventCallback('onCancel', [null, this.proxy]);\n }\n onSkip(steps: any) {\n this.onNext(steps, 'skip');\n }\n\n renderWidget(props: WmWizardProps) {\n this.numberOfSteps = this.steps.length;\n const activeStep = this.steps[this.state.currentStep];\n const isSkippable = this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip;\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.wizardHeader}>\n {this.steps ? this.steps.map((step, i) => this.renderWizardHeader(step, i)) : null}\n </View>\n <View style={this.styles.wizardBody}>\n {props.children}\n </View>\n <View style={[this.styles.wizardFooter,\n {flexDirection: props.actionsalignment === 'right' ? 'row-reverse': 'row'}]}>\n {(this.state.currentStep+1) === this.numberOfSteps &&\n <WmButton iconclass={'wm-sl-l sl-check'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-success'), this.styles.doneButton)}\n caption={props.donebtnlabel} onTap={this.onDone.bind(this)}></WmButton>\n }\n {(this.state.currentStep+1) < this.numberOfSteps &&\n <WmButton iconclass={'wi wi-chevron-right'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-primary'), this.styles.nextButton)}\n iconposition={'right'} caption={props.nextbtnlabel} onTap={this.onNext.bind(this, this.steps)}></WmButton>\n }\n {this.state.currentStep > 0 &&\n <WmButton iconclass={'wi wi-chevron-left'} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.prevButton)} caption={props.previousbtnlabel}\n onTap={this.onPrev.bind(this, this.steps)}></WmButton>\n }\n {props.cancelable ?\n <WmButton caption={props.cancelbtnlabel} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.cancelButton)} onTap={this.onCancel.bind(this)}></WmButton>\n : null\n }\n {isSkippable &&\n <WmAnchor iconclass={'wi wi-chevron-right'} iconposition={'right'} caption={'Skip'}\n styles={merge({}, this.styles.wizardActions, this.styles.skipLink)} onTap={this.onSkip.bind(this, this.steps)}></WmAnchor>\n }\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,QAAQ,cAAc;AACrE,SAASC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,QAAQ,MAAM,oEAAoE;AAGzF,OAAO,MAAMC,aAAa,SAASN,kBAAkB,CAAgB;EAAAO,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,sBAC7C,CAAC;IAAAA,eAAA,iBACL,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,QAAQ,SAASX,aAAa,CAA+C;EAGhGQ,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAET,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;IAACQ,eAAA,wBAHnB,IAAI;IAAAA,eAAA,gBACpB,EAAE;IAGhB,MAAMG,KAAK,GAAGD,KAAK,CAACE,QAAQ;IAC5B,IAAIC,gBAAgB,GAAG,CAAC;IACxB,IAAIjB,OAAO,CAACe,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B,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC7C,KAAK;IAAE,CAAW,CAEnI,CACF,CAAC;EAEX;AACF"}
|
|
1
|
+
{"version":3,"names":["React","Text","View","TouchableOpacity","Platform","isArray","merge","BaseComponent","BaseComponentState","WmWizardProps","DEFAULT_CLASS","WmButton","WmIcon","WmAnchor","WmWizardState","constructor","arguments","_defineProperty","WmWizard","props","steps","children","defaultStepIndex","defaultstep","map","item","index","name","updateCurrentStep","addWizardStep","step","forceUpdate","componentDidMount","showActiveStep","_this$steps$this$stat","state","currentStep","setActive","_this$steps$this$stat2","isDone","length","undefined","setInActive","updateState","getStepStyle","style","styles","push","doneStep","activeStep","renderWizardHeader","isLastStep","numberOfSteps","isFirstStep","isActiveStep","isNumberTextLayout","classname","show","createElement","headerWrapper","paddingRight","paddingLeft","key","stepWrapper","onPress","bind","disabled","stepCounter","stepIcon","icon","color","iconclass","stepTitle","title","numberTextStepConnector","width","stepConnector","left","OS","isRTL","onPrev","invokePrevCB","onNext","eventName","invokeSkipCB","invokeNextCB","onDone","$event","invokeEventCallback","proxy","onCancel","onSkip","renderWidget","isSkippable","enableskip","root","_background","wizardHeader","i","wizardBody","wizardFooter","flexDirection","actionsalignment","wizardActions","theme","getStyle","doneButton","caption","donebtnlabel","onTap","nextButton","iconposition","nextbtnlabel","previousbtnlabel","cancelable","cancelbtnlabel","skipLink"],"sources":["wizard.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, Platform } from 'react-native';\nimport { isArray, merge } from 'lodash';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmWizardProps from './wizard.props';\nimport { DEFAULT_CLASS, WmWizardStyles } from './wizard.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmWizardstep from './wizardstep/wizardstep.component';\n\nexport class WmWizardState extends BaseComponentState<WmWizardProps> {\n currentStep: number = 0;\n isDone: boolean = false;\n}\n\nexport default class WmWizard extends BaseComponent<WmWizardProps, WmWizardState, WmWizardStyles> {\n private numberOfSteps: number = null as any;\n private steps = [] as WmWizardstep[];\n constructor(props: WmWizardProps) {\n super(props, DEFAULT_CLASS, new WmWizardProps());\n const steps = props.children;\n let defaultStepIndex = 0;\n if (isArray(steps) && props.defaultstep) {\n steps.map((item: any, index: any) => {\n if (props.defaultstep === item.props.name) {\n defaultStepIndex = index;\n }\n })\n }\n this.updateCurrentStep(defaultStepIndex);\n }\n\n addWizardStep(step: WmWizardstep) {\n this.steps[step.props.index] = step;\n this.forceUpdate();\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.showActiveStep();\n }\n\n showActiveStep() {\n this.steps[this.state.currentStep]?.setActive();\n }\n\n updateCurrentStep(index: number, isDone = false) {\n this.steps[this.state.currentStep]?.setInActive();\n this.updateState({\n currentStep: index,\n isDone: isDone\n } as WmWizardState, () => this.showActiveStep());\n }\n\n getStepStyle(index: number) {\n const style = [this.styles.step];\n if (this.state.isDone || index < this.state.currentStep) {\n style.push(this.styles.doneStep);\n } else if (this.state.currentStep === index) {\n style.push(this.styles.activeStep);\n }\n return style;\n }\n\n renderWizardHeader(item: any, index: number) {\n const isLastStep = index === this.numberOfSteps - 1;\n const isFirstStep = index === 0;\n const isActiveStep = index === this.state.currentStep;\n const isNumberTextLayout = this.state.props.classname === 'number-text-inline';\n return item.props.show != false ? (\n <View style={[this.styles.headerWrapper, isNumberTextLayout ?\n {paddingRight: isActiveStep ? 0 : 5, paddingLeft: index === this.state.currentStep + 1 ? 0 : 5}: {}]} key={index+1}>\n <TouchableOpacity style={this.styles.stepWrapper}\n onPress={this.updateCurrentStep.bind(this, index, false)} disabled={index >= this.state.currentStep}>\n <View style={this.getStepStyle(index)}>\n {index >= this.state.currentStep && !this.state.isDone &&\n <Text style={isActiveStep ? this.styles.activeStep : this.styles.stepCounter}>{index+1}</Text>}\n {(index < this.state.currentStep || this.state.isDone) &&\n <WmIcon styles={merge({}, this.styles.stepIcon, {icon: {color: this.styles.activeStep.color}})}\n iconclass={item.props.iconclass || 'wm-sl-l sl-check'}></WmIcon>}\n </View>\n {((isNumberTextLayout && isActiveStep) || !isNumberTextLayout) &&\n <Text style={this.styles.stepTitle}>\n {item.props.title || 'Step Title'}</Text> }\n {this.numberOfSteps > 1 && isActiveStep &&\n <View style={[this.styles.numberTextStepConnector, {width: isLastStep ? 0 : 50}]}></View>}\n </TouchableOpacity>\n {this.numberOfSteps > 1 && <View style={[this.styles.stepConnector, { width: isFirstStep || isLastStep ? '50%' : '100%',\n left: Platform.OS == \"web\"?(!this.isRTL && isFirstStep) || (this.isRTL && isLastStep) ? '50%': '0%': isFirstStep ? '50%': '0%'}]}></View>}\n </View>\n ) : null;\n }\n\n onPrev(steps: any) {\n const index = this.state.currentStep;\n const currentStep = this.steps[index];\n currentStep.invokePrevCB(index);\n this.updateCurrentStep(index - 1);\n }\n\n onNext(steps: any, eventName?: string) {\n const index = this.state.currentStep;\n const currentStep = this.steps[index];\n if (eventName === 'skip') {\n currentStep.invokeSkipCB(index);\n } else {\n currentStep.invokeNextCB(index);\n }\n this.updateCurrentStep(index + 1);\n }\n\n onDone($event: any) {\n this.updateState({\n isDone: true\n } as WmWizardState);\n this.invokeEventCallback('onDone', [$event, this.proxy]);\n }\n\n onCancel() {\n this.invokeEventCallback('onCancel', [null, this.proxy]);\n }\n onSkip(steps: any) {\n this.onNext(steps, 'skip');\n }\n\n renderWidget(props: WmWizardProps) {\n this.numberOfSteps = this.steps.length;\n const activeStep = this.steps[this.state.currentStep];\n const isSkippable = this.steps[this.state.currentStep] && this.steps[this.state.currentStep].props.enableskip;\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.wizardHeader}>\n {this.steps ? this.steps.map((step, i) => this.renderWizardHeader(step, i)) : null}\n </View>\n <View style={this.styles.wizardBody}>\n {props.children}\n </View>\n <View style={[this.styles.wizardFooter,\n {flexDirection: props.actionsalignment === 'right' ? 'row-reverse': 'row'}]}>\n {(this.state.currentStep+1) === this.numberOfSteps &&\n <WmButton iconclass={'wm-sl-l sl-check'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-success'), this.styles.doneButton)}\n caption={props.donebtnlabel} onTap={this.onDone.bind(this)}></WmButton>\n }\n {(this.state.currentStep+1) < this.numberOfSteps &&\n <WmButton iconclass={'wi wi-chevron-right'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-primary'), this.styles.nextButton)}\n iconposition={'right'} caption={props.nextbtnlabel} onTap={this.onNext.bind(this, this.steps)}></WmButton>\n }\n {this.state.currentStep > 0 &&\n <WmButton iconclass={'wi wi-chevron-left'} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions)} caption={props.previousbtnlabel}\n onTap={this.onPrev.bind(this, this.steps)}></WmButton>\n }\n {props.cancelable ?\n <WmButton caption={props.cancelbtnlabel} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions)} onTap={this.onCancel.bind(this)}></WmButton>\n : null\n }\n {isSkippable &&\n <WmAnchor iconclass={'wi wi-chevron-right'} iconposition={'right'} caption={'Skip'}\n styles={merge({}, this.styles.wizardActions, this.styles.skipLink)} onTap={this.onSkip.bind(this, this.steps)}></WmAnchor>\n }\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,QAAQ,cAAc;AACrE,SAASC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,MAAM,MAAM,gEAAgE;AACnF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a,CAAE;MAACM,KAAK,EAAE,IAAI,CAACnB,QAAQ,CAACzB,IAAI,CAAC,IAAI;IAAE,CAAW,CAAC,GACrK,IAAI,EAET4B,WAAW,iBACR7F,KAAA,CAAA0D,aAAA,CAAC7C,QAAQ;MAAC0D,SAAS,EAAE,qBAAsB;MAACwC,YAAY,EAAE,OAAQ;MAACJ,OAAO,EAAE,MAAO;MACzE7D,MAAM,EAAExC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAACwC,MAAM,CAACyD,aAAa,EAAE,IAAI,CAACzD,MAAM,CAACsE,QAAQ,CAAE;MAACP,KAAK,EAAE,IAAI,CAAClB,MAAM,CAAC1B,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC7C,KAAK;IAAE,CAAW,CAEnI,CACF,CAAC;EAEX;AACF"}
|
|
@@ -7,7 +7,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
7
7
|
flexDirection: 'column',
|
|
8
8
|
backgroundColor: themeVariables.wizardBackgroundColor,
|
|
9
9
|
display: 'flex',
|
|
10
|
-
|
|
10
|
+
height: '100%'
|
|
11
11
|
},
|
|
12
12
|
text: {},
|
|
13
13
|
activeStep: {
|
|
@@ -84,8 +84,6 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
84
84
|
borderColor: themeVariables.wizardNextBtnColor
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
-
prevButton: {},
|
|
88
|
-
cancelButton: {},
|
|
89
87
|
doneButton: {
|
|
90
88
|
root: {
|
|
91
89
|
marginRight: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","backgroundColor","wizardBackgroundColor","display","minHeight","text","activeStep","wizardStepActiveColor","borderColor","color","wizardActiveStepColor","doneStep","wizardStepDoneColor","wizardDoneStepColor","wizardHeader","padding","alignItems","justifyContent","stepWrapper","zIndex","headerWrapper","flex","wizardBody","alignSelf","paddingTop","width","borderWidth","borderTopWidth","borderBottomWidth","wizardBorderColor","wizardFooter","buttonWrapper","stepTitle","textTransform","fontSize","wizardStepTitleColor","step","height","borderRadius","wizardStepColor","wizardActions","marginRight","nextButton","wizardNextBtnColor","prevButton","cancelButton","doneButton","wizardDoneBtnColor","icon","stepIcon","wizardStepIconColor","skipLink","stepConnector","wizardStepConnectorColor","position","top","numberTextStepConnector","stepCounter","transform","rotateY"],"sources":["wizard.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmAnchorStyles } from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.styles';\n\nexport type WmWizardStyles = BaseStyles & {\n wizardHeader: AllStyle,\n wizardBody: AllStyle,\n wizardFooter: AllStyle,\n wizardActions: WmButtonStyles,\n stepTitle: AllStyle,\n buttonWrapper: AllStyle,\n step: AllStyle,\n nextButton: WmButtonStyles,\n doneButton: WmButtonStyles,\n prevButton: WmButtonStyles,\n cancelButton: WmButtonStyles,\n stepIcon: WmIconStyles,\n skipLink: WmAnchorStyles,\n activeStep: AllStyle,\n doneStep: AllStyle,\n headerWrapper: AllStyle,\n stepWrapper: AllStyle,\n stepConnector: AllStyle,\n numberTextStepConnector: AllStyle,\n stepCounter: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-wizard';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmWizardStyles = defineStyles({\n root: {\n flexDirection: 'column',\n backgroundColor: themeVariables.wizardBackgroundColor,\n display: 'flex',\n minHeight: 240\n },\n text: {},\n activeStep:{\n backgroundColor: themeVariables.wizardStepActiveColor,\n borderColor: themeVariables.wizardStepActiveColor,\n color: themeVariables.wizardActiveStepColor\n },\n doneStep: {\n backgroundColor: themeVariables.wizardStepDoneColor,\n color: themeVariables.wizardDoneStepColor,\n borderColor: themeVariables.wizardStepDoneColor\n },\n wizardHeader: {\n padding: 8,\n flexDirection: 'row',\n alignItems: 'flex-start',\n justifyContent: 'center'\n },\n stepWrapper: {\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: 20\n },\n headerWrapper: {\n flex: 1\n },\n wizardBody: {\n alignSelf: 'flex-start',\n paddingTop: 10,\n flex: 1,\n width: '100%',\n borderWidth: 0,\n borderTopWidth: 1,\n borderBottomWidth: 1,\n borderColor: themeVariables.wizardBorderColor\n },\n wizardFooter: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n padding: 12\n },\n buttonWrapper: {\n flexDirection: 'row',\n },\n stepTitle: {\n textTransform: 'capitalize',\n fontSize: 12,\n color: themeVariables.wizardStepTitleColor\n },\n step: {\n alignItems: 'center',\n justifyContent: 'center',\n width: 37,\n backgroundColor: themeVariables.wizardBackgroundColor,\n height: 37,\n borderWidth: 1,\n borderRadius: 18.5,\n color: themeVariables.wizardStepColor,\n borderColor: themeVariables.wizardStepColor\n },\n wizardActions: {\n root: {\n marginRight: 8\n },\n text : {\n textTransform: 'capitalize',\n fontSize: 14\n }\n } as WmButtonStyles,\n nextButton: {\n root: {\n marginRight: 0,\n backgroundColor: themeVariables.wizardNextBtnColor,\n borderColor: themeVariables.wizardNextBtnColor\n }\n } as WmButtonStyles,\n prevButton: {\n } as WmButtonStyles,\n cancelButton: {\n } as WmButtonStyles,\n doneButton: {\n root: {\n marginRight: 0,\n backgroundColor: themeVariables.wizardDoneBtnColor\n },\n icon: {\n text: {\n fontSize: 12\n }\n }\n } as WmButtonStyles,\n stepIcon: {\n root: {\n alignSelf: 'center',\n justifyContent: 'center'\n },\n text: {\n color: themeVariables.wizardStepIconColor,\n fontSize: 15\n }\n } as WmIconStyles,\n skipLink: {\n root: {\n padding: 8,\n alignSelf: 'flex-end'\n },\n } as WmAnchorStyles,\n stepConnector: {\n backgroundColor: themeVariables.wizardStepConnectorColor,\n position: 'absolute',\n top: 17.5,\n zIndex: 10,\n height: 2\n },\n numberTextStepConnector: {\n display: 'none'\n },\n stepCounter: {\n fontSize: 15,\n color: themeVariables.wizardStepColor\n }\n } as WmWizardStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('number-text-inline', '', {\n stepConnector: {\n display: 'none'\n },\n numberTextStepConnector: {\n backgroundColor: themeVariables.wizardStepConnectorColor,\n height: 2,\n display: 'flex'\n },\n stepWrapper: {\n flexDirection: 'row'\n },\n wizardHeader: {\n justifyContent: 'flex-start'\n },\n headerWrapper: {\n flex: -1\n },\n stepTitle: {\n padding: 5\n },\n } as WmWizardStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n wizardActions: {\n icon: {\n root:{\n transform: [{rotateY:'180deg'}]\n }\n },\n },\n nextButton:{\n root: {\n marginRight: 8,\n }\n },\n doneButton:{\n root: {\n marginRight: 8,\n },\n icon:{\n root:{\n transform: [{rotateY:'0deg'}]\n }\n }\n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA4BxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,aAAa,EAAE,QAAQ;MACvBC,eAAe,EAAEL,cAAc,CAACM,qBAAqB;MACrDC,OAAO,EAAE,MAAM;MACfC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,UAAU,EAAC;MACPL,eAAe,EAAEL,cAAc,CAACW,qBAAqB;MACrDC,WAAW,EAAEZ,cAAc,CAACW,qBAAqB;MACjDE,KAAK,EAAEb,cAAc,CAACc;IAC1B,C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CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE;IACjCuD,aAAa,EAAE;MACbjD,OAAO,EAAE;IACX,CAAC;IACDqD,uBAAuB,EAAE;MACvBvD,eAAe,EAAEL,cAAc,CAACyD,wBAAwB;MACxDhB,MAAM,EAAE,CAAC;MACTlC,OAAO,EAAE;IACX,CAAC;IACDe,WAAW,EAAE;MACXlB,aAAa,EAAE;IACjB,CAAC;IACDc,YAAY,EAAE;MACZG,cAAc,EAAE;IAClB,CAAC;IACDG,aAAa,EAAE;MACbC,IAAI,EAAE,CAAC;IACT,CAAC;IACDW,SAAS,EAAE;MACTjB,OAAO,EAAE;IACX;EACF,CAAmB,CAAC;EACpBlB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnC8C,aAAa,EAAE;MACbQ,IAAI,EAAE;QACJjD,IAAI,EAAC;UACH2D,SAAS,EAAE,CAAC;YAACC,OAAO,EAAC;UAAQ,CAAC;QAChC;MACF;IACF,CAAC;IACDjB,UAAU,EAAC;MACT3C,IAAI,EAAE;QACJ0C,WAAW,EAAE;MACf;IACF,CAAC;IACDK,UAAU,EAAC;MACT/C,IAAI,EAAE;QACJ0C,WAAW,EAAE;MACf,CAAC;MACDO,IAAI,EAAC;QACHjD,IAAI,EAAC;UACH2D,SAAS,EAAE,CAAC;YAACC,OAAO,EAAC;UAAM,CAAC;QAC9B;MACF;IACF;EACF,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","backgroundColor","wizardBackgroundColor","display","height","text","activeStep","wizardStepActiveColor","borderColor","color","wizardActiveStepColor","doneStep","wizardStepDoneColor","wizardDoneStepColor","wizardHeader","padding","alignItems","justifyContent","stepWrapper","zIndex","headerWrapper","flex","wizardBody","alignSelf","paddingTop","width","borderWidth","borderTopWidth","borderBottomWidth","wizardBorderColor","wizardFooter","buttonWrapper","stepTitle","textTransform","fontSize","wizardStepTitleColor","step","borderRadius","wizardStepColor","wizardActions","marginRight","nextButton","wizardNextBtnColor","doneButton","wizardDoneBtnColor","icon","stepIcon","wizardStepIconColor","skipLink","stepConnector","wizardStepConnectorColor","position","top","numberTextStepConnector","stepCounter","transform","rotateY"],"sources":["wizard.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmAnchorStyles } from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.styles';\n\nexport type WmWizardStyles = BaseStyles & {\n wizardHeader: AllStyle,\n wizardBody: AllStyle,\n wizardFooter: AllStyle,\n wizardActions: WmButtonStyles,\n stepTitle: AllStyle,\n buttonWrapper: AllStyle,\n step: AllStyle,\n nextButton: WmButtonStyles,\n doneButton: WmButtonStyles,\n stepIcon: WmIconStyles,\n skipLink: WmAnchorStyles,\n activeStep: AllStyle,\n doneStep: AllStyle,\n headerWrapper: AllStyle,\n stepWrapper: AllStyle,\n stepConnector: AllStyle,\n numberTextStepConnector: AllStyle,\n stepCounter: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-wizard';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmWizardStyles = defineStyles({\n root: {\n flexDirection: 'column',\n backgroundColor: themeVariables.wizardBackgroundColor,\n display: 'flex',\n height: '100%'\n },\n text: {},\n activeStep:{\n backgroundColor: themeVariables.wizardStepActiveColor,\n borderColor: themeVariables.wizardStepActiveColor,\n color: themeVariables.wizardActiveStepColor\n },\n doneStep: {\n backgroundColor: themeVariables.wizardStepDoneColor,\n color: themeVariables.wizardDoneStepColor,\n borderColor: themeVariables.wizardStepDoneColor\n },\n wizardHeader: {\n padding: 8,\n flexDirection: 'row',\n alignItems: 'flex-start',\n justifyContent: 'center'\n },\n stepWrapper: {\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: 20\n },\n headerWrapper: {\n flex: 1\n },\n wizardBody: {\n alignSelf: 'flex-start',\n paddingTop: 10,\n flex: 1,\n width: '100%',\n borderWidth: 0,\n borderTopWidth: 1,\n borderBottomWidth: 1,\n borderColor: themeVariables.wizardBorderColor\n },\n wizardFooter: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n padding: 12\n },\n buttonWrapper: {\n flexDirection: 'row',\n },\n stepTitle: {\n textTransform: 'capitalize',\n fontSize: 12,\n color: themeVariables.wizardStepTitleColor\n },\n step: {\n alignItems: 'center',\n justifyContent: 'center',\n width: 37,\n backgroundColor: themeVariables.wizardBackgroundColor,\n height: 37,\n borderWidth: 1,\n borderRadius: 18.5,\n color: themeVariables.wizardStepColor,\n borderColor: themeVariables.wizardStepColor\n },\n wizardActions: {\n root: {\n marginRight: 8\n },\n text : {\n textTransform: 'capitalize',\n fontSize: 14\n }\n } as WmButtonStyles,\n nextButton: {\n root: {\n marginRight: 0,\n backgroundColor: themeVariables.wizardNextBtnColor,\n borderColor: themeVariables.wizardNextBtnColor\n }\n } as WmButtonStyles,\n doneButton: {\n root: {\n marginRight: 0,\n backgroundColor: themeVariables.wizardDoneBtnColor\n },\n icon: {\n text: {\n fontSize: 12\n }\n }\n } as WmButtonStyles,\n stepIcon: {\n root: {\n alignSelf: 'center',\n justifyContent: 'center'\n },\n text: {\n color: themeVariables.wizardStepIconColor,\n fontSize: 15\n }\n } as WmIconStyles,\n skipLink: {\n root: {\n padding: 8,\n alignSelf: 'flex-end'\n },\n } as WmAnchorStyles,\n stepConnector: {\n backgroundColor: themeVariables.wizardStepConnectorColor,\n position: 'absolute',\n top: 17.5,\n zIndex: 10,\n height: 2\n },\n numberTextStepConnector: {\n display: 'none'\n },\n stepCounter: {\n fontSize: 15,\n color: themeVariables.wizardStepColor\n }\n } as WmWizardStyles);\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('number-text-inline', '', {\n stepConnector: {\n display: 'none'\n },\n numberTextStepConnector: {\n backgroundColor: themeVariables.wizardStepConnectorColor,\n height: 2,\n display: 'flex'\n },\n stepWrapper: {\n flexDirection: 'row'\n },\n wizardHeader: {\n justifyContent: 'flex-start'\n },\n headerWrapper: {\n flex: -1\n },\n stepTitle: {\n padding: 5\n },\n } as WmWizardStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n wizardActions: {\n icon: {\n root:{\n transform: [{rotateY:'180deg'}]\n }\n },\n },\n nextButton:{\n root: {\n marginRight: 8,\n }\n },\n doneButton:{\n root: {\n marginRight: 8,\n },\n icon:{\n root:{\n transform: [{rotateY:'0deg'}]\n }\n }\n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA0BxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,aAAa,EAAE,QAAQ;MACvBC,eAAe,EAAEL,cAAc,CAACM,qBAAqB;MACrDC,OAAO,EAAE,MAAM;MACfC,MAAM,EAAE;IACV,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,UAAU,EAAC;MACPL,eAAe,EAAEL,cAAc,CAACW,qBAAqB;MACrDC,WAAW,EAAEZ,cAAc,CAACW,qBAAqB;MACjDE,KAAK,EAAEb,cAAc,CAACc;IAC1B,CAAC;IACDC,QAAQ,EAAE;MACRV,eAAe,EAAEL,cAAc,CAACgB,mBAAmB;MACnDH,KAAK,EAAEb,cAAc,CAACiB,mBAAmB;MACzCL,WAAW,EAAEZ,cAAc,CAACgB;IAC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AM,EAAE,CAAC;MACTD,OAAO,EAAE;IACX,CAAC;IACDe,WAAW,EAAE;MACXlB,aAAa,EAAE;IACjB,CAAC;IACDc,YAAY,EAAE;MACZG,cAAc,EAAE;IAClB,CAAC;IACDG,aAAa,EAAE;MACbC,IAAI,EAAE,CAAC;IACT,CAAC;IACDW,SAAS,EAAE;MACTjB,OAAO,EAAE;IACX;EACF,CAAmB,CAAC;EACpBlB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnC6C,aAAa,EAAE;MACbM,IAAI,EAAE;QACJ9C,IAAI,EAAC;UACHwD,SAAS,EAAE,CAAC;YAACC,OAAO,EAAC;UAAQ,CAAC;QAChC;MACF;IACF,CAAC;IACDf,UAAU,EAAC;MACT1C,IAAI,EAAE;QACJyC,WAAW,EAAE;MACf;IACF,CAAC;IACDG,UAAU,EAAC;MACT5C,IAAI,EAAE;QACJyC,WAAW,EAAE;MACf,CAAC;MACDK,IAAI,EAAC;QACH9C,IAAI,EAAC;UACHwD,SAAS,EAAE,CAAC;YAACC,OAAO,EAAC;UAAM,CAAC;QAC9B;MACF;IACF;EACF,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCardContentProps","DEFAULT_CLASS","WmCardContentState","constructor","arguments","_defineProperty","WmCardContent","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","createElement","style","styles","root","_background"],"sources":["card-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCardContentProps from './card-content.props';\nimport { DEFAULT_CLASS, WmCardContentStyles } from './card-content.styles';\n\nexport class WmCardContentState extends BaseComponentState<WmCardContentProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmCardContent extends BaseComponent<WmCardContentProps, WmCardContentState, WmCardContentStyles> {\n\n constructor(props: WmCardContentProps) {\n super(props, DEFAULT_CLASS, new WmCardContentProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmCardContentProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmCardContentState);\n });\n }\n return props.renderPartial(
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCardContentProps","DEFAULT_CLASS","WmCardContentState","constructor","arguments","_defineProperty","WmCardContent","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","createElement","style","styles","root","_background"],"sources":["card-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmCardContentProps from './card-content.props';\nimport { DEFAULT_CLASS, WmCardContentStyles } from './card-content.styles';\n\nexport class WmCardContentState extends BaseComponentState<WmCardContentProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmCardContent extends BaseComponent<WmCardContentProps, WmCardContentState, WmCardContentStyles> {\n\n constructor(props: WmCardContentProps) {\n super(props, DEFAULT_CLASS, new WmCardContentProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmCardContentProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmCardContentState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmCardContentProps) {\n return (<View style={this.styles.root}>{this._background}{this.renderContent(props)}</View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAE1E,OAAO,MAAMC,kBAAkB,SAASH,kBAAkB,CAAqB;EAAAI,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,0BAC3D,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,aAAa,SAASR,aAAa,CAA8D;EAEpHK,WAAWA,CAACI,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,kBAAkB,CAAC,CAAC,CAAC;EACvD;EAEAQ,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAaA,CAACH,KAAyB,EAAE;IACvC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAuB,CAAC;QAC1B,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAAC,IAAI,CAACH,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,YAAYA,CAACX,KAAyB,EAAE;IACtC,oBAAQX,KAAA,CAAAuB,aAAA,CAACtB,IAAI;MAACuB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAE,IAAI,CAACb,aAAa,CAACH,KAAK,CAAQ,CAAC;EAC7F;AACF"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import { isNil } from 'lodash';
|
|
4
3
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
5
4
|
import WmListTemplateProps from './list-template.props';
|
|
6
5
|
import { DEFAULT_CLASS } from './list-template.styles';
|
|
@@ -10,21 +9,8 @@ export default class WmListTemplate extends BaseComponent {
|
|
|
10
9
|
super(props, DEFAULT_CLASS, new WmListTemplateProps());
|
|
11
10
|
}
|
|
12
11
|
renderWidget(props) {
|
|
13
|
-
var _style;
|
|
14
|
-
const list = this.parent;
|
|
15
|
-
const listProps = list.state.props;
|
|
16
|
-
const isHorizontalList = listProps.direction === 'horizontal';
|
|
17
|
-
const noOfCols = list.getNoOfColumns();
|
|
18
|
-
let style = this.theme.getStyle(isHorizontalList ? 'horizontal-list-template' : 'vertical-list-template');
|
|
19
|
-
if (isNil(style['flex']) && !isHorizontalList && noOfCols === 1) {
|
|
20
|
-
style = this.theme.mergeStyle({
|
|
21
|
-
root: {
|
|
22
|
-
flex: 1
|
|
23
|
-
}
|
|
24
|
-
}, style);
|
|
25
|
-
}
|
|
26
12
|
return /*#__PURE__*/React.createElement(View, {
|
|
27
|
-
style:
|
|
13
|
+
style: this.styles.root
|
|
28
14
|
}, this._background, props.children);
|
|
29
15
|
}
|
|
30
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmListTemplateProps","DEFAULT_CLASS","WmListTemplateState","WmListTemplate","constructor","props","renderWidget","createElement","style","styles","root","_background","children"],"sources":["list-template.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmListTemplateProps from './list-template.props';\nimport { DEFAULT_CLASS, WmListTemplateStyles } from './list-template.styles';\n\nexport class WmListTemplateState extends BaseComponentState<WmListTemplateProps> {\n\n}\n\nexport default class WmListTemplate extends BaseComponent<WmListTemplateProps, WmListTemplateState, WmListTemplateStyles> {\n\n constructor(props: WmListTemplateProps) {\n super(props, DEFAULT_CLASS, new WmListTemplateProps());\n }\n\n renderWidget(props: WmListTemplateProps) {\n return (\n <View style={this.styles.root}>{this._background}{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,aAAa,QAA8B,wBAAwB;AAE5E,OAAO,MAAMC,mBAAmB,SAASH,kBAAkB,CAAsB;AAIjF,eAAe,MAAMI,cAAc,SAASL,aAAa,CAAiE;EAExHM,WAAWA,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,mBAAmB,CAAC,CAAC,CAAC;EACxD;EAEAM,YAAYA,CAACD,KAA0B,EAAE;IACvC,oBACET,KAAA,CAAAW,aAAA,CAACV,IAAI;MAACW,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEN,KAAK,CAACO,QAAe,CAAC;EAE5E;AACF"}
|
|
@@ -3,7 +3,9 @@ import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
|
3
3
|
export const DEFAULT_CLASS = 'app-list-template';
|
|
4
4
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
5
5
|
const defaultStyles = defineStyles({
|
|
6
|
-
root: {
|
|
6
|
+
root: {
|
|
7
|
+
flex: 1
|
|
8
|
+
},
|
|
7
9
|
text: {}
|
|
8
10
|
});
|
|
9
11
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
|
@@ -12,11 +14,5 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
12
14
|
borderBottomWidth: 0
|
|
13
15
|
}
|
|
14
16
|
});
|
|
15
|
-
addStyle('horizontal-list-template', '', {
|
|
16
|
-
root: {}
|
|
17
|
-
});
|
|
18
|
-
addStyle('vertical-list-template', '', {
|
|
19
|
-
root: {}
|
|
20
|
-
});
|
|
21
17
|
});
|
|
22
18
|
//# sourceMappingURL=list-template.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","borderBottomWidth"],"sources":["list-template.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmListTemplateStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-list-template';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmListTemplateStyles = defineStyles<WmListTemplateStyles>({\n root: {},\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('list-card-template', '', {\n root : {\n borderBottomWidth: 0\n }\n } as WmListTemplateStyles);\n
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flex","text","borderBottomWidth"],"sources":["list-template.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmListTemplateStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-list-template';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmListTemplateStyles = defineStyles<WmListTemplateStyles>({\n root: {\n flex: 1\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('list-card-template', '', {\n root : {\n borderBottomWidth: 0\n }\n } as WmListTemplateStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,mBAAmB;AAChDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAmC,GAAGL,YAAY,CAAuB;IAC3EM,IAAI,EAAE;MACFC,IAAI,EAAE;IACV,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EAEFJ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE;IAC/BE,IAAI,EAAG;MACHG,iBAAiB,EAAE;IACvB;EACJ,CAAyB,CAAC;AAC9B,CAAC,CAAC"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import { SectionList, Text, View } from 'react-native';
|
|
7
6
|
import { FlatList } from 'react-native-gesture-handler';
|
|
8
|
-
import { isArray
|
|
7
|
+
import { isArray } from 'lodash-es';
|
|
9
8
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
10
9
|
import { getGroupedData, isDefined } from "@wavemaker/app-rn-runtime/core/utils";
|
|
11
10
|
import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
|
12
|
-
import { DefaultKeyExtractor } from '@wavemaker/app-rn-runtime/core/key.extractor';
|
|
13
11
|
import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
|
|
14
12
|
import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
|
|
15
13
|
import WmListProps from './list.props';
|
|
@@ -22,6 +20,24 @@ export class WmListState extends BaseComponentState {
|
|
|
22
20
|
_defineProperty(this, "currentPage", 1);
|
|
23
21
|
}
|
|
24
22
|
}
|
|
23
|
+
class DefaultKeyExtractor {
|
|
24
|
+
constructor() {
|
|
25
|
+
_defineProperty(this, "store", new Map());
|
|
26
|
+
_defineProperty(this, "nextKey", 1);
|
|
27
|
+
}
|
|
28
|
+
getKey(o) {
|
|
29
|
+
let create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
30
|
+
let k = this.store.get(o);
|
|
31
|
+
if (!k && create) {
|
|
32
|
+
k = `key:${Date.now()}:${this.nextKey++}`;
|
|
33
|
+
this.store.set(o, k);
|
|
34
|
+
}
|
|
35
|
+
return k;
|
|
36
|
+
}
|
|
37
|
+
clear() {
|
|
38
|
+
this.store = new Map();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
25
41
|
export default class WmList extends BaseComponent {
|
|
26
42
|
constructor(props) {
|
|
27
43
|
super(props, DEFAULT_CLASS, new WmListProps(), new WmListState());
|
|
@@ -40,7 +56,7 @@ export default class WmList extends BaseComponent {
|
|
|
40
56
|
let triggerTapEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
41
57
|
const props = this.state.props;
|
|
42
58
|
let selectedItem = null;
|
|
43
|
-
if (
|
|
59
|
+
if (!props.disableitem($item, $index)) {
|
|
44
60
|
if (props.multiselect) {
|
|
45
61
|
selectedItem = [...(props.selecteditem || [])];
|
|
46
62
|
const index = selectedItem.indexOf($item);
|
|
@@ -173,17 +189,10 @@ export default class WmList extends BaseComponent {
|
|
|
173
189
|
return 'list_item_' + this.keyExtractor.getKey(item, true);
|
|
174
190
|
}
|
|
175
191
|
renderItem(item, index, props) {
|
|
176
|
-
const cols = this.getNoOfColumns();
|
|
177
|
-
const isHorizontal = props.direction === 'horizontal';
|
|
178
192
|
return /*#__PURE__*/React.createElement(Tappable, {
|
|
179
193
|
onTap: () => this.onSelect(item, index, true),
|
|
180
194
|
onLongTap: () => this.invokeEventCallback('onLongtap', [null, this.proxy]),
|
|
181
|
-
onDoubleTap: () => this.invokeEventCallback('onDoubletap', [null, this.proxy])
|
|
182
|
-
styles: [cols ? {
|
|
183
|
-
width: round(100 / cols, 2) + '%'
|
|
184
|
-
} : null, cols || isHorizontal ? {
|
|
185
|
-
paddingRight: (isNil(this.styles.item.marginRight) ? this.styles.item.margin : this.styles.item.marginRight) || 4
|
|
186
|
-
} : null]
|
|
195
|
+
onDoubleTap: () => this.invokeEventCallback('onDoubletap', [null, this.proxy])
|
|
187
196
|
}, /*#__PURE__*/React.createElement(View, {
|
|
188
197
|
style: [this.styles.item, props.itemclass ? this.theme.getStyle(props.itemclass(item, index)) : null, this.isSelected(item) ? this.styles.selectedItem : {}]
|
|
189
198
|
}, props.renderItem(item, index, this), this.isSelected(item) ? /*#__PURE__*/React.createElement(WmIcon, {
|
|
@@ -225,13 +234,6 @@ export default class WmList extends BaseComponent {
|
|
|
225
234
|
caption: props.loadingdatamsg
|
|
226
235
|
});
|
|
227
236
|
}
|
|
228
|
-
getNoOfColumns() {
|
|
229
|
-
const props = this.state.props;
|
|
230
|
-
if (props.direction === 'vertical') {
|
|
231
|
-
return props.itemsperrow.xs;
|
|
232
|
-
}
|
|
233
|
-
return 0;
|
|
234
|
-
}
|
|
235
237
|
renderWithFlatList(props) {
|
|
236
238
|
let isHorizontal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
237
239
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -241,16 +243,13 @@ export default class WmList extends BaseComponent {
|
|
|
241
243
|
marginBottom: 16
|
|
242
244
|
},
|
|
243
245
|
key: v.key || this.keyExtractor.getKey(v, true)
|
|
244
|
-
}, this.renderHeader(props, v.key), /*#__PURE__*/React.createElement(FlatList,
|
|
245
|
-
key: props.name + '_' + (isHorizontal ? 'H' : 'V') + props.itemsperrow.xs,
|
|
246
|
+
}, this.renderHeader(props, v.key), /*#__PURE__*/React.createElement(FlatList, {
|
|
246
247
|
keyExtractor: (item, i) => this.generateItemKey(item, i, props),
|
|
247
248
|
horizontal: isHorizontal,
|
|
248
249
|
data: v.data || [],
|
|
249
250
|
ListEmptyComponent: itemInfo => this.renderEmptyMessage(isHorizontal, itemInfo.item, itemInfo.index, props),
|
|
250
251
|
renderItem: itemInfo => this.renderItem(itemInfo.item, itemInfo.index, props)
|
|
251
|
-
}
|
|
252
|
-
numColumns: this.getNoOfColumns()
|
|
253
|
-
})))) : null);
|
|
252
|
+
}))) : null);
|
|
254
253
|
}
|
|
255
254
|
getSectionListData() {
|
|
256
255
|
if (this._showSkeleton) {
|
|
@@ -258,7 +257,7 @@ export default class WmList extends BaseComponent {
|
|
|
258
257
|
key: '',
|
|
259
258
|
data: [{}, {}, {}]
|
|
260
259
|
}];
|
|
261
|
-
} else if (this.state.groupedData
|
|
260
|
+
} else if (this.state.groupedData[0] && this.state.groupedData[0]['data'].length) {
|
|
262
261
|
return this.state.groupedData;
|
|
263
262
|
}
|
|
264
263
|
return [];
|
|
@@ -297,11 +296,7 @@ export default class WmList extends BaseComponent {
|
|
|
297
296
|
renderWidget(props) {
|
|
298
297
|
this.invokeEventCallback('onBeforedatarender', [this, this.state.props.dataset]);
|
|
299
298
|
const isHorizontal = props.direction === 'horizontal';
|
|
300
|
-
return /*#__PURE__*/React.createElement(View,
|
|
301
|
-
style: isHorizontal ? null : {
|
|
302
|
-
width: '100%'
|
|
303
|
-
}
|
|
304
|
-
}, this._background, isHorizontal || !props.groupby ? this.renderWithFlatList(props, isHorizontal) : this.renderWithSectionList(props, isHorizontal));
|
|
299
|
+
return /*#__PURE__*/React.createElement(View, null, this._background, isHorizontal ? this.renderWithFlatList(props, isHorizontal) : this.renderWithSectionList(props, isHorizontal));
|
|
305
300
|
}
|
|
306
301
|
}
|
|
307
302
|
//# sourceMappingURL=list.component.js.map
|