@wavemaker/app-rn-runtime 12.0.0-next.45031 → 12.0.0-next.45501
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 +18 -3
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +2 -2
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +6 -2
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +5 -4
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +4 -4
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- 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/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +1 -2
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js +4 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +31 -2
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +1 -0
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +4 -0
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +4 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +3 -1
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +1 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +4 -2
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -3
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +27 -11
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +11 -4
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +25 -12
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -6
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +3 -2
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +3 -2
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +16 -1
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +22 -5
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +6 -3
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +6 -6
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +23 -9
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +2 -2
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/core/base.component.js +2 -1
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +4 -3
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/key.extractor.js.map +1 -1
- app-rn-runtime/core/props.provider.js +3 -0
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +26 -25
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/ui-preferences.context.js +7 -0
- app-rn-runtime/core/ui-preferences.context.js.map +1 -0
- app-rn-runtime/core/utils.js +66 -4
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/package.json +28 -7
- app-rn-runtime/runtime/App.js +2 -1
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +15 -0
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/runtime/watcher.js.map +1 -1
- app-rn-runtime/styles/background.component.js +1 -0
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/variables/base-variable.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","SwipeAnimation","isWebPreviewMode","WmTabsProps","DEFAULT_CLASS","WmTabheader","WmTabsState","constructor","args","_defineProperty","WmTabs","props","bounds","e","_this$tabLayout","activeTabIndex","state","selectedTabIndex","w","tabLayout","width","noOfTabs","tabPanes","length","lower","center","upper","onLower","onChange","onUpper","setTabLayout","event","nativeEvent","layout","forceUpdate","goToTab","setTabPaneHeights","index","_nativeEvent$nativeEv","tabPaneHeights","height","setTabShown","tabIndex","callback","tabsShown","setTimeout","updateState","addTabPane","tabPane","i","findIndex","t","name","newIndex","selectTabPane","indexOf","selectedTabPane","_this$tabLayout2","position","animationView","setPosition","then","prev","_this$animationView","goToLower","next","_this$animationView2","oldIndex","deselectedTab","_onDeselect","selectedTab","_onSelect","invokeEventCallback","proxy","renderSkeleton","Children","toArray","children","filter","item","show","headerData","map","p","title","icon","key","createElement","style","styles","root","borderBottomWidth","onLayout","bind","tabHeader","data","showskeleton","overflow","flexDirection","flexWrap","alignSelf","onPropertyChange","$new","$old","selectedIndex","renderWidget","paneicon","_background","id","getTestId","onIndexChange","flex","maxHeight","tabContent","enableGestures","enablegestures","alignItems","direction","ref","r","handlers","animationHandlers","undefined"],"sources":["tabs.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmTabsProps from './tabs.props';\nimport { DEFAULT_CLASS, WmTabsStyles } from './tabs.styles';\nimport WmTabpane from './tabpane/tabpane.component';\nimport WmTabheader from './tabheader/tabheader.component';\n\nexport class WmTabsState extends BaseComponentState<WmTabsProps> {\n tabsShown: boolean[] = [];\n selectedTabIndex: number = 0;\n}\n\nexport default class WmTabs extends BaseComponent<WmTabsProps, WmTabsState, WmTabsStyles> {\n public tabPanes = [] as WmTabpane[];\n private newIndex = 0;\n private tabLayout: LayoutRectangle = null as any;\n private tabPaneHeights: number[] = [];\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.selectedTabIndex,\n w = this.tabLayout?.width || 0,\n noOfTabs = this.tabPanes.length;\n return {\n lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,\n center: -1 * activeTabIndex * w,\n upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w\n };\n },\n onLower: (e) => {\n this.onChange(this.state.selectedTabIndex - 1);\n },\n onUpper: (e) => {\n this.onChange(this.state.selectedTabIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmTabsProps) {\n super(props, DEFAULT_CLASS, new WmTabsProps(), new WmTabsState());\n }\n\n setTabLayout(event: LayoutChangeEvent) {\n this.tabLayout = event.nativeEvent.layout;\n this.forceUpdate(() => {\n this.goToTab();\n });\n }\n\n setTabPaneHeights(index: number, nativeEvent: LayoutChangeEvent) {\n this.tabPaneHeights[index] = nativeEvent.nativeEvent.layout?.height;\n if (index === this.state.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n setTabShown(tabIndex: number, callback: () => any) {\n if (!this.state.tabsShown[tabIndex]) {\n const tabsShown = [...this.state.tabsShown];\n tabsShown[tabIndex] = true;\n setTimeout(() => {\n this.updateState({\n tabsShown: tabsShown\n } as WmTabsState, callback);\n }, 300);\n } else {\n callback && callback();\n }\n }\n\n addTabPane(tabPane: WmTabpane) {\n const i = this.tabPanes.findIndex(t => t.props.name === tabPane.props.name);\n if (i >= 0) {\n this.tabPanes[i] = tabPane;\n } else {\n this.tabPanes[this.newIndex++] = tabPane;\n }\n }\n\n selectTabPane(tabPane: WmTabpane) {\n this.goToTab(this.tabPanes.indexOf(tabPane));\n }\n\n get selectedTabPane() {\n return this.tabPanes[this.state.selectedTabIndex];\n }\n\n goToTab(index = this.state.selectedTabIndex) {\n const position = -1 * index * (this.tabLayout?.width || 0);\n if(this.animationView) {\n this.animationView.setPosition(position)\n .then(() => this.onChange(index));\n } else {\n this.onChange(index);\n }\n }\n\n prev() {\n this.animationView?.goToLower();\n }\n\n next() {\n this.animationView?.goToLower();\n }\n\n onChange(newIndex: number) {\n if (newIndex < 0 || newIndex >= this.tabPanes.length) {\n return;\n }\n const oldIndex = this.state.selectedTabIndex;\n const deselectedTab = this.tabPanes[this.state.selectedTabIndex];\n this.newIndex = newIndex;\n deselectedTab?._onDeselect();\n this.updateState({\n selectedTabIndex: newIndex\n } as WmTabsState, () => {\n this.setTabShown(newIndex, () => {\n const selectedTab = this.tabPanes[newIndex];\n selectedTab?._onSelect();\n this.invokeEventCallback('onChange', [{}, this.proxy, newIndex, oldIndex]);\n });\n });\n }\n\n public renderSkeleton(props: WmTabsProps){\n const tabPanes = React.Children.toArray(this.props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: '', key: `tab-${p.props.title}-${i}`}));\n return(\n <View style={[this.styles.root, { borderBottomWidth: 0}]}>\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n styles={this.styles.tabHeader}\n data={headerData}\n showskeleton={this.props.showskeleton}\n selectedTabIndex={this.state.selectedTabIndex}\n ></WmTabheader>\n <View\n //{...this.panResponder.panHandlers}\n style={{\n width: '100%',\n //height: this.tabPaneHeights[this.state.selectedTabIndex],\n overflow: 'hidden'\n }} >\n <View style={{\n flexDirection: 'row',\n flexWrap: 'nowrap'\n }}>\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>);\n })}\n </View>\n </View>\n </View>\n\n )\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"defaultpaneindex\":\n const selectedIndex = $new || 0;\n const tabsShown: boolean[] = [];\n tabsShown[selectedIndex] = true;\n this.updateState({\n selectedTabIndex: selectedIndex,\n tabsShown: tabsShown\n } as WmTabsState);\n }\n }\n\n renderWidget(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: p.props.paneicon || '', key: `tab-${p.props.title}-${i}`}));\n return (\n <View style={this.styles.root}>\n {this._background}\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n id={this.getTestId('headers')}\n styles={this.styles.tabHeader}\n data={headerData}\n selectedTabIndex={this.state.selectedTabIndex}\n onIndexChange={this.goToTab.bind(this)}\n ></WmTabheader>\n <View\n style={[{\n width: '100%',\n flex: 1\n }, this.styles.root.height ?\n (isWebPreviewMode() ? {'overflowX': 'hidden','overflowY': 'auto'} as any : {overflow: 'scroll'})\n : {\n overflow: 'hidden',\n maxHeight: this.tabPaneHeights[this.state.selectedTabIndex],\n }, this.styles.tabContent]} >\n <SwipeAnimation.View\n enableGestures={props.enablegestures}\n style={{\n flexDirection: 'row',\n flexWrap: 'nowrap',\n alignItems: 'flex-start'\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n >\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{\n width: '100%',\n height: this.styles.root.height ? undefined : 1000000,\n alignSelf: 'flex-start'}}>\n <View\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>\n </View>);\n })}\n </SwipeAnimation.View>\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA6CC,IAAI,QAAQ,cAAc;AACvE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAE3D,OAAOC,WAAW,MAAM,iCAAiC;AAEzD,OAAO,MAAMC,WAAW,SAASN,kBAAkB,CAAc;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACxC,EAAE;IAAAA,eAAA,2BACE,CAAC;EAAA;AAC9B;AAEA,eAAe,MAAMC,MAAM,SAASX,aAAa,CAAyC;EAyBxFQ,WAAWA,CAACI,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,EAAE,IAAIG,WAAW,CAAC,CAAC,C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ACyE,KAAM,IAAGnC,CAAE,EAAE;QACjCuC,KAAK,EAAE;UACLpE,KAAK,EAAE,MAAM;UACboB,MAAM,EAAE,IAAI,CAACiD,MAAM,CAACC,IAAI,CAAClD,MAAM,GAAIkF,SAAS,GAAG,OAAO;UACtDtB,SAAS,EAAE;QAAY;MAAE,gBAC3BvG,KAAA,CAAA0F,aAAA,CAACzF,IAAI;QACH0F,KAAK,EAAE;UAACpE,KAAK,EAAE,MAAM;UAAEgF,SAAS,EAAE;QAAY,CAAE;QAChDR,QAAQ,EAAE,IAAI,CAACxD,iBAAiB,CAACyD,IAAI,CAAC,IAAI,EAAE5C,CAAC;MAAE,GAE9CkC,CACG,CACF,CAAC;IACT,CAAC,CACkB,CACjB,CACF,CAAC;EAEX;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","SwipeAnimation","isWebPreviewMode","WmTabsProps","DEFAULT_CLASS","WmTabheader","WmTabsState","constructor","args","_defineProperty","WmTabs","props","bounds","e","_this$tabLayout","activeTabIndex","state","selectedTabIndex","w","tabLayout","width","noOfTabs","tabPanes","length","lower","center","upper","onLower","onChange","onUpper","setTabLayout","event","nativeEvent","layout","forceUpdate","goToTab","setTabPaneHeights","index","_nativeEvent$nativeEv","tabPaneHeights","height","setTabShown","tabIndex","callback","tabsShown","setTimeout","updateState","addTabPane","tabPane","i","findIndex","t","name","newIndex","selectTabPane","indexOf","selectedTabPane","_this$tabLayout2","position","animationView","setPosition","then","prev","_this$animationView","goToLower","next","_this$animationView2","oldIndex","deselectedTab","_onDeselect","selectedTab","_onSelect","invokeEventCallback","proxy","renderSkeleton","Children","toArray","children","filter","item","show","headerData","map","p","title","icon","key","createElement","style","styles","root","borderBottomWidth","onLayout","bind","tabHeader","data","showskeleton","overflow","flexDirection","flexWrap","alignSelf","onPropertyChange","$new","$old","selectedIndex","renderWidget","paneicon","_background","id","getTestId","onIndexChange","flex","maxHeight","tabContent","enableGestures","enablegestures","alignItems","direction","ref","r","handlers","animationHandlers","undefined"],"sources":["tabs.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmTabsProps from './tabs.props';\nimport { DEFAULT_CLASS, WmTabsStyles } from './tabs.styles';\nimport WmTabpane from './tabpane/tabpane.component';\nimport WmTabheader from './tabheader/tabheader.component';\n\nexport class WmTabsState extends BaseComponentState<WmTabsProps> {\n tabsShown: boolean[] = [];\n selectedTabIndex: number = 0;\n}\n\nexport default class WmTabs extends BaseComponent<WmTabsProps, WmTabsState, WmTabsStyles> {\n public tabPanes = [] as WmTabpane[];\n private newIndex = 0;\n private tabLayout: LayoutRectangle = null as any;\n private tabPaneHeights: number[] = [];\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.selectedTabIndex,\n w = this.tabLayout?.width || 0,\n noOfTabs = this.tabPanes.length;\n return {\n lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,\n center: -1 * activeTabIndex * w,\n upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w\n };\n },\n onLower: (e) => {\n this.onChange(this.state.selectedTabIndex - 1);\n },\n onUpper: (e) => {\n this.onChange(this.state.selectedTabIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmTabsProps) {\n super(props, DEFAULT_CLASS, new WmTabsProps(), new WmTabsState());\n }\n\n setTabLayout(event: LayoutChangeEvent) {\n this.tabLayout = event.nativeEvent.layout;\n this.forceUpdate(() => {\n this.goToTab();\n });\n }\n\n setTabPaneHeights(index: number, nativeEvent: LayoutChangeEvent) {\n this.tabPaneHeights[index] = nativeEvent.nativeEvent.layout?.height;\n if (index === this.state.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n setTabShown(tabIndex: number, callback: () => any) {\n if (!this.state.tabsShown[tabIndex]) {\n const tabsShown = [...this.state.tabsShown];\n tabsShown[tabIndex] = true;\n setTimeout(() => {\n this.updateState({\n tabsShown: tabsShown\n } as WmTabsState, callback);\n }, 300);\n } else {\n callback && callback();\n }\n }\n\n addTabPane(tabPane: WmTabpane) {\n const i = this.tabPanes.findIndex(t => t.props.name === tabPane.props.name);\n if (i >= 0) {\n this.tabPanes[i] = tabPane;\n } else {\n this.tabPanes[this.newIndex++] = tabPane;\n }\n }\n\n selectTabPane(tabPane: WmTabpane) {\n this.goToTab(this.tabPanes.indexOf(tabPane));\n }\n\n get selectedTabPane() {\n return this.tabPanes[this.state.selectedTabIndex];\n }\n\n goToTab(index = this.state.selectedTabIndex) {\n const position = -1 * index * (this.tabLayout?.width || 0);\n if(this.animationView) {\n this.animationView.setPosition(position)\n .then(() => this.onChange(index));\n } else {\n this.onChange(index);\n }\n }\n\n prev() {\n this.animationView?.goToLower();\n }\n\n next() {\n this.animationView?.goToLower();\n }\n\n onChange(newIndex: number) {\n if (newIndex < 0 || newIndex >= this.tabPanes.length) {\n return;\n }\n const oldIndex = this.state.selectedTabIndex;\n const deselectedTab = this.tabPanes[this.state.selectedTabIndex];\n this.newIndex = newIndex;\n deselectedTab?._onDeselect();\n this.updateState({\n selectedTabIndex: newIndex\n } as WmTabsState, () => {\n this.setTabShown(newIndex, () => {\n const selectedTab = this.tabPanes[newIndex];\n selectedTab?._onSelect();\n this.invokeEventCallback('onChange', [{}, this.proxy, newIndex, oldIndex]);\n });\n });\n }\n\n public renderSkeleton(props: WmTabsProps){\n const tabPanes = React.Children.toArray(this.props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: '', key: `tab-${p.props.title}-${i}`}));\n return(\n <View style={[this.styles.root, { borderBottomWidth: 0}]}>\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n styles={this.styles.tabHeader}\n data={headerData}\n showskeleton={this.props.showskeleton}\n selectedTabIndex={this.state.selectedTabIndex}\n ></WmTabheader>\n <View\n //{...this.panResponder.panHandlers}\n style={{\n width: '100%',\n //height: this.tabPaneHeights[this.state.selectedTabIndex],\n overflow: 'hidden'\n }} >\n <View style={{\n flexDirection: 'row',\n flexWrap: 'nowrap'\n }}>\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>);\n })}\n </View>\n </View>\n </View>\n\n )\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"defaultpaneindex\":\n const selectedIndex = $new || 0;\n const tabsShown: boolean[] = [];\n tabsShown[selectedIndex] = true;\n this.updateState({\n selectedTabIndex: selectedIndex,\n tabsShown: tabsShown\n } as WmTabsState);\n }\n }\n\n renderWidget(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: p.props.paneicon || '', key: `tab-${p.props.title}-${i}`}));\n return (\n <View style={this.styles.root}>\n {this._background}\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n id={this.getTestId('headers')}\n styles={this.styles.tabHeader}\n data={headerData}\n selectedTabIndex={this.state.selectedTabIndex}\n onIndexChange={this.goToTab.bind(this)}\n ></WmTabheader>\n <View\n style={[{\n width: '100%',\n flex: 1\n }, this.styles.root.height ?\n (isWebPreviewMode() ? {'overflowX': 'hidden','overflowY': 'auto'} as any : {overflow: 'scroll'})\n : {\n overflow: 'hidden',\n maxHeight: this.tabPaneHeights[this.state.selectedTabIndex],\n }, this.styles.tabContent]} >\n <SwipeAnimation.View\n enableGestures={props.enablegestures}\n style={{\n flexDirection: 'row',\n flexWrap: 'nowrap',\n alignItems: 'flex-start'\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n >\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{\n width: '100%',\n height: this.styles.root.height ? undefined : 1000000,\n alignSelf: 'flex-start'}}>\n <View\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>\n </View>);\n })}\n </SwipeAnimation.View>\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA6CC,IAAI,QAAQ,cAAc;AACvE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAE3D,OAAOC,WAAW,MAAM,iCAAiC;AAEzD,OAAO,MAAMC,WAAW,SAASN,kBAAkB,CAAc;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACxC,EAAE;IAAAA,eAAA,2BACE,CAAC;EAAA;AAC9B;AAEA,eAAe,MAAMC,MAAM,SAASX,aAAa,CAAyC;EAyBxFQ,WAAWA,CAACI,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,EAAE,IAAIG,WAAW,CAAC,CAAC,CAAC;IAACG,eAAA,mBAzBlD,EAAE;IAAAA,eAAA,mBACD,CAAC;IAAAA,eAAA,oBACiB,IAAI;IAAAA,eAAA,yB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iD,MAAM,CAACC,IAAI,CAAClD,MAAM,GAAIkF,SAAS,GAAG,OAAO;UACtDtB,SAAS,EAAE;QAAY;MAAE,gBAC3BvG,KAAA,CAAA0F,aAAA,CAACzF,IAAI;QACH0F,KAAK,EAAE;UAACpE,KAAK,EAAE,MAAM;UAAEgF,SAAS,EAAE;QAAY,CAAE;QAChDR,QAAQ,EAAE,IAAI,CAACxD,iBAAiB,CAACyD,IAAI,CAAC,IAAI,EAAE5C,CAAC;MAAE,GAE9CkC,CACG,CACF,CAAC;IACT,CAAC,CACkB,CACjB,CACF,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -1,3 +1,4 @@
|
|
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); }
|
1
2
|
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; }
|
2
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -33,10 +34,13 @@ export default class WmWizard extends BaseComponent {
|
|
33
34
|
}
|
34
35
|
}
|
35
36
|
});
|
36
|
-
|
37
|
+
}
|
38
|
+
updateDefaultStep() {
|
39
|
+
const steps = this.steps;
|
40
|
+
const props = this.props;
|
37
41
|
let defaultStepIndex = 0;
|
38
42
|
if (isArray(steps) && props.defaultstep) {
|
39
|
-
steps.map((item, index) => {
|
43
|
+
steps && steps.map((item, index) => {
|
40
44
|
if (props.defaultstep === item.props.name) {
|
41
45
|
defaultStepIndex = index;
|
42
46
|
}
|
@@ -50,7 +54,16 @@ export default class WmWizard extends BaseComponent {
|
|
50
54
|
}
|
51
55
|
componentDidMount() {
|
52
56
|
super.componentDidMount();
|
53
|
-
this.
|
57
|
+
if (this.props.defaultstep) {
|
58
|
+
this.updateDefaultStep();
|
59
|
+
}
|
60
|
+
}
|
61
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
62
|
+
super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);
|
63
|
+
// * when a variable is bind to default step
|
64
|
+
if (this.props.defaultstep && prevProps.defaultstep !== this.props.defaultstep) {
|
65
|
+
this.updateDefaultStep();
|
66
|
+
}
|
54
67
|
}
|
55
68
|
showActiveStep() {
|
56
69
|
var _this$steps$this$stat;
|
@@ -108,6 +121,7 @@ export default class WmWizard extends BaseComponent {
|
|
108
121
|
}, /*#__PURE__*/React.createElement(View, {
|
109
122
|
style: [this.styles.stepMenu, currentMenuItem ? this.styles.activeStepMenu : {}]
|
110
123
|
}, /*#__PURE__*/React.createElement(WmIcon, {
|
124
|
+
id: this.getTestId('icon'),
|
111
125
|
caption: caption,
|
112
126
|
iconclass: currentMenuItem ? "wi wi-radio-button-checked" : 'wi wi-radio-button-unchecked',
|
113
127
|
styles: currentMenuItem ? this.styles.stepMenuActiveIcon : this.styles.stepMenuIcon
|
@@ -132,6 +146,7 @@ export default class WmWizard extends BaseComponent {
|
|
132
146
|
flexDirection: 'row'
|
133
147
|
}
|
134
148
|
}, /*#__PURE__*/React.createElement(WmProgressCircle, {
|
149
|
+
id: this.getTestId('progress'),
|
135
150
|
minvalue: 0,
|
136
151
|
maxvalue: this.steps.length,
|
137
152
|
datavalue: index + 1,
|
@@ -146,11 +161,11 @@ export default class WmWizard extends BaseComponent {
|
|
146
161
|
justifyContent: 'center',
|
147
162
|
flexDirection: 'column'
|
148
163
|
}
|
149
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
164
|
+
}, /*#__PURE__*/React.createElement(Text, _extends({
|
150
165
|
style: this.styles.stepTitle
|
151
|
-
}, item.props.title || 'Step Title'), /*#__PURE__*/React.createElement(Text, {
|
166
|
+
}, this.getTestPropsForLabel('step' + (index + 1) + '_title')), item.props.title || 'Step Title'), /*#__PURE__*/React.createElement(Text, _extends({
|
152
167
|
style: this.styles.stepSubTitle
|
153
|
-
}, item.props.subtitle || 'Step Sub Title')), /*#__PURE__*/React.createElement(View, {
|
168
|
+
}, this.getTestPropsForLabel('step' + (index + 1) + '_subtitle')), item.props.subtitle || 'Step Sub Title')), /*#__PURE__*/React.createElement(View, {
|
154
169
|
style: {
|
155
170
|
flexDirection: 'row',
|
156
171
|
alignItems: 'flex-end',
|
@@ -175,20 +190,21 @@ export default class WmWizard extends BaseComponent {
|
|
175
190
|
onPress: this.updateCurrentStep.bind(this, index, false),
|
176
191
|
disabled: index >= this.state.currentStep || !this.state.props.headernavigation,
|
177
192
|
accessibilityRole: "header"
|
178
|
-
}, /*#__PURE__*/React.createElement(View, {
|
193
|
+
}, /*#__PURE__*/React.createElement(View, _extends({
|
179
194
|
style: this.getStepStyle(index)
|
180
|
-
}, index >= this.state.currentStep && !this.state.isDone && /*#__PURE__*/React.createElement(Text, {
|
195
|
+
}, this.getTestPropsForAction('step' + index)), index >= this.state.currentStep && !this.state.isDone && /*#__PURE__*/React.createElement(Text, _extends({
|
181
196
|
style: isActiveStep ? [this.styles.activeStep, this.styles.activeStepCounter] : this.styles.stepCounter
|
182
|
-
}, index + 1), (index < this.state.currentStep || this.state.isDone) && /*#__PURE__*/React.createElement(WmIcon, {
|
197
|
+
}, this.getTestPropsForLabel('step' + (index + 1) + '_indicator')), index + 1), (index < this.state.currentStep || this.state.isDone) && /*#__PURE__*/React.createElement(WmIcon, {
|
198
|
+
id: this.getTestId('status'),
|
183
199
|
styles: merge({}, this.styles.stepIcon, {
|
184
200
|
icon: {
|
185
201
|
color: this.styles.activeStep.color
|
186
202
|
}
|
187
203
|
}),
|
188
204
|
iconclass: item.state.props.iconclass || 'wm-sl-l sl-check'
|
189
|
-
})), isActiveStep && /*#__PURE__*/React.createElement(Text, {
|
205
|
+
})), isActiveStep && /*#__PURE__*/React.createElement(Text, _extends({
|
190
206
|
style: this.styles.stepTitle
|
191
|
-
}, item.state.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
|
207
|
+
}, this.getTestPropsForLabel('step' + (index + 1) + '_title')), item.state.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
|
192
208
|
style: [this.styles.numberTextStepConnector, {
|
193
209
|
width: isLastStep ? 0 : 50
|
194
210
|
}]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","View","TouchableOpacity","Platform","TouchableWithoutFeedback","isArray","merge","BaseComponent","BaseComponentState","WmWizardProps","DEFAULT_CLASS","WmButton","WmIcon","WmAnchor","WmProgressCircle","WmPopover","WmLabel","WmWizardState","constructor","args","_defineProperty","WmWizard","props","onComponentInit","c","popOverRef","steps","children","defaultStepIndex","defaultstep","map","item","index","name","updateCurrentStep","addWizardStep","step","forceUpdate","componentDidMount","showActiveStep","_this$steps$this$stat","state","currentStep","setActive","isDone","_this$steps$this$stat2","lastStep","setInActive","updateState","invokeEventCallback","proxy","getStepStyle","style","styles","push","doneStep","activeStep","renderMenuPopover","menuDataset","getmenudataexpression","Labels","title","createElement","id","getTestId","popover","contentanimation","caption","popoverheight","height","popoverwidth","width","listener","iconclass","popovericonclass","iconposition","type","currentMenuItem","length","key","onPress","hide","stepMenu","activeStepMenu","stepMenuActiveIcon","stepMenuIcon","stepMenuActiveLabel","stepMenuLabel","renderProgressCircleHeader","progressTitle","progresstitle","headerWrapper","stepWrapper","flex","alignItems","justifyContent","flexDirection","minvalue","maxvalue","datavalue","captionplacement","progresstype","subtitle","progressCircle","stepTitle","stepSubTitle","renderWizardHeader","isLastStep","numberOfSteps","isFirstStep","isActiveStep","isNumberTextLayout","classname","show","paddingRight","paddingLeft","bind","disabled","headernavigation","accessibilityRole","activeStepCounter","stepCounter","stepIcon","icon","color","numberTextStepConnector","stepConnector","left","OS","isRTL","prev","invokePrevCB","next","eventName","invokeSkipCB","invokeNextCB","done","$event","cancel","skip","renderWidget","_this$state$props$cla","isSkippable","enableskip","isProgressCircleHeader","includes","root","_background","wizardHeader","i","wizardBody","wizardFooter","actionsalignment","showdone","wizardActions","theme","getStyle","doneButton","donebtnlabel","onTap","disabledone","shownext","nextButton","nextbtnlabel","disablenext","showprev","prevButton","previousbtnlabel","disableprev","cancelable","cancelbtnlabel","cancelButton","skipLink"],"sources":["wizard.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, Platform, TouchableWithoutFeedback } from 'react-native';\nimport { isArray, merge } from 'lodash';\nimport { BaseComponent, BaseComponentState, LifecycleListener } 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';\nimport WmProgressCircle from '@wavemaker/app-rn-runtime/components/basic/progress-circle/progress-circle.component';\nimport WmPopover from '@wavemaker/app-rn-runtime/components/navigation/popover/popover.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.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 private popOverRef: WmPopover = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmPopover) {\n this.popOverRef = c;\n }\n }\n };\n\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 const lastStep = this.state.currentStep;\n this.steps[this.state.currentStep]?.setInActive();\n this.updateState({\n currentStep: index,\n isDone: isDone\n } as WmWizardState, () => {\n this.showActiveStep();\n if (lastStep !== index) {\n this.invokeEventCallback('onChange', [null, this.proxy, index + 1, lastStep + 1]);\n }\n });\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 renderMenuPopover(){\n const menuDataset = this.props.getmenudataexpression || ((item: any, index: number) => '') ;\n const Labels = this.steps.map((step: WmWizardstep) => step.state.props.title);\n return (\n <WmPopover\n id={this.getTestId('menu')}\n styles={this.styles.popover}\n contentanimation={'slideInDown'}\n caption={''}\n popoverheight={this.styles.popover.popover.height as string | number | undefined || null}\n popoverwidth={this.styles.popover.popover.width as string | number | undefined || null}\n listener={this.listener}\n iconclass={this.props.popovericonclass || 'fa fa-caret-down'}\n iconposition=\"right\"\n type='dropdown'>\n <View style={this.styles.popover.popover}>\n {Labels.map((item: any, index: number) => {\n const currentMenuItem = index==this.state.currentStep;\n const caption = menuDataset({\"count\":this.steps.length}, index);\n return (\n <TouchableWithoutFeedback key={'wizard_menu_item_'+index} onPress={()=>{this.popOverRef.hide();}}>\n <View style={[this.styles.stepMenu, currentMenuItem?this.styles.activeStepMenu:{}]}>\n <WmIcon caption={caption} iconclass={currentMenuItem? \"wi wi-radio-button-checked\" : 'wi wi-radio-button-unchecked'} styles={currentMenuItem?this.styles.stepMenuActiveIcon:this.styles.stepMenuIcon}/>\n <WmLabel caption={item} styles={currentMenuItem?this.styles.stepMenuActiveLabel:this.styles.stepMenuLabel}/>\n </View>\n </TouchableWithoutFeedback>\n )})}\n </View>\n </WmPopover>\n );\n }\n\n renderProgressCircleHeader(item: any, index: number) {\n const progressTitle = this.props.progresstitle || (index + 1 + '/' + this.steps.length);\n return (\n <View style={[this.styles.headerWrapper]} key={index + 1}>\n <View style={this.styles.stepWrapper}>\n <View style={{ flex: 1, alignItems: 'flex-start', justifyContent: 'center', flexDirection:'row' }}>\n <WmProgressCircle minvalue={0} maxvalue={this.steps.length} datavalue={index + 1} captionplacement={'inside'} type={this.props.progresstype} title={progressTitle} subtitle={''} styles={this.styles.progressCircle} />\n </View>\n <View style={{ flex: 2, justifyContent: 'center', flexDirection: 'column' }}>\n <Text style={this.styles.stepTitle}>\n {item.props.title || 'Step Title'}</Text>\n <Text style={this.styles.stepSubTitle}>\n {item.props.subtitle || 'Step Sub Title'}</Text>\n </View>\n <View style={{ flexDirection: 'row', alignItems: 'flex-end', justifyContent: 'flex-end', flex: 1 }}>\n {this.renderMenuPopover()}\n </View>\n </View>\n </View>\n );\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.state.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 || !this.state.props.headernavigation}\n accessibilityRole='header'>\n <View style={this.getStepStyle(index)}>\n {index >= this.state.currentStep && !this.state.isDone &&\n <Text style={isActiveStep ? [this.styles.activeStep, this.styles.activeStepCounter] : 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.state.props.iconclass || 'wm-sl-l sl-check'}></WmIcon>}\n </View>\n {(isActiveStep) &&\n <Text style={this.styles.stepTitle}>\n {item.state.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 prev() {\n const index = this.state.currentStep;\n if (index <= 0) {\n return;\n }\n const currentStep = this.steps[index];\n if(currentStep.invokePrevCB(index) == false){\n return;\n }\n this.updateCurrentStep(index - 1);\n }\n\n next(eventName?: string) {\n const index = this.state.currentStep;\n if (index >= this.steps.length - 1) {\n return;\n }\n const currentStep = this.steps[index];\n if (eventName === 'skip') {\n currentStep.invokeSkipCB(index);\n } else if (currentStep.invokeNextCB(index) == false) {\n return;\n }\n this.updateCurrentStep(index + 1);\n }\n\n done($event: any) {\n if (this.state.currentStep !== this.steps.length - 1) {\n return;\n }\n this.updateState({\n isDone: true\n } as WmWizardState);\n this.invokeEventCallback('onDone', [$event, this.proxy]);\n }\n\n cancel() {\n this.invokeEventCallback('onCancel', [null, this.proxy]);\n }\n\n skip() {\n this.next('skip');\n }\n\n renderWidget(props: WmWizardProps) {\n this.numberOfSteps = this.steps.length;\n const activeStep = this.steps[this.state.currentStep];\n const isSkippable = activeStep && activeStep.state.props.enableskip;\n const isProgressCircleHeader = this.state.props.classname?.includes('progress-circle-header');\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.wizardHeader}>\n {activeStep && isProgressCircleHeader ? (this.renderProgressCircleHeader(activeStep, this.state.currentStep)) : (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 && activeStep.state.props.showdone &&\n <WmButton iconclass={'wm-sl-l sl-check'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.doneButton)}\n id = {this.getTestId('donebtn')} caption={props.donebtnlabel} onTap={this.done.bind(this)} disabled={activeStep.state.props.disabledone}></WmButton>\n }\n {(this.state.currentStep+1) < this.numberOfSteps && activeStep.state.props.shownext &&\n <WmButton iconclass={'wi wi-chevron-right'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.nextButton)}\n id = {this.getTestId('nextbtn')}\n iconposition={'right'} caption={props.nextbtnlabel} onTap={this.next.bind(this)} disabled={activeStep.state.props.disablenext}></WmButton>\n }\n {this.state.currentStep > 0 && activeStep.state.props.showprev &&\n <WmButton iconclass={'wi wi-chevron-left'} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.prevButton)} caption={props.previousbtnlabel}\n id = {this.getTestId('prevbtn')}\n onTap={this.prev.bind(this)} disabled={activeStep.state.props.disableprev}></WmButton>\n }\n {props.cancelable ?\n <WmButton id = {this.getTestId('cancelbtn')} caption={props.cancelbtnlabel} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.cancelButton)} onTap={this.cancel.bind(this)}></WmButton>\n : null\n }\n {isSkippable &&\n <WmAnchor iconclass={'wi wi-chevron-right'} iconposition={'right'} caption={'Skip'}\n id = {this.getTestId('skip')}\n styles={merge({}, this.styles.wizardActions, this.styles.skipLink)} onTap={this.skip.bind(this)}></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,EAAEC,wBAAwB,QAAQ,cAAc;AAC/F,SAASC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAA2B,+CAA+C;AAEpH,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;AAEzF,OAAOC,gBAAgB,MAAM,sFAAsF;AACnH,OAAOC,SAAS,MAAM,2EAA2E;AACjG,OAAOC,OAAO,MAAM,kEAAkE;AAEtF,OAAO,MAAMC,aAAa,SAAST,kBAAkB,CAAgB;EAAAU,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,sBAC7C,CAAC;IAAAA,eAAA,iBACL,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,QAAQ,SAASd,aAAa,CAA+C;EAahGW,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEZ,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,CAAC;IAACW,eAAA,wBAbnB,IAAI;IAAAA,eAAA,gBACpB,EAAE;IAAAA,eAAA,qBACc,IAAI;IAAAA,eAAA,mBAEE;MACpCG,eAAe,EAAGC,CAAC,IAAK;QACtB,IAAIA,CAAC,YAAYT,SAAS,EAAE;UAC1B,IAAI,CAACU,UAAU,GAAGD,CAAC;QACrB;MACF;IACF,CAAC;IAIC,MAAME,KAAK,GAAGJ,KAAK,CAACK,QAAQ;IAC5B,IAAIC,g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I,IAAI,CAACC,SAAS,CAAC,MAAM,CAAE;MAC7BX,MAAM,EAAE/C,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC+C,MAAM,CAACqG,aAAa,EAAE,IAAI,CAACrG,MAAM,CAACuH,QAAQ,CAAE;MAACb,KAAK,EAAE,IAAI,CAACpB,IAAI,CAACvB,IAAI,CAAC,IAAI;IAAE,CAAW,CAE7G,CACF,CAAC;EAEX;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Text","View","TouchableOpacity","Platform","TouchableWithoutFeedback","isArray","merge","BaseComponent","BaseComponentState","WmWizardProps","DEFAULT_CLASS","WmButton","WmIcon","WmAnchor","WmProgressCircle","WmPopover","WmLabel","WmWizardState","constructor","args","_defineProperty","WmWizard","props","onComponentInit","c","popOverRef","updateDefaultStep","steps","defaultStepIndex","defaultstep","map","item","index","name","updateCurrentStep","addWizardStep","step","forceUpdate","componentDidMount","componentDidUpdate","prevProps","prevState","snapshot","showActiveStep","_this$steps$this$stat","state","currentStep","setActive","isDone","_this$steps$this$stat2","lastStep","setInActive","updateState","invokeEventCallback","proxy","getStepStyle","style","styles","push","doneStep","activeStep","renderMenuPopover","menuDataset","getmenudataexpression","Labels","title","createElement","id","getTestId","popover","contentanimation","caption","popoverheight","height","popoverwidth","width","listener","iconclass","popovericonclass","iconposition","type","currentMenuItem","length","key","onPress","hide","stepMenu","activeStepMenu","stepMenuActiveIcon","stepMenuIcon","stepMenuActiveLabel","stepMenuLabel","renderProgressCircleHeader","progressTitle","progresstitle","headerWrapper","stepWrapper","flex","alignItems","justifyContent","flexDirection","minvalue","maxvalue","datavalue","captionplacement","progresstype","subtitle","progressCircle","_extends","stepTitle","getTestPropsForLabel","stepSubTitle","renderWizardHeader","isLastStep","numberOfSteps","isFirstStep","isActiveStep","isNumberTextLayout","classname","show","paddingRight","paddingLeft","bind","disabled","headernavigation","accessibilityRole","getTestPropsForAction","activeStepCounter","stepCounter","stepIcon","icon","color","numberTextStepConnector","stepConnector","left","OS","isRTL","prev","invokePrevCB","next","eventName","invokeSkipCB","invokeNextCB","done","$event","cancel","skip","renderWidget","_this$state$props$cla","isSkippable","enableskip","isProgressCircleHeader","includes","root","_background","wizardHeader","i","wizardBody","children","wizardFooter","actionsalignment","showdone","wizardActions","theme","getStyle","doneButton","donebtnlabel","onTap","disabledone","shownext","nextButton","nextbtnlabel","disablenext","showprev","prevButton","previousbtnlabel","disableprev","cancelable","cancelbtnlabel","cancelButton","skipLink"],"sources":["wizard.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, Platform, TouchableWithoutFeedback } from 'react-native';\nimport { isArray, merge } from 'lodash';\nimport { BaseComponent, BaseComponentState, LifecycleListener } 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';\nimport WmProgressCircle from '@wavemaker/app-rn-runtime/components/basic/progress-circle/progress-circle.component';\nimport WmPopover from '@wavemaker/app-rn-runtime/components/navigation/popover/popover.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.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 private popOverRef: WmPopover = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmPopover) {\n this.popOverRef = c;\n }\n }\n };\n\n constructor(props: WmWizardProps) {\n super(props, DEFAULT_CLASS, new WmWizardProps());\n }\n\n updateDefaultStep() {\n const steps = this.steps;\n const props = this.props;\n let defaultStepIndex = 0;\n if (isArray(steps) && props.defaultstep) {\n steps && 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 if (this.props.defaultstep) {\n this.updateDefaultStep();\n }\n }\n\n componentDidUpdate(prevProps: Readonly<WmWizardProps>, prevState: Readonly<WmWizardState>, snapshot?: any): void {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n // * when a variable is bind to default step\n if (this.props.defaultstep && prevProps.defaultstep !== this.props.defaultstep) {\n this.updateDefaultStep();\n }\n }\n\n showActiveStep() {\n this.steps[this.state.currentStep]?.setActive();\n }\n\n updateCurrentStep(index: number, isDone = false) {\n const lastStep = this.state.currentStep;\n this.steps[this.state.currentStep]?.setInActive();\n this.updateState({\n currentStep: index,\n isDone: isDone\n } as WmWizardState, () => {\n this.showActiveStep();\n if (lastStep !== index) {\n this.invokeEventCallback('onChange', [null, this.proxy, index + 1, lastStep + 1]);\n }\n });\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 renderMenuPopover(){\n const menuDataset = this.props.getmenudataexpression || ((item: any, index: number) => '') ;\n const Labels = this.steps.map((step: WmWizardstep) => step.state.props.title);\n return (\n <WmPopover\n id={this.getTestId('menu')}\n styles={this.styles.popover}\n contentanimation={'slideInDown'}\n caption={''}\n popoverheight={this.styles.popover.popover.height as string | number | undefined || null}\n popoverwidth={this.styles.popover.popover.width as string | number | undefined || null}\n listener={this.listener}\n iconclass={this.props.popovericonclass || 'fa fa-caret-down'}\n iconposition=\"right\"\n type='dropdown'>\n <View style={this.styles.popover.popover}>\n {Labels.map((item: any, index: number) => {\n const currentMenuItem = index==this.state.currentStep;\n const caption = menuDataset({\"count\":this.steps.length}, index);\n return (\n <TouchableWithoutFeedback key={'wizard_menu_item_'+index} onPress={()=>{this.popOverRef.hide();}}>\n <View style={[this.styles.stepMenu, currentMenuItem?this.styles.activeStepMenu:{}]}>\n <WmIcon id={this.getTestId('icon')} caption={caption} iconclass={currentMenuItem? \"wi wi-radio-button-checked\" : 'wi wi-radio-button-unchecked'} styles={currentMenuItem?this.styles.stepMenuActiveIcon:this.styles.stepMenuIcon}/>\n <WmLabel caption={item} styles={currentMenuItem?this.styles.stepMenuActiveLabel:this.styles.stepMenuLabel}/>\n </View>\n </TouchableWithoutFeedback>\n )})}\n </View>\n </WmPopover>\n );\n }\n\n renderProgressCircleHeader(item: any, index: number) {\n const progressTitle = this.props.progresstitle || (index + 1 + '/' + this.steps.length);\n return (\n <View style={[this.styles.headerWrapper]} key={index + 1}>\n <View style={this.styles.stepWrapper}>\n <View style={{ flex: 1, alignItems: 'flex-start', justifyContent: 'center', flexDirection:'row' }}>\n <WmProgressCircle id={this.getTestId('progress')} minvalue={0} maxvalue={this.steps.length} datavalue={index + 1} captionplacement={'inside'} type={this.props.progresstype} title={progressTitle} subtitle={''} styles={this.styles.progressCircle}/>\n </View>\n <View style={{ flex: 2, justifyContent: 'center', flexDirection: 'column' }}>\n <Text style={this.styles.stepTitle} {...this.getTestPropsForLabel('step' + (index + 1) + '_title')}>\n {item.props.title || 'Step Title'}</Text>\n <Text style={this.styles.stepSubTitle} {...this.getTestPropsForLabel('step' + (index + 1)+ '_subtitle')}>\n {item.props.subtitle || 'Step Sub Title'}</Text>\n </View>\n <View style={{ flexDirection: 'row', alignItems: 'flex-end', justifyContent: 'flex-end', flex: 1 }}>\n {this.renderMenuPopover()}\n </View>\n </View>\n </View>\n );\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.state.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 || !this.state.props.headernavigation}\n accessibilityRole='header'>\n <View style={this.getStepStyle(index)} {...this.getTestPropsForAction('step'+index)}>\n {index >= this.state.currentStep && !this.state.isDone &&\n <Text style={isActiveStep ? [this.styles.activeStep, this.styles.activeStepCounter] : this.styles.stepCounter} {...this.getTestPropsForLabel('step' + (index + 1) + '_indicator')}>{index+1}</Text>}\n {(index < this.state.currentStep || this.state.isDone) &&\n <WmIcon id={this.getTestId('status')} styles={merge({}, this.styles.stepIcon, {icon: {color: this.styles.activeStep.color}})}\n iconclass={item.state.props.iconclass || 'wm-sl-l sl-check'}></WmIcon>}\n </View>\n {(isActiveStep) &&\n <Text style={this.styles.stepTitle} {...this.getTestPropsForLabel('step' + (index + 1) + '_title')}>\n {item.state.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 prev() {\n const index = this.state.currentStep;\n if (index <= 0) {\n return;\n }\n const currentStep = this.steps[index];\n if(currentStep.invokePrevCB(index) == false){\n return;\n }\n this.updateCurrentStep(index - 1);\n }\n\n next(eventName?: string) {\n const index = this.state.currentStep;\n if (index >= this.steps.length - 1) {\n return;\n }\n const currentStep = this.steps[index];\n if (eventName === 'skip') {\n currentStep.invokeSkipCB(index);\n } else if (currentStep.invokeNextCB(index) == false) {\n return;\n }\n this.updateCurrentStep(index + 1);\n }\n\n done($event: any) {\n if (this.state.currentStep !== this.steps.length - 1) {\n return;\n }\n this.updateState({\n isDone: true\n } as WmWizardState);\n this.invokeEventCallback('onDone', [$event, this.proxy]);\n }\n\n cancel() {\n this.invokeEventCallback('onCancel', [null, this.proxy]);\n }\n\n skip() {\n this.next('skip');\n }\n\n renderWidget(props: WmWizardProps) {\n this.numberOfSteps = this.steps.length;\n const activeStep = this.steps[this.state.currentStep];\n const isSkippable = activeStep && activeStep.state.props.enableskip;\n const isProgressCircleHeader = this.state.props.classname?.includes('progress-circle-header');\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.wizardHeader}>\n {activeStep && isProgressCircleHeader ? (this.renderProgressCircleHeader(activeStep, this.state.currentStep)) : (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 && activeStep.state.props.showdone &&\n <WmButton iconclass={'wm-sl-l sl-check'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.doneButton)}\n id = {this.getTestId('donebtn')} caption={props.donebtnlabel} onTap={this.done.bind(this)} disabled={activeStep.state.props.disabledone}></WmButton>\n }\n {(this.state.currentStep+1) < this.numberOfSteps && activeStep.state.props.shownext &&\n <WmButton iconclass={'wi wi-chevron-right'} styles={merge({}, this.styles.wizardActions, this.theme.getStyle('btn-default'), this.styles.nextButton)}\n id = {this.getTestId('nextbtn')}\n iconposition={'right'} caption={props.nextbtnlabel} onTap={this.next.bind(this)} disabled={activeStep.state.props.disablenext}></WmButton>\n }\n {this.state.currentStep > 0 && activeStep.state.props.showprev &&\n <WmButton iconclass={'wi wi-chevron-left'} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.prevButton)} caption={props.previousbtnlabel}\n id = {this.getTestId('prevbtn')}\n onTap={this.prev.bind(this)} disabled={activeStep.state.props.disableprev}></WmButton>\n }\n {props.cancelable ?\n <WmButton id = {this.getTestId('cancelbtn')} caption={props.cancelbtnlabel} styles={merge({}, this.theme.getStyle('btn-default'), this.styles.wizardActions, this.styles.cancelButton)} onTap={this.cancel.bind(this)}></WmButton>\n : null\n }\n {isSkippable &&\n <WmAnchor iconclass={'wi wi-chevron-right'} iconposition={'right'} caption={'Skip'}\n id = {this.getTestId('skip')}\n styles={merge({}, this.styles.wizardActions, this.styles.skipLink)} onTap={this.skip.bind(this)}></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,EAAEC,wBAAwB,QAAQ,cAAc;AAC/F,SAASC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAA2B,+CAA+C;AAEpH,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;AAEzF,OAAOC,gBAAgB,MAAM,sFAAsF;AACnH,OAAOC,SAAS,MAAM,2EAA2E;AACjG,OAAOC,OAAO,MAAM,kEAAkE;AAEtF,OAAO,MAAMC,aAAa,SAAST,kBAAkB,CAAgB;EAAAU,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,sBAC7C,CAAC;IAAAA,eAAA,iBACL,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,QAAQ,SAASd,aAAa,CAA+C;EAahGW,WAAWA,C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AM,CAAC0H,YAAY,CAAE;MAACZ,KAAK,EAAE,IAAI,CAACtB,MAAM,CAACvB,IAAI,CAAC,IAAI;IAAE,CAAW,CAAC,GACjO,IAAI,EAET2B,WAAW,iBACRtJ,KAAA,CAAAmE,aAAA,CAACrD,QAAQ;MAACgE,SAAS,EAAE,qBAAsB;MAACE,YAAY,EAAE,OAAQ;MAACR,OAAO,EAAE,MAAO;MACjFJ,EAAE,EAAI,IAAI,CAACC,SAAS,CAAC,MAAM,CAAE;MAC7BX,MAAM,EAAEnD,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAACmD,MAAM,CAACyG,aAAa,EAAE,IAAI,CAACzG,MAAM,CAAC2H,QAAQ,CAAE;MAACb,KAAK,EAAE,IAAI,CAACrB,IAAI,CAACxB,IAAI,CAAC,IAAI;IAAE,CAAW,CAE7G,CACF,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","isEqual","isNil","get","find","cloneDeep","forEach","keys","WmFormFieldProps","DEFAULT_CLASS","PERFORMANCE_LOGGER","WmFormFieldState","constructor","args","_defineProperty","WmFormField","props","form","formScope","componentDidMount","_this$form","_this$form2","_this$form3","formwidget","formKey","formWidgets","name","registerFormFields","formFields","onFieldChangeEvt","$new","$old","isDefault","notifyChanges","updateState","datavalue","invokeEventCallback","undefined","validateFormField","updateDataOutput","call","observeOn","fields","field","formfield","f","proxy","notifyForFields","push","validate","setTimeout","getPromiseList","validators","arr","fn","promise","Function","bind","Promise","setAsyncValidators","_asyncValidatorFn","all","then","err","validationMsg","hasOwnProperty","messageKeys","toString","setInvalidState","setValidators","_cloneValidators","_syncValidators","obj","index","key","defaultValidatorMessages","value","propsObj","updateFormWidgetDataset","res","displayField","dataset","data","datafield","displayfield","state","msg","isValid","validationmessage","onPropertyChange","debug","applyDefaultValue","setPrimaryKey","setReadOnlyState","updateMode","_this$formwidget","readonly","_this$formwidget2","_this$_syncValidators","_this$formwidget3","errorType","errormsg","errorMessage","renderWidget","childrenWithProps","Children","map","renderFormFields","children","child","cloneElement","maskchar","displayformat","invokeEvent","triggerValidation","onFieldChange","formRef","placeholder","createElement","style","styles","root","_background","_extends","getTestPropsForLabel","errorMsg"],"sources":["form-field.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View} from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { widgetsWithUndefinedValue } from '@wavemaker/app-rn-runtime/core/utils';\nimport { isEqual, isNil, get, find, cloneDeep, forEach, keys } from 'lodash';\n\nimport WmFormFieldProps from './form-field.props';\nimport { DEFAULT_CLASS, WmFormFieldStyles } from './form-field.styles';\nimport {PERFORMANCE_LOGGER} from \"@wavemaker/app-rn-runtime/core/logger\";\n\nexport class WmFormFieldState extends BaseComponentState<WmFormFieldProps> {\n isValid = true;\n}\n\nexport default class WmFormField extends BaseComponent<WmFormFieldProps, WmFormFieldState, WmFormFieldStyles> {\n public form: any;\n public formwidget: any;\n public _syncValidators: any;\n public defaultValidatorMessages: any = [];\n private notifyForFields: any = [];\n private _asyncValidatorFn: any;\n constructor(props: WmFormFieldProps) {\n super(props, DEFAULT_CLASS, new WmFormFieldProps(), new WmFormFieldState());\n if (!this.form) {\n this.form = props.formScope && props.formScope();\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.formwidget = (this.props.formKey && this.form?.formWidgets[this.props.formKey])\n || (this.props.name && this.form?.formWidgets[this.props.name]);\n this.form?.registerFormFields(this.form.formFields, this.form.formWidgets);\n }\n\n onFieldChangeEvt(name: string, $new: any, $old: any, isDefault: boolean) {\n this.notifyChanges();\n if (!isEqual($old, $new)) {\n this.updateState({ props: { datavalue: $new }} as WmFormFieldState, () => {\n !isDefault && this.invokeEventCallback('onChange', [undefined, this, $new, $old]);\n this.validateFormField();\n });\n if (this.form) {\n this.form.updateDataOutput.call(this.form, get(this.props, 'formKey', this.props.name), $new);\n }\n }\n }\n\n // Registers observer of validation fields\n observeOn(fields: any) {\n forEach(fields, (field) => {\n const formfield = find(this.form.formFields, (f) => f.proxy.name === field);\n if (formfield) {\n formfield.notifyForFields.push(this);\n }\n });\n }\n\n // Notifies changes to observing validation fields\n notifyChanges() {\n forEach(this.notifyForFields, (field) => {\n field.formwidget.validate(field.formwidget.datavalue);\n setTimeout(() => field.validateFormField());\n });\n }\n\n getPromiseList(validators: any) {\n const arr: any = [];\n forEach(validators, (fn) => {\n let promise = fn;\n if (fn instanceof Function && fn.bind) {\n promise = fn(this.formwidget.proxy, this.form);\n }\n if (promise instanceof Promise) {\n arr.push(promise);\n }\n });\n return arr;\n }\n\n // this method sets the asyncValidation on the form field. Assigns validationmessages from the returned response\n setAsyncValidators(validators: any) {\n this._asyncValidatorFn = () => {\n return Promise.all(this.getPromiseList(validators)).then(() => {\n return null;\n }, err => {\n let validationMsg: string;\n // if err obj has validationMessage key, then set validationMessage using this value\n // else return the value of the first key in the err object as validation message.\n if (err.hasOwnProperty('errorMessage')) {\n validationMsg = get(err, 'errorMessage');\n } else {\n const messageKeys = keys(err);\n validationMsg = (err[messageKeys[0]]).toString();\n }\n this.setInvalidState(validationMsg);\n return err;\n })\n };\n }\n\n // sets the default validation on the form field\n setValidators(validators: any) {\n let _cloneValidators = cloneDeep(validators);\n this._syncValidators = [];\n forEach(_cloneValidators, (obj, index) => {\n // custom validation is bound to function.\n if (obj && obj instanceof Function) {\n // passing formwidget and form as arguments to the obj (i.e. validator function)\n _cloneValidators[index] = obj.bind(undefined, this.formwidget.proxy, this.form);\n this._syncValidators.push(_cloneValidators[index]);\n } else {\n // checks for default validator like required, maxchars etc.\n const key = get(obj, 'type');\n this.defaultValidatorMessages[key] = get(obj, 'errorMessage');\n const value = get(obj, 'validator');\n let propsObj: any = {\n props: {}\n };\n propsObj.props[key] = value;\n key === 'required' && this.updateState(propsObj as WmFormFieldState);\n this.formwidget.updateState(propsObj as WmFormFieldState);\n }\n });\n }\n\n updateFormWidgetDataset(res: any, displayField: string) {\n this.formwidget.updateState({\n props: {\n dataset: res.data,\n datafield: 'All Fields',\n displayfield: this.formwidget.state.props.displayfield || displayField,\n }\n } as WmFormFieldState);\n }\n\n setInvalidState(msg: string) {\n this.updateState({\n isValid: false,\n props: {\n validationmessage: msg\n }\n } as WmFormFieldState)\n this.formwidget.updateState({\n isValid: false,\n props: {\n validationmessage: msg\n }\n } as WmFormFieldState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'datavalue':\n if (!isEqual($old, $new)) {\n PERFORMANCE_LOGGER.debug(`form field ${this.props.name} changed from ${$old} to ${$new}`);\n }\n break;\n case 'defaultvalue':\n if (!isEqual($old, $new)) {\n get(this, 'form') && this.form.applyDefaultValue(this);\n }\n break;\n case 'primary-key':\n if ($new) {\n this.form.setPrimaryKey(this.props.name);\n }\n break;\n }\n }\n\n setReadOnlyState(updateMode: any) {\n this.formwidget?.updateState({\n props: {\n readonly: !updateMode,\n }\n } as WmFormFieldState);\n }\n\n validateFormField() {\n if (this.formwidget?.state.isValid === false) {\n const errorType = this.formwidget?.state?.errorType;\n let validationMsg = get(this.defaultValidatorMessages, errorType);\n if (validationMsg) {\n if (validationMsg instanceof Function) {\n // passing formwidget and form as arguments to the errorMessage function.\n validationMsg = validationMsg(this.formwidget.proxy, this.form);\n }\n this.updateState({ props: {\n validationmessage: validationMsg\n }} as WmFormFieldState);\n }\n this.updateState({ isValid: false} as WmFormFieldState);\n } else {\n this.updateState({ isValid: true } as WmFormFieldState);\n }\n\n this._syncValidators?.forEach((fn: any) => {\n const errormsg = fn();\n let validationMsg = errormsg?.errorMessage;\n if (validationMsg) {\n if (validationMsg instanceof Function) {\n // passing formwidget and form as arguments to the errorMessage function.\n validationMsg = validationMsg(this.formwidget.proxy, this.form);\n }\n this.setInvalidState(validationMsg);\n }\n })\n\n this._asyncValidatorFn && this._asyncValidatorFn();\n\n }\n\n get value(){\n return this.state.props.datavalue;\n }\n\n renderWidget(props: WmFormFieldProps) {\n var childrenWithProps = React.Children.map(props.renderFormFields(this.proxy).props.children, (child) => {\n return React.cloneElement(child, {\n datavalue: props.datavalue,\n value: this.value,\n isValid: this.state.isValid,\n maskchar: props.maskchar,\n displayformat: props.displayformat,\n invokeEvent: this.invokeEventCallback.bind(this),\n triggerValidation: this.validateFormField.bind(this),\n onFieldChange: this.onFieldChangeEvt.bind(this),\n formRef: props.formRef,\n ...(!isNil(props?.placeholder) ? { placeholder: props.placeholder } : {})\n });\n });\n return (\n <View style={this.styles.root}>{this._background}{childrenWithProps}\n {this.state.isValid === false && <Text {...this.getTestPropsForLabel('error_msg')} style={this.styles.errorMsg}>{props.validationmessage}</Text>}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,OAAO,EAAEC,KAAK,EAAEC,GAAG,EAAEC,IAAI,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,QAAQ;AAE5E,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAAQC,kBAAkB,QAAO,uCAAuC;AAExE,OAAO,MAAMC,gBAAgB,SAASX,kBAAkB,CAAmB;EAAAY,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAC/D,IAAI;EAAA;AAChB;AAEA,eAAe,MAAMC,WAAW,SAAShB,aAAa,CAAwD;EAO5Ga,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIG,gBAAgB,CAAC,CAAC,CAAC;IAACG,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,mCAJvC,EAAE;IAAAA,eAAA,0BACV,EAAE;IAAAA,eAAA;IA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,IAAK;MACvG,oBAAOjH,KAAK,CAACkH,YAAY,CAACD,KAAK,EAAE;QAC7B1E,SAAS,EAAEnB,KAAK,CAACmB,SAAS;QAC1ByC,KAAK,EAAE,IAAI,CAACA,KAAK;QACjBW,OAAO,EAAE,IAAI,CAACF,KAAK,CAACE,OAAO;QAC3BwB,QAAQ,EAAE/F,KAAK,CAAC+F,QAAQ;QACxBC,aAAa,EAAEhG,KAAK,CAACgG,aAAa;QAClCC,WAAW,EAAE,IAAI,CAAC7E,mBAAmB,CAACqB,IAAI,CAAC,IAAI,CAAC;QAChDyD,iBAAiB,EAAE,IAAI,CAAC5E,iBAAiB,CAACmB,IAAI,CAAC,IAAI,CAAC;QACpD0D,aAAa,EAAE,IAAI,CAACtF,gBAAgB,CAAC4B,IAAI,CAAC,IAAI,CAAC;QAC/C2D,OAAO,EAAEpG,KAAK,CAACoG,OAAO;QACtB,IAAI,CAAClH,KAAK,CAACc,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEqG,WAAW,CAAC,GAAG;UAAEA,WAAW,EAAErG,KAAK,CAACqG;QAAY,CAAC,GAAG,CAAC,CAAC;MACzE,CAAC,CAAC;IACP,CAAC,CAAC;IACF,oBACEzH,KAAA,CAAA0H,aAAA,CAACxH,IAAI;MAACyH,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAElB,iBAAiB,EAChE,IAAI,CAACnB,KAAK,CAACE,OAAO,KAAK,KAAK,iBAAI3F,KAAA,CAAA0H,aAAA,CAACzH,IAAI,EAAA8H,QAAA,KAAK,IAAI,CAACC,oBAAoB,CAAC,WAAW,CAAC;MAAEL,KAAK,EAAE,IAAI,CAACC,MAAM,CAACK;IAAS,IAAE7G,KAAK,CAACwE,iBAAwB,CAC3I,CAAC;EAEX;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","isEqual","isNil","get","find","cloneDeep","forEach","keys","WmFormFieldProps","DEFAULT_CLASS","PERFORMANCE_LOGGER","WmFormFieldState","constructor","args","_defineProperty","WmFormField","props","form","formScope","componentDidMount","_this$form","_this$form2","_this$form3","formwidget","formKey","formWidgets","name","registerFormFields","formFields","onFieldChangeEvt","$new","$old","isDefault","notifyChanges","updateState","datavalue","invokeEventCallback","undefined","validateFormField","updateDataOutput","call","observeOn","fields","field","formfield","f","proxy","notifyForFields","push","validate","setTimeout","getPromiseList","validators","arr","fn","promise","Function","bind","Promise","setAsyncValidators","_asyncValidatorFn","all","then","err","validationMsg","hasOwnProperty","messageKeys","toString","setInvalidState","setValidators","_cloneValidators","_syncValidators","obj","index","key","defaultValidatorMessages","value","propsObj","updateFormWidgetDataset","res","displayField","dataset","data","datafield","displayfield","state","msg","isValid","validationmessage","onPropertyChange","debug","applyDefaultValue","setPrimaryKey","setReadOnlyState","updateMode","_this$formwidget","readonly","_this$formwidget2","_this$_syncValidators","_this$formwidget3","errorType","errormsg","errorMessage","renderWidget","childrenWithProps","Children","map","renderFormFields","children","child","cloneElement","maskchar","displayformat","invokeEvent","triggerValidation","onFieldChange","formRef","placeholder","createElement","style","styles","root","_background","_extends","getTestPropsForLabel","errorMsg"],"sources":["form-field.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View} from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { widgetsWithUndefinedValue } from '@wavemaker/app-rn-runtime/core/utils';\nimport { isEqual, isNil, get, find, cloneDeep, forEach, keys } from 'lodash';\n\nimport WmFormFieldProps from './form-field.props';\nimport { DEFAULT_CLASS, WmFormFieldStyles } from './form-field.styles';\nimport {PERFORMANCE_LOGGER} from \"@wavemaker/app-rn-runtime/core/logger\";\n\nexport class WmFormFieldState extends BaseComponentState<WmFormFieldProps> {\n isValid = true;\n}\n\nexport default class WmFormField extends BaseComponent<WmFormFieldProps, WmFormFieldState, WmFormFieldStyles> {\n public form: any;\n public formwidget: any;\n public _syncValidators: any;\n public defaultValidatorMessages: any = [];\n private notifyForFields: any = [];\n private _asyncValidatorFn: any;\n constructor(props: WmFormFieldProps) {\n super(props, DEFAULT_CLASS, new WmFormFieldProps(), new WmFormFieldState());\n if (!this.form) {\n this.form = props.formScope && props.formScope();\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.formwidget = (this.props.formKey && this.form?.formWidgets[this.props.formKey])\n || (this.props.name && this.form?.formWidgets[this.props.name]);\n this.form?.registerFormFields(this.form.formFields, this.form.formWidgets);\n }\n\n onFieldChangeEvt(name: string, $new: any, $old: any, isDefault: boolean) {\n this.notifyChanges();\n if (!isEqual($old, $new)) {\n this.updateState({ props: { datavalue: $new }} as WmFormFieldState, () => {\n !isDefault && this.invokeEventCallback('onChange', [undefined, this, $new, $old]);\n this.validateFormField();\n });\n if (this.form) {\n this.form.updateDataOutput.call(this.form, get(this.props, 'formKey', this.props.name), $new);\n }\n }\n }\n\n // Registers observer of validation fields\n observeOn(fields: any) {\n forEach(fields, (field) => {\n const formfield = find(this.form.formFields, (f) => f.proxy.name === field);\n if (formfield) {\n formfield.notifyForFields.push(this);\n }\n });\n }\n\n // Notifies changes to observing validation fields\n notifyChanges() {\n forEach(this.notifyForFields, (field) => {\n field.formwidget.validate(field.formwidget.datavalue);\n setTimeout(() => field.validateFormField());\n });\n }\n\n getPromiseList(validators: any) {\n const arr: any = [];\n forEach(validators, (fn) => {\n let promise = fn;\n if (fn instanceof Function && fn.bind) {\n promise = fn(this.formwidget.proxy, this.form);\n }\n if (promise instanceof Promise) {\n arr.push(promise);\n }\n });\n return arr;\n }\n\n // this method sets the asyncValidation on the form field. Assigns validationmessages from the returned response\n setAsyncValidators(validators: any) {\n this._asyncValidatorFn = () => {\n return Promise.all(this.getPromiseList(validators)).then(() => {\n return null;\n }, err => {\n let validationMsg: string;\n // if err obj has validationMessage key, then set validationMessage using this value\n // else return the value of the first key in the err object as validation message.\n if (err.hasOwnProperty('errorMessage')) {\n validationMsg = get(err, 'errorMessage');\n } else {\n const messageKeys = keys(err);\n validationMsg = (err[messageKeys[0]]).toString();\n }\n this.setInvalidState(validationMsg);\n return err;\n })\n };\n }\n\n // sets the default validation on the form field\n setValidators(validators: any) {\n let _cloneValidators = cloneDeep(validators);\n this._syncValidators = [];\n forEach(_cloneValidators, (obj, index) => {\n // custom validation is bound to function.\n if (obj && obj instanceof Function) {\n // passing formwidget and form as arguments to the obj (i.e. validator function)\n _cloneValidators[index] = obj.bind(undefined, this.formwidget.proxy, this.form);\n this._syncValidators.push(_cloneValidators[index]);\n } else {\n // checks for default validator like required, maxchars etc.\n const key = get(obj, 'type');\n this.defaultValidatorMessages[key] = get(obj, 'errorMessage');\n const value = get(obj, 'validator');\n let propsObj: any = {\n props: {}\n };\n propsObj.props[key] = value;\n key === 'required' && this.updateState(propsObj as WmFormFieldState);\n this.formwidget.updateState(propsObj as WmFormFieldState);\n }\n });\n }\n\n updateFormWidgetDataset(res: any, displayField: string) {\n this.formwidget.updateState({\n props: {\n dataset: res.data,\n datafield: 'All Fields',\n displayfield: this.formwidget.state.props.displayfield || displayField,\n }\n } as WmFormFieldState);\n }\n\n setInvalidState(msg: string) {\n this.updateState({\n isValid: false,\n props: {\n validationmessage: msg\n }\n } as WmFormFieldState)\n this.formwidget.updateState({\n isValid: false,\n props: {\n validationmessage: msg\n }\n } as WmFormFieldState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'datavalue':\n if (!isEqual($old, $new)) {\n PERFORMANCE_LOGGER.debug(`form field ${this.props.name} changed from ${$old} to ${$new}`);\n }\n break;\n case 'defaultvalue':\n if (!isEqual($old, $new)) {\n get(this, 'form') && this.form.applyDefaultValue(this);\n }\n break;\n case 'primary-key':\n if ($new) {\n this.form.setPrimaryKey(this.props.name);\n }\n break;\n }\n }\n\n setReadOnlyState(updateMode: any) {\n this.formwidget?.updateState({\n props: {\n readonly: !updateMode,\n }\n } as WmFormFieldState);\n }\n\n validateFormField() {\n if (this.formwidget?.state.isValid === false) {\n const errorType = this.formwidget?.state?.errorType;\n let validationMsg = get(this.defaultValidatorMessages, errorType);\n if (validationMsg) {\n if (validationMsg instanceof Function) {\n // passing formwidget and form as arguments to the errorMessage function.\n validationMsg = validationMsg(this.formwidget.proxy, this.form);\n }\n this.updateState({ props: {\n validationmessage: validationMsg\n }} as WmFormFieldState);\n }\n this.updateState({ isValid: false} as WmFormFieldState);\n } else {\n this.updateState({ isValid: true } as WmFormFieldState);\n }\n\n this._syncValidators?.forEach((fn: any) => {\n const errormsg = fn();\n let validationMsg = errormsg?.errorMessage;\n if (validationMsg) {\n if (validationMsg instanceof Function) {\n // passing formwidget and form as arguments to the errorMessage function.\n validationMsg = validationMsg(this.formwidget.proxy, this.form);\n }\n this.setInvalidState(validationMsg);\n }\n })\n\n this._asyncValidatorFn && this._asyncValidatorFn();\n\n }\n\n get value(){\n return this.state.props.datavalue;\n }\n\n renderWidget(props: WmFormFieldProps) {\n var childrenWithProps = React.Children.map(props.renderFormFields(this.proxy).props.children, (child) => {\n return React.cloneElement(child, {\n datavalue: props.datavalue,\n value: this.value,\n isValid: this.state.isValid,\n maskchar: props.maskchar,\n displayformat: props.displayformat,\n invokeEvent: this.invokeEventCallback.bind(this),\n triggerValidation: this.validateFormField.bind(this),\n onFieldChange: this.onFieldChangeEvt.bind(this),\n formRef: props.formRef,\n ...(!isNil(props?.placeholder) ? { placeholder: props.placeholder } : {})\n });\n });\n return (\n <View style={this.styles.root}>{this._background}{childrenWithProps}\n {this.state.isValid === false && <Text {...this.getTestPropsForLabel('error_msg')} style={this.styles.errorMsg}>{props.validationmessage}</Text>}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,OAAO,EAAEC,KAAK,EAAEC,GAAG,EAAEC,IAAI,EAAEC,SAAS,EAAEC,OAAO,EAAE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