@wavemaker/app-rn-runtime 11.4.0-next.141706 → 11.4.0-next.1417060
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/custom/custom.component.js +25 -0
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.props.js +16 -0
- app-rn-runtime/components/basic/custom/custom.props.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.styles.js +18 -0
- app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -0
- 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/lottie/lottie.component.js +137 -0
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js +14 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js +11 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -0
- 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 +10 -10
- 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 +6 -5
- app-rn-runtime/runtime/App.js +24 -16
- 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/app-spinner.service.js +5 -1
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js +1 -1
- app-rn-runtime/runtime/services/app-toast.service.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 +38 -8
- 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 +6 -37
- 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":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","flexDirection","text","fontWeight","fontSize","textTransform","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","button","backgroundColor","switchBgColor","switchTextColor","minWidth","borderRadius","borderColor","switchBorderColor","borderWidth","borderRightWidth","alignItems","selectedButton","switchActiveTextColor","switchActiveBgColor","firstButton","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","lastButton"],"sources":["switch.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {WmIconStyles} from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.styles\";\n\nexport type WmSwitchStyles = BaseStyles & {\n loadingIcon: WmIconStyles,\n button: AllStyle,\n selectedButton: AllStyle,\n firstButton: AllStyle,\n lastButton: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-switch';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmSwitchStyles = defineStyles<WmSwitchStyles>({\n root: {\n height: 38,\n flexDirection: 'row'\n },\n text: {\n fontWeight: '500',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n button: {\n backgroundColor: themeVariables.switchBgColor,\n color: themeVariables.switchTextColor,\n fontSize: 16,\n minWidth: 64,\n borderRadius: 0,\n borderColor: themeVariables.switchBorderColor,\n borderWidth: 1,\n borderRightWidth: 0,\n fontWeight: 'bold',\n justifyContent: 'center',\n alignItems: 'center'\n } as AllStyle,\n selectedButton: {\n color: themeVariables.switchActiveTextColor,\n backgroundColor: themeVariables.switchActiveBgColor,\n borderColor: themeVariables.switchActiveBgColor\n } as AllStyle,\n firstButton: {\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n borderRightWidth: 1\n } as AllStyle\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {}\n });\n addStyle(DEFAULT_CLASS + '1', '', {\n firstButton: {\n borderTopLeftRadius: 500,\n borderBottomLeftRadius: 500,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n } as AllStyle,\n lastButton: {\n flex: 1,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 500,\n borderBottomRightRadius: 500\n } as AllStyle\n } as WmSwitchStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAkB,wCAAwC;AAC3E,SAAqBC,YAAY,QAAQ,+CAA+C;AAWxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,aAAa,EAAE;IACjB,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAE,KAAK;MACjBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE;IACjB,CAAC;IACHC,WAAW,EAAE;MACXP,IAAI,EAAE;QACJQ,IAAI,EAAE,CAAC;QACPC,SAAS,EAAE,QAAQ;QACnBC,cAAc,EAAE,QAAQ;QACxBL,QAAQ,EAAE;MACZ,CAAC;MACDF,IAAI,EAAE;QACJQ,KAAK,EAAEd,cAAc,CAACe;MACxB;IACF,CAAiB;IACjBC,MAAM,EAAE;MACNC,eAAe,EAAEjB,cAAc,CAACkB,aAAa;MAC7CJ,KAAK,EAAEd,cAAc,CAACmB,eAAe;MACrCX,QAAQ,EAAE,EAAE;MACZY,QAAQ,EAAE,EAAE;MACZC,YAAY,EAAE,CAAC;MACfC,WAAW,EAAEtB,cAAc,CAACuB,iBAAiB;MAC7CC,WAAW,EAAE,CAAC;MACdC,gBAAgB,EAAE,CAAC;MACnBlB,UAAU,EAAE,MAAM;MAClBM,cAAc,EAAE,QAAQ;MACxBa,UAAU,EAAE;IACd,CAAa;IACbC,cAAc,EAAE;MACdb,KAAK,EAAEd,cAAc,CAAC4B,qBAAqB;MAC3CX,eAAe,EAAEjB,cAAc,CAAC6B,mBAAmB;MACnDP,WAAW,EAAEtB,cAAc,CAAC6B;IAC9B,CAAa;IACbC,WAAW,EAAE;MACXC,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAa;IACbC,UAAU,EAAE;MACVJ,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE,CAAC;MAC1BT,gBAAgB,EAAE;IACpB;EACF,CAAC,CAAC;EAEFxB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAE,CAAC;EACT,CAAC,CAAC;EACFF,QAAQ,CAACH,aAAa,GAAG,GAAG,EAAE,EAAE,EAAE;IAChCgC,WAAW,EAAE;MACXC,mBAAmB,EAAE,GAAG;MACxBC,sBAAsB,EAAE,GAAG;MAC3BC,oBAAoB,EAAE,CAAC;MACvBC,uBAAuB,EAAE;IAC3B,CAAa;IACbC,UAAU,EAAE;MACVxB,IAAI,EAAE,CAAC;MACPoB,mBAAmB,EAAE,CAAC;MACtBC,sBAAsB,EAAE,CAAC;MACzBC,oBAAoB,EAAE,GAAG;MACzBC,uBAAuB,EAAE;IAC3B;EACF,CAAC,CAAmB;AACtB,CAAC,CAAC"}
|
|
@@ -5,20 +5,11 @@ import WmTextProps from './text.props';
|
|
|
5
5
|
import { DEFAULT_CLASS } from './text.styles';
|
|
6
6
|
import { BaseInputComponent, BaseInputState } from "@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component";
|
|
7
7
|
import { isNull } from 'lodash';
|
|
8
|
-
import { createSkeleton } from '../../basic/skeleton/skeleton.component';
|
|
9
8
|
export class WmTextState extends BaseInputState {}
|
|
10
9
|
export default class WmText extends BaseInputComponent {
|
|
11
10
|
constructor(props) {
|
|
12
11
|
super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());
|
|
13
12
|
}
|
|
14
|
-
renderSkeleton(props) {
|
|
15
|
-
var _this$styles$root, _this$styles$text, _this$styles$placehol;
|
|
16
|
-
return createSkeleton(this.theme, this.styles.skeleton, {
|
|
17
|
-
...this.styles.root,
|
|
18
|
-
width: this.styles.root.width,
|
|
19
|
-
height: ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.height) || ((_this$styles$text = this.styles.text) === null || _this$styles$text === void 0 ? void 0 : _this$styles$text.fontSize) || ((_this$styles$placehol = this.styles.placeholderText) === null || _this$styles$placehol === void 0 ? void 0 : _this$styles$placehol.fontSize)
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
13
|
renderWidget(props) {
|
|
23
14
|
var _this$state$textValue;
|
|
24
15
|
let opts = {};
|
|
@@ -42,7 +33,7 @@ export default class WmText extends BaseInputComponent {
|
|
|
42
33
|
editable: props.disabled || props.readonly ? false : true,
|
|
43
34
|
secureTextEntry: props.type === 'password' ? true : false,
|
|
44
35
|
maxLength: props.maxchars,
|
|
45
|
-
placeholder: props.placeholder
|
|
36
|
+
placeholder: props.placeholder,
|
|
46
37
|
onBlur: this.onBlur.bind(this),
|
|
47
38
|
onFocus: this.onFocus.bind(this),
|
|
48
39
|
onKeyPress: this.onKeyPress.bind(this),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","TextInput","WmTextProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","isNull","
|
|
1
|
+
{"version":3,"names":["React","Platform","TextInput","WmTextProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","isNull","WmTextState","WmText","constructor","props","renderWidget","opts","valueExpr","OS","state","textValue","toString","ref","widgetRef","selectionStart","selectionEnd","cursor","styles","placeholderText","color","root","isValid","invalid","keyboardType","autocomplete","autofocus","disabled","readonly","type","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","invokeChange"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\nimport { createSkeleton } from '../../basic/skeleton/skeleton.component';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <TextInput\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' ? true : false}\n maxLength={props.maxchars}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AA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a;MACtC,YAAY,EAAEnB,KAAK,CAACoB,YAAY,GAAG,UAAU,GAAG,KAAM;MACtD,SAAS,EAAEpB,KAAK,CAACqB,SAAU;MAC3B,QAAQ,EAAErB,KAAK,CAACsB,QAAQ,IAAItB,KAAK,CAACuB,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1D,eAAe,EAAEvB,KAAK,CAACwB,IAAI,KAAK,UAAU,GAAG,IAAI,GAAG,KAAM;MAC1D,SAAS,EAAExB,KAAK,CAACyB,QAAS;MAC1B,WAAW,EAAEzB,KAAK,CAAC0B,WAAY;MAC/B,MAAM,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/B,OAAO,EAAE,IAAI,CAACC,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjC,UAAU,EAAE,IAAI,CAACE,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvC,YAAY,EAAE,IAAI,CAACG,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3C,QAAQ,EAAE,IAAI,CAACI,YAAY,CAACJ,IAAI,CAAC,IAAI;IAAE,GACvC;EAER;AACF"}
|
|
@@ -5,21 +5,11 @@ import WmTextareaProps from './textarea.props';
|
|
|
5
5
|
import { DEFAULT_CLASS } from './textarea.styles';
|
|
6
6
|
import { BaseInputComponent, BaseInputState } from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';
|
|
7
7
|
import { isNull } from 'lodash';
|
|
8
|
-
import { createSkeleton } from '../../basic/skeleton/skeleton.component';
|
|
9
8
|
export class WmTextareaState extends BaseInputState {}
|
|
10
9
|
export default class WmTextarea extends BaseInputComponent {
|
|
11
10
|
constructor(props) {
|
|
12
11
|
super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());
|
|
13
12
|
}
|
|
14
|
-
renderSkeleton(props) {
|
|
15
|
-
const styles = {
|
|
16
|
-
borderRadius: 4,
|
|
17
|
-
marginBottom: 10
|
|
18
|
-
};
|
|
19
|
-
return createSkeleton(this.theme, this.styles.skeleton, {
|
|
20
|
-
...this.styles.root
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
13
|
renderWidget(props) {
|
|
24
14
|
var _this$state$textValue;
|
|
25
15
|
let opts = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","TextInput","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","isNull","
|
|
1
|
+
{"version":3,"names":["React","Platform","TextInput","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","isNull","WmTextareaState","WmTextarea","constructor","props","renderWidget","opts","valueExpr","OS","state","textValue","toString","ref","widgetRef","selectionStart","selectionEnd","cursor","styles","placeholderText","color","root","text","isValid","invalid","keyboardType","autocomplete","autofocus","disabled","readonly","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","invokeChange"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TextInput } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { isNull } from 'lodash';\nimport { createSkeleton } from '../../basic/skeleton/skeleton.component';\n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n renderWidget(props: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( <TextInput\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n multiline={true}\n numberOfLines={4}\n keyboardType={this.state.keyboardType}\n {...opts}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n />);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AAClD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,MAAM,QAAQ,QAAQ;AAG/B,OAAO,MAAMC,eAAe,SAASF,cAAc,CAAkB;AAErE,eAAe,MAAMG,UAAU,SAASJ,kBAAkB,CAAqD;EAE7GK,WAAW,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,eAAe,EAAE,EAAE,IAAIK,eAAe,EAAE,CAAC;EAC3E;EAEAI,YAAY,CAACD,KAAsB,EAAE;IAAA;IACnC,IAAIE,IAAS,GAAG,CAAC,CAAC;IAClB,MAAMC,SAAS,GAAGb,QAAQ,CAACc,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,cAAc;IAClEF,IAAI,CAACC,SAAS,CAAC,GAAG,8BAAI,CAACE,KAAK,CAACC,SAAS,0DAApB,sBAAsBC,QAAQ,EAAE,KAAI,EAAE;IACxD,oBAAS,oBAAC,SAAS;MACjB,GAAG,EAAEC,GAAG,IAAI;QAAC,IAAI,CAACC,SAAS,GAAGD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;AACF"}
|
|
@@ -68,7 +68,7 @@ export default class WmToggle extends BaseComponent {
|
|
|
68
68
|
renderWidget(props) {
|
|
69
69
|
return /*#__PURE__*/React.createElement(View, {
|
|
70
70
|
style: this.styles.root
|
|
71
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
71
|
+
}, this._background, /*#__PURE__*/React.createElement(Switch, {
|
|
72
72
|
value: this.state.isSwitchOn,
|
|
73
73
|
color: this.styles.text.color,
|
|
74
74
|
disabled: props.readonly || props.disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Switch","BaseComponent","BaseComponentState","unStringify","validateField","WmToggleProps","DEFAULT_CLASS","WmToggleState","WmToggle","constructor","props","onPropertyChange","name","$new","$old","value","state","checkedvalue","updateState","isSwitchOn","updateDatavalue","datavalue","validate","validationObj","isValid","errorType","onToggleSwitch","oldValue","dataValue","uncheckedvalue","onFieldChange","invokeEventCallback","proxy","renderWidget","styles","root","text","color","readonly","disabled","bind","setTimeout"],"sources":["toggle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { Switch } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {unStringify, validateField} from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmToggleProps from './toggle.props';\nimport { DEFAULT_CLASS, WmToggleStyles } from './toggle.styles';\n\nexport class WmToggleState extends BaseComponentState<WmToggleProps> {\n isSwitchOn: boolean = false;\n isValid: boolean = true;\n errorType = '';\n}\n\nexport default class WmToggle extends BaseComponent<WmToggleProps, WmToggleState, WmToggleStyles> {\n\n constructor(props: WmToggleProps) {\n super(props, DEFAULT_CLASS, new WmToggleProps(), new WmToggleState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'datavalue':\n let value =\n unStringify($new) ===\n unStringify(this.state.props.checkedvalue, true);\n this.updateState({ isSwitchOn: value } as WmToggleState);\n break;\n }\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmToggleState);\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 WmToggleState);\n }\n\n onToggleSwitch(value: any) {\n const oldValue = this.state.props.datavalue;\n this.validate(value);\n this.updateState({ isSwitchOn: value } as WmToggleState);\n const dataValue = value === true ? this.state.props.checkedvalue : this.state.props.uncheckedvalue;\n // @ts-ignore\n this.updateState({ props: { datavalue: dataValue } },\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: WmToggleProps) {\n return (\n <View style={this.styles.root}>\n <Switch value={this.state.isSwitchOn}\n color={this.styles.text.color as string}\n disabled={props.readonly || props.disabled}\n onValueChange={this.onToggleSwitch.bind(this)}\n onTouchEndCapture={() => {\n // Added setTimeout to smooth animation\n setTimeout(() => {\n if (!props.readonly) {\n this.invokeEventCallback('onFocus', [null, this]);\n }\n this.invokeEventCallback('onTap', [null, this]);\n }, 500);\n }}/>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAAQC,WAAW,EAAEC,aAAa,QAAO,sCAAsC;AAE/E,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,OAAO,MAAMC,aAAa,SAASL,kBAAkB,CAAgB;EAAA;IAAA;IAAA,oCAC7C,KAAK;IAAA,iCACR,IAAI;IAAA,mCACX,EAAE;EAAA;AAChB;AAEA,eAAe,MAAMM,QAAQ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X,WAAW,CAAC;MAAER,KAAK,EAAE;QAAEW,SAAS,EAAEO;MAAU;IAAE,CAAC,EAClD,MAAK;MACH,IAAI,CAAC,IAAI,CAAClB,KAAK,CAACoB,aAAa,EAAE;QAC7B,IAAI,CAACC,mBAAmB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAACC,KAAK,EAAEJ,SAAS,EAAED,QAAQ,CAAC,CAAC;MAC/E,CAAC,MAAM;QACL,IAAI,CAACjB,KAAK,CAACoB,aAAa,IAAI,IAAI,CAACpB,KAAK,CAACoB,aAAa,CAAC,WAAW,EAAEF,SAAS,EAAED,QAAQ,CAAC;MACxF;MACA,IAAI,CAACI,mBAAmB,CAAC,QAAQ,EAAE,CAAE,IAAI,EAAE,IAAI,CAACC,KAAK,CAAE,CAAC;IAC1D,CAAC,CAAC;EACN;EAEAC,YAAY,CAACvB,KAAoB,EAAE;IACjC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACwB,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","Switch","BaseComponent","BaseComponentState","unStringify","validateField","WmToggleProps","DEFAULT_CLASS","WmToggleState","WmToggle","constructor","props","onPropertyChange","name","$new","$old","value","state","checkedvalue","updateState","isSwitchOn","updateDatavalue","datavalue","validate","validationObj","isValid","errorType","onToggleSwitch","oldValue","dataValue","uncheckedvalue","onFieldChange","invokeEventCallback","proxy","renderWidget","styles","root","_background","text","color","readonly","disabled","bind","setTimeout"],"sources":["toggle.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { Switch } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {unStringify, validateField} from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmToggleProps from './toggle.props';\nimport { DEFAULT_CLASS, WmToggleStyles } from './toggle.styles';\n\nexport class WmToggleState extends BaseComponentState<WmToggleProps> {\n isSwitchOn: boolean = false;\n isValid: boolean = true;\n errorType = '';\n}\n\nexport default class WmToggle extends BaseComponent<WmToggleProps, WmToggleState, WmToggleStyles> {\n\n constructor(props: WmToggleProps) {\n super(props, DEFAULT_CLASS, new WmToggleProps(), new WmToggleState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'datavalue':\n let value =\n unStringify($new) ===\n unStringify(this.state.props.checkedvalue, true);\n this.updateState({ isSwitchOn: value } as WmToggleState);\n break;\n }\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmToggleState);\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 WmToggleState);\n }\n\n onToggleSwitch(value: any) {\n const oldValue = this.state.props.datavalue;\n this.validate(value);\n this.updateState({ isSwitchOn: value } as WmToggleState);\n const dataValue = value === true ? this.state.props.checkedvalue : this.state.props.uncheckedvalue;\n // @ts-ignore\n this.updateState({ props: { datavalue: dataValue } },\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: WmToggleProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <Switch value={this.state.isSwitchOn}\n color={this.styles.text.color as string}\n disabled={props.readonly || props.disabled}\n onValueChange={this.onToggleSwitch.bind(this)}\n onTouchEndCapture={() => {\n // Added setTimeout to smooth animation\n setTimeout(() => {\n if (!props.readonly) {\n this.invokeEventCallback('onFocus', [null, this]);\n }\n this.invokeEventCallback('onTap', [null, this]);\n }, 500);\n }}/>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,aA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C9C,iBAAiB,EAAE,MAAM;QACvB;QACAC,UAAU,CAAC,MAAM;UACf,IAAI,CAAChC,KAAK,CAAC6B,QAAQ,EAAE;YACnB,IAAI,CAACR,mBAAmB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;UACnD;UACA,IAAI,CAACA,mBAAmB,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjD,CAAC,EAAE,GAAG,CAAC;MACT;IAAE,EAAE,CACH;EAEX;AACF"}
|
|
@@ -22,7 +22,7 @@ export default class WmAppNavbar extends BaseComponent {
|
|
|
22
22
|
renderWidget(props) {
|
|
23
23
|
return /*#__PURE__*/React.createElement(View, {
|
|
24
24
|
style: this.styles.root
|
|
25
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
25
|
+
}, this._background, /*#__PURE__*/React.createElement(View, {
|
|
26
26
|
style: this.styles.leftSection
|
|
27
27
|
}, props.showDrawerButton && /*#__PURE__*/React.createElement(WmIcon, {
|
|
28
28
|
styles: this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmIcon","WmPicture","WmAppNavbarProps","DEFAULT_CLASS","WmAppNavbarState","WmAppNavbar","constructor","props","onDrawerBtnPress","invokeEventCallback","bind","onBackBtnPress","onSearchBtnPress","renderWidget","styles","root","leftSection","showDrawerButton","theme","mergeStyle","action","leftnavIcon","leftnavpaneliconclass","backbutton","backIcon","backbuttoniconclass","backbuttonlabel","middleSection","imgsrc","image","content","title","rightSection","searchbutton","searchbuttoniconclass","children"],"sources":["appnavbar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\n\nimport WmAppNavbarProps from './appnavbar.props';\nimport { DEFAULT_CLASS, WmAppNavbarStyles } from './appnavbar.styles';\n\nexport class WmAppNavbarState extends BaseComponentState<WmAppNavbarProps> {\n\n}\n\nexport default class WmAppNavbar extends BaseComponent<WmAppNavbarProps, WmAppNavbarState, WmAppNavbarStyles> {\n\n private onDrawerBtnPress: Function;\n private onBackBtnPress: Function;\n private onSearchBtnPress: Function;\n\n constructor(props: WmAppNavbarProps) {\n super(props, DEFAULT_CLASS, new WmAppNavbarProps());\n this.onDrawerBtnPress = (() => this.invokeEventCallback('onDrawerbuttonpress', [null, this])).bind(this);\n this.onBackBtnPress = (() => this.invokeEventCallback('onBackbtnclick', [null, this])).bind(this);\n this.onSearchBtnPress = (() => this.invokeEventCallback('onSearchbuttonpress', [null, this])).bind(this);\n }\n\n renderWidget(props: WmAppNavbarProps) {\n return (\n <View style={this.styles.root}>\n <View style={this.styles.leftSection}>\n {props.showDrawerButton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon)}\n iconclass={props.leftnavpaneliconclass}\n onTap={this.onDrawerBtnPress}\n />)}\n {props.backbutton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.backIcon)}\n iconclass={props.backbuttoniconclass}\n caption={props.backbuttonlabel}\n onTap={this.onBackBtnPress}/>)}\n </View>\n <View style={this.styles.middleSection}>\n {props.imgsrc && (\n <WmPicture\n styles={this.styles.image}\n picturesource={props.imgsrc} />)}\n <Text style={this.styles.content}>{props.title}</Text>\n </View>\n <View style={this.styles.rightSection}>\n {props.searchbutton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon)}\n iconclass={props.searchbuttoniconclass}\n onTap={this.onSearchBtnPress}\n />)}\n {props.children}\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,sEAAsE;AAE5F,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AAErE,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;AAI3E,eAAe,MAAMM,WAAW,SAASP,aAAa,CAAwD;EAM5GQ,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,gBAAgB,EAAE,CAAC;IAAC;IAAA;IAAA;IACpD,IAAI,CAACM,gBAAgB,GAAG,CAAC,MAAM,IAAI,CAACC,mBAAmB,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAEC,IAAI,CAAC,IAAI,CAAC;IACxG,IAAI,CAACC,cAAc,GAAG,CAAC,MAAM,IAAI,CAACF,mBAAmB,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAEC,IAAI,CAAC,IAAI,CAAC;IACjG,IAAI,CAACE,gBAAgB,GAAG,CAAC,MAAM,IAAI,CAACH,mBAAmB,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAEC,IAAI,CAAC,IAAI,CAAC;EAC1G;EAEAG,YAAY,CAACN,KAAuB,EAAE;IACpC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACO,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","Text","View","BaseComponent","BaseComponentState","WmIcon","WmPicture","WmAppNavbarProps","DEFAULT_CLASS","WmAppNavbarState","WmAppNavbar","constructor","props","onDrawerBtnPress","invokeEventCallback","bind","onBackBtnPress","onSearchBtnPress","renderWidget","styles","root","_background","leftSection","showDrawerButton","theme","mergeStyle","action","leftnavIcon","leftnavpaneliconclass","backbutton","backIcon","backbuttoniconclass","backbuttonlabel","middleSection","imgsrc","image","content","title","rightSection","searchbutton","searchbuttoniconclass","children"],"sources":["appnavbar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\n\nimport WmAppNavbarProps from './appnavbar.props';\nimport { DEFAULT_CLASS, WmAppNavbarStyles } from './appnavbar.styles';\n\nexport class WmAppNavbarState extends BaseComponentState<WmAppNavbarProps> {\n\n}\n\nexport default class WmAppNavbar extends BaseComponent<WmAppNavbarProps, WmAppNavbarState, WmAppNavbarStyles> {\n\n private onDrawerBtnPress: Function;\n private onBackBtnPress: Function;\n private onSearchBtnPress: Function;\n\n constructor(props: WmAppNavbarProps) {\n super(props, DEFAULT_CLASS, new WmAppNavbarProps());\n this.onDrawerBtnPress = (() => this.invokeEventCallback('onDrawerbuttonpress', [null, this])).bind(this);\n this.onBackBtnPress = (() => this.invokeEventCallback('onBackbtnclick', [null, this])).bind(this);\n this.onSearchBtnPress = (() => this.invokeEventCallback('onSearchbuttonpress', [null, this])).bind(this);\n }\n\n renderWidget(props: WmAppNavbarProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <View style={this.styles.leftSection}>\n {props.showDrawerButton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon)}\n iconclass={props.leftnavpaneliconclass}\n onTap={this.onDrawerBtnPress}\n />)}\n {props.backbutton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.backIcon)}\n iconclass={props.backbuttoniconclass}\n caption={props.backbuttonlabel}\n onTap={this.onBackBtnPress}/>)}\n </View>\n <View style={this.styles.middleSection}>\n {props.imgsrc && (\n <WmPicture\n styles={this.styles.image}\n picturesource={props.imgsrc} />)}\n <Text style={this.styles.content}>{props.title}</Text>\n </View>\n <View style={this.styles.rightSection}>\n {props.searchbutton && (<WmIcon\n styles={this.theme.mergeStyle({}, this.styles.action, this.styles.leftnavIcon)}\n iconclass={props.searchbuttoniconclass}\n onTap={this.onSearchBtnPress}\n />)}\n {props.children}\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,sEAAsE;AAE5F,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AAErE,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;AAI3E,eAAe,MAAMM,WAAW,SAASP,aAAa,CAAwD;EAM5GQ,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,gBAAgB,EAAE,CAAC;IAAC;IAAA;IAAA;IACpD,IAAI,CAACM,gBAAgB,GAAG,CAAC,MAAM,IAAI,CAACC,mBAAmB,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAEC,IAAI,CAAC,IAAI,CAAC;IACxG,IAAI,CAACC,cAAc,GAAG,CAAC,MAAM,IAAI,CAACF,mBAAmB,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAEC,IAAI,CAAC,IAAI,CAAC;IACjG,IAAI,CAACE,gBAAgB,GAAG,CAAC,MAAM,IAAI,CAACH,mBAAmB,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAEC,IAAI,CAAC,IAAI,CAAC;EAC1G;EAEAG,YAAY,CAACN,KAAuB,EAAE;IACpC,oBACE,oBAAC,IAAI;MAAC,KAAK,EA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AC,EAAE,IAAI,CAACN,MAAM,CAACO,MAAM,EAAE,IAAI,CAACP,MAAM,CAACQ,WAAW,CAAE;MAC/E,SAAS,EAAEf,KAAK,CAAC4B,qBAAsB;MACvC,KAAK,EAAE,IAAI,CAACvB;IAAiB,EAC1B,EACJL,KAAK,CAAC6B,QAAQ,CACV,CACF;EAEX;AACF"}
|
|
@@ -12,6 +12,7 @@ export class BaseNavProps extends BaseProps {
|
|
|
12
12
|
_defineProperty(this, "itembadge", null);
|
|
13
13
|
_defineProperty(this, "isactive", null);
|
|
14
14
|
_defineProperty(this, "itemchildren", null);
|
|
15
|
+
_defineProperty(this, "getDisplayExpression", label => null);
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=basenav.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","BaseNavProps"],"sources":["basenav.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport class BaseNavProps extends BaseProps {\n dataset?: any = null as any;\n itemlabel?: string | ((item: any) => string) = 'label' as any;\n itemlink?: string | ((item: any) => string) = 'link' as any;\n itemicon?: string | ((item: any) => string) = 'icon' as any;\n itembadge?: string | ((item: any) => string) = null as any;\n isactive?: string | ((item: any) => string) = null as any;\n itemchildren?: string = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,OAAO,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,iCAC1B,IAAI;IAAA,mCAC2B,OAAO;IAAA,kCACR,MAAM;IAAA,kCACN,MAAM;IAAA,mCACL,IAAI;IAAA,kCACL,IAAI;IAAA,sCAC1B,IAAI;EAAA;
|
|
1
|
+
{"version":3,"names":["BaseProps","BaseNavProps","label"],"sources":["basenav.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport class BaseNavProps extends BaseProps {\n dataset?: any = null as any;\n itemlabel?: string | ((item: any) => string) = 'label' as any;\n itemlink?: string | ((item: any) => string) = 'link' as any;\n itemicon?: string | ((item: any) => string) = 'icon' as any;\n itembadge?: string | ((item: any) => string) = null as any;\n isactive?: string | ((item: any) => string) = null as any;\n itemchildren?: string = null as any;\n getDisplayExpression? = (label: string) => null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,OAAO,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA,iCAC1B,IAAI;IAAA,mCAC2B,OAAO;IAAA,kCACR,MAAM;IAAA,kCACN,MAAM;IAAA,mCACL,IAAI;IAAA,kCACL,IAAI;IAAA,sCAC1B,IAAI;IAAA,8CACHE,KAAa,IAAK,IAAW;EAAA;AACxD"}
|
|
@@ -27,9 +27,10 @@ export default class WmMenu extends BaseNavComponent {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
renderMenuItem(item) {
|
|
30
|
+
const getDisplayLabel = this.props.getDisplayExpression || (label => label);
|
|
30
31
|
return /*#__PURE__*/React.createElement(WmAnchor, {
|
|
31
32
|
iconclass: item.icon,
|
|
32
|
-
caption: item.label,
|
|
33
|
+
caption: getDisplayLabel(item.label),
|
|
33
34
|
hyperlink: item.link,
|
|
34
35
|
styles: this.styles.menuItem,
|
|
35
36
|
onTap: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","WmAnchor","BaseNavComponent","BaseNavState","WmPopover","WmMenuProps","DEFAULT_CLASS","WmMenuState","animationMap","slide","fade","scale","WmMenu","constructor","props","onComponentInit","c","popOverRef","renderMenuItem","item","
|
|
1
|
+
{"version":3,"names":["React","View","WmAnchor","BaseNavComponent","BaseNavState","WmPopover","WmMenuProps","DEFAULT_CLASS","WmMenuState","animationMap","slide","fade","scale","WmMenu","constructor","props","onComponentInit","c","popOverRef","renderMenuItem","item","getDisplayLabel","getDisplayExpression","label","icon","link","styles","menuItem","invokeEventCallback","hide","renderWidget","menuItems","state","dataItems","animateitems","caption","iconclass","listener","menu","height","width","map","key"],"sources":["menu.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '../basenav/basenav.component';\nimport WmPopover from '../popover/popover.component';\nimport WmMenuProps from './menu.props';\nimport { DEFAULT_CLASS, WmMenuStyles } from './menu.styles';\n\nexport class WmMenuState <T extends WmMenuProps> extends BaseNavState<T> {}\n\nconst animationMap: any = {\n slide: 'slideInDown',\n fade: 'fadeIn',\n scale: 'zoomIn'\n};\n\nexport default class WmMenu extends BaseNavComponent<WmMenuProps, WmMenuState<WmMenuProps>, WmMenuStyles> {\n\n private popOverRef: WmPopover = null as any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmPopover) {\n this.popOverRef = c;\n }\n }\n };\n\n constructor(props: WmMenuProps) {\n super(props, DEFAULT_CLASS, new WmMenuProps(), new WmMenuState());\n }\n\n renderMenuItem(item: NavigationDataItem) {\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n return (\n <WmAnchor\n iconclass={item.icon as string}\n caption={getDisplayLabel(item.label)}\n hyperlink={item.link}\n styles={this.styles.menuItem}\n onTap={() => {\n this.invokeEventCallback('onSelect', [null, this, item]);\n this.popOverRef.hide();\n }}></WmAnchor>\n );\n }\n\n renderWidget(props: WmMenuProps) {\n const menuItems = this.state.dataItems;\n return (\n <WmPopover styles={this.styles}\n contentanimation={animationMap[props.animateitems || 'scale']}\n caption={props.caption}\n iconclass={props.iconclass}\n listener={this.listener}\n popoverheight={this.styles.menu.height || null}\n popoverwidth={this.styles.menu.width || null}\n iconposition=\"right\"\n type='dropdown'>\n <View style={this.styles.menu}>\n {menuItems.map(item => (\n <View key={item.key}>\n {this.renderMenuItem(item)}\n </View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,CAAC;QACxD,IAAI,CAACF,UAAU,CAACW,IAAI,EAAE;MAC1B;IAAE,EAAY;EAElB;EAEAC,YAAY,CAACf,KAAkB,EAAE;IAC/B,MAAMgB,SAAS,GAAG,IAAI,CAACC,KAAK,CAACC,SAAS;IACtC,oBACE,oBAAC,SAAS;MAAC,MAAM,EAAE,IAAI,CAACP,MAAO;MAC7B,gBAAgB,EAAEjB,YAAY,CAACM,KAAK,CAACmB,YAAY,IAAI,OAAO,CAAE;MAC9D,OAAO,EAAEnB,KAAK,CAACoB,OAAQ;MACvB,SAAS,EAAEpB,KAAK,CAACqB,SAAU;MAC3B,QAAQ,EAAE,IAAI,CAACC,QAAS;MACxB,aAAa,EAAE,IAAI,CAACX,MAAM,CAACY,IAAI,CAACC,MAAM,IAAI,IAAK;MAC/C,YAAY,EAAE,IAAI,CAACb,MAAM,CAACY,IAAI,CAACE,KAAK,IAAI,IAAK;MAC7C,YAAY,EAAC,OAAO;MACpB,IAAI,EAAC;IAAU,gBACb,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACd,MAAM,CAACY;IAAK,GAC3BP,SAAS,CAACU,GAAG,CAACrB,IAAI,iBACjB,oBAAC,IAAI;MAAC,GAAG,EAAEA,IAAI,CAACsB;IAAI,GACjB,IAAI,CAACvB,cAAc,CAACC,IAAI,CAAC,CAE7B,CAAC,CACG,CACC;EAEhB;AACF"}
|
|
@@ -42,6 +42,7 @@ export default class WmNavbar extends BaseNavComponent {
|
|
|
42
42
|
item: item,
|
|
43
43
|
onSelect: props.onSelect,
|
|
44
44
|
styles: item.isactive ? activeItemStyles : itemStyles,
|
|
45
|
+
getDisplayExpression: this.props.getDisplayExpression,
|
|
45
46
|
view: item.childnavigation ? 'dropdown' : 'anchor'
|
|
46
47
|
}, item.childnavigation && /*#__PURE__*/React.createElement(WmNavbar, {
|
|
47
48
|
dataset: item.childnavigation,
|
|
@@ -55,6 +56,7 @@ export default class WmNavbar extends BaseNavComponent {
|
|
|
55
56
|
itemlink: props.itemlink,
|
|
56
57
|
isactive: props.isactive,
|
|
57
58
|
indent: props.indent || indent + indent,
|
|
59
|
+
getDisplayExpression: this.props.getDisplayExpression,
|
|
58
60
|
ischildnav: true
|
|
59
61
|
})));
|
|
60
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","WmNavItem","BaseNavComponent","BaseNavState","WmNavbarProps","DEFAULT_CLASS","WmNavbarState","WmNavbar","constructor","props","computeItemStyles","activeItemStyles","theme","getStyle","itemStyles","indentStyle","indent","navAnchorItem","root","paddingLeft","ischildnav","mergeStyle","renderNavItem","item","styles","childNav","navitem","key","onSelect","isactive","childnavigation","type","layout","itemlabel","itembadge","itemicon","itemchildren","itemlink","renderWidget","navItems","state","dataItems","childElements","children","styleName","nav","length","map"],"sources":["navbar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport WmNavItem from '@wavemaker/app-rn-runtime/components/navigation/navitem/navitem.component';\nimport { BaseNavComponent, NavigationDataItem, BaseNavState } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\n\nimport WmNavbarProps from './navbar.props';\nimport { DEFAULT_CLASS, WmNavbarStyles } from './navbar.styles';\n\nclass WmNavbarState<T extends BaseNavProps> extends BaseNavState<T> {}\n\nexport default class WmNavbar extends BaseNavComponent<WmNavbarProps, WmNavbarState<WmNavbarProps>, WmNavbarStyles> {\n constructor(props: WmNavbarProps) {\n super(props, DEFAULT_CLASS, new WmNavbarProps(), new WmNavbarState());\n }\n\n computeItemStyles(props: WmNavbarProps) {\n let activeItemStyles = this.theme.getStyle('app-navitem-active');\n let itemStyles = this.theme.getStyle('app-navitem');\n const indentStyle = props.indent ? {\n navAnchorItem: {\n root: {\n paddingLeft: props.indent\n }\n }\n } : null;\n if (props.ischildnav) {\n itemStyles = this.theme.mergeStyle({}, itemStyles, this.theme.getStyle('app-navitem-child'));\n }\n activeItemStyles = this.theme.mergeStyle({}, activeItemStyles, indentStyle);\n itemStyles = this.theme.mergeStyle({}, itemStyles, indentStyle);\n return {activeItemStyles, itemStyles};\n }\n\n renderNavItem(item: NavigationDataItem, props: WmNavbarProps) {\n const indent = this.styles.childNav.paddingLeft as number || 0;\n const {activeItemStyles, itemStyles} = this.computeItemStyles(props);\n return (\n <View style={this.styles.navitem} key={item.key} >\n <WmNavItem item={item}\n onSelect={props.onSelect}\n styles={item.isactive ? activeItemStyles: itemStyles}\n view={item.childnavigation ? 'dropdown' : 'anchor'}>\n {item.childnavigation && (\n <WmNavbar\n dataset={item.childnavigation}\n type={props.type}\n styles={this.styles}\n layout={props.layout}\n itemlabel={props.itemlabel}\n itembadge={props.itembadge}\n itemicon={props.itemicon}\n itemchildren={props.itemchildren}\n itemlink={props.itemlink}\n isactive={props.isactive}\n indent={props.indent || indent + indent}\n ischildnav={true}>\n </WmNavbar>)}\n </WmNavItem>\n </View>\n );\n }\n\n renderWidget(props: WmNavbarProps) {\n const navItems = this.state.dataItems;\n let childElements = props.children;\n const styleName = props.layout + 'Nav';\n\n return (\n <View style={[this.theme.getStyle(styleName), this.styles.nav]}>\n { navItems && navItems.length ? navItems.map(item => {\n return this.renderNavItem(item, props);\n }) : childElements\n }\n </View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,SAAS,MAAM,2EAA2E;AACjG,SAASC,gBAAgB,EAAsBC,YAAY,QAAQ,2EAA2E;AAG9I,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,MAAMC,aAAa,SAAiCH,YAAY,CAAI;AAEpE,eAAe,MAAMI,QAAQ,SAASL,gBAAgB,CAA8D;EAClHM,WAAW,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,aAAa,EAAE,E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,CAACmB,QAAS;MACzB,MAAM,EAAEL,IAAI,CAACM,QAAQ,GAAGlB,gBAAgB,GAAEG,UAAW;MACrD,IAAI,
|
|
1
|
+
{"version":3,"names":["React","View","WmNavItem","BaseNavComponent","BaseNavState","WmNavbarProps","DEFAULT_CLASS","WmNavbarState","WmNavbar","constructor","props","computeItemStyles","activeItemStyles","theme","getStyle","itemStyles","indentStyle","indent","navAnchorItem","root","paddingLeft","ischildnav","mergeStyle","renderNavItem","item","styles","childNav","navitem","key","onSelect","isactive","getDisplayExpression","childnavigation","type","layout","itemlabel","itembadge","itemicon","itemchildren","itemlink","renderWidget","navItems","state","dataItems","childElements","children","styleName","nav","length","map"],"sources":["navbar.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport WmNavItem from '@wavemaker/app-rn-runtime/components/navigation/navitem/navitem.component';\nimport { BaseNavComponent, NavigationDataItem, BaseNavState } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\n\nimport WmNavbarProps from './navbar.props';\nimport { DEFAULT_CLASS, WmNavbarStyles } from './navbar.styles';\n\nclass WmNavbarState<T extends BaseNavProps> extends BaseNavState<T> {}\n\nexport default class WmNavbar extends BaseNavComponent<WmNavbarProps, WmNavbarState<WmNavbarProps>, WmNavbarStyles> {\n constructor(props: WmNavbarProps) {\n super(props, DEFAULT_CLASS, new WmNavbarProps(), new WmNavbarState());\n }\n\n computeItemStyles(props: WmNavbarProps) {\n let activeItemStyles = this.theme.getStyle('app-navitem-active');\n let itemStyles = this.theme.getStyle('app-navitem');\n const indentStyle = props.indent ? {\n navAnchorItem: {\n root: {\n paddingLeft: props.indent\n }\n }\n } : null;\n if (props.ischildnav) {\n itemStyles = this.theme.mergeStyle({}, itemStyles, this.theme.getStyle('app-navitem-child'));\n }\n activeItemStyles = this.theme.mergeStyle({}, activeItemStyles, indentStyle);\n itemStyles = this.theme.mergeStyle({}, itemStyles, indentStyle);\n return {activeItemStyles, itemStyles};\n }\n\n renderNavItem(item: NavigationDataItem, props: WmNavbarProps) {\n const indent = this.styles.childNav.paddingLeft as number || 0;\n const {activeItemStyles, itemStyles} = this.computeItemStyles(props);\n return (\n <View style={this.styles.navitem} key={item.key} >\n <WmNavItem item={item}\n onSelect={props.onSelect}\n styles={item.isactive ? activeItemStyles: itemStyles}\n getDisplayExpression={this.props.getDisplayExpression} \n view={item.childnavigation ? 'dropdown' : 'anchor'}>\n {item.childnavigation && (\n <WmNavbar\n dataset={item.childnavigation}\n type={props.type}\n styles={this.styles}\n layout={props.layout}\n itemlabel={props.itemlabel}\n itembadge={props.itembadge}\n itemicon={props.itemicon}\n itemchildren={props.itemchildren}\n itemlink={props.itemlink}\n isactive={props.isactive}\n indent={props.indent || indent + indent}\n getDisplayExpression={this.props.getDisplayExpression} \n ischildnav={true}>\n </WmNavbar>)}\n </WmNavItem>\n </View>\n );\n }\n\n renderWidget(props: WmNavbarProps) {\n const navItems = this.state.dataItems;\n let childElements = props.children;\n const styleName = props.layout + 'Nav';\n\n return (\n <View style={[this.theme.getStyle(styleName), this.styles.nav]}>\n { navItems && navItems.length ? navItems.map(item => {\n return this.renderNavItem(item, props);\n }) : childElements\n }\n </View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,SAAS,MAAM,2EAA2E;AACjG,SAASC,gBAAgB,EAAsBC,YAAY,QAAQ,2EAA2E;AAG9I,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAE/D,MAAMC,aAAa,SAAiCH,YAAY,CAAI;AAEpE,eAAe,MAAMI,QAAQ,SAASL,gBAAgB,CAA8D;EAClHM,WAAW,CAACC,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,aAAa,EAAE,EAAE,IAAIE,aAAa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ACjD,OAAO,IAAI,CAACD,aAAa,CAACC,IAAI,EAAEd,KAAK,CAAC;IACxC,CAAC,CAAC,GAAGkC,aAAa,CAEjB;EAEX;AACF"}
|
|
@@ -23,11 +23,12 @@ export default class WmNavItem extends BaseComponent {
|
|
|
23
23
|
cb && cb($event, this, $item);
|
|
24
24
|
}
|
|
25
25
|
renderWidget(props) {
|
|
26
|
+
const getDisplayLabel = this.props.getDisplayExpression || (label => label);
|
|
26
27
|
let child = props.children;
|
|
27
28
|
if (props.view === 'anchor') {
|
|
28
29
|
child = /*#__PURE__*/React.createElement(WmAnchor, {
|
|
29
30
|
styles: this.styles.navAnchorItem,
|
|
30
|
-
caption: props.item.label,
|
|
31
|
+
caption: getDisplayLabel(props.item.label),
|
|
31
32
|
hyperlink: props.item.link,
|
|
32
33
|
badgevalue: props.item.badge,
|
|
33
34
|
iconclass: props.item.icon,
|
|
@@ -45,7 +46,7 @@ export default class WmNavItem extends BaseComponent {
|
|
|
45
46
|
style: this.styles.dropdownNav
|
|
46
47
|
}, /*#__PURE__*/React.createElement(WmAnchor, {
|
|
47
48
|
styles: this.styles.navAnchorItem,
|
|
48
|
-
caption: props.item.label,
|
|
49
|
+
caption: getDisplayLabel(props.item.label),
|
|
49
50
|
iconclass: props.item.icon,
|
|
50
51
|
onTap: this.onSelectItem.bind(this, props.onSelect, props.item)
|
|
51
52
|
}), /*#__PURE__*/React.createElement(WmIcon, {
|
|
@@ -55,7 +56,7 @@ export default class WmNavItem extends BaseComponent {
|
|
|
55
56
|
}
|
|
56
57
|
return /*#__PURE__*/React.createElement(View, {
|
|
57
58
|
style: this.styles.root
|
|
58
|
-
}, child);
|
|
59
|
+
}, this._background, child);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
//# sourceMappingURL=navitem.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","TouchableOpacity","BaseComponent","BaseComponentState","WmAnchor","WmIcon","WmNavItemProps","DEFAULT_CLASS","WmNavItemState","WmNavItem","constructor","props","onSelectItem","cb","$item","$event","renderWidget","child","children","view","styles","navAnchorItem","item","
|
|
1
|
+
{"version":3,"names":["React","View","TouchableOpacity","BaseComponent","BaseComponentState","WmAnchor","WmIcon","WmNavItemProps","DEFAULT_CLASS","WmNavItemState","WmNavItem","constructor","props","onSelectItem","cb","$item","$event","renderWidget","getDisplayLabel","getDisplayExpression","label","child","children","view","styles","navAnchorItem","item","link","badge","icon","bind","onSelect","updateState","collapsed","state","dropdownNav","caretIcon","root","_background"],"sources":["navitem.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { TouchableOpacity } from 'react-native-gesture-handler';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmNavItemProps from './navitem.props';\nimport { DEFAULT_CLASS, WmNavItemStyles } from './navitem.styles';\nimport { NavigationDataItem } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component\";\nimport { TapEvent } from \"@wavemaker/app-rn-runtime/core/tappable.component\";\n\nexport class WmNavItemState extends BaseComponentState<WmNavItemProps> {\n collapsed = true;\n}\n\nexport default class WmNavItem extends BaseComponent<WmNavItemProps, WmNavItemState, WmNavItemStyles> {\n\n constructor(props: WmNavItemProps) {\n super(props, DEFAULT_CLASS, new WmNavItemProps(), new WmNavItemState());\n }\n\n onSelectItem(cb: any, $item: NavigationDataItem, $event: TapEvent) {\n cb && cb($event, this, $item);\n }\n\n renderWidget(props: WmNavItemProps) {\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n let child = props.children;\n if (props.view === 'anchor') {\n child = <WmAnchor styles={this.styles.navAnchorItem} caption={getDisplayLabel(props.item.label)} hyperlink={props.item.link}\n badgevalue={props.item.badge} iconclass={props.item.icon} onTap={this.onSelectItem.bind(this, props.onSelect, props.item)}></WmAnchor>\n }\n if (props.view === 'dropdown') {\n child = (\n <>\n <TouchableOpacity onPress={() => {\n this.updateState({collapsed: !this.state.collapsed} as WmNavItemState);\n }}>\n <View style={this.styles.dropdownNav}>\n <WmAnchor styles={this.styles.navAnchorItem} caption={getDisplayLabel(props.item.label)} iconclass={props.item.icon} onTap={this.onSelectItem.bind(this, props.onSelect, props.item)}></WmAnchor>\n <WmIcon styles={this.styles.caretIcon} iconclass={this.state.collapsed ? 'fa fa-sort-down' : 'fa fa-sort-up'}></WmIcon>\n </View>\n </TouchableOpacity>\n {!this.state.collapsed && props.children}\n </>\n );\n }\n return (\n <View style={this.styles.root}>{this._background}{child}</View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,gBAAgB,QAAQ,8BAA8B;AAE/D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAIjE,OAAO,MAAMC,cAAc,SAASL,kBAAkB,CAAiB;EAAA;IAAA;IAAA,mCACzD,IAAI;EAAA;AAClB;AAEA,eAAe,MAAMM,SAAS,SAASP,aAAa,CAAkD;EAEpGQ,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,cAAc,EAAE,EAAE,IAAIE,cAAc,EAAE,CAAC;EACzE;EAEAI,YAAY,CAACC,EAAO,EAAEC,KAAyB,EAAEC,MAAgB,EAAE;IACjEF,EAAE,IAAIA,EAAE,CAACE,MAAM,EAAE,IAAI,EAAED,KAAK,CAAC;EAC/B;EAEAE,YAAY,CAACL,KAAqB,EAAE;IAClC,MAAMM,eAAe,GAAG,IAAI,CAACN,KAAK,CAACO,oBA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AACY,SAAU;QAAC,SAAS,EAAE,IAAI,CAACF,KAAK,CAACD,SAAS,GAAG,iBAAiB,GAAG;MAAgB,EAAU,CAClH,CACU,EAClB,CAAC,IAAI,CAACC,KAAK,CAACD,SAAS,IAAIrB,KAAK,CAACU,QAAQ,CAEzC;IACH;IACA,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACa;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEjB,KAAK,CAAQ;EAEnE;AACF"}
|
|
@@ -10,6 +10,7 @@ export default class WmNavItemProps extends BaseProps {
|
|
|
10
10
|
_defineProperty(this, "item", []);
|
|
11
11
|
_defineProperty(this, "view", 'default');
|
|
12
12
|
_defineProperty(this, "onSelect", ($event, target, $item) => {});
|
|
13
|
+
_defineProperty(this, "getDisplayExpression", label => null);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=navitem.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmNavItemProps","$event","target","$item"],"sources":["navitem.props.ts"],"sourcesContent":["import {BaseComponent, BaseProps} from '@wavemaker/app-rn-runtime/core/base.component';\nimport {NavigationDataItem} from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component\";\nimport {TapEvent} from \"@wavemaker/app-rn-runtime/core/tappable.component\";\n\nexport default class WmNavItemProps extends BaseProps {\n children?: any;\n caption?: string;\n item: any = [];\n view: 'default' | 'dropdown' | 'anchor' = 'default';\n onSelect? = ($event: TapEvent, target: any, $item: NavigationDataItem) => {};\n}\n"],"mappings":";;;AAAA,SAAuBA,SAAS,QAAO,+CAA+C;AAItF,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA;IAAA;IAAA,8BAGxC,EAAE;IAAA,8BAC4B,SAAS;IAAA,kCACvC,CAACE,MAAgB,EAAEC,MAAW,EAAEC,KAAyB,KAAK,CAAC,CAAC;EAAA;
|
|
1
|
+
{"version":3,"names":["BaseProps","WmNavItemProps","$event","target","$item","label"],"sources":["navitem.props.ts"],"sourcesContent":["import {BaseComponent, BaseProps} from '@wavemaker/app-rn-runtime/core/base.component';\nimport {NavigationDataItem} from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component\";\nimport {TapEvent} from \"@wavemaker/app-rn-runtime/core/tappable.component\";\n\nexport default class WmNavItemProps extends BaseProps {\n children?: any;\n caption?: string;\n item: any = [];\n view: 'default' | 'dropdown' | 'anchor' = 'default';\n onSelect? = ($event: TapEvent, target: any, $item: NavigationDataItem) => {};\n getDisplayExpression? = (label: string) => null as any;\n}\n"],"mappings":";;;AAAA,SAAuBA,SAAS,QAAO,+CAA+C;AAItF,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAA;IAAA;IAAA;IAAA;IAAA,8BAGxC,EAAE;IAAA,8BAC4B,SAAS;IAAA,kCACvC,CAACE,MAAgB,EAAEC,MAAW,EAAEC,KAAyB,KAAK,CAAC,CAAC;IAAA,8CACnDC,KAAa,IAAK,IAAW;EAAA;AACxD"}
|
|
@@ -93,7 +93,7 @@ export default class WmPopover extends BaseComponent {
|
|
|
93
93
|
ref: ref => {
|
|
94
94
|
this.view = ref;
|
|
95
95
|
}
|
|
96
|
-
}, /*#__PURE__*/React.createElement(WmAnchor, {
|
|
96
|
+
}, this._background, /*#__PURE__*/React.createElement(WmAnchor, {
|
|
97
97
|
animation: props.animation,
|
|
98
98
|
caption: props.caption,
|
|
99
99
|
badgevalue: props.badgevalue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","isString","TouchableOpacity","Text","View","ScrollView","Dimensions","BaseComponent","BaseComponentState","ModalConsumer","WmAnchor","WmPopoverProps","DEFAULT_CLASS","WmContainer","WmPopoverState","WmPopover","constructor","props","e","position","state","type","windowDimensions","get","view","measure","x","y","width","height","px","py","popoverwidth","parseInt","left","top","updateState","setState","isOpened","invokeEventCallback","stopPropagation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","autoclose","centered","animation","contentanimation","onClose","hide","isPartialLoaded","hideModal","renderWidget","dimensions","theme","mergeStyle","getStyle","popoverheight","root","computePosition","ref","caption","badgevalue","iconclass","iconposition","link","showPopover","showModal","popover","title","popoverContent","renderPartial","children"],"sources":["popover.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isString } from 'lodash-es';\nimport { LayoutChangeEvent, TouchableOpacity, Text, View, ScrollView, Dimensions } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { TapEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\n\nimport WmPopoverProps from './popover.props';\nimport { DEFAULT_CLASS, WmPopoverStyles } from './popover.styles';\nimport WmContainer from '../../container/container.component';\n\nexport class WmPopoverState extends BaseComponentState<WmPopoverProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {} as PopoverPosition;\n isPartialLoaded = false;\n}\n\nexport interface PopoverPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmPopover extends BaseComponent<WmPopoverProps, WmPopoverState, WmPopoverStyles> {\n\n view: View = null as any;\n\n constructor(props: WmPopoverProps) {\n super(props, DEFAULT_CLASS, new WmPopoverProps(), new WmPopoverState());\n }\n\n private computePosition = (e: LayoutChangeEvent) => {\n const position = {} as PopoverPosition;\n if (this.state.props.type === 'dropdown') {\n const windowDimensions = Dimensions.get('window');\n this.view.measure((x, y, width, height, px, py) => {\n let popoverwidth = this.state.props.popoverwidth as any;\n if (popoverwidth && isString(popoverwidth)) {\n popoverwidth = parseInt(popoverwidth);\n }\n position.left = px;\n if (px + popoverwidth > windowDimensions.width) {\n position.left = px + width - popoverwidth;\n }\n position.top = py + height;\n this.updateState({position: position} as WmPopoverState);\n });\n }\n };\n\n public showPopover = (e?: TapEvent) => {\n this.setState({ isOpened: true });\n this.invokeEventCallback('onShow', [e, this]);\n e?.stopPropagation();\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmPopoverStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent, ...this.state.position};\n o.content = content;\n o.isModal = this.state.props.autoclose !== 'disabled';\n o.centered = true;\n o.animation = this.state.props.contentanimation || 'slideInUp';\n o.onClose = () => {\n this.hide = () => {};\n this.setState({ isOpened: false, isPartialLoaded: false, modalOptions: {} as ModalOptions });\n this.invokeEventCallback('onHide', [null, this]);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmPopoverProps) {\n let dimensions = {} as any;\n const styles = this.theme.mergeStyle(this.theme.getStyle('popover-' + props.type), this.styles);\n if (props.type === 'dropdown') {\n if (props.popoverwidth) {\n dimensions.width = props.popoverwidth;\n styles.modalContent.width = props.popoverwidth;\n }\n if (props.popoverheight) {\n dimensions.height = props.popoverheight;\n }\n }\n return (\n <View style={styles.root} onLayout={this.computePosition} ref={ref => {this.view = ref as View}}>\n <WmAnchor\n animation={props.animation}\n caption={props.caption}\n badgevalue={props.badgevalue}\n iconclass={props.iconclass}\n iconposition={props.iconposition}\n styles={styles.link}\n onTap={this.showPopover}></WmAnchor>\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={this.theme.mergeStyle(styles.popover, dimensions)}>\n {props.title ? (<Text style={styles.title}>{props.title}</Text>): null}\n <TouchableOpacity activeOpacity={1} onPress={() => {\n props.autoclose === 'always' && this.hide()\n }} style={styles.popoverContent.root}>\n <WmContainer\n styles={styles.popoverContent}\n onLoad={() => this.invokeEventCallback('onLoad', [this])}\n renderPartial={props.renderPartial}>\n {props.renderPartial ? null : props.children}\n </WmContainer>\n </TouchableOpacity>\n </ScrollView>\n ), styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAA4BC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AACtG,SAASC,aAAa,EAAEC,kBAAkB,QAAmB,+CAA+C;AAG5G,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,WAAW,MAAM,qCAAqC;AAE7D,OAAO,MAAMC,cAAc,SAASN,kBAAkB,CAAiB;EAAA;IAAA;IAAA,kCACjD,KAAK;IAAA,sCACV,CAAC,CAAC;IAAA,kCACN,CAAC,CAAC;IAAA,yCACK,KAAK;EAAA;AACzB;AASA,eAAe,MAAMO,SAAS,SAASR,aAAa,CAAkD;EAIpGS,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,cAAc,EAAE,EAAE,IAAIG,cAAc,EAAE,CAAC;IAAC,8BAH7D,IAAI;IAAA,yCAMUI,CAAoB,IAAK;MAClD,MAAMC,QAAQ,GAAG,CAAC,CAAoB;MACtC,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,IAAI,KAAK,UAAU,EAAE;QACxC,MAAMC,gBAAgB,GAAGhB,UAAU,CAACiB,GAAG,CAAC,QAAQ,CAAC;QACjD,IAAI,CAACC,IAAI,CAACC,OAAO,CAAC,CAACC,CAAC,EAAEC,CAAC,EAAEC,KAAK,EAAEC,MAAM,EAAEC,EAAE,EAAEC,EAAE,KAAK;UACjD,IAAIC,YAAY,GAAG,IAAI,CAACZ,KAAK,CAACH,KAAK,CAACe,Y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AY,CAAC,CAAC;MACzB,OAAO,IAAI;IACb,CAAC,CACa,GAAI,IAAI,CACrB;EACX;AACF"}
|
|
1
|
+
{"version":3,"names":["React","isString","TouchableOpacity","Text","View","ScrollView","Dimensions","BaseComponent","BaseComponentState","ModalConsumer","WmAnchor","WmPopoverProps","DEFAULT_CLASS","WmContainer","WmPopoverState","WmPopover","constructor","props","e","position","state","type","windowDimensions","get","view","measure","x","y","width","height","px","py","popoverwidth","parseInt","left","top","updateState","setState","isOpened","invokeEventCallback","stopPropagation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","autoclose","centered","animation","contentanimation","onClose","hide","isPartialLoaded","hideModal","renderWidget","dimensions","theme","mergeStyle","getStyle","popoverheight","root","computePosition","ref","_background","caption","badgevalue","iconclass","iconposition","link","showPopover","showModal","popover","title","popoverContent","renderPartial","children"],"sources":["popover.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isString } from 'lodash-es';\nimport { LayoutChangeEvent, TouchableOpacity, Text, View, ScrollView, Dimensions } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { TapEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\n\nimport WmPopoverProps from './popover.props';\nimport { DEFAULT_CLASS, WmPopoverStyles } from './popover.styles';\nimport WmContainer from '../../container/container.component';\n\nexport class WmPopoverState extends BaseComponentState<WmPopoverProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {} as PopoverPosition;\n isPartialLoaded = false;\n}\n\nexport interface PopoverPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmPopover extends BaseComponent<WmPopoverProps, WmPopoverState, WmPopoverStyles> {\n\n view: View = null as any;\n\n constructor(props: WmPopoverProps) {\n super(props, DEFAULT_CLASS, new WmPopoverProps(), new WmPopoverState());\n }\n\n private computePosition = (e: LayoutChangeEvent) => {\n const position = {} as PopoverPosition;\n if (this.state.props.type === 'dropdown') {\n const windowDimensions = Dimensions.get('window');\n this.view.measure((x, y, width, height, px, py) => {\n let popoverwidth = this.state.props.popoverwidth as any;\n if (popoverwidth && isString(popoverwidth)) {\n popoverwidth = parseInt(popoverwidth);\n }\n position.left = px;\n if (px + popoverwidth > windowDimensions.width) {\n position.left = px + width - popoverwidth;\n }\n position.top = py + height;\n this.updateState({position: position} as WmPopoverState);\n });\n }\n };\n\n public showPopover = (e?: TapEvent) => {\n this.setState({ isOpened: true });\n this.invokeEventCallback('onShow', [e, this]);\n e?.stopPropagation();\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmPopoverStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent, ...this.state.position};\n o.content = content;\n o.isModal = this.state.props.autoclose !== 'disabled';\n o.centered = true;\n o.animation = this.state.props.contentanimation || 'slideInUp';\n o.onClose = () => {\n this.hide = () => {};\n this.setState({ isOpened: false, isPartialLoaded: false, modalOptions: {} as ModalOptions });\n this.invokeEventCallback('onHide', [null, this]);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmPopoverProps) {\n let dimensions = {} as any;\n const styles = this.theme.mergeStyle(this.theme.getStyle('popover-' + props.type), this.styles);\n if (props.type === 'dropdown') {\n if (props.popoverwidth) {\n dimensions.width = props.popoverwidth;\n styles.modalContent.width = props.popoverwidth;\n }\n if (props.popoverheight) {\n dimensions.height = props.popoverheight;\n }\n }\n return (\n <View style={styles.root} onLayout={this.computePosition} ref={ref => {this.view = ref as View}}>\n {this._background}\n <WmAnchor\n animation={props.animation}\n caption={props.caption}\n badgevalue={props.badgevalue}\n iconclass={props.iconclass}\n iconposition={props.iconposition}\n styles={styles.link}\n onTap={this.showPopover}></WmAnchor>\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={this.theme.mergeStyle(styles.popover, dimensions)}>\n {props.title ? (<Text style={styles.title}>{props.title}</Text>): null}\n <TouchableOpacity activeOpacity={1} onPress={() => {\n props.autoclose === 'always' && this.hide()\n }} style={styles.popoverContent.root}>\n <WmContainer\n styles={styles.popoverContent}\n onLoad={() => this.invokeEventCallback('onLoad', [this])}\n renderPartial={props.renderPartial}>\n {props.renderPartial ? null : props.children}\n </WmContainer>\n </TouchableOpacity>\n </ScrollView>\n ), styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAA4BC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AACtG,SAASC,aAAa,EAAEC,kBAAkB,QAAmB,+CAA+C;AAG5G,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,WAAW,MAAM,qCAAqC;AAE7D,OAAO,MAAMC,cAAc,SAASN,kBAAkB,CAAiB;EAAA;IAAA;IAAA,kCACjD,KAAK;IAAA,sCACV,CAAC,CAAC;IAAA,kCACN,CAAC,CAAC;IAAA,yCACK,KAAK;EAAA;AACzB;AASA,eAAe,MAAMO,SAAS,SAASR,aAAa,CAAkD;EAIpGS,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,cAAc,EAAE,EAAE,IAAIG,cAAc,EAAE,CAAC;IAAC,8BAH7D,IAAI;IAAA,yCAMUI,CAAoB,IAAK;MAClD,MA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AI,CAACK,IAAI,EAAE;QAC7C,CAAE;QAAC,KAAK,EAAEd,MAAM,CAACoC,cAAc,CAACb;MAAK,gBACnC,oBAAC,WAAW;QACV,MAAM,EAAEvB,MAAM,CAACoC,cAAe;QAC9B,MAAM,EAAE,MAAM,IAAI,CAACxC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAE;QACzD,aAAa,EAAEtB,KAAK,CAAC+D;MAAc,GAChC/D,KAAK,CAAC+D,aAAa,GAAG,IAAI,GAAG/D,KAAK,CAACgE,QAAQ,CAClC,CACG,CACR,EACdtC,MAAM,EAAEC,YAAY,CAAC,CAAC;MACzB,OAAO,IAAI;IACb,CAAC,CACa,GAAI,IAAI,CACrB;EACX;AACF"}
|
|
@@ -10,7 +10,7 @@ export default class WmContent extends BaseComponent {
|
|
|
10
10
|
renderWidget(props) {
|
|
11
11
|
return /*#__PURE__*/React.createElement(View, {
|
|
12
12
|
style: this.styles.root
|
|
13
|
-
}, props.children);
|
|
13
|
+
}, this._background, props.children);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=content.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmContentState","WmContent","constructor","props","renderWidget","styles","root","children"],"sources":["content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmContentProps from './content.props';\nimport { DEFAULT_CLASS, WmContentStyles } from './content.styles';\n\nexport class WmContentState extends BaseComponentState<WmContentProps> {\n\n}\n\nexport default class WmContent extends BaseComponent<WmContentProps, WmContentState, WmContentStyles> {\n\n constructor(props: WmContentProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmContentProps) {\n return (\n <View style={this.styles.root}>\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASF,kBAAkB,CAAiB;AAIvE,eAAe,MAAMG,SAAS,SAASJ,aAAa,CAAkD;EAEpGK,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAAqB,EAAE;IAClC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmContentState","WmContent","constructor","props","renderWidget","styles","root","_background","children"],"sources":["content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmContentProps from './content.props';\nimport { DEFAULT_CLASS, WmContentStyles } from './content.styles';\n\nexport class WmContentState extends BaseComponentState<WmContentProps> {\n\n}\n\nexport default class WmContent extends BaseComponent<WmContentProps, WmContentState, WmContentStyles> {\n\n constructor(props: WmContentProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmContentProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASF,kBAAkB,CAAiB;AAIvE,eAAe,MAAMG,SAAS,SAASJ,aAAa,CAAkD;EAEpGK,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,CAAG;EAC/B;EAEAK,YAAY,CAACD,KAAqB,EAAE;IAClC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBJ,KAAK,CAACK,QAAQ,CACV;EAEX;AACF"}
|
|
@@ -35,7 +35,7 @@ export default class WmLeftPanel extends BaseComponent {
|
|
|
35
35
|
renderWidget(props) {
|
|
36
36
|
return /*#__PURE__*/React.createElement(ScrollView, {
|
|
37
37
|
contentContainerStyle: this.styles.root
|
|
38
|
-
}, this.renderContent(props));
|
|
38
|
+
}, this._background, this.renderContent(props));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=left-panel.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","BaseComponent","BaseComponentState","WmLeftPanelProps","DEFAULT_CLASS","ScrollView","WmLeftPanelState","WmLeftPanel","constructor","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","styles","root"],"sources":["left-panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLeftPanelProps from './left-panel.props';\nimport { DEFAULT_CLASS, WmLeftPanelStyles } from './left-panel.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nexport class WmLeftPanelState extends BaseComponentState<WmLeftPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmLeftPanel extends BaseComponent<WmLeftPanelProps, WmLeftPanelState, WmLeftPanelStyles> {\n\n constructor(props: WmLeftPanelProps) {\n super(props, DEFAULT_CLASS, new WmLeftPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmLeftPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmLeftPanelState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmLeftPanelProps) {\n return (\n <ScrollView contentContainerStyle={this.styles.root}>\n {this.renderContent(props)}\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAO,MAAMC,gBAAgB,SAASJ,kBAAkB,CAAmB;EAAA;IAAA;IAAA,yCACvD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMK,WAAW,SAASN,aAAa,CAAwD;EAE5GO,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,gBAAgB,EAAE,CAAC;EACrD;EAEAO,aAAa,GAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAa,CAACH,KAAuB,EAAE;IACrC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAC,CAAqB;QACxB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAAC,IAAI,CAACH,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,YAAY,CAACX,KAAuB,EAAE;IACpC,oBACE,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACY,MAAM,CAACC;IAAK,GACjD,IAAI,
|
|
1
|
+
{"version":3,"names":["React","BaseComponent","BaseComponentState","WmLeftPanelProps","DEFAULT_CLASS","ScrollView","WmLeftPanelState","WmLeftPanel","constructor","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","styles","root","_background"],"sources":["left-panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLeftPanelProps from './left-panel.props';\nimport { DEFAULT_CLASS, WmLeftPanelStyles } from './left-panel.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nexport class WmLeftPanelState extends BaseComponentState<WmLeftPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmLeftPanel extends BaseComponent<WmLeftPanelProps, WmLeftPanelState, WmLeftPanelStyles> {\n\n constructor(props: WmLeftPanelProps) {\n super(props, DEFAULT_CLASS, new WmLeftPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmLeftPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmLeftPanelState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmLeftPanelProps) {\n return (\n <ScrollView contentContainerStyle={this.styles.root}>\n {this._background}\n {this.renderContent(props)}\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAO,MAAMC,gBAAgB,SAASJ,kBAAkB,CAAmB;EAAA;IAAA;IAAA,yCACvD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMK,WAAW,SAASN,aAAa,CAAwD;EAE5GO,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,gBAAgB,EAAE,CAAC;EACrD;EAEAO,aAAa,GAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAa,CAACH,KAAuB,EAAE;IACrC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAC,CAAqB;QACxB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAAC,IAAI,CAACH,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,YAAY,CAACX,KAAuB,EAAE;IACpC,oBACE,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACY,MAAM,CAACC;IAAK,GACjD,IAAI,CAACC,WAAW,EAChB,IAAI,CAACX,aAAa,CAACH,KAAK,CAAC,CACf;EAEjB;AACF"}
|
|
@@ -14,9 +14,9 @@ export default class WmPageContent extends BaseComponent {
|
|
|
14
14
|
renderWidget(props) {
|
|
15
15
|
return props.scrollable || isWebPreviewMode() ? /*#__PURE__*/React.createElement(ScrollView, {
|
|
16
16
|
contentContainerStyle: this.styles.root
|
|
17
|
-
}, props.children) : /*#__PURE__*/React.createElement(View, {
|
|
17
|
+
}, this._background, props.children) : /*#__PURE__*/React.createElement(View, {
|
|
18
18
|
style: this.styles.root
|
|
19
|
-
}, props.children);
|
|
19
|
+
}, this._background, props.children);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=page-content.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ScrollView","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","WmPageContentState","WmPageContent","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderWidget","scrollable","styles","root","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n\n}\n\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n renderWidget(props: WmPageContentProps) {\n return props.scrollable || isWebPreviewMode() ? (\n <ScrollView contentContainerStyle={this.styles.root}>\n {props.children}\n </ScrollView>\n ) : (\n <View style={this.styles.root}>\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAE1E,OAAO,MAAMC,kBAAkB,SAASH,kBAAkB,CAAqB;AAI/E,eAAe,MAAMI,aAAa,SAASL,aAAa,CAA8D;EAEpHM,WAAW,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,kBAAkB,EAAE,CAAC;IACrD,IAAI,CAACM,QAAQ,GAAGT,QAAQ,CAACU,gBAAgB;EAC3C;EAEAC,YAAY,CAACH,KAAyB,EAAE;IACtC,OAAOA,KAAK,CAACI,UAAU,IAAIb,gBAAgB,EAAE,gBAC3C,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACc,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","ScrollView","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","WmPageContentState","WmPageContent","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderWidget","scrollable","styles","root","_background","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n\n}\n\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n renderWidget(props: WmPageContentProps) {\n return props.scrollable || isWebPreviewMode() ? (\n <ScrollView contentContainerStyle={this.styles.root}>\n {this._background}\n {props.children}\n </ScrollView>\n ) : (\n <View style={this.styles.root}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAE1E,OAAO,MAAMC,kBAAkB,SAASH,kBAAkB,CAAqB;AAI/E,eAAe,MAAMI,aAAa,SAASL,aAAa,CAA8D;EAEpHM,WAAW,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,kBAAkB,EAAE,CAAC;IACrD,IAAI,CAACM,QAAQ,GAAGT,QAAQ,CAACU,gBAAgB;EAC3C;EAEAC,YAAY,CAACH,KAAyB,EAAE;IACtC,OAAOA,KAAK,CAACI,UAAU,IAAIb,gBAAgB,EAAE,gBAC3C,oBAAC,UAAU;MAAC,qBAAqB,EAAE,IAAI,CAACc,MAAM,CAACC;IAAK,GACjD,IAAI,CAACC,WAAW,EAChBP,KAAK,CAACQ,QAAQ,CACJ,gBAEb,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACH,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBP,KAAK,CAACQ,QAAQ,CAElB;EACH;AACF"}
|
|
@@ -10,7 +10,7 @@ export default class WmPage extends BaseComponent {
|
|
|
10
10
|
renderWidget(props) {
|
|
11
11
|
return /*#__PURE__*/React.createElement(View, {
|
|
12
12
|
style: this.styles.root
|
|
13
|
-
}, props.children);
|
|
13
|
+
}, this._background, props.children);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=page.component.js.map
|