@wavemaker/app-rn-runtime 11.4.0-next.1417013 → 11.4.0-next.1417014
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/actions/notification-action.js +5 -4
- app-rn-runtime/actions/notification-action.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +1 -1
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +5 -5
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +1 -1
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +1 -1
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +37 -26
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -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 +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +4 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +56 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -0
- app-rn-runtime/components/basic/video/video.props.js +22 -0
- app-rn-runtime/components/basic/video/video.props.js.map +1 -0
- app-rn-runtime/components/basic/video/video.styles.js +11 -0
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
- app-rn-runtime/components/container/accordion/accordion.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +1 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.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/tabs/tabheader/tabheader.component.js +12 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +2 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +5 -2
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +80 -64
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +1 -1
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +1 -1
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +0 -6
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +2 -31
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +17 -8
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +3 -2
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +9 -4
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.props.js +0 -1
- app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +7 -0
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +0 -9
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +0 -40
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +1 -1
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +1 -1
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +19 -22
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +7 -7
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +1 -10
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +0 -10
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
- app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +1 -1
- app-rn-runtime/components/page/content/content.component.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/page-content/page-content.component.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page.component.js +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +1 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.styles.js +2 -1
- app-rn-runtime/components/page/partial-container/partial-container.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/core/asset.provider.js +5 -0
- app-rn-runtime/core/asset.provider.js.map +1 -0
- app-rn-runtime/core/base.component.js +113 -41
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +1 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/injector.js +15 -1
- app-rn-runtime/core/injector.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +9 -2
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +6 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +105 -0
- app-rn-runtime/gestures/swipe.animation.js.map +1 -0
- app-rn-runtime/package.json +5 -5
- app-rn-runtime/runtime/App.js +20 -15
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +2 -12
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +6 -4
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +28 -6
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js +15 -14
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/styles/background.component.js +259 -0
- app-rn-runtime/styles/background.component.js.map +1 -0
- app-rn-runtime/styles/style-prop.validator.js +11 -6
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/style-props.js +93 -0
- app-rn-runtime/styles/style-props.js.map +1 -0
- app-rn-runtime/styles/theme.js +5 -36
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js +43 -21
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/http.service.js +3 -12
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +19 -8
- app-rn-runtime/variables/service-variable.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","SectionList","Text","View","TouchableWithoutFeedback","FlatList","isArray","BaseComponent","BaseComponentState","getGroupedData","isDefined","WmLabel","WmIcon","WmListProps","DEFAULT_CLASS","WmListState","WmList","constructor","props","onSelect","$item","$index","state","disableitem","selectedItemWidgets","itemWidgets","updateState","selecteditem","selectedindex","invokeEventCallback","proxy","selectFirstItem","initialized","dataset","length","index","groupby","deselect","setGroupData","items","dataItems","groupedData","match","orderby","dateformat","key","onPropertyChange","name","$new","$old","_showSkeleton","data","selectfirstitem","componentDidMount","setTimeout","componentDidUpdate","prevProps","prevState","snapshot","getDefaultStyles","isHorizontal","direction","theme","getStyle","defaultClass","getIndex","item","indexOf","generateItemKey","itemkey","renderItem","styles","itemclass","_groupIndex","selectedItem","selectedIcon","renderHeader","title","groupHeading","iconclass","subheading","heading","flex","flexDirection","listIcon","renderEmptyMessage","emptyMessage","nodatamessage","renderLoadingIcon","loadingIcon","loadingicon","loadingdatamsg","renderWithFlatList","root","map","v","marginBottom","i","itemInfo","renderWithSectionList","distanceFromEnd","setState","currentPage","section","loadingdata","renderWidget"],"sources":["list.component.tsx"],"sourcesContent":["import React from 'react';\nimport { SectionList, Text, View, TouchableWithoutFeedback } from 'react-native';\nimport { FlatList } from 'react-native-gesture-handler';\nimport { isArray } from 'lodash-es';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {getGroupedData, isDefined} from \"@wavemaker/app-rn-runtime/core/utils\";\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmListProps from './list.props';\nimport { DEFAULT_CLASS, WmListStyles } from './list.styles';\n\n\nexport class WmListState extends BaseComponentState<WmListProps> {\n public selectedindex: any;\n groupedData: Array<any> = [];\n currentPage: number = 1;\n}\n\nexport default class WmList extends BaseComponent<WmListProps, WmListState, WmListStyles> {\n\n private itemWidgets = [] as any[];\n private selectedItemWidgets = {} as any;\n private key = 1;\n\n constructor(props: WmListProps) {\n super(props, DEFAULT_CLASS, new WmListProps(), new WmListState());\n }\n\n private onSelect($item: any, $index: number | string) {\n if (!this.state.props.disableitem($item, $index)) {\n this.selectedItemWidgets = this.itemWidgets[$index as number];\n this.updateState({\n props: { selecteditem: $item },\n selectedindex: $index\n } as WmListState, () => {\n this.invokeEventCallback('onSelect', [this.proxy, $item]);\n });\n }\n }\n\n private selectFirstItem() {\n const props = this.state.props;\n if (this.initialized\n && props.dataset\n && props.dataset.length) {\n const index = props.groupby ? '00': 0;\n this.onSelect(props.dataset[0], index);\n }\n }\n\n private deselect() {\n this.updateState({\n props: { selecteditem: null },\n selectedindex: -1\n } as WmListState);\n }\n\n setGroupData(items: any) {\n const dataItems = items;\n const props = this.state.props;\n if (props.groupby) {\n const groupedData = dataItems && getGroupedData(dataItems, props.groupby, props.match, props.orderby, props.dateformat, this);\n this.updateState({\n groupedData: groupedData\n } as WmListState, () => {\n this.key += (items && items.length) || 0;\n });\n }\n }\n\n public onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n switch(name) {\n case 'selectfirstitem':\n if ($new) {\n this.selectFirstItem();\n }\n break;\n case 'dataset':\n if(this._showSkeleton) {\n $new = [{}, {}, {}];\n }\n if (this.state.props.groupby) {\n this.setGroupData($new);\n } else {\n this.updateState({\n groupedData: [{\n key: '',\n data: isArray($new) ? $new : (isDefined($new) ? [$new] : [])\n }]\n } as WmListState, () => {\n this.key += ($new && $new.length) || 0;\n });\n }\n this.itemWidgets = [];\n if (props.selectfirstitem) {\n this.selectFirstItem();\n } else {\n this.deselect();\n }\n break;\n case 'groupby':\n case 'match':\n this.setGroupData(this.state.props.dataset);\n break;\n }\n }\n\n componentDidMount() {\n const props = this.state.props;\n if (this.state.props.selectfirstitem && props.dataset?.length) {\n setTimeout(() => {\n this.onSelect(props.dataset[0], 0);\n });\n }\n super.componentDidMount();\n }\n\n componentDidUpdate(prevProps: WmListProps, prevState: WmListState, snapshot?: any) {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n this.invokeEventCallback('onRender', [this, this.state.props.dataset]);\n }\n\n getDefaultStyles() {\n const isHorizontal = this.state.props.direction === 'horizontal';\n return this.theme.getStyle(`${this.defaultClass} ${isHorizontal ? 'app-horizontal-list' : 'app-vertical-list'}`);\n }\n\n getIndex(item: any) {\n return this.state.props.dataset.indexOf(item);\n }\n\n private generateItemKey(item: any, index: number, props: WmListProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + (this.key + index);\n }\n\n private renderItem(item: any, index: number, props: WmListProps) {\n return (\n <TouchableWithoutFeedback onPress={() => this.onSelect(item, index)}>\n <View style={[\n this.styles.item,\n props.itemclass ? this.theme.getStyle(props.itemclass(item, index)) : null,\n this.state.selectedindex === index && this.state.props.selecteditem?._groupIndex === item._groupIndex ? this.styles.selectedItem : {}]}>\n {props.renderItem(item, index, this)}\n { this.state.selectedindex === index && this.state.props.selecteditem?._groupIndex === item._groupIndex ? (\n <WmIcon iconclass='wi wi-check-circle' styles={this.styles.selectedIcon} />\n ) : null}\n </View>\n </TouchableWithoutFeedback>\n );\n }\n\n private renderHeader(props: WmListProps, title: string) {\n return props.groupby ? (\n <Text style={this.styles.groupHeading}>{title}</Text>\n ) : (props.iconclass || props.title || props.subheading) ? (\n <View style={this.styles.heading}>\n <View style={{flex: 1, flexDirection: 'row'}}>\n <WmIcon styles={this.styles.listIcon} iconclass={props.iconclass}></WmIcon>\n <View>\n <WmLabel styles={this.styles.title} caption={props.title}></WmLabel>\n <WmLabel styles={this.styles.subheading} caption={props.subheading}></WmLabel>\n </View>\n </View>\n </View>) : null;\n }\n\n private renderEmptyMessage(isHorizontal: boolean, item: any, index: any, props: WmListProps) {\n return (<WmLabel styles={this.styles.emptyMessage} caption={props.nodatamessage}></WmLabel>);\n }\n\n private renderLoadingIcon(props: WmListProps) {\n return (<WmIcon\n styles={this.styles.loadingIcon}\n iconclass={props.loadingicon}\n caption={props.loadingdatamsg}></WmIcon>)\n }\n\n private renderWithFlatList(props: WmListProps, isHorizontal = false) {\n return (\n <View style={this.styles.root}>\n {this.state.groupedData ? this.state.groupedData.map((v: any) => ((\n <View style={{marginBottom: 16}}>\n {this.renderHeader(props, v.key)}\n <FlatList\n keyExtractor={(item, i) => this.generateItemKey(item, i, props)}\n horizontal = {isHorizontal}\n data={v.data || []}\n ListEmptyComponent = {(itemInfo) => this.renderEmptyMessage(isHorizontal, itemInfo.item, itemInfo.index, props)}\n renderItem={(itemInfo) => this.renderItem(itemInfo.item, itemInfo.index, props)}>\n </FlatList>\n </View>\n ))) : null\n }\n </View>);\n }\n\n private renderWithSectionList(props: WmListProps, isHorizontal = false) {\n return (\n <SectionList\n keyExtractor={(item, i) => this.generateItemKey(item, i, props)}\n horizontal = {isHorizontal}\n onEndReached={({distanceFromEnd}) => {\n this.setState({ currentPage: this.state.currentPage + 1 } as WmListState);\n this.invokeEventCallback('onEndReached', [null, this]);\n }}\n contentContainerStyle={this.styles.root}\n onEndReachedThreshold={0.3}\n sections={this.state.groupedData[0]['data'].length ? this.state.groupedData : [] || []}\n renderSectionHeader={({ section: {key, data}}) => {\n return this.renderHeader(props, key);\n }}\n renderSectionFooter={() => props.loadingdata ? this.renderLoadingIcon(props) : null}\n ListEmptyComponent = {(itemInfo) => this.renderEmptyMessage(isHorizontal, itemInfo.item, itemInfo.index, props)}\n renderItem={(itemInfo) => this.renderItem(itemInfo.item, itemInfo.index, props)}>\n </SectionList>\n );\n }\n\n renderWidget(props: WmListProps) {\n this.invokeEventCallback('onBeforedatarender', [this, this.state.props.dataset]);\n const isHorizontal = (props.direction === 'horizontal');\n return (\n <View>\n {(isHorizontal) ?\n this.renderWithFlatList(props, isHorizontal)\n : this.renderWithSectionList(props, isHorizontal)}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,EAAEC,IAAI,EAAEC,IAAI,EAAEC,wBAAwB,QAAQ,cAAc;AAChF,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAAQC,cAAc,EAAEC,SAAS,QAAO,sCAAsC;AAC9E,OAAOC,OAAO,MAAM,kEAAkE;AACtF,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAG3D,OAAO,MAAMC,WAAW,SAASP,kBAAkB,CAAc;EAAA;IAAA;IAAA;IAAA,qCAErC,EAAE;IAAA,qCACN,CAAC;EAAA;AACzB;AAEA,eAAe,MAAMQ,MAAM,SAAST,aAAa,CAAyC;EAMxFU,WAAW,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,WAAW,EAAE,EAAE,IAAIE,WAAW,EAAE,CAAC;IAAC,qCAL9C,EAAE;IAAA,6CACM,CAAC,CAAC;IAAA,6BAClB,CAAC;EAIf;EAEQI,QAAQ,CAACC,KAAU,EAAEC,MAAuB,EAAE;IACpD,IAAI,CAAC,IAAI,CAACC,KAAK,CAACJ,KAAK,CAACK,WAAW,CAACH,KAAK,EAAEC,MAAM,CAAC,EAAE;MAChD,IAAI,CAACG,mBAAmB,GAAG,IAAI,CAACC,WAAW,CAACJ,MAAM,CAAW;MAC7D,IAAI,CAACK,WAAW,CAAC;QACfR,KAAK,EAAE;UAAES,YAAY,EAAEP;QAAM,CAAC;QA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utFeedback","FlatList","isArray","BaseComponent","BaseComponentState","getGroupedData","isDefined","WmLabel","WmIcon","WmListProps","DEFAULT_CLASS","WmListState","WmList","constructor","props","onSelect","$item","$index","state","disableitem","selectedItemWidgets","itemWidgets","updateState","selecteditem","selectedindex","invokeEventCallback","proxy","selectFirstItem","initialized","dataset","length","index","groupby","deselect","setGroupData","items","dataItems","groupedData","match","orderby","dateformat","key","onPropertyChange","name","$new","$old","data","direction","selectfirstitem","componentDidMount","setTimeout","componentDidUpdate","prevProps","prevState","snapshot","getDefaultStyles","isHorizontal","theme","getStyle","defaultClass","getIndex","item","indexOf","generateItemKey","itemkey","_showSkeleton","renderItem","styles","itemclass","_groupIndex","selectedItem","selectedIcon","renderHeader","title","groupHeading","iconclass","subheading","heading","flex","flexDirection","listIcon","renderEmptyMessage","emptyMessage","nodatamessage","renderLoadingIcon","loadingIcon","loadingicon","loadingdatamsg","renderWithFlatList","root","map","v","marginBottom","i","itemInfo","getSectionListData","renderWithSectionList","distanceFromEnd","setState","currentPage","section","loadingdata","renderWidget","_background"],"sources":["list.component.tsx"],"sourcesContent":["import React from 'react';\nimport { SectionList, Text, View, TouchableWithoutFeedback } from 'react-native';\nimport { FlatList } from 'react-native-gesture-handler';\nimport { isArray } from 'lodash-es';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {getGroupedData, isDefined} from \"@wavemaker/app-rn-runtime/core/utils\";\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmListProps from './list.props';\nimport { DEFAULT_CLASS, WmListStyles } from './list.styles';\n\n\nexport class WmListState extends BaseComponentState<WmListProps> {\n public selectedindex: any;\n groupedData: Array<any> = [];\n currentPage: number = 1;\n}\n\nexport default class WmList extends BaseComponent<WmListProps, WmListState, WmListStyles> {\n\n private itemWidgets = [] as any[];\n private selectedItemWidgets = {} as any;\n private key = 1;\n\n constructor(props: WmListProps) {\n super(props, DEFAULT_CLASS, new WmListProps(), new WmListState());\n }\n\n private onSelect($item: any, $index: number | string) {\n if (!this.state.props.disableitem($item, $index)) {\n this.selectedItemWidgets = this.itemWidgets[$index as number];\n this.updateState({\n props: { selecteditem: $item },\n selectedindex: $index\n } as WmListState, () => {\n this.invokeEventCallback('onSelect', [this.proxy, $item]);\n });\n }\n }\n\n private selectFirstItem() {\n const props = this.state.props;\n if (this.initialized\n && props.dataset\n && props.dataset.length) {\n const index = props.groupby ? '00': 0;\n this.onSelect(props.dataset[0], index);\n }\n }\n\n private deselect() {\n this.updateState({\n props: { selecteditem: null },\n selectedindex: -1\n } as WmListState);\n }\n\n setGroupData(items: any) {\n const dataItems = items;\n const props = this.state.props;\n if (props.groupby) {\n const groupedData = dataItems && getGroupedData(dataItems, props.groupby, props.match, props.orderby, props.dateformat, this);\n this.updateState({\n groupedData: groupedData\n } as WmListState, () => {\n this.key += (items && items.length) || 0;\n });\n }\n }\n\n public onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n switch(name) {\n case 'selectfirstitem':\n if ($new) {\n this.selectFirstItem();\n }\n break;\n case 'dataset':\n if (this.state.props.groupby) {\n this.setGroupData($new);\n } else {\n const data = isArray($new) ? $new : (isDefined($new) ? [$new] : []);\n this.updateState({\n groupedData: (data[0] || props.direction === 'horizontal' ? [{\n key: '',\n data: data\n }] : [])\n } as WmListState, () => {\n this.key += ($new && $new.length) || 0;\n });\n }\n this.itemWidgets = [];\n if (props.selectfirstitem) {\n this.selectFirstItem();\n } else {\n this.deselect();\n }\n break;\n case 'groupby':\n case 'match':\n this.setGroupData(this.state.props.dataset);\n break;\n }\n }\n\n componentDidMount() {\n const props = this.state.props;\n if (this.state.props.selectfirstitem && props.dataset?.length) {\n setTimeout(() => {\n this.onSelect(props.dataset[0], 0);\n });\n }\n super.componentDidMount();\n }\n\n componentDidUpdate(prevProps: WmListProps, prevState: WmListState, snapshot?: any) {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n this.invokeEventCallback('onRender', [this, this.state.props.dataset]);\n }\n\n getDefaultStyles() {\n const isHorizontal = this.state.props.direction === 'horizontal';\n return this.theme.getStyle(`${this.defaultClass} ${isHorizontal ? 'app-horizontal-list' : 'app-vertical-list'}`);\n }\n\n getIndex(item: any) {\n return this.state.props.dataset.indexOf(item);\n }\n\n private generateItemKey(item: any, index: number, props: WmListProps) {\n if (props.itemkey && item && !this._showSkeleton) {\n return props.itemkey(item, index);\n }\n return 'list_item_' + (this.key + index);\n }\n\n private renderItem(item: any, index: number, props: WmListProps) {\n return (\n <TouchableWithoutFeedback onPress={() => this.onSelect(item, index)}>\n <View style={[\n this.styles.item,\n props.itemclass ? this.theme.getStyle(props.itemclass(item, index)) : null,\n this.state.selectedindex === index && this.state.props.selecteditem?._groupIndex === item._groupIndex ? this.styles.selectedItem : {}]}>\n {props.renderItem(item, index, this)}\n { this.state.selectedindex === index && this.state.props.selecteditem?._groupIndex === item._groupIndex ? (\n <WmIcon iconclass='wi wi-check-circle' styles={this.styles.selectedIcon} />\n ) : null}\n </View>\n </TouchableWithoutFeedback>\n );\n }\n\n private renderHeader(props: WmListProps, title: string) {\n return props.groupby ? (\n <Text style={this.styles.groupHeading}>{title}</Text>\n ) : (props.iconclass || props.title || props.subheading) ? (\n <View style={this.styles.heading}>\n <View style={{flex: 1, flexDirection: 'row'}}>\n <WmIcon styles={this.styles.listIcon} iconclass={props.iconclass}></WmIcon>\n <View>\n <WmLabel styles={this.styles.title} caption={props.title}></WmLabel>\n <WmLabel styles={this.styles.subheading} caption={props.subheading}></WmLabel>\n </View>\n </View>\n </View>) : null;\n }\n\n private renderEmptyMessage(isHorizontal: boolean, item: any, index: any, props: WmListProps) {\n return (<WmLabel styles={this.styles.emptyMessage} caption={props.nodatamessage}></WmLabel>);\n }\n\n private renderLoadingIcon(props: WmListProps) {\n return (<WmIcon\n styles={this.styles.loadingIcon}\n iconclass={props.loadingicon}\n caption={props.loadingdatamsg}></WmIcon>)\n }\n\n private renderWithFlatList(props: WmListProps, isHorizontal = false) {\n return (\n <View style={this.styles.root}>\n {this.state.groupedData ? this.state.groupedData.map((v: any) => ((\n <View style={{marginBottom: 16}}>\n {this.renderHeader(props, v.key)}\n <FlatList\n keyExtractor={(item, i) => this.generateItemKey(item, i, props)}\n horizontal = {isHorizontal}\n data={v.data || []}\n ListEmptyComponent = {(itemInfo) => this.renderEmptyMessage(isHorizontal, itemInfo.item, itemInfo.index, props)}\n renderItem={(itemInfo) => this.renderItem(itemInfo.item, itemInfo.index, props)}>\n </FlatList>\n </View>\n ))) : null\n }\n </View>);\n }\n\n private getSectionListData() {\n if (this._showSkeleton) {\n return [{\n key: '',\n data: [{}, {}, {}]\n }];\n } else if (this.state.groupedData[0] && this.state.groupedData[0]['data'].length) {\n return this.state.groupedData;\n }\n return [];\n }\n\n private renderWithSectionList(props: WmListProps, isHorizontal = false) {\n return (\n <SectionList\n keyExtractor={(item, i) => this.generateItemKey(item, i, props)}\n horizontal = {isHorizontal}\n onEndReached={({distanceFromEnd}) => {\n this.setState({ currentPage: this.state.currentPage + 1 } as WmListState);\n this.invokeEventCallback('onEndReached', [null, this]);\n }}\n contentContainerStyle={this.styles.root}\n onEndReachedThreshold={0.3}\n sections={this.getSectionListData()}\n renderSectionHeader={({ section: {key, data}}) => {\n return this.renderHeader(props, key);\n }}\n renderSectionFooter={() => props.loadingdata ? this.renderLoadingIcon(props) : null}\n ListEmptyComponent = {(itemInfo) => this.renderEmptyMessage(isHorizontal, itemInfo.item, itemInfo.index, props)}\n renderItem={(itemInfo) => this.renderItem(itemInfo.item, itemInfo.index, props)}>\n </SectionList>\n );\n }\n\n renderWidget(props: WmListProps) {\n this.invokeEventCallback('onBeforedatarender', [this, this.state.props.dataset]);\n const isHorizontal = (props.direction === 'horizontal');\n return (\n <View>\n {this._background}\n {(isHorizontal) ?\n this.renderWithFlatList(props, isHorizontal)\n : this.renderWithSection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f/C,YAAY,GACZ,IAAI,CAACgC,kBAAkB,CAAC1E,KAAK,EAAE0C,YAAY,CAAC,GAC5C,IAAI,CAACwC,qBAAqB,CAAClF,KAAK,EAAE0C,YAAY,CAAC,CAC5C;EACX;AACF"}
|
|
@@ -23,8 +23,9 @@ export default class WmBarcodescanner extends BaseComponent {
|
|
|
23
23
|
props: {
|
|
24
24
|
datavalue: res.text
|
|
25
25
|
}
|
|
26
|
+
}, () => {
|
|
27
|
+
this.invokeEventCallback('onSuccess', [null, this.proxy]);
|
|
26
28
|
});
|
|
27
|
-
this.invokeEventCallback('onSuccess', [null, this.proxy]);
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
renderWidget(props) {
|
|
@@ -32,7 +33,7 @@ export default class WmBarcodescanner extends BaseComponent {
|
|
|
32
33
|
this.scanner = scanService;
|
|
33
34
|
return /*#__PURE__*/React.createElement(View, {
|
|
34
35
|
style: this.styles.root
|
|
35
|
-
}, /*#__PURE__*/React.createElement(WmButton, {
|
|
36
|
+
}, this._background, /*#__PURE__*/React.createElement(WmButton, {
|
|
36
37
|
iconclass: props.iconclass,
|
|
37
38
|
styles: this.styles.button,
|
|
38
39
|
onTap: this.onScanTap.bind(this),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","ScanConsumer","WmBarcodescannerProps","DEFAULT_CLASS","WmButton","WmBarcodescannerState","WmBarcodescanner","constructor","props","onScanTap","params","barcodeFormat","state","barcodeformat","scanner","scanBarcode","then","res","updateState","datavalue","text","invokeEventCallback","proxy","renderWidget","scanService","styles","root","iconclass","button","bind","caption","iconsize"],"sources":["barcodescanner.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ScanInput, ScanOutput } from '@wavemaker/app-rn-runtime/variables/device/scan/scan.operation';\nimport { ScanConsumer, ScanService } from '@wavemaker/app-rn-runtime/core/device/scan-service';\n\nimport WmBarcodescannerProps from './barcodescanner.props';\nimport { DEFAULT_CLASS, WmBarcodescannerStyles } from './barcodescanner.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nexport class WmBarcodescannerState extends BaseComponentState<WmBarcodescannerProps> {}\n\nexport default class WmBarcodescanner extends BaseComponent<WmBarcodescannerProps, WmBarcodescannerState, WmBarcodescannerStyles> {\n private scanner: ScanService = null as any;\n constructor(props: WmBarcodescannerProps) {\n super(props, DEFAULT_CLASS, new WmBarcodescannerProps());\n }\n\n onScanTap() {\n const params: ScanInput = {\n barcodeFormat: this.state.props.barcodeformat\n };\n this.scanner.scanBarcode(params).then((res: ScanOutput) => {\n this.updateState({\n props: {\n datavalue: res.text\n }\n } as WmBarcodescannerState)
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","ScanConsumer","WmBarcodescannerProps","DEFAULT_CLASS","WmButton","WmBarcodescannerState","WmBarcodescanner","constructor","props","onScanTap","params","barcodeFormat","state","barcodeformat","scanner","scanBarcode","then","res","updateState","datavalue","text","invokeEventCallback","proxy","renderWidget","scanService","styles","root","_background","iconclass","button","bind","caption","iconsize"],"sources":["barcodescanner.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ScanInput, ScanOutput } from '@wavemaker/app-rn-runtime/variables/device/scan/scan.operation';\nimport { ScanConsumer, ScanService } from '@wavemaker/app-rn-runtime/core/device/scan-service';\n\nimport WmBarcodescannerProps from './barcodescanner.props';\nimport { DEFAULT_CLASS, WmBarcodescannerStyles } from './barcodescanner.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nexport class WmBarcodescannerState extends BaseComponentState<WmBarcodescannerProps> {}\n\nexport default class WmBarcodescanner extends BaseComponent<WmBarcodescannerProps, WmBarcodescannerState, WmBarcodescannerStyles> {\n private scanner: ScanService = null as any;\n constructor(props: WmBarcodescannerProps) {\n super(props, DEFAULT_CLASS, new WmBarcodescannerProps());\n }\n\n onScanTap() {\n const params: ScanInput = {\n barcodeFormat: this.state.props.barcodeformat\n };\n this.scanner.scanBarcode(params).then((res: ScanOutput) => {\n this.updateState({\n props: {\n datavalue: res.text\n }\n } as WmBarcodescannerState, () => {\n this.invokeEventCallback('onSuccess', [null, this.proxy]);\n });\n })\n }\n\n renderWidget(props: WmBarcodescannerProps) {\n return (\n <ScanConsumer>\n {(scanService: ScanService) => {\n this.scanner = scanService;\n return <View style={this.styles.root}>\n {this._background}\n <WmButton iconclass={props.iconclass} styles={this.styles.button} onTap={this.onScanTap.bind(this)} caption={props.caption} iconsize={props.iconsize}></WmButton>\n </View>\n }}\n </ScanConsumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,YAAY,QAAqB,oDAAoD;AAE9F,OAAOC,qBAAqB,MAAM,wBAAwB;AAC1D,SAASC,aAAa,QAAgC,yBAAyB;AAC/E,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAO,MAAMC,qBAAqB,SAASL,kBAAkB,CAAwB;AAErF,eAAe,MAAMM,gBAAgB,SAASP,aAAa,CAAuE;EAEhIQ,WAAW,CAACC,KAA4B,EAAE;IACxC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,qBAAqB,EAAE,CAAC;IAAC,iCAF5B,IAAI;EAGnC;EAEAO,SAAS,GAAG;IACV,MAAMC,MAAiB,GAAG;MACxBC,aAAa,EAAE,IAAI,CAACC,KAAK,CAACJ,KAAK,CAACK;IAClC,CAAC;IACD,IAAI,CAACC,OAAO,CAACC,WAAW,CAACL,MAAM,CAAC,CAACM,IAAI,CAAEC,GAAe,IAAK;MACzD,IAAI,CAACC,WAAW,CAAC;QACfV,KAAK,EAAE;UACLW,SAAS,EAAEF,GAAG,CAACG;QACjB;MACF,CAAC,EAA2B,MAAM;QAChC,IAAI,CAACC,mBAAmB,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,CAAC,CAAC;MAC3D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEAC,YAAY,CAACf,KAA4B,EAAE;IACzC,oBACE,oBAAC,YAAY,QACTgB,WAAwB,IAAK;MAC7B,IAAI,CAACV,OAAO,GAAGU,WAAW;MAC1B,oBAAO,oBAAC,IAAI;QAAC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;MAAK,GAClC,IAAI,CAACC,WAAW,eACjB,oBAAC,QAAQ;QAAC,SAAS,EAAEnB,KAAK,CAACoB,SAAU;QAAC,MAAM,EAAE,IAAI,CAACH,MAAM,CAACI,MAAO;QAAC,KAAK,EAAE,IAAI,CAACpB,SAAS,CAACqB,IAAI,CAAC,IAAI,CAAE;QAAC,OAAO,EAAEtB,KAAK,CAACuB,OAAQ;QAAC,QAAQ,EAAEvB,KAAK,CAACwB;MAAS,EAAY,CAC5J;IACT,CAAC,CACY;EAEnB;AACF"}
|
|
@@ -13,6 +13,7 @@ export default class WmCamera extends BaseComponent {
|
|
|
13
13
|
constructor(props) {
|
|
14
14
|
super(props, DEFAULT_CLASS, new WmCameraProps());
|
|
15
15
|
_defineProperty(this, "camera", null);
|
|
16
|
+
_defineProperty(this, "localFile", '');
|
|
16
17
|
}
|
|
17
18
|
onCameraTap() {
|
|
18
19
|
const props = this.state.props;
|
|
@@ -25,25 +26,29 @@ export default class WmCamera extends BaseComponent {
|
|
|
25
26
|
imageTargetHeight: props.imagetargetheight
|
|
26
27
|
};
|
|
27
28
|
this.camera.captureImage(params).then(res => {
|
|
28
|
-
this.updateModel(null, res.imagePath);
|
|
29
|
+
this.updateModel(null, res.imagePath, res.content);
|
|
29
30
|
});
|
|
30
31
|
} else {
|
|
31
32
|
this.camera.captureVideo().then(res => {
|
|
32
|
-
this.updateModel(null, res.videoPath);
|
|
33
|
+
this.updateModel(null, res.videoPath, res.content);
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
updateModel($event, value) {
|
|
37
|
+
updateModel($event, value, content) {
|
|
37
38
|
value = (value.startsWith('file://') ? '' : 'file://') + value;
|
|
39
|
+
this.localFile = content;
|
|
38
40
|
this.updateState({
|
|
39
41
|
props: {
|
|
40
42
|
datavalue: value,
|
|
41
43
|
localFilePath: value
|
|
42
44
|
}
|
|
43
|
-
}, this.invokeEventCallback.bind(this, 'onSuccess', [null, this.proxy, value]));
|
|
45
|
+
}, this.invokeEventCallback.bind(this, 'onSuccess', [null, this.proxy, value, this.localFile]));
|
|
44
46
|
}
|
|
45
47
|
renderWidget(props) {
|
|
46
48
|
return /*#__PURE__*/React.createElement(CameraConsumer, null, cameraService => {
|
|
49
|
+
{
|
|
50
|
+
this._background;
|
|
51
|
+
}
|
|
47
52
|
this.camera = cameraService;
|
|
48
53
|
return /*#__PURE__*/React.createElement(View, {
|
|
49
54
|
style: this.styles.root
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCameraProps","DEFAULT_CLASS","WmButton","CameraConsumer","WmCameraState","WmCamera","constructor","props","onCameraTap","state","capturetype","params","allowImageEdit","allowedit","imageQuality","imagequality","imageEncodingType","imageencodingtype","imageTargetWidth","imagetargetwidth","imageTargetHeight","imagetargetheight","camera","captureImage","then","res","updateModel","imagePath","captureVideo","videoPath","$event","value","startsWith","updateState","datavalue","localFilePath","invokeEventCallback","bind","proxy","renderWidget","cameraService","styles","root","iconclass","button","iconsize"],"sources":["camera.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 WmCameraProps from './camera.props';\nimport { DEFAULT_CLASS, WmCameraStyles } from './camera.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { CaptureImageOutput } from '@wavemaker/app-rn-runtime/variables/device/camera/capture-image.operation';\nimport { CameraConsumer, CameraInput, CameraService } from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { CaptureVideoOutput } from '@wavemaker/app-rn-runtime/variables/device/camera/capture-video.operation';\n\n\nexport class WmCameraState extends BaseComponentState<WmCameraProps> {}\n\nexport default class WmCamera extends BaseComponent<WmCameraProps, WmCameraState, WmCameraStyles> {\n private camera: CameraService = null as any;\n constructor(props: WmCameraProps) {\n super(props, DEFAULT_CLASS, new WmCameraProps());\n }\n\n onCameraTap() {\n const props = this.state.props;\n if (props.capturetype === 'IMAGE') {\n const params: CameraInput = {\n allowImageEdit: props.allowedit,\n imageQuality: props.imagequality,\n imageEncodingType: props.imageencodingtype,\n imageTargetWidth: props.imagetargetwidth,\n imageTargetHeight: props.imagetargetheight\n };\n\n this.camera.captureImage(params).then((res: CaptureImageOutput) => {\n this.updateModel(null, res.imagePath);\n });\n } else {\n this.camera.captureVideo().then((res: CaptureVideoOutput) => {\n this.updateModel(null, res.videoPath);\n });\n }\n\n }\n\n private updateModel($event: any, value: any) {\n value = (value.startsWith('file://') ? '' : 'file://') + value;\n this.updateState({\n props: {\n datavalue: value,\n localFilePath: value\n }\n } as WmCameraState, this.invokeEventCallback.bind(this, 'onSuccess', [null, this.proxy, value]));\n }\n\n renderWidget(props: WmCameraProps) {\n return (\n <CameraConsumer>\n {(cameraService: CameraService) => {\n this.camera = cameraService;\n return <View style={this.styles.root}>\n <WmButton iconclass={props.iconclass} styles={this.styles.button} iconsize={props.iconsize} onTap={this.onCameraTap.bind(this)}></WmButton>\n </View>\n }}\n </CameraConsumer>\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,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,SAASC,cAAc,QAAoC,sDAAsD;AAIjH,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;AAErE,eAAe,MAAMM,QAAQ,SAASP,aAAa,CAA+C;
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmCameraProps","DEFAULT_CLASS","WmButton","CameraConsumer","WmCameraState","WmCamera","constructor","props","onCameraTap","state","capturetype","params","allowImageEdit","allowedit","imageQuality","imagequality","imageEncodingType","imageencodingtype","imageTargetWidth","imagetargetwidth","imageTargetHeight","imagetargetheight","camera","captureImage","then","res","updateModel","imagePath","content","captureVideo","videoPath","$event","value","startsWith","localFile","updateState","datavalue","localFilePath","invokeEventCallback","bind","proxy","renderWidget","cameraService","_background","styles","root","iconclass","button","iconsize"],"sources":["camera.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 WmCameraProps from './camera.props';\nimport { DEFAULT_CLASS, WmCameraStyles } from './camera.styles';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { CaptureImageOutput } from '@wavemaker/app-rn-runtime/variables/device/camera/capture-image.operation';\nimport { CameraConsumer, CameraInput, CameraService } from \"@wavemaker/app-rn-runtime/core/device/camera-service\";\nimport { CaptureVideoOutput } from '@wavemaker/app-rn-runtime/variables/device/camera/capture-video.operation';\n\n\nexport class WmCameraState extends BaseComponentState<WmCameraProps> {}\n\nexport default class WmCamera extends BaseComponent<WmCameraProps, WmCameraState, WmCameraStyles> {\n private camera: CameraService = null as any;\n public localFile: string = '';\n constructor(props: WmCameraProps) {\n super(props, DEFAULT_CLASS, new WmCameraProps());\n }\n\n onCameraTap() {\n const props = this.state.props;\n if (props.capturetype === 'IMAGE') {\n const params: CameraInput = {\n allowImageEdit: props.allowedit,\n imageQuality: props.imagequality,\n imageEncodingType: props.imageencodingtype,\n imageTargetWidth: props.imagetargetwidth,\n imageTargetHeight: props.imagetargetheight\n };\n\n this.camera.captureImage(params).then((res: CaptureImageOutput) => {\n this.updateModel(null, res.imagePath, res.content);\n });\n } else {\n this.camera.captureVideo().then((res: CaptureVideoOutput) => {\n this.updateModel(null, res.videoPath, res.content);\n });\n }\n\n }\n\n private updateModel($event: any, value: any, content: string) {\n value = (value.startsWith('file://') ? '' : 'file://') + value;\n this.localFile = content;\n this.updateState({\n props: {\n datavalue: value,\n localFilePath: value\n }\n } as WmCameraState, this.invokeEventCallback.bind(this, 'onSuccess', [null, this.proxy, value, this.localFile]));\n }\n\n renderWidget(props: WmCameraProps) {\n return (\n <CameraConsumer>\n {(cameraService: CameraService) => {\n {this._background}\n this.camera = cameraService;\n return <View style={this.styles.root}>\n <WmButton iconclass={props.iconclass} styles={this.styles.button} iconsize={props.iconsize} onTap={this.onCameraTap.bind(this)}></WmButton>\n </View>\n }}\n </CameraConsumer>\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,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,SAASC,cAAc,QAAoC,sDAAsD;AAIjH,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;AAErE,eAAe,MAAMM,QAAQ,SAASP,aAAa,CAA+C;EAGhGQ,WAAW,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,aAAa,EAAE,CAAC;IAAC,gCAHnB,IAAI;IAAA,mCACT,EAAE;EAG7B;EAEAQ,WAAW,GAAG;IACZ,MAAMD,KAAK,GAAG,IAAI,CAACE,KAAK,CAACF,KAAK;IAC9B,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ACTmC,aAA4B,IAAK;MACnC;QAAC,IAAI,CAACC,WAAW;MAAA;MACjB,IAAI,CAACrB,MAAM,GAAGoB,aAAa;MAC3B,oBAAO,oBAAC,IAAI;QAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;MAAK,gBACnC,oBAAC,QAAQ;QAAC,SAAS,EAAEtC,KAAK,CAACuC,SAAU;QAAC,MAAM,EAAE,IAAI,CAACF,MAAM,CAACG,MAAO;QAAC,QAAQ,EAAExC,KAAK,CAACyC,QAAS;QAAC,KAAK,EAAE,IAAI,CAACxC,WAAW,CAAC+B,IAAI,CAAC,IAAI;MAAE,EAAY,CACtI;IACT,CAAC,CACc;EAEzB;AACF"}
|
|
@@ -14,7 +14,6 @@ export default class WmCameraProps extends BaseProps {
|
|
|
14
14
|
_defineProperty(this, "imagetargetwidth", null);
|
|
15
15
|
_defineProperty(this, "imagetargetheight", null);
|
|
16
16
|
_defineProperty(this, "datavalue", void 0);
|
|
17
|
-
_defineProperty(this, "localFile", '');
|
|
18
17
|
_defineProperty(this, "localFilePath", '');
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmCameraProps"],"sources":["camera.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmCameraProps extends BaseProps {\n allowedit: boolean = false;\n capturetype: string = 'IMAGE';\n iconclass: string = 'wm-sl-l sl-camera';\n iconsize: number = 16;\n imagequality: number = 80;\n imageencodingtype: string = 'JPEG';\n imagetargetwidth: number = null as any;\n imagetargetheight: number = null as any;\n datavalue: any;\n
|
|
1
|
+
{"version":3,"names":["BaseProps","WmCameraProps"],"sources":["camera.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmCameraProps extends BaseProps {\n allowedit: boolean = false;\n capturetype: string = 'IMAGE';\n iconclass: string = 'wm-sl-l sl-camera';\n iconsize: number = 16;\n imagequality: number = 80;\n imageencodingtype: string = 'JPEG';\n imagetargetwidth: number = null as any;\n imagetargetheight: number = null as any;\n datavalue: any;\n localFilePath: string = '';\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,aAAa,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,mCAC9B,KAAK;IAAA,qCACJ,OAAO;IAAA,mCACT,mBAAmB;IAAA,kCACpB,EAAE;IAAA,sCACE,EAAE;IAAA,2CACG,MAAM;IAAA,0CACP,IAAI;IAAA,2CACH,IAAI;IAAA;IAAA,uCAER,EAAE;EAAA;AAC5B"}
|
|
@@ -68,7 +68,7 @@ export default class WmDialog extends BaseComponent {
|
|
|
68
68
|
value: this.theme
|
|
69
69
|
}, /*#__PURE__*/React.createElement(View, {
|
|
70
70
|
style: this.styles.root
|
|
71
|
-
}, props.showheader ? /*#__PURE__*/React.createElement(View, {
|
|
71
|
+
}, this._background, props.showheader ? /*#__PURE__*/React.createElement(View, {
|
|
72
72
|
style: this.styles.header
|
|
73
73
|
}, /*#__PURE__*/React.createElement(View, {
|
|
74
74
|
style: this.styles.headerLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","ModalConsumer","HideMode","ThemeProvider","BaseComponent","BaseComponentState","WmIcon","WmButton","WmDialogProps","DEFAULT_CLASS","WmDialogState","WmDialog","constructor","props","hideMode","DONOT_ADD_TO_DOM","state","modalOptions","onClose","Promise","res","updateState","show","invokeEventCallback","onOpen","open","close","_close","prepareModalOptions","content","modalService","o","name","modalStyle","styles","modal","contentStyle","isModal","centered","animation","hideModal","renderWidget","showModal","theme","root","showheader","header","headerLabel","title","iconclass","icon","closable","closeBtn","children"],"sources":["dialog.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\n\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nimport WmDialogProps from './dialog.props';\nimport { DEFAULT_CLASS, WmDialogStyles } from './dialog.styles';\n\nexport class WmDialogState extends BaseComponentState<WmDialogProps> {\n modalOptions = {} as ModalOptions;\n}\n\nexport default class WmDialog extends BaseComponent<WmDialogProps, WmDialogState, WmDialogStyles> {\n\n private _close: Function = () => {};\n\n constructor(props: WmDialogProps) {\n super(props, DEFAULT_CLASS, new WmDialogProps(), new WmDialogState());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n this.state.modalOptions.onClose = () => {\n return new Promise<void>((res) => {\n this.updateState({\n props: {show: false}\n } as WmDialogState, () => {\n this.invokeEventCallback('onClose', [null, this]);\n res();\n });\n });\n };\n this.state.modalOptions.onOpen = () => {\n this.invokeEventCallback('onOpened', [null, this]);\n };\n }\n\n open() {\n if (!this.state.props.show) {\n this.updateState({\n props:{show: true}\n } as WmDialogState);\n }\n }\n\n close() {\n this._close();\n }\n\n prepareModalOptions(content: React.ReactNode, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.name = this.state.props.name;\n o.modalStyle = this.styles.modal;\n o.content = content;\n o.contentStyle = this.styles.content;\n o.isModal = !!this.state.props.modal;\n o.centered = true;\n o.animation = this.state.props.animation;\n this._close = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmDialogProps) {\n return (<ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ThemeProvider value={this.theme}>\n <View style={this.styles.root}>\n {props.showheader ? (<View style={this.styles.header}>\n <View style={this.styles.headerLabel}>\n <WmIcon caption={props.title} iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>\n </View>\n {props.closable && <WmButton show={props.closable} iconclass=\"wm-sl-l sl-close\" onTap={() => this.close()} styles={this.styles.closeBtn}></WmButton>}\n </View>) : null}\n {props.children}\n </View>\n </ThemeProvider>\n ), modalService));\n return null;\n }}\n </ModalConsumer>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AAEzC,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;EAAA;IAAA;IAAA,sCACpD,CAAC,CAAC;EAAA;AACnB;AAEA,eAAe,MAAMM,QAAQ,SAASP,aAAa,CAA+C;EAIhGQ,WAAW,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,aAAa,EAAE,EAAE,IAAIE,aAAa,EAAE,CAAC;IAAC,gCAH7C,MAAM,CAAC,CAAC;IAIjC,IAAI,CAACI,QAAQ,GAAGZ,QAAQ,CAACa,gBAAgB;IACzC,IAAI,CAACC,KAAK,CAACC,YAAY,CAACC,OAAO,GAAG,MAAM;MACtC,OAAO,IAAIC,OAAO,CAAQC,GAAG,IAAK;QAChC,IAAI,CAACC,WAAW,CAAC;UACfR,KAAK,EAAE;YAACS,IAAI,EAAE;UAAK;QACrB,CAAC,EAAmB,MAAM;UACxB,IAAI,CAACC,mBAAmB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;UACjDH,GAAG,EAAE;QACP,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ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AAa;QAAC,KAAK,EAAE,IAAI,CAACe;MAAM,gBAC/B,oBAAC,IAAI;QAAC,KAAK,EAAE,IAAI,CAACT,MAAM,CAACU;MAAK,
|
|
1
|
+
{"version":3,"names":["React","View","ModalConsumer","HideMode","ThemeProvider","BaseComponent","BaseComponentState","WmIcon","WmButton","WmDialogProps","DEFAULT_CLASS","WmDialogState","WmDialog","constructor","props","hideMode","DONOT_ADD_TO_DOM","state","modalOptions","onClose","Promise","res","updateState","show","invokeEventCallback","onOpen","open","close","_close","prepareModalOptions","content","modalService","o","name","modalStyle","styles","modal","contentStyle","isModal","centered","animation","hideModal","renderWidget","showModal","theme","root","_background","showheader","header","headerLabel","title","iconclass","icon","closable","closeBtn","children"],"sources":["dialog.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\n\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\n\nimport WmDialogProps from './dialog.props';\nimport { DEFAULT_CLASS, WmDialogStyles } from './dialog.styles';\n\nexport class WmDialogState extends BaseComponentState<WmDialogProps> {\n modalOptions = {} as ModalOptions;\n}\n\nexport default class WmDialog extends BaseComponent<WmDialogProps, WmDialogState, WmDialogStyles> {\n\n private _close: Function = () => {};\n\n constructor(props: WmDialogProps) {\n super(props, DEFAULT_CLASS, new WmDialogProps(), new WmDialogState());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n this.state.modalOptions.onClose = () => {\n return new Promise<void>((res) => {\n this.updateState({\n props: {show: false}\n } as WmDialogState, () => {\n this.invokeEventCallback('onClose', [null, this]);\n res();\n });\n });\n };\n this.state.modalOptions.onOpen = () => {\n this.invokeEventCallback('onOpened', [null, this]);\n };\n }\n\n open() {\n if (!this.state.props.show) {\n this.updateState({\n props:{show: true}\n } as WmDialogState);\n }\n }\n\n close() {\n this._close();\n }\n\n prepareModalOptions(content: React.ReactNode, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.name = this.state.props.name;\n o.modalStyle = this.styles.modal;\n o.content = content;\n o.contentStyle = this.styles.content;\n o.isModal = !!this.state.props.modal;\n o.centered = true;\n o.animation = this.state.props.animation;\n this._close = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmDialogProps) {\n return (<ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ThemeProvider value={this.theme}>\n <View style={this.styles.root}>\n {this._background}\n {props.showheader ? (<View style={this.styles.header}>\n <View style={this.styles.headerLabel}>\n <WmIcon caption={props.title} iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>\n </View>\n {props.closable && <WmButton show={props.closable} iconclass=\"wm-sl-l sl-close\" onTap={() => this.close()} styles={this.styles.closeBtn}></WmButton>}\n </View>) : null}\n {props.children}\n </View>\n </ThemeProvider>\n ), modalService));\n return null;\n }}\n </ModalConsumer>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AAEzC,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;EAAA;IAAA;IAAA,sCACpD,CAAC,CAAC;EAA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AAK,EAAG;QAAC,MAAM,EAAE,IAAI,CAACQ,MAAM,CAACmB;MAAS,EAAY,CAC/I,GAAI,IAAI,EACdxC,KAAK,CAACyC,QAAQ,CACV,CACO,EACfxB,YAAY,CAAC,CAAC;MACjB,OAAO,IAAI;IACb,CAAC,CACa;EAClB;AACF"}
|
|
@@ -15,7 +15,7 @@ export default class WmDialogactions extends BaseComponent {
|
|
|
15
15
|
renderWidget(props) {
|
|
16
16
|
return /*#__PURE__*/React.createElement(View, {
|
|
17
17
|
style: this.styles.root
|
|
18
|
-
}, props.children);
|
|
18
|
+
}, this._background, props.children);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=dialogactions.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmDialogactionsProps","DEFAULT_CLASS","WmDialogactionsState","WmDialogactions","constructor","props","renderWidget","styles","root","children"],"sources":["dialogactions.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 WmDialogactionsProps from './dialogactions.props';\nimport { DEFAULT_CLASS, WmDialogactionsStyles } from './dialogactions.styles';\n\nexport class WmDialogactionsState extends BaseComponentState<WmDialogactionsProps> {}\n\nexport default class WmDialogactions extends BaseComponent<WmDialogactionsProps, WmDialogactionsState, WmDialogactionsStyles> {\n __TYPE='WmDialogactions';\n\n constructor(props: WmDialogactionsProps) {\n super(props, DEFAULT_CLASS, new WmDialogactionsProps());\n }\n\n renderWidget(props: WmDialogactionsProps) {\n return (<View style={this.styles.root}>{props.children}</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,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAE7E,OAAO,MAAMC,oBAAoB,SAASH,kBAAkB,CAAuB;AAEnF,eAAe,MAAMI,eAAe,SAASL,aAAa,CAAoE;EAG5HM,WAAW,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,oBAAoB,EAAE,CAAC;IAAC,gCAHnD,iBAAiB;EAIxB;EAEAM,YAAY,CAACD,KAA2B,EAAE;IACxC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmDialogactionsProps","DEFAULT_CLASS","WmDialogactionsState","WmDialogactions","constructor","props","renderWidget","styles","root","_background","children"],"sources":["dialogactions.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 WmDialogactionsProps from './dialogactions.props';\nimport { DEFAULT_CLASS, WmDialogactionsStyles } from './dialogactions.styles';\n\nexport class WmDialogactionsState extends BaseComponentState<WmDialogactionsProps> {}\n\nexport default class WmDialogactions extends BaseComponent<WmDialogactionsProps, WmDialogactionsState, WmDialogactionsStyles> {\n __TYPE='WmDialogactions';\n\n constructor(props: WmDialogactionsProps) {\n super(props, DEFAULT_CLASS, new WmDialogactionsProps());\n }\n\n renderWidget(props: WmDialogactionsProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</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,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAE7E,OAAO,MAAMC,oBAAoB,SAASH,kBAAkB,CAAuB;AAEnF,eAAe,MAAMI,eAAe,SAASL,aAAa,CAAoE;EAG5HM,WAAW,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,oBAAoB,EAAE,CAAC;IAAC,gCAHnD,iBAAiB;EAIxB;EAEAM,YAAY,CAACD,KAA2B,EAAE;IACxC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEJ,KAAK,CAACK,QAAQ,CAAQ;EAClF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ScrollView","BaseComponent","BaseComponentState","WmDialogcontentProps","DEFAULT_CLASS","WmDialogcontentState","WmDialogcontent","constructor","props","renderWidget","styles","root","maxHeight","children"],"sources":["dialogcontent.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmDialogcontentProps from './dialogcontent.props';\nimport { DEFAULT_CLASS, WmDialogcontentStyles } from './dialogcontent.styles';\n\nexport class WmDialogcontentState extends BaseComponentState<WmDialogcontentProps> {}\n\nexport default class WmDialogcontent extends BaseComponent<WmDialogcontentProps, WmDialogcontentState, WmDialogcontentStyles> {\n\n constructor(props: WmDialogcontentProps) {\n super(props, DEFAULT_CLASS, new WmDialogcontentProps());\n }\n\n renderWidget(props: WmDialogcontentProps) {\n return (<ScrollView contentContainerStyle={this.styles.root} style={{maxHeight: '90%'}}>{props.children}</ScrollView>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAE7E,OAAO,MAAMC,oBAAoB,SAASH,kBAAkB,CAAuB;AAEnF,eAAe,MAAMI,eAAe,SAASL,aAAa,CAAoE;EAE5HM,WAAW,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,oBAAoB,EAAE,CAAC;EACzD;EAEAM,YAAY,CAACD,KAA2B,EAAE;IACxC,oBAAQ,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACE,MAAM,CAACC,IAAK;MAAC,KAAK,EAAE;QAACC,SAAS,EAAE;MAAK;IAAE,
|
|
1
|
+
{"version":3,"names":["React","ScrollView","BaseComponent","BaseComponentState","WmDialogcontentProps","DEFAULT_CLASS","WmDialogcontentState","WmDialogcontent","constructor","props","renderWidget","styles","root","maxHeight","_background","children"],"sources":["dialogcontent.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmDialogcontentProps from './dialogcontent.props';\nimport { DEFAULT_CLASS, WmDialogcontentStyles } from './dialogcontent.styles';\n\nexport class WmDialogcontentState extends BaseComponentState<WmDialogcontentProps> {}\n\nexport default class WmDialogcontent extends BaseComponent<WmDialogcontentProps, WmDialogcontentState, WmDialogcontentStyles> {\n\n constructor(props: WmDialogcontentProps) {\n super(props, DEFAULT_CLASS, new WmDialogcontentProps());\n }\n\n renderWidget(props: WmDialogcontentProps) {\n return (<ScrollView contentContainerStyle={this.styles.root} style={{maxHeight: '90%'}}>{this._background}{props.children}</ScrollView>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,oBAAoB,MAAM,uBAAuB;AACxD,SAASC,aAAa,QAA+B,wBAAwB;AAE7E,OAAO,MAAMC,oBAAoB,SAASH,kBAAkB,CAAuB;AAEnF,eAAe,MAAMI,eAAe,SAASL,aAAa,CAAoE;EAE5HM,WAAW,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,oBAAoB,EAAE,CAAC;EACzD;EAEAM,YAAY,CAACD,KAA2B,EAAE;IACxC,oBAAQ,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACE,MAAM,CAACC,IAAK;MAAC,KAAK,EAAE;QAACC,SAAS,EAAE;MAAK;IAAE,GAAE,IAAI,CAACC,WAAW,EAAEL,KAAK,CAACM,QAAQ,CAAc;EACzI;AACF"}
|
|
@@ -6,6 +6,7 @@ import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/cor
|
|
|
6
6
|
import { isString } from 'lodash';
|
|
7
7
|
import { Platform } from 'react-native';
|
|
8
8
|
import { validateField } from '@wavemaker/app-rn-runtime/core/utils';
|
|
9
|
+
import Injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
9
10
|
export class BaseInputState extends BaseComponentState {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
@@ -31,6 +32,10 @@ export class BaseInputComponent extends BaseComponent {
|
|
|
31
32
|
var _this$widgetRef;
|
|
32
33
|
this === null || this === void 0 ? void 0 : (_this$widgetRef = this.widgetRef) === null || _this$widgetRef === void 0 ? void 0 : _this$widgetRef.focus();
|
|
33
34
|
}
|
|
35
|
+
blur() {
|
|
36
|
+
var _this$widgetRef2, _this$widgetRef3;
|
|
37
|
+
(this === null || this === void 0 ? void 0 : (_this$widgetRef2 = this.widgetRef) === null || _this$widgetRef2 === void 0 ? void 0 : _this$widgetRef2.blur) && (this === null || this === void 0 ? void 0 : (_this$widgetRef3 = this.widgetRef) === null || _this$widgetRef3 === void 0 ? void 0 : _this$widgetRef3.blur());
|
|
38
|
+
}
|
|
34
39
|
onPropertyChange(name, $new, $old) {
|
|
35
40
|
switch (name) {
|
|
36
41
|
case 'type':
|
|
@@ -106,6 +111,7 @@ export class BaseInputComponent extends BaseComponent {
|
|
|
106
111
|
});
|
|
107
112
|
}
|
|
108
113
|
onBlur(event) {
|
|
114
|
+
Injector.FOCUSED_ELEMENT.remove();
|
|
109
115
|
this.isTouched = true;
|
|
110
116
|
let newVal = event.target.value || this.state.textValue;
|
|
111
117
|
let oldVal = this.state.props.datavalue || '';
|
|
@@ -131,6 +137,7 @@ export class BaseInputComponent extends BaseComponent {
|
|
|
131
137
|
});
|
|
132
138
|
}
|
|
133
139
|
onFocus(event) {
|
|
140
|
+
Injector.FOCUSED_ELEMENT.set(this);
|
|
134
141
|
this.invokeEventCallback('onFocus', [event, this.proxy]);
|
|
135
142
|
}
|
|
136
143
|
onKeyPress(event) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_CLASS","BaseComponent","BaseComponentState","isString","Platform","validateField","BaseInputState","BaseInputComponent","constructor","props","defaultClass","defaultProps","defaultState","focus","widgetRef","onPropertyChange","name","$new","$old","keyboardType","type","updateState","textValue","isDefault","state","onFieldChange","bind","onChange","event","updateon","updateDatavalue","target","value","onChangeText","validate","invokeChange","e","OS","cursor","selectionStart","setState","source","oldValue","datavalue","autotrim","trim","invokeEventCallback","proxy","onBlur","isTouched","newVal","oldVal","setTimeout","triggerValidation","validationObj","isValid","errorType","onFocus","onKeyPress"],"sources":["baseinput.component.ts"],"sourcesContent":["import { DEFAULT_CLASS } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles\";\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BaseInputProps from './baseinput.props';\nimport { isString } from 'lodash';\nimport { BaseInputStyles } from './baseinput.styles';\nimport { Platform, TextInput } from 'react-native';\nimport { validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseInputState <T extends BaseInputProps> extends BaseComponentState<T> {\n keyboardType: any = 'default';\n isValid: boolean = true;\n textValue: string = '';\n isDefault = false;\n errorType: string = '';\n}\nexport abstract class BaseInputComponent< T extends BaseInputProps, S extends BaseInputState<T>, L extends BaseInputStyles> extends BaseComponent<T, S, L> {\n public widgetRef: TextInput | null = null;\n isTouched: boolean = false;\n private cursor: any = 0;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'type':\n let keyboardType;\n if (this.props.type === 'number') {\n keyboardType = 'numeric';\n } else if (this.props.type === 'tel') {\n keyboardType = 'phone-pad';\n } else if (this.props.type === 'email') {\n keyboardType = 'email-address';\n }\n this.updateState({\n keyboardType: keyboardType,\n } as S);\n break;\n case 'datavalue':\n this.updateState({\n textValue: $new\n } as S\n );\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as S, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n }\n }\n\n onChange(event: any) {\n if (this.state.props.updateon === 'default') {\n this.updateDatavalue(event.target.value, event);\n }\n }\n\n onChangeText(value: any) {\n this.updateState({\n textValue: value\n } as S, () => {\n if (this.state.props.updateon === 'default') {\n this.validate(value);\n this.updateDatavalue(value, null);\n }\n }\n );\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.setState({ textValue: e.target.value });\n }\n }\n\n updateDatavalue(value: any, event?: any, source?: any) {\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (value === oldValue) {\n return;\n }\n\n // autotrim\n if (props.autotrim && props.datavalue && isString(props.datavalue)) {\n value = value.trim();\n }\n\n this.updateState({\n props: {\n datavalue: value\n }\n } as S, () => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, value, oldValue]);\n if (source === 'blur') {\n this.invokeEventCallback('onBlur', [ event, this.proxy]);\n }\n })\n\n }\n\n onBlur(event: any) {\n this.isTouched = true;\n let newVal = event.target.value || this.state.textValue;\n let oldVal = this.state.props.datavalue || '';\n this.validate(newVal);\n if (newVal === '') {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n if (this.state.props.updateon === 'blur') {\n if (oldVal !== newVal) {\n this.updateDatavalue(newVal, event, 'blur');\n } else {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as S);\n }\n\n onFocus(event: any) {\n this.invokeEventCallback('onFocus', [ event, this.proxy]);\n }\n\n onKeyPress(event: any) {\n this.invokeEventCallback('onKeypress', [ event, this.proxy]);\n }\n}\n"],"mappings":";;;AAAA,SAASA,aAAa,QAAQ,wEAAwE;AACtG,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,QAAQ,QAAQ,QAAQ;AAEjC,SAASC,QAAQ,QAAmB,cAAc;AAClD,SAASC,aAAa,QAAQ,sCAAsC;
|
|
1
|
+
{"version":3,"names":["DEFAULT_CLASS","BaseComponent","BaseComponentState","isString","Platform","validateField","Injector","BaseInputState","BaseInputComponent","constructor","props","defaultClass","defaultProps","defaultState","focus","widgetRef","blur","onPropertyChange","name","$new","$old","keyboardType","type","updateState","textValue","isDefault","state","onFieldChange","bind","onChange","event","updateon","updateDatavalue","target","value","onChangeText","validate","invokeChange","e","OS","cursor","selectionStart","setState","source","oldValue","datavalue","autotrim","trim","invokeEventCallback","proxy","onBlur","FOCUSED_ELEMENT","remove","isTouched","newVal","oldVal","setTimeout","triggerValidation","validationObj","isValid","errorType","onFocus","set","onKeyPress"],"sources":["baseinput.component.ts"],"sourcesContent":["import { DEFAULT_CLASS } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles\";\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BaseInputProps from './baseinput.props';\nimport { isString } from 'lodash';\nimport { BaseInputStyles } from './baseinput.styles';\nimport { Platform, TextInput } from 'react-native';\nimport { validateField } from '@wavemaker/app-rn-runtime/core/utils';\nimport Injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport class BaseInputState <T extends BaseInputProps> extends BaseComponentState<T> {\n keyboardType: any = 'default';\n isValid: boolean = true;\n textValue: string = '';\n isDefault = false;\n errorType: string = '';\n}\nexport abstract class BaseInputComponent< T extends BaseInputProps, S extends BaseInputState<T>, L extends BaseInputStyles> extends BaseComponent<T, S, L> {\n public widgetRef: TextInput | null = null;\n isTouched: boolean = false;\n private cursor: any = 0;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n blur() {\n this?.widgetRef?.blur && this?.widgetRef?.blur();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'type':\n let keyboardType;\n if (this.props.type === 'number') {\n keyboardType = 'numeric';\n } else if (this.props.type === 'tel') {\n keyboardType = 'phone-pad';\n } else if (this.props.type === 'email') {\n keyboardType = 'email-address';\n }\n this.updateState({\n keyboardType: keyboardType,\n } as S);\n break;\n case 'datavalue':\n this.updateState({\n textValue: $new\n } as S\n );\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as S, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n }\n }\n\n onChange(event: any) {\n if (this.state.props.updateon === 'default') {\n this.updateDatavalue(event.target.value, event);\n }\n }\n\n onChangeText(value: any) {\n this.updateState({\n textValue: value\n } as S, () => {\n if (this.state.props.updateon === 'default') {\n this.validate(value);\n this.updateDatavalue(value, null);\n }\n }\n );\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.setState({ textValue: e.target.value });\n }\n }\n\n updateDatavalue(value: any, event?: any, source?: any) {\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (value === oldValue) {\n return;\n }\n\n // autotrim\n if (props.autotrim && props.datavalue && isString(props.datavalue)) {\n value = value.trim();\n }\n\n this.updateState({\n props: {\n datavalue: value\n }\n } as S, () => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, value, oldValue]);\n if (source === 'blur') {\n this.invokeEventCallback('onBlur', [ event, this.proxy]);\n }\n })\n\n }\n\n onBlur(event: any) {\n Injector.FOCUSED_ELEMENT.remove();\n this.isTouched = true;\n let newVal = event.target.value || this.state.textValue;\n let oldVal = this.state.props.datavalue || '';\n this.validate(newVal);\n if (newVal === '') {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n if (this.state.props.updateon === 'blur') {\n if (oldVal !== newVal) {\n this.updateDatavalue(newVal, event, 'blur');\n } else {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as S);\n }\n\n onFocus(event: any) {\n Injector.FOCUSED_ELEMENT.set(this);\n this.invokeEventCallback('onFocus', [ event, this.proxy]);\n }\n\n onKeyPress(event: any) {\n this.invokeEventCallback('onKeypress', [ event, this.proxy]);\n }\n}\n"],"mappings":";;;AAAA,SAASA,aAAa,QAAQ,wEAAwE;AACtG,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,QAAQ,QAAQ,QAAQ;AAEjC,SAASC,QAAQ,QAAmB,cAAc;AAClD,SAASC,aAAa,QAAQ,sCAAsC;AACpE,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAO,MAAMC,cAAc,SAAoCL,kBAAkB,CAAI;EAAA;IAAA;IAAA,sCAC/D,SAAS;IAAA,iCACV,IAAI;IAAA,mCACH,EA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MACjBE,UAAU,CAAC,MAAM;QACf,IAAI,CAAC9C,KAAK,CAAC+C,iBAAiB,IAAI,IAAI,CAAC/C,KAAK,CAAC+C,iBAAiB,EAAE;MAChE,CAAC,CAAC;IACJ;IACA,IAAI,IAAI,CAAC/B,KAAK,CAAChB,KAAK,CAACqB,QAAQ,KAAK,MAAM,EAAE;MACxC,IAAIwB,MAAM,KAAKD,MAAM,EAAE;QACrB,IAAI,CAACtB,eAAe,CAACsB,MAAM,EAAExB,KAAK,EAAE,MAAM,CAAC;MAC7C,CAAC,MAAM;QACL,IAAI,CAACkB,mBAAmB,CAAC,QAAQ,EAAE,CAAClB,KAAK,EAAE,IAAI,CAACmB,KAAK,CAAC,CAAC;MACzD;IACF;EACF;EAEAb,QAAQ,CAACF,KAAU,EAAE;IACnB,MAAMwB,aAAa,GAAGrD,aAAa,CAAC,IAAI,CAACqB,KAAK,CAAChB,KAAK,EAAEwB,KAAK,CAAC;IAC5D,IAAI,CAACX,WAAW,CAAC;MACfoC,OAAO,EAAED,aAAa,CAACC,OAAO;MAC9BC,SAAS,EAAEF,aAAa,CAACE;IAC3B,CAAC,CAAM;EACT;EAEAC,OAAO,CAAC/B,KAAU,EAAE;IAClBxB,QAAQ,CAAC6C,eAAe,CAACW,GAAG,CAAC,IAAI,CAAC;IAClC,IAAI,CAACd,mBAAmB,CAAC,SAAS,EAAE,CAAElB,KAAK,EAAE,IAAI,CAACmB,KAAK,CAAC,CAAC;EAC3D;EAEAc,UAAU,CAACjC,KAAU,EAAE;IACrB,IAAI,CAACkB,mBAAmB,CAAC,YAAY,EAAE,CAAElB,KAAK,EAAE,IAAI,CAACmB,KAAK,CAAC,CAAC;EAC9D;AACF"}
|
|
@@ -95,7 +95,7 @@ export default class WmCalendar extends BaseComponent {
|
|
|
95
95
|
this.invokeEventCallback('onBeforerender', [null, this]);
|
|
96
96
|
return /*#__PURE__*/React.createElement(View, {
|
|
97
97
|
style: this.styles.root
|
|
98
|
-
}, /*#__PURE__*/React.createElement(MonthView, {
|
|
98
|
+
}, this._background, /*#__PURE__*/React.createElement(MonthView, {
|
|
99
99
|
date: this.state.selectedDate,
|
|
100
100
|
selectDate: this.onDateChange,
|
|
101
101
|
format: DEFAULT_DATE_FORMAT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","isString","moment","BaseComponent","BaseComponentState","MonthView","WmCalendarProps","DEFAULT_CLASS","WmIcon","WmCalendarState","Map","DEFAULT_DATE_FORMAT","WmCalendar","constructor","props","date","d","format","dateWindow","state","calendar","get","updateState","datavalue","selectedDate","invokeEventCallback","events","root","marginTop","alignSelf","icon","styles","Math","min","length","prepareDataset","dataset","eventStartKey","eventstart","forEach","startDate","has","set","push","onPropertyChange","name","$new","$old","componentDidUpdate","prevProps","prevState","snapshot","renderWidget","onDateChange","renderDay","selectedDay","selectedDayText","weekDay","calendarHeader","weekDayText","dayWrapper","day","yearText","monthText","today","todayText","notDayOfCurrentMonth","prevYearBtn","prevMonthBtn","nextMonthBtn","nextYearBtn"],"sources":["calendar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isString } from 'lodash';\nimport moment, { Moment } from 'moment';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { MonthView } from './views/month-view';\nimport WmCalendarProps from './calendar.props';\nimport { DEFAULT_CLASS, WmCalendarStyles } from './calendar.styles';\nimport WmIcon from '../../basic/icon/icon.component';\n\nexport class WmCalendarState extends BaseComponentState<WmCalendarProps> {\n selectedDate: Moment = moment();\n calendar: Map<String, { date: number, events: any []}> = new Map();\n}\n\nconst DEFAULT_DATE_FORMAT = 'DD-MM-YYYY';\n\nexport default class WmCalendar extends BaseComponent<WmCalendarProps, WmCalendarState, WmCalendarStyles> {\n\n constructor(props: WmCalendarProps) {\n super(props, DEFAULT_CLASS, new WmCalendarProps(), new WmCalendarState());\n }\n\n onDateChange = (date: Moment) => {\n const d = moment(date).format(DEFAULT_DATE_FORMAT);\n const dateWindow = this.state.calendar.get(d);\n this.updateState({\n props: {datavalue: d},\n selectedDate: date\n } as WmCalendarState);\n this.invokeEventCallback('onSelect', [d, d, this, dateWindow?.events]);\n }\n\n prepareDataset(dataset: any[]) {\n if (!dataset) {\n return;\n }\n const state = {\n calendar: new Map()\n } as WmCalendarState;\n const eventStartKey = this.state.props.eventstart;\n dataset.forEach(d => {\n let startDate = d[eventStartKey];\n if (!isString(startDate)) {\n startDate = moment(startDate).format(DEFAULT_DATE_FORMAT);\n }\n if (!state.calendar.has(startDate)) {\n state.calendar.set(startDate, {\n date: moment(startDate, DEFAULT_DATE_FORMAT).get('milliseconds'),\n events: []\n });\n }\n const dateWindow = state.calendar.get(startDate);\n dateWindow?.events.push(d);\n });\n this.updateState(state);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'dataset':\n this.prepareDataset($new);\n break;\n case 'datavalue':\n if ($new) {\n this.updateState({\n selectedDate: isString($new) ? moment($new, DEFAULT_DATE_FORMAT) : moment($new)\n } as WmCalendarState)\n }\n }\n }\n\n renderDay = (date: Moment) => {\n const dateWindow = this.state.calendar.get(moment(date).format(DEFAULT_DATE_FORMAT));\n if (dateWindow) {\n return (\n <WmIcon\n iconclass=\"fa fa-circle\"\n iconsize={8}\n styles={{\n root: {marginTop: -8, alignSelf: 'flexStart'},\n icon: this.styles['eventDay' + Math.min(3, dateWindow.events.length)]}}></WmIcon>\n );\n }\n return (<></>);\n }\n\n componentDidUpdate(prevProps: WmCalendarProps, prevState: WmCalendarState, snapshot: any) {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n this.invokeEventCallback('onViewrender', [this, null]);\n }\n\n renderWidget(props: WmCalendarProps) {\n this.invokeEventCallback('onBeforerender', [null, this]);\n return (\n <View style={this.styles.root}>\n <MonthView\n date={this.state.selectedDate}\n selectDate={this.onDateChange}\n format={DEFAULT_DATE_FORMAT}\n renderChildDay={this.renderDay}\n containerStyle={this.styles.calendar}\n dateSelectedWarpDayStyle={this.styles.selectedDay}\n selectedDayTextStyle={this.styles.selectedDayText}\n warpRowWeekdays={this.styles.weekDay}\n warpRowControlMonthYear={this.styles.calendarHeader}\n weekdayStyle={this.styles.weekDayText}\n warpDayStyle={this.styles.dayWrapper}\n textDayStyle={this.styles.day}\n yearTextStyle={this.styles.yearText}\n monthTextStyle={this.styles.monthText}\n currentDayStyle={this.styles.today}\n currentDayTextStyle={this.styles.todayText}\n notDayOfCurrentMonthStyle={this.styles.notDayOfCurrentMonth}\n renderPrevYearButton={() =>\n (<WmIcon iconclass=\"wi wi-angle-double-left\" styles={this.styles.prevYearBtn}/>)}\n renderPrevMonthButton={() =>\n (<WmIcon iconclass=\"wi wi-chevron-left fa-2x\" styles={this.styles.prevMonthBtn}/>)}\n renderNextMonthButton={() =>\n (<WmIcon iconclass=\"wi wi-chevron-right fa-2x\" styles={this.styles.nextMonthBtn}/>)}\n renderNextYearButton={() =>\n (<WmIcon iconclass=\"wi wi-angle-double-right\" styles={this.styles.nextYearBtn}/>)}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAkB,QAAQ;AACvC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,OAAOC,MAAM,MAAM,iCAAiC;AAEpD,OAAO,MAAMC,eAAe,SAASL,kBAAkB,CAAkB;EAAA;IAAA;IAAA,sCAChDF,MAAM,EAAE;IAAA,kCAC0B,IAAIQ,GAAG,EAAE;EAAA;AACpE;AAEA,MAAMC,mBAAmB,GAAG,YAAY;AAExC,eAAe,MAAMC,UAAU,SAAST,aAAa,CAAqD;EAExGU,WAAW,CAACC,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B,EAAE,IAAI,CAACjC,MAAM,CAACkC,SAAU;MAC3C,yBAAyB,EAAE,IAAI,CAAClC,MAAM,CAACmC,oBAAqB;MAC5D,oBAAoB,EAAE,mBACnB,oBAAC,MAAM;QAAC,SAAS,EAAC,yBAAyB;QAAC,MAAM,EAAE,IAAI,CAACnC,MAAM,CAACoC;MAAY,EAAI;MACnF,qBAAqB,EAAE,mBACpB,oBAAC,MAAM;QAAC,SAAS,EAAC,0BAA0B;QAAC,MAAM,EAAE,IAAI,CAACpC,MAAM,CAACqC;MAAa,EAAI;MACrF,qBAAqB,EAAE,mBAClB,oBAAC,MAAM;QAAC,SAAS,EAAC,2BAA2B;QAAC,MAAM,EAAE,IAAI,CAACrC,MAAM,CAACsC;MAAa,EAAI;MACxF,oBAAoB,EAAE,mBACjB,oBAAC,MAAM;QAAC,SAAS,EAAC,0BAA0B;QAAC,MAAM,EAAE,IAAI,CAACtC,MAAM,CAACuC;MAAY;IAAI,EACtF,CACC;EAEX;AACF"}
|
|
1
|
+
{"version":3,"names":["React","View","isString","moment","BaseComponent","BaseComponentState","MonthView","WmCalendarProps","DEFAULT_CLASS","WmIcon","WmCalendarState","Map","DEFAULT_DATE_FORMAT","WmCalendar","constructor","props","date","d","format","dateWindow","state","calendar","get","updateState","datavalue","selectedDate","invokeEventCallback","events","root","marginTop","alignSelf","icon","styles","Math","min","length","prepareDataset","dataset","eventStartKey","eventstart","forEach","startDate","has","set","push","onPropertyChange","name","$new","$old","componentDidUpdate","prevProps","prevState","snapshot","renderWidget","_background","onDateChange","renderDay","selectedDay","selectedDayText","weekDay","calendarHeader","weekDayText","dayWrapper","day","yearText","monthText","today","todayText","notDayOfCurrentMonth","prevYearBtn","prevMonthBtn","nextMonthBtn","nextYearBtn"],"sources":["calendar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isString } from 'lodash';\nimport moment, { Moment } from 'moment';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { MonthView } from './views/month-view';\nimport WmCalendarProps from './calendar.props';\nimport { DEFAULT_CLASS, WmCalendarStyles } from './calendar.styles';\nimport WmIcon from '../../basic/icon/icon.component';\n\nexport class WmCalendarState extends BaseComponentState<WmCalendarProps> {\n selectedDate: Moment = moment();\n calendar: Map<String, { date: number, events: any []}> = new Map();\n}\n\nconst DEFAULT_DATE_FORMAT = 'DD-MM-YYYY';\n\nexport default class WmCalendar extends BaseComponent<WmCalendarProps, WmCalendarState, WmCalendarStyles> {\n\n constructor(props: WmCalendarProps) {\n super(props, DEFAULT_CLASS, new WmCalendarProps(), new WmCalendarState());\n }\n\n onDateChange = (date: Moment) => {\n const d = moment(date).format(DEFAULT_DATE_FORMAT);\n const dateWindow = this.state.calendar.get(d);\n this.updateState({\n props: {datavalue: d},\n selectedDate: date\n } as WmCalendarState);\n this.invokeEventCallback('onSelect', [d, d, this, dateWindow?.events]);\n }\n\n prepareDataset(dataset: any[]) {\n if (!dataset) {\n return;\n }\n const state = {\n calendar: new Map()\n } as WmCalendarState;\n const eventStartKey = this.state.props.eventstart;\n dataset.forEach(d => {\n let startDate = d[eventStartKey];\n if (!isString(startDate)) {\n startDate = moment(startDate).format(DEFAULT_DATE_FORMAT);\n }\n if (!state.calendar.has(startDate)) {\n state.calendar.set(startDate, {\n date: moment(startDate, DEFAULT_DATE_FORMAT).get('milliseconds'),\n events: []\n });\n }\n const dateWindow = state.calendar.get(startDate);\n dateWindow?.events.push(d);\n });\n this.updateState(state);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch(name) {\n case 'dataset':\n this.prepareDataset($new);\n break;\n case 'datavalue':\n if ($new) {\n this.updateState({\n selectedDate: isString($new) ? moment($new, DEFAULT_DATE_FORMAT) : moment($new)\n } as WmCalendarState)\n }\n }\n }\n\n renderDay = (date: Moment) => {\n const dateWindow = this.state.calendar.get(moment(date).format(DEFAULT_DATE_FORMAT));\n if (dateWindow) {\n return (\n <WmIcon\n iconclass=\"fa fa-circle\"\n iconsize={8}\n styles={{\n root: {marginTop: -8, alignSelf: 'flexStart'},\n icon: this.styles['eventDay' + Math.min(3, dateWindow.events.length)]}}></WmIcon>\n );\n }\n return (<></>);\n }\n\n componentDidUpdate(prevProps: WmCalendarProps, prevState: WmCalendarState, snapshot: any) {\n super.componentDidUpdate && super.componentDidUpdate(prevProps, prevState, snapshot);\n this.invokeEventCallback('onViewrender', [this, null]);\n }\n\n renderWidget(props: WmCalendarProps) {\n this.invokeEventCallback('onBeforerender', [null, this]);\n return (\n <View style={this.styles.root}>\n {this._background}\n <MonthView\n date={this.state.selectedDate}\n selectDate={this.onDateChange}\n format={DEFAULT_DATE_FORMAT}\n renderChildDay={this.renderDay}\n containerStyle={this.styles.calendar}\n dateSelectedWarpDayStyle={this.styles.selectedDay}\n selectedDayTextStyle={this.styles.selectedDayText}\n warpRowWeekdays={this.styles.weekDay}\n warpRowControlMonthYear={this.styles.calendarHeader}\n weekdayStyle={this.styles.weekDayText}\n warpDayStyle={this.styles.dayWrapper}\n textDayStyle={this.styles.day}\n yearTextStyle={this.styles.yearText}\n monthTextStyle={this.styles.monthText}\n currentDayStyle={this.styles.today}\n currentDayTextStyle={this.styles.todayText}\n notDayOfCurrentMonthStyle={this.styles.notDayOfCurrentMonth}\n renderPrevYearButton={() =>\n (<WmIcon iconclass=\"wi wi-angle-double-left\" styles={this.styles.prevYearBtn}/>)}\n renderPrevMonthButton={() =>\n (<WmIcon iconclass=\"wi wi-chevron-left fa-2x\" styles={this.styles.prevMonthBtn}/>)}\n renderNextMonthButton={() =>\n (<WmIcon iconclass=\"wi wi-chevron-right fa-2x\" styles={this.styles.nextMonthBtn}/>)}\n renderNextYearButton={() =>\n (<WmIcon iconclass=\"wi wi-angle-double-right\" styles={this.styles.nextYearBtn}/>)}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,QAAQ,QAAQ,QA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oBAAoB,EAAE,IAAI,CAACzB,MAAM,CAAC0B,eAAgB;MAClD,eAAe,EAAE,IAAI,CAAC1B,MAAM,CAAC2B,OAAQ;MACrC,uBAAuB,EAAE,IAAI,CAAC3B,MAAM,CAAC4B,cAAe;MACpD,YAAY,EAAE,IAAI,CAAC5B,MAAM,CAAC6B,WAAY;MACtC,YAAY,EAAE,IAAI,CAAC7B,MAAM,CAAC8B,UAAW;MACrC,YAAY,EAAE,IAAI,CAAC9B,MAAM,CAAC+B,GAAI;MAC9B,aAAa,EAAE,IAAI,CAAC/B,MAAM,CAACgC,QAAS;MACpC,cAAc,EAAE,IAAI,CAAChC,MAAM,CAACiC,SAAU;MACtC,eAAe,EAAE,IAAI,CAACjC,MAAM,CAACkC,KAAM;MACnC,mBAAmB,EAAE,IAAI,CAAClC,MAAM,CAACmC,SAAU;MAC3C,yBAAyB,EAAE,IAAI,CAACnC,MAAM,CAACoC,oBAAqB;MAC5D,oBAAoB,EAAE,mBACnB,oBAAC,MAAM;QAAC,SAAS,EAAC,yBAAyB;QAAC,MAAM,EAAE,IAAI,CAACpC,MAAM,CAACqC;MAAY,EAAI;MACnF,qBAAqB,EAAE,mBACpB,oBAAC,MAAM;QAAC,SAAS,EAAC,0BAA0B;QAAC,MAAM,EAAE,IAAI,CAACrC,MAAM,CAACsC;MAAa,EAAI;MACrF,qBAAqB,EAAE,mBAClB,oBAAC,MAAM;QAAC,SAAS,EAAC,2BAA2B;QAAC,MAAM,EAAE,IAAI,CAACtC,MAAM,CAACuC;MAAa,EAAI;MACxF,oBAAoB,EAAE,mBACjB,oBAAC,MAAM;QAAC,SAAS,EAAC,0BAA0B;QAAC,MAAM,EAAE,IAAI,CAACvC,MAAM,CAACwC;MAAY;IAAI,EACtF,CACC;EAEX;AACF"}
|
|
@@ -9,7 +9,6 @@ import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/cor
|
|
|
9
9
|
import { unStringify, validateField } from '@wavemaker/app-rn-runtime/core/utils';
|
|
10
10
|
import WmCheckboxProps from './checkbox.props';
|
|
11
11
|
import { DEFAULT_CLASS } from './checkbox.styles';
|
|
12
|
-
import { createSkeleton } from '../../basic/skeleton/skeleton.component';
|
|
13
12
|
export class WmCheckboxState extends BaseComponentState {
|
|
14
13
|
constructor() {
|
|
15
14
|
super(...arguments);
|
|
@@ -80,25 +79,11 @@ export default class WmCheckbox extends BaseComponent {
|
|
|
80
79
|
this.invokeEventCallback('onBlur', [null, this.proxy]);
|
|
81
80
|
});
|
|
82
81
|
}
|
|
83
|
-
renderSkeleton(props) {
|
|
84
|
-
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
85
|
-
style: this.styles.root,
|
|
86
|
-
onPress: this.onPress.bind(this)
|
|
87
|
-
}, /*#__PURE__*/React.createElement(Checkbox.Android, {
|
|
88
|
-
status: this.state.isChecked ? 'checked' : 'unchecked',
|
|
89
|
-
color: this.styles.text.color,
|
|
90
|
-
disabled: this.props.readonly || this.props.disabled
|
|
91
|
-
}), createSkeleton(this.theme, this.styles.skeleton, {
|
|
92
|
-
...this.styles.root,
|
|
93
|
-
width: this.styles.root.width,
|
|
94
|
-
height: this.styles.root.height
|
|
95
|
-
}));
|
|
96
|
-
}
|
|
97
82
|
renderWidget(props) {
|
|
98
83
|
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
99
84
|
style: this.styles.root,
|
|
100
85
|
onPress: this.onPress.bind(this)
|
|
101
|
-
}, /*#__PURE__*/React.createElement(Checkbox.Android, {
|
|
86
|
+
}, this._background, /*#__PURE__*/React.createElement(Checkbox.Android, {
|
|
102
87
|
status: this.state.isChecked ? 'checked' : 'unchecked',
|
|
103
88
|
color: this.styles.text.color,
|
|
104
89
|
disabled: props.readonly || props.disabled
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","Checkbox","TouchableOpacity","BaseComponent","BaseComponentState","unStringify","validateField","WmCheckboxProps","DEFAULT_CLASS","
|
|
1
|
+
{"version":3,"names":["React","Text","Checkbox","TouchableOpacity","BaseComponent","BaseComponentState","unStringify","validateField","WmCheckboxProps","DEFAULT_CLASS","WmCheckboxState","WmCheckbox","constructor","props","setChecked","dataValue","checkedvalue","value","updateState","isChecked","onPropertyChange","name","$new","$old","state","datavalue","updateDatavalue","validate","validationObj","isValid","errorType","onPress","readonly","invokeEventCallback","proxy","disabled","oldValue","uncheckedvalue","onFieldChange","renderWidget","styles","root","bind","_background","text","color","checkboxLabel","caption"],"sources":["checkbox.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { Checkbox } from 'react-native-paper';\nimport { TouchableOpacity } from 'react-native-gesture-handler';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {unStringify, validateField} from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmCheckboxProps from './checkbox.props';\nimport { DEFAULT_CLASS, WmCheckboxStyles } from './checkbox.styles';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\n\nexport class WmCheckboxState extends BaseComponentState<WmCheckboxProps> {\n isChecked: boolean = false;\n isValid: boolean = true;\n errorType = '';\n}\n\nexport default class WmCheckbox extends BaseComponent<WmCheckboxProps, WmCheckboxState, WmCheckboxStyles> {\n\n constructor(props: WmCheckboxProps) {\n super(props, DEFAULT_CLASS, new WmCheckboxProps(), new WmCheckboxState());\n }\n\n setChecked(dataValue: any, checkedvalue: any) {\n const value = unStringify(dataValue) === unStringify(checkedvalue, true);\n this.updateState({ isChecked: value } as WmCheckboxState);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'checkedvalue':\n this.setChecked(this.state.props.datavalue, $new);\n break;\n case 'datavalue':\n this.setChecked($new, this.state.props.checkedvalue);\n break;\n }\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmCheckboxState);\n }\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as WmCheckboxState);\n }\n\n onPress() {\n if (!this.state.props.readonly) {\n this.invokeEventCallback('onFocus', [null, this.proxy]);\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n if (this.state.props.disabled) {\n return;\n }\n const oldValue = this.state.props.datavalue;\n const value = !this.state.isChecked;\n this.validate(value);\n this.updateState({ isChecked: value } as WmCheckboxState);\n const dataValue = value === true ? this.state.props.checkedvalue : this.state.props.uncheckedvalue;\n this.updateState({ props: { datavalue: dataValue } } as WmCheckboxState,\n () => {\n if (!this.props.onFieldChange) {\n this.invokeEventCallback('onChange', [null, this.proxy, dataValue, oldValue]);\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', dataValue, oldValue);\n }\n this.invokeEventCallback('onBlur', [ null, this.proxy ]);\n });\n }\n\n renderWidget(props: WmCheckboxProps) {\n return (\n <TouchableOpacity style={this.styles.root} onPress={this.onPress.bind(this)}>\n {this._background}\n <Checkbox.Android status={this.state.isChecked ? 'checked' : 'unchecked'} color={this.styles.text.color as string} disabled={props.readonly || props.disabled}/>\n <Text style={this.styles.checkboxLabel}>{props.caption}</Text>\n </TouchableOpacity>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,gBAAgB,QAAQ,8BAA8B;AAE/D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAAQC,WAAW,EAAEC,aAAa,QAAO,sCAAsC;AAE/E,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AAGnE,OAAO,MAAMC,eAAe,SAASL,kBAAkB,CAAkB;EAAA;IAAA;IAAA,mCAClD,KAAK;IAAA,iCACP,IAAI;IAAA,mCACX,EAAE;EAAA;AAChB;AAEA,eAAe,MAAMM,UAAU,SAASP,aAAa,CAAqD;EAExGQ,WAAW,CA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