@wavemaker/app-rn-runtime 11.4.0-next.26251 → 11.4.0-next.28151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/components/advanced/carousel/carousel-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 +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +68 -67
- 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 +1 -30
- 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 +1 -4
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +3 -0
- app-rn-runtime/components/device/camera/camera.component.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/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/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/gestures/swipe.animation.js +105 -0
- app-rn-runtime/gestures/swipe.animation.js.map +1 -0
- app-rn-runtime/package.json +4 -3
- app-rn-runtime/runtime/App.js +11 -2
- app-rn-runtime/runtime/App.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/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/http.service.js +3 -12
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +13 -7
- app-rn-runtime/variables/service-variable.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmGridcolumnProps","DEFAULT_CLASS","WmGridcolumnState","WmGridcolumn","constructor","props","renderWidget","styles","root","height","overflow","undefined","theme","getStyle","xscolumnwidth","columnwidth","width","children"],"sources":["gridcolumn.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 WmGridcolumnProps from './gridcolumn.props';\nimport { DEFAULT_CLASS, WmGridColumnStyles } from './gridcolumn.styles';\n\nexport class WmGridcolumnState extends BaseComponentState<WmGridcolumnProps> {\n\n}\n\nexport default class WmGridcolumn extends BaseComponent<WmGridcolumnProps, WmGridcolumnState, WmGridColumnStyles> {\n\n constructor(props: WmGridcolumnProps) {\n super(props, DEFAULT_CLASS, new WmGridcolumnProps());\n }\n\n renderWidget(props: WmGridcolumnProps) {\n if (this.styles.root.height) {\n this.styles.root.overflow = undefined;\n }\n const styles = this.theme.getStyle(`col-xs-${props.xscolumnwidth} col-sm-${props.columnwidth}`);\n return (\n <View style={[{width: \"100%\"}, styles.root, this.styles.root]}>{props.children}</View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AAEvE,OAAO,MAAMC,iBAAiB,SAASH,kBAAkB,CAAoB;AAI7E,eAAe,MAAMI,YAAY,SAASL,aAAa,CAA2D;EAEhHM,WAAW,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,iBAAiB,EAAE,CAAC;EACtD;EAEAM,YAAY,CAACD,KAAwB,EAAE;IACrC,IAAI,IAAI,CAACE,MAAM,CAACC,IAAI,CAACC,MAAM,EAAE;MAC3B,IAAI,CAACF,MAAM,CAACC,IAAI,CAACE,QAAQ,GAAGC,SAAS;IACvC;IACA,MAAMJ,MAAM,GAAG,IAAI,CAACK,KAAK,CAACC,QAAQ,CAAE,UAASR,KAAK,CAACS,aAAc,YAAWT,KAAK,CAACU,WAAY,EAAC,CAAC;IAChG,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,CAAC;QAACC,KAAK,EAAE;MAAM,CAAC,EAAET,MAAM,CAACC,IAAI,EAAE,IAAI,CAACD,MAAM,CAACC,IAAI;IAAE,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmGridcolumnProps","DEFAULT_CLASS","WmGridcolumnState","WmGridcolumn","constructor","props","renderWidget","styles","root","height","overflow","undefined","theme","getStyle","xscolumnwidth","columnwidth","width","_background","children"],"sources":["gridcolumn.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 WmGridcolumnProps from './gridcolumn.props';\nimport { DEFAULT_CLASS, WmGridColumnStyles } from './gridcolumn.styles';\n\nexport class WmGridcolumnState extends BaseComponentState<WmGridcolumnProps> {\n\n}\n\nexport default class WmGridcolumn extends BaseComponent<WmGridcolumnProps, WmGridcolumnState, WmGridColumnStyles> {\n\n constructor(props: WmGridcolumnProps) {\n super(props, DEFAULT_CLASS, new WmGridcolumnProps());\n }\n\n renderWidget(props: WmGridcolumnProps) {\n if (this.styles.root.height) {\n this.styles.root.overflow = undefined;\n }\n const styles = this.theme.getStyle(`col-xs-${props.xscolumnwidth} col-sm-${props.columnwidth}`);\n return (\n <View style={[{width: \"100%\"}, styles.root, this.styles.root]}>{this._background}{props.children}</View>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AAEvE,OAAO,MAAMC,iBAAiB,SAASH,kBAAkB,CAAoB;AAI7E,eAAe,MAAMI,YAAY,SAASL,aAAa,CAA2D;EAEhHM,WAAW,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,iBAAiB,EAAE,CAAC;EACtD;EAEAM,YAAY,CAACD,KAAwB,EAAE;IACrC,IAAI,IAAI,CAACE,MAAM,CAACC,IAAI,CAACC,MAAM,EAAE;MAC3B,IAAI,CAACF,MAAM,CAACC,IAAI,CAACE,QAAQ,GAAGC,SAAS;IACvC;IACA,MAAMJ,MAAM,GAAG,IAAI,CAACK,KAAK,CAACC,QAAQ,CAAE,UAASR,KAAK,CAACS,aAAc,YAAWT,KAAK,CAACU,WAAY,EAAC,CAAC;IAChG,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,CAAC;QAACC,KAAK,EAAE;MAAM,CAAC,EAAET,MAAM,CAACC,IAAI,EAAE,IAAI,CAACD,MAAM,CAACC,IAAI;IAAE,GAAE,IAAI,CAACS,WAAW,EAAEZ,KAAK,CAACa,QAAQ,CAAQ;EAE5G;AACF"}
|
|
@@ -11,7 +11,7 @@ export default class WmGridrow extends BaseComponent {
|
|
|
11
11
|
renderWidget(props) {
|
|
12
12
|
return /*#__PURE__*/React.createElement(View, {
|
|
13
13
|
style: this.styles.root
|
|
14
|
-
}, props.children);
|
|
14
|
+
}, this._background, props.children);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=gridrow.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmGridrowProps","DEFAULT_CLASS","WmGridrowState","WmGridrow","constructor","props","renderWidget","styles","root","children"],"sources":["gridrow.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 WmGridrowProps from './gridrow.props';\nimport { DEFAULT_CLASS, WmGridRowStyles } from './gridrow.styles';\n\nexport class WmGridrowState extends BaseComponentState<WmGridrowProps> {\n\n}\n\nexport default class WmGridrow extends BaseComponent<WmGridrowProps, WmGridrowState, WmGridRowStyles> {\n\n constructor(props: WmGridrowProps) {\n super(props, DEFAULT_CLASS, new WmGridrowProps());\n }\n\n renderWidget(props: WmGridrowProps) {\n return (\n <View style={this.styles.root}>{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;AAIvE,eAAe,MAAMI,SAAS,SAASL,aAAa,CAAkD;EAEpGM,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,cAAc,EAAE,CAAC;EACnD;EAEAM,YAAY,CAACD,KAAqB,EAAE;IAClC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmGridrowProps","DEFAULT_CLASS","WmGridrowState","WmGridrow","constructor","props","renderWidget","styles","root","_background","children"],"sources":["gridrow.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 WmGridrowProps from './gridrow.props';\nimport { DEFAULT_CLASS, WmGridRowStyles } from './gridrow.styles';\n\nexport class WmGridrowState extends BaseComponentState<WmGridrowProps> {\n\n}\n\nexport default class WmGridrow extends BaseComponent<WmGridrowProps, WmGridrowState, WmGridRowStyles> {\n\n constructor(props: WmGridrowProps) {\n super(props, DEFAULT_CLASS, new WmGridrowProps());\n }\n\n renderWidget(props: WmGridrowProps) {\n return (\n <View style={this.styles.root}>{this._background}{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;AAIvE,eAAe,MAAMI,SAAS,SAASL,aAAa,CAAkD;EAEpGM,WAAW,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,cAAc,EAAE,CAAC;EACnD;EAEAM,YAAY,CAACD,KAAqB,EAAE;IAClC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEJ,KAAK,CAACK,QAAQ,CAAQ;EAE5E;AACF"}
|
|
@@ -11,7 +11,7 @@ export default class WmLayoutgrid extends BaseComponent {
|
|
|
11
11
|
renderWidget(props) {
|
|
12
12
|
return /*#__PURE__*/React.createElement(View, {
|
|
13
13
|
style: this.styles.root
|
|
14
|
-
}, props.children);
|
|
14
|
+
}, this._background, props.children);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=layoutgrid.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLayoutgridProps","DEFAULT_CLASS","WmLayoutgridState","WmLayoutgrid","constructor","props","renderWidget","styles","root","children"],"sources":["layoutgrid.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 WmLayoutgridProps from './layoutgrid.props';\nimport { DEFAULT_CLASS, WmLayoutGridStyles } from './layoutgrid.styles';\n\nexport class WmLayoutgridState extends BaseComponentState<WmLayoutgridProps> {\n\n}\n\nexport default class WmLayoutgrid extends BaseComponent<WmLayoutgridProps, WmLayoutgridState, WmLayoutGridStyles> {\n\n constructor(props: WmLayoutgridProps) {\n super(props, DEFAULT_CLASS, new WmLayoutgridProps());\n }\n\n renderWidget(props: WmLayoutgridProps) {\n return (\n <View style={this.styles.root}>{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AAEvE,OAAO,MAAMC,iBAAiB,SAASH,kBAAkB,CAAoB;AAI7E,eAAe,MAAMI,YAAY,SAASL,aAAa,CAA2D;EAEhHM,WAAW,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,iBAAiB,EAAE,CAAC;EACtD;EAEAM,YAAY,CAACD,KAAwB,EAAE;IACrC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLayoutgridProps","DEFAULT_CLASS","WmLayoutgridState","WmLayoutgrid","constructor","props","renderWidget","styles","root","_background","children"],"sources":["layoutgrid.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 WmLayoutgridProps from './layoutgrid.props';\nimport { DEFAULT_CLASS, WmLayoutGridStyles } from './layoutgrid.styles';\n\nexport class WmLayoutgridState extends BaseComponentState<WmLayoutgridProps> {\n\n}\n\nexport default class WmLayoutgrid extends BaseComponent<WmLayoutgridProps, WmLayoutgridState, WmLayoutGridStyles> {\n\n constructor(props: WmLayoutgridProps) {\n super(props, DEFAULT_CLASS, new WmLayoutgridProps());\n }\n\n renderWidget(props: WmLayoutgridProps) {\n return (\n <View style={this.styles.root}>{this._background}{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AAEvE,OAAO,MAAMC,iBAAiB,SAASH,kBAAkB,CAAoB;AAI7E,eAAe,MAAMI,YAAY,SAASL,aAAa,CAA2D;EAEhHM,WAAW,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,iBAAiB,EAAE,CAAC;EACtD;EAEAM,YAAY,CAACD,KAAwB,EAAE;IACrC,oBACE,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEJ,KAAK,CAACK,QAAQ,CAAQ;EAE5E;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLinearlayoutProps","DEFAULT_CLASS","ALIGNMENT_MAP","WmLinearlayoutState","WmLinearlayout","constructor","props","getStyles","s","direction","display","flexDirection","isHorizontal","startsWith","justifyContent","horizontalalign","alignItems","verticalalign","renderWidget","styles","root","children"],"sources":["linearlayout.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewStyle } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLinearlayoutProps from './linearlayout.props';\nimport { DEFAULT_CLASS, WmLinearlayoutStyles } from './linearlayout.styles';\n\nconst ALIGNMENT_MAP = {\n 'top': 'flex-start',\n 'left': 'flex-start',\n 'center': 'center',\n 'right': 'flex-end',\n 'bottom': 'flex-end'\n} as any;\n\nexport class WmLinearlayoutState extends BaseComponentState<WmLinearlayoutProps> {}\n\nexport default class WmLinearlayout extends BaseComponent<WmLinearlayoutProps, WmLinearlayoutState, WmLinearlayoutStyles> {\n\n constructor(props: WmLinearlayoutProps) {\n super(props, DEFAULT_CLASS, new WmLinearlayoutProps());\n }\n\n getStyles(props: WmLinearlayoutProps) {\n const s = {} as ViewStyle;\n const direction = props.direction;\n s.display = 'flex';\n s.flexDirection = direction;\n const isHorizontal = direction.startsWith('row');\n if (isHorizontal) {\n s.justifyContent = ALIGNMENT_MAP[props.horizontalalign];\n s.alignItems = ALIGNMENT_MAP[props.verticalalign];\n } else {\n s.justifyContent = ALIGNMENT_MAP[props.verticalalign];\n s.alignItems = ALIGNMENT_MAP[props.horizontalalign];\n }\n return s;\n }\n\n renderWidget(props: WmLinearlayoutProps) {\n return (<View style={{...this.getStyles(props), ...this.styles.root}}>\n {props.children}\n </View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAmB,cAAc;AAC9C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,mBAAmB,MAAM,sBAAsB;AACtD,SAASC,aAAa,QAA8B,uBAAuB;AAE3E,MAAMC,aAAa,GAAG;EACpB,KAAK,EAAG,YAAY;EACpB,MAAM,EAAE,YAAY;EACpB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,UAAU;EACnB,QAAQ,EAAE;AACZ,CAAQ;AAER,OAAO,MAAMC,mBAAmB,SAASJ,kBAAkB,CAAsB;AAEjF,eAAe,MAAMK,cAAc,SAASN,aAAa,CAAiE;EAExHO,WAAW,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,mBAAmB,EAAE,CAAC;EACxD;EAEAO,SAAS,CAACD,KAA0B,EAAE;IACpC,MAAME,CAAC,GAAG,CAAC,CAAc;IACzB,MAAMC,SAAS,GAAGH,KAAK,CAACG,SAAS;IACjCD,CAAC,CAACE,OAAO,GAAG,MAAM;IAClBF,CAAC,CAACG,aAAa,GAAGF,SAAS;IAC3B,MAAMG,YAAY,GAAGH,SAAS,CAACI,UAAU,CAAC,KAAK,CAAC;IAChD,IAAID,YAAY,EAAE;MAChBJ,CAAC,CAACM,cAAc,GAAGZ,aAAa,CAACI,KAAK,CAACS,eAAe,CAAC;MACvDP,CAAC,CAACQ,UAAU,GAAGd,aAAa,CAACI,KAAK,CAACW,aAAa,CAAC;IACnD,CAAC,MAAM;MACLT,CAAC,CAACM,cAAc,GAAGZ,aAAa,CAACI,KAAK,CAACW,aAAa,CAAC;MACrDT,CAAC,CAACQ,UAAU,GAAGd,aAAa,CAACI,KAAK,CAACS,eAAe,CAAC;IACrD;IACA,OAAOP,CAAC;EACV;EAEAU,YAAY,CAACZ,KAA0B,EAAE;IACvC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE;QAAC,GAAG,IAAI,CAACC,SAAS,CAACD,KAAK,CAAC;QAAE,GAAG,IAAI,CAACa,MAAM,CAACC;MAAI;IAAE,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLinearlayoutProps","DEFAULT_CLASS","ALIGNMENT_MAP","WmLinearlayoutState","WmLinearlayout","constructor","props","getStyles","s","direction","display","flexDirection","isHorizontal","startsWith","justifyContent","horizontalalign","alignItems","verticalalign","renderWidget","styles","root","_background","children"],"sources":["linearlayout.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewStyle } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLinearlayoutProps from './linearlayout.props';\nimport { DEFAULT_CLASS, WmLinearlayoutStyles } from './linearlayout.styles';\n\nconst ALIGNMENT_MAP = {\n 'top': 'flex-start',\n 'left': 'flex-start',\n 'center': 'center',\n 'right': 'flex-end',\n 'bottom': 'flex-end'\n} as any;\n\nexport class WmLinearlayoutState extends BaseComponentState<WmLinearlayoutProps> {}\n\nexport default class WmLinearlayout extends BaseComponent<WmLinearlayoutProps, WmLinearlayoutState, WmLinearlayoutStyles> {\n\n constructor(props: WmLinearlayoutProps) {\n super(props, DEFAULT_CLASS, new WmLinearlayoutProps());\n }\n\n getStyles(props: WmLinearlayoutProps) {\n const s = {} as ViewStyle;\n const direction = props.direction;\n s.display = 'flex';\n s.flexDirection = direction;\n const isHorizontal = direction.startsWith('row');\n if (isHorizontal) {\n s.justifyContent = ALIGNMENT_MAP[props.horizontalalign];\n s.alignItems = ALIGNMENT_MAP[props.verticalalign];\n } else {\n s.justifyContent = ALIGNMENT_MAP[props.verticalalign];\n s.alignItems = ALIGNMENT_MAP[props.horizontalalign];\n }\n return s;\n }\n\n renderWidget(props: WmLinearlayoutProps) {\n return (<View style={{...this.getStyles(props), ...this.styles.root}}>\n {this._background}{props.children}\n </View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAmB,cAAc;AAC9C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,mBAAmB,MAAM,sBAAsB;AACtD,SAASC,aAAa,QAA8B,uBAAuB;AAE3E,MAAMC,aAAa,GAAG;EACpB,KAAK,EAAG,YAAY;EACpB,MAAM,EAAE,YAAY;EACpB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,UAAU;EACnB,QAAQ,EAAE;AACZ,CAAQ;AAER,OAAO,MAAMC,mBAAmB,SAASJ,kBAAkB,CAAsB;AAEjF,eAAe,MAAMK,cAAc,SAASN,aAAa,CAAiE;EAExHO,WAAW,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,mBAAmB,EAAE,CAAC;EACxD;EAEAO,SAAS,CAACD,KAA0B,EAAE;IACpC,MAAME,CAAC,GAAG,CAAC,CAAc;IACzB,MAAMC,SAAS,GAAGH,KAAK,CAACG,SAAS;IACjCD,CAAC,CAACE,OAAO,GAAG,MAAM;IAClBF,CAAC,CAACG,aAAa,GAAGF,SAAS;IAC3B,MAAMG,YAAY,GAAGH,SAAS,CAACI,UAAU,CAAC,KAAK,CAAC;IAChD,IAAID,YAAY,EAAE;MAChBJ,CAAC,CAACM,cAAc,GAAGZ,aAAa,CAACI,KAAK,CAACS,eAAe,CAAC;MACvDP,CAAC,CAACQ,UAAU,GAAGd,aAAa,CAACI,KAAK,CAACW,aAAa,CAAC;IACnD,CAAC,MAAM;MACLT,CAAC,CAACM,cAAc,GAAGZ,aAAa,CAACI,KAAK,CAACW,aAAa,CAAC;MACrDT,CAAC,CAACQ,UAAU,GAAGd,aAAa,CAACI,KAAK,CAACS,eAAe,CAAC;IACrD;IACA,OAAOP,CAAC;EACV;EAEAU,YAAY,CAACZ,KAA0B,EAAE;IACvC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE;QAAC,GAAG,IAAI,CAACC,SAAS,CAACD,KAAK,CAAC;QAAE,GAAG,IAAI,CAACa,MAAM,CAACC;MAAI;IAAE,GAClE,IAAI,CAACC,WAAW,EAAEf,KAAK,CAACgB,QAAQ,CAC1B;EACX;AACF"}
|
app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js
CHANGED
|
@@ -18,7 +18,7 @@ export default class WmLinearlayoutitem extends BaseComponent {
|
|
|
18
18
|
flexShrink: isNil(props.flexshrink) ? props.flexgrow : props.flexshrink,
|
|
19
19
|
flexBasis: props.flexgrow && (direction === 'row' || direction === 'row-reverse') ? 0 : 'auto'
|
|
20
20
|
}
|
|
21
|
-
}, props.children);
|
|
21
|
+
}, this._background, props.children);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=linearlayoutitem.component.js.map
|
app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","isNil","BaseComponent","BaseComponentState","WmLinearlayoutitemProps","DEFAULT_CLASS","WmLinearlayoutitemState","WmLinearlayoutitem","constructor","props","renderWidget","direction","parent","state","styles","root","flexGrow","flexgrow","flexShrink","flexshrink","flexBasis","children"],"sources":["linearlayoutitem.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isNil } from 'lodash-es';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLinearlayout from '../linearlayout.component';\nimport WmLinearlayoutitemProps from './linearlayoutitem.props';\nimport { DEFAULT_CLASS, WmLinearlayoutitemStyles } from './linearlayoutitem.styles';\n\nexport class WmLinearlayoutitemState extends BaseComponentState<WmLinearlayoutitemProps> {}\n\nexport default class WmLinearlayoutitem extends BaseComponent<WmLinearlayoutitemProps, WmLinearlayoutitemState, WmLinearlayoutitemStyles> {\n\n constructor(props: WmLinearlayoutitemProps) {\n super(props, DEFAULT_CLASS, new WmLinearlayoutitemProps());\n }\n\n renderWidget(props: WmLinearlayoutitemProps) {\n const direction = (this.parent as WmLinearlayout).state.props.direction;\n return (<View style={{\n ...this.styles.root,\n flexGrow: props.flexgrow,\n flexShrink: isNil(props.flexshrink) ? props.flexgrow : props.flexshrink,\n flexBasis: props.flexgrow && (direction === 'row' || direction === 'row-reverse') ? 0 : 'auto'\n }}>{props.children}</View>); \n }\n}"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,WAAW;AACjC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,uBAAuB,MAAM,0BAA0B;AAC9D,SAASC,aAAa,QAAkC,2BAA2B;AAEnF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,EAAE,CAAC;EAC5D;EAEAM,YAAY,CAACD,KAA8B,EAAE;IAC3C,MAAME,SAAS,GAAI,IAAI,CAACC,MAAM,CAAoBC,KAAK,CAACJ,KAAK,CAACE,SAAS;IACvE,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE;QACnB,GAAG,IAAI,CAACG,MAAM,CAACC,IAAI;QACnBC,QAAQ,EAAEP,KAAK,CAACQ,QAAQ;QACxBC,UAAU,EAAEjB,KAAK,CAACQ,KAAK,CAACU,UAAU,CAAC,GAAGV,KAAK,CAACQ,QAAQ,GAAGR,KAAK,CAACU,UAAU;QACvEC,SAAS,EAAGX,KAAK,CAACQ,QAAQ,KAAKN,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,aAAa,CAAC,GAAG,CAAC,GAAG;MAC3F;IAAE,
|
|
1
|
+
{"version":3,"names":["React","View","isNil","BaseComponent","BaseComponentState","WmLinearlayoutitemProps","DEFAULT_CLASS","WmLinearlayoutitemState","WmLinearlayoutitem","constructor","props","renderWidget","direction","parent","state","styles","root","flexGrow","flexgrow","flexShrink","flexshrink","flexBasis","_background","children"],"sources":["linearlayoutitem.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isNil } from 'lodash-es';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLinearlayout from '../linearlayout.component';\nimport WmLinearlayoutitemProps from './linearlayoutitem.props';\nimport { DEFAULT_CLASS, WmLinearlayoutitemStyles } from './linearlayoutitem.styles';\n\nexport class WmLinearlayoutitemState extends BaseComponentState<WmLinearlayoutitemProps> {}\n\nexport default class WmLinearlayoutitem extends BaseComponent<WmLinearlayoutitemProps, WmLinearlayoutitemState, WmLinearlayoutitemStyles> {\n\n constructor(props: WmLinearlayoutitemProps) {\n super(props, DEFAULT_CLASS, new WmLinearlayoutitemProps());\n }\n\n renderWidget(props: WmLinearlayoutitemProps) {\n const direction = (this.parent as WmLinearlayout).state.props.direction;\n return (<View style={{\n ...this.styles.root,\n flexGrow: props.flexgrow,\n flexShrink: isNil(props.flexshrink) ? props.flexgrow : props.flexshrink,\n flexBasis: props.flexgrow && (direction === 'row' || direction === 'row-reverse') ? 0 : 'auto'\n }}>{this._background}{props.children}</View>); \n }\n}"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,WAAW;AACjC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,uBAAuB,MAAM,0BAA0B;AAC9D,SAASC,aAAa,QAAkC,2BAA2B;AAEnF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,EAAE,CAAC;EAC5D;EAEAM,YAAY,CAACD,KAA8B,EAAE;IAC3C,MAAME,SAAS,GAAI,IAAI,CAACC,MAAM,CAAoBC,KAAK,CAACJ,KAAK,CAACE,SAAS;IACvE,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE;QACnB,GAAG,IAAI,CAACG,MAAM,CAACC,IAAI;QACnBC,QAAQ,EAAEP,KAAK,CAACQ,QAAQ;QACxBC,UAAU,EAAEjB,KAAK,CAACQ,KAAK,CAACU,UAAU,CAAC,GAAGV,KAAK,CAACQ,QAAQ,GAAGR,KAAK,CAACU,UAAU;QACvEC,SAAS,EAAGX,KAAK,CAACQ,QAAQ,KAAKN,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,aAAa,CAAC,GAAG,CAAC,GAAG;MAC3F;IAAE,GAAE,IAAI,CAACU,WAAW,EAAEZ,KAAK,CAACa,QAAQ,CAAQ;EAC9C;AACF"}
|
|
@@ -11,7 +11,7 @@ export default class WmPanelContent extends BaseComponent {
|
|
|
11
11
|
renderWidget(props) {
|
|
12
12
|
return /*#__PURE__*/React.createElement(View, {
|
|
13
13
|
style: this.styles.root
|
|
14
|
-
}, props.children);
|
|
14
|
+
}, this._background, props.children);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=panel-content.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmPanelContentProps","DEFAULT_CLASS","WmPanelContentState","WmPanelContent","constructor","props","renderWidget","styles","root","children"],"sources":["panel-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 WmPanelContentProps from './panel-content.props';\nimport { DEFAULT_CLASS, WmPanelContentStyles } from './panel-content.styles';\n\nexport class WmPanelContentState extends BaseComponentState<WmPanelContentProps> {}\n\nexport default class WmPanelContent extends BaseComponent<WmPanelContentProps, WmPanelContentState, WmPanelContentStyles> {\n\n constructor(props: WmPanelContentProps) {\n super(props, DEFAULT_CLASS, new WmPanelContentProps());\n }\n\n renderWidget(props: WmPanelContentProps) {\n return (<View style={this.styles.root}>{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,aAAa,QAA8B,wBAAwB;AAE5E,OAAO,MAAMC,mBAAmB,SAASH,kBAAkB,CAAsB;AAEjF,eAAe,MAAMI,cAAc,SAASL,aAAa,CAAiE;EAExHM,WAAW,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,mBAAmB,EAAE,CAAC;EACxD;EAEAM,YAAY,CAACD,KAA0B,EAAE;IACvC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmPanelContentProps","DEFAULT_CLASS","WmPanelContentState","WmPanelContent","constructor","props","renderWidget","styles","root","_background","children"],"sources":["panel-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 WmPanelContentProps from './panel-content.props';\nimport { DEFAULT_CLASS, WmPanelContentStyles } from './panel-content.styles';\n\nexport class WmPanelContentState extends BaseComponentState<WmPanelContentProps> {}\n\nexport default class WmPanelContent extends BaseComponent<WmPanelContentProps, WmPanelContentState, WmPanelContentStyles> {\n\n constructor(props: WmPanelContentProps) {\n super(props, DEFAULT_CLASS, new WmPanelContentProps());\n }\n\n renderWidget(props: WmPanelContentProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,aAAa,QAA8B,wBAAwB;AAE5E,OAAO,MAAMC,mBAAmB,SAASH,kBAAkB,CAAsB;AAEjF,eAAe,MAAMI,cAAc,SAASL,aAAa,CAAiE;EAExHM,WAAW,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,mBAAmB,EAAE,CAAC;EACxD;EAEAM,YAAY,CAACD,KAA0B,EAAE;IACvC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEJ,KAAK,CAACK,QAAQ,CAAQ;EAClF;AACF"}
|
|
@@ -11,7 +11,7 @@ export default class WmPanelFooter extends BaseComponent {
|
|
|
11
11
|
renderWidget(props) {
|
|
12
12
|
return /*#__PURE__*/React.createElement(View, {
|
|
13
13
|
style: this.styles.root
|
|
14
|
-
}, props.children);
|
|
14
|
+
}, this._background, props.children);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=panel-footer.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmPanelFooterProps","DEFAULT_CLASS","WmPanelFooterState","WmPanelFooter","constructor","props","renderWidget","styles","root","children"],"sources":["panel-footer.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 WmPanelFooterProps from './panel-footer.props';\nimport { DEFAULT_CLASS, WmPanelFooterStyles } from './panel-footer.styles';\n\nexport class WmPanelFooterState extends BaseComponentState<WmPanelFooterProps> {}\n\nexport default class WmPanelFooter extends BaseComponent<WmPanelFooterProps, WmPanelFooterState, WmPanelFooterStyles> {\n\n constructor(props: WmPanelFooterProps) {\n super(props, DEFAULT_CLASS, new WmPanelFooterProps());\n }\n\n renderWidget(props: WmPanelFooterProps) {\n return (<View style={this.styles.root}>{props.children}</View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAE1E,OAAO,MAAMC,kBAAkB,SAASH,kBAAkB,CAAqB;AAE/E,eAAe,MAAMI,aAAa,SAASL,aAAa,CAA8D;EAEpHM,WAAW,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,kBAAkB,EAAE,CAAC;EACvD;EAEAM,YAAY,CAACD,KAAyB,EAAE;IACtC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmPanelFooterProps","DEFAULT_CLASS","WmPanelFooterState","WmPanelFooter","constructor","props","renderWidget","styles","root","_background","children"],"sources":["panel-footer.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 WmPanelFooterProps from './panel-footer.props';\nimport { DEFAULT_CLASS, WmPanelFooterStyles } from './panel-footer.styles';\n\nexport class WmPanelFooterState extends BaseComponentState<WmPanelFooterProps> {}\n\nexport default class WmPanelFooter extends BaseComponent<WmPanelFooterProps, WmPanelFooterState, WmPanelFooterStyles> {\n\n constructor(props: WmPanelFooterProps) {\n super(props, DEFAULT_CLASS, new WmPanelFooterProps());\n }\n\n renderWidget(props: WmPanelFooterProps) {\n return (<View style={this.styles.root}>{this._background}{props.children}</View>);\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAE1E,OAAO,MAAMC,kBAAkB,SAASH,kBAAkB,CAAqB;AAE/E,eAAe,MAAMI,aAAa,SAASL,aAAa,CAA8D;EAEpHM,WAAW,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,kBAAkB,EAAE,CAAC;EACvD;EAEAM,YAAY,CAACD,KAAyB,EAAE;IACtC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACE,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAEJ,KAAK,CAACK,QAAQ,CAAQ;EAClF;AACF"}
|
|
@@ -116,7 +116,7 @@ export default class WmPanel extends BaseComponent {
|
|
|
116
116
|
renderWidget(props) {
|
|
117
117
|
return /*#__PURE__*/React.createElement(View, {
|
|
118
118
|
style: this.styles.root
|
|
119
|
-
}, /*#__PURE__*/React.createElement(List.AccordionGroup, {
|
|
119
|
+
}, this._background, /*#__PURE__*/React.createElement(List.AccordionGroup, {
|
|
120
120
|
expandedId: this.state.expandedId,
|
|
121
121
|
onAccordionPress: this.onPanelPress.bind(this)
|
|
122
122
|
}, /*#__PURE__*/React.createElement(Animatedview, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Badge","List","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","Animatedview","WmPanelState","WmPanel","constructor","props","updateState","expandedId","state","expanded","onPartialLoad","invokeEventCallback","renderContent","renderPartial","isPartialLoaded","setTimeout","bind","onPanelPress","collapsible","paneId","eventName","animatedRef","triggerExit","then","res","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","styles","badgetype","iconclass","toggleIcon","flexDirection","renderPanel","icon","name","title","header","text","subheading","marginLeft","ref","children","renderWidget","root","animation"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { Badge, List } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n expandedId: any;\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n private animatedRef: any;\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n this.updateState({\n expandedId: this.state.props.expanded ? 1 : -1,\n } as WmPanelState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress(expandedId: any) {\n if (!this.state.props.collapsible) {\n return;\n }\n const paneId = expandedId === this.state.expandedId ? -1 : 1;\n const eventName = paneId === 1 ? 'onExpand' : 'onCollapse';\n\n if (eventName === 'onCollapse') {\n this.animatedRef.triggerExit().then((res: any) => {\n if (res) {\n this.updateState({\n expandedId: paneId,\n props: {\n expanded: false\n }\n } as WmPanelState);\n }\n })\n } else {\n this.updateState({\n expandedId: paneId,\n props: {\n expanded: true\n }\n } as WmPanelState);\n }\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderPanel(props: WmPanelProps) {\n const icon = (<WmIcon styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass}></WmIcon>);\n return (\n <List.Accordion title={props.title} style={this.styles.header} id={1}\n titleStyle={this.styles.text} descriptionStyle={this.styles.subheading}\n description={props.subheading}\n expanded={props.expanded} \n right={({isExpanded}) => this.expandCollapseIcon(isExpanded)} left={props => icon}>\n <Animatedview style={{marginLeft: -64}} ref={ref => this.animatedRef = ref} entryanimation={'fadeInDown'}>\n <View>{this.renderContent(props)}</View>\n <View>{props.children}</View>\n </Animatedview>\n </List.Accordion>\n );\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n <List.AccordionGroup expandedId={this.state.expandedId} onAccordionPress={this.onPanelPress.bind(this)}>\n <Animatedview entryanimation={props.animation}>\n {this.renderPanel(props)}\n </Animatedview>\n </List.AccordionGroup>\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AACzC,SAASC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AAChD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,YAAY,QAAQ,mEAAmE;AAEhG,OAAO,MAAMC,YAAY,SAASL,kBAAkB,CAAe;EAAA;IAAA;IAAA;IAAA,yCAE/C,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMM,OAAO,SAASP,aAAa,CAA4C;EAE5FQ,WAAW,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,YAAY,EAAE,CAAC;IAAC;IAChD,IAAI,CAACO,WAAW,CAAC;MACfC,UAAU,EAAE,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,QAAQ,GAAG,CAAC,GAAG,CAAC;IAC/C,CAAC,CAAiB;EACpB;EAEAC,aAAa,GAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC5C;EAEAC,aAAa,CAACP,KAAmB,EAAE;IACjC,IAAIA,KAAK,CAACQ,aAAa,EAAE;MACvB,IAAI,CAAC,IAA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,gBAChG,oBAAC,YAAY;MAAC,KAAK,EAAE;QAACM,UAAU,EAAE,CAAC;MAAE,CAAE;MAAC,GAAG,EAAEC,GAAG,IAAI,IAAI,CAACxB,WAAW,GAAGwB,GAAI;MAAC,cAAc,EAAE;IAAa,gBACvG,oBAAC,IAAI,QAAE,IAAI,CAACjC,aAAa,CAACP,KAAK,CAAC,CAAQ,eACxC,oBAAC,IAAI,QAAEA,KAAK,CAACyC,QAAQ,CAAQ,CAChB,CACA;EAErB;EAEAC,YAAY,CAAC1C,KAAmB,EAAE;IAChC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAAC2B,MAAM,CAACgB;IAAK,
|
|
1
|
+
{"version":3,"names":["React","View","Badge","List","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","Animatedview","WmPanelState","WmPanel","constructor","props","updateState","expandedId","state","expanded","onPartialLoad","invokeEventCallback","renderContent","renderPartial","isPartialLoaded","setTimeout","bind","onPanelPress","collapsible","paneId","eventName","animatedRef","triggerExit","then","res","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","styles","badgetype","iconclass","toggleIcon","flexDirection","renderPanel","icon","name","title","header","text","subheading","marginLeft","ref","children","renderWidget","root","_background","animation"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { Badge, List } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n expandedId: any;\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n private animatedRef: any;\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n this.updateState({\n expandedId: this.state.props.expanded ? 1 : -1,\n } as WmPanelState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress(expandedId: any) {\n if (!this.state.props.collapsible) {\n return;\n }\n const paneId = expandedId === this.state.expandedId ? -1 : 1;\n const eventName = paneId === 1 ? 'onExpand' : 'onCollapse';\n\n if (eventName === 'onCollapse') {\n this.animatedRef.triggerExit().then((res: any) => {\n if (res) {\n this.updateState({\n expandedId: paneId,\n props: {\n expanded: false\n }\n } as WmPanelState);\n }\n })\n } else {\n this.updateState({\n expandedId: paneId,\n props: {\n expanded: true\n }\n } as WmPanelState);\n }\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderPanel(props: WmPanelProps) {\n const icon = (<WmIcon styles={this.styles.icon} name={props.name + '_icon'} iconclass={props.iconclass}></WmIcon>);\n return (\n <List.Accordion title={props.title} style={this.styles.header} id={1}\n titleStyle={this.styles.text} descriptionStyle={this.styles.subheading}\n description={props.subheading}\n expanded={props.expanded} \n right={({isExpanded}) => this.expandCollapseIcon(isExpanded)} left={props => icon}>\n <Animatedview style={{marginLeft: -64}} ref={ref => this.animatedRef = ref} entryanimation={'fadeInDown'}>\n <View>{this.renderContent(props)}</View>\n <View>{props.children}</View>\n </Animatedview>\n </List.Accordion>\n );\n }\n\n renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\n <List.AccordionGroup expandedId={this.state.expandedId} onAccordionPress={this.onPanelPress.bind(this)}>\n <Animatedview entryanimation={props.animation}>\n {this.renderPanel(props)}\n </Animatedview>\n </List.AccordionGroup>\n </View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AACzC,SAASC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AAChD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,YAAY,QAAQ,mEAAmE;AAEhG,OAAO,MAAMC,YAAY,SAASL,kBAAkB,CAAe;EAAA;IAAA;IAAA;IAAA,yCAE/C,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMM,OAAO,SAASP,aAAa,CAA4C;EAE5FQ,WAAW,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,YAAY,EAAE,CAAC;IAAC;IAChD,IAAI,CAACO,WAAW,CAAC;MACfC,UAAU,EAAE,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,QAAQ,GAAG,CAAC,GAAG,CAAC;IAC/C,CAAC,CAAiB;EACpB;EAEAC,aAAa,GAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC5C;EAEAC,aAAa,CAACP,KAAmB,EAAE;IACjC,IAAIA,KAAK,CAACQ,aAAa,EAAE;MACv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AAK,IAAIiC;IAAK,gBAChG,oBAAC,YAAY;MAAC,KAAK,EAAE;QAACM,UAAU,EAAE,CAAC;MAAE,CAAE;MAAC,GAAG,EAAEC,GAAG,IAAI,IAAI,CAACxB,WAAW,GAAGwB,GAAI;MAAC,cAAc,EAAE;IAAa,gBACvG,oBAAC,IAAI,QAAE,IAAI,CAACjC,aAAa,CAACP,KAAK,CAAC,CAAQ,eACxC,oBAAC,IAAI,QAAEA,KAAK,CAACyC,QAAQ,CAAQ,CAChB,CACA;EAErB;EAEAC,YAAY,CAAC1C,KAAmB,EAAE;IAChC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAAC2B,MAAM,CAACgB;IAAK,GACvB,IAAI,CAACC,WAAW,eACjB,oBAAC,IAAI,CAAC,cAAc;MAAC,UAAU,EAAE,IAAI,CAACzC,KAAK,CAACD,UAAW;MAAC,gBAAgB,EAAE,IAAI,CAACU,YAAY,CAACD,IAAI,CAAC,IAAI;IAAE,gBACnG,oBAAC,YAAY;MAAC,cAAc,EAAEX,KAAK,CAAC6C;IAAU,GAC3C,IAAI,CAACb,WAAW,CAAChC,KAAK,CAAC,CACX,CACG,CACrB;EACjB;AACF"}
|
|
@@ -89,7 +89,10 @@ export default class WmTabheader extends BaseComponent {
|
|
|
89
89
|
const isSelected = i === this.props.selectedTabIndex;
|
|
90
90
|
return /*#__PURE__*/React.createElement(Tappable, {
|
|
91
91
|
onTap: this.onTabSelection.bind(this, i),
|
|
92
|
-
key: header.key
|
|
92
|
+
key: header.key,
|
|
93
|
+
styles: {
|
|
94
|
+
flex: 1
|
|
95
|
+
}
|
|
93
96
|
}, /*#__PURE__*/React.createElement(View, {
|
|
94
97
|
onLayout: this.setHeaderPositon.bind(this, i),
|
|
95
98
|
style: [this.styles.header, isSelected ? this.styles.activeHeader : null]
|
|
@@ -123,14 +126,19 @@ export default class WmTabheader extends BaseComponent {
|
|
|
123
126
|
onLayout: this.setHeaderPanelPositon.bind(this)
|
|
124
127
|
}, /*#__PURE__*/React.createElement(View, {
|
|
125
128
|
style: this.styles.root
|
|
126
|
-
}, props.data.map((header, i) => {
|
|
129
|
+
}, this._background, props.data.map((header, i) => {
|
|
127
130
|
const isSelected = i === props.selectedTabIndex;
|
|
128
131
|
return /*#__PURE__*/React.createElement(Tappable, {
|
|
129
132
|
onTap: this.onTabSelection.bind(this, i),
|
|
130
|
-
key: header.key
|
|
133
|
+
key: header.key,
|
|
134
|
+
styles: this.styles.header.flexGrow ? {
|
|
135
|
+
flexGrow: this.styles.header.flexGrow
|
|
136
|
+
} : null
|
|
131
137
|
}, /*#__PURE__*/React.createElement(View, {
|
|
132
138
|
onLayout: this.setHeaderPositon.bind(this, i),
|
|
133
|
-
style: [this.styles.header,
|
|
139
|
+
style: [this.styles.header, {
|
|
140
|
+
flexGrow: undefined
|
|
141
|
+
}, isSelected ? this.styles.activeHeader : null]
|
|
134
142
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
135
143
|
numberOfLines: 1,
|
|
136
144
|
style: [this.styles.headerText, isSelected ? this.styles.activeHeaderText : null]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","Easing","Text","View","BaseComponent","BaseComponentState","WmTabheaderProps","DEFAULT_CLASS","Tappable","createSkeleton","WmTabheaderState","WmTabheader","constructor","props","Value","headerScrollPosition","addListener","value","headerScrollPositionValue","setHeaderPanelPositon","nativeEvent","headerPanelLayout","layout","setHeaderPositon","index","headersLayout","selectedTabIndex","forceUpdate","onTabSelection","state","onIndexChange","setPosition","toIndicatorPosition","toIndicatorWidth","width","toHeaderScrollPosition","totalWidth","forEach","p","i","minScrollPosition","maxScrollPosition","Math","max","min","parallel","timing","useNativeDriver","toValue","duration","easing","linear","indicatorWidth","indicatorPosition","start","renderSkeleton","transform","translateX","bind","styles","root","data","map","header","isSelected","key","activeHeader","theme","borderRadius","height","activeHeaderText","fontSize","activeIndicator","scaleX","renderWidget","headerText","title"],"sources":["tabheader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, Easing, LayoutChangeEvent, LayoutRectangle, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabheaderProps from './tabheader.props';\nimport { DEFAULT_CLASS, WmTabheaderStyles } from './tabheader.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmSkeleton, { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport class WmTabheaderState extends BaseComponentState<WmTabheaderProps> {\n}\n\nexport default class WmTabheader extends BaseComponent<WmTabheaderProps, WmTabheaderState, WmTabheaderStyles> {\n\n private headerPanelLayout: LayoutRectangle = null as any;\n private headersLayout: LayoutRectangle[] = [];\n private headerScrollPosition = new Animated.Value(0);\n private headerScrollPositionValue = 0;\n private indicatorPosition = new Animated.Value(0);\n private indicatorWidth = new Animated.Value(0);\n\n constructor(props: WmTabheaderProps) {\n super(props, DEFAULT_CLASS, new WmTabheaderProps(), new WmTabheaderState());\n this.headerScrollPosition.addListener(({value}) => this.headerScrollPositionValue = value);\n }\n\n setHeaderPanelPositon(nativeEvent: LayoutChangeEvent) {\n this.headerPanelLayout = nativeEvent.nativeEvent.layout;\n }\n\n setHeaderPositon(index: number, nativeEvent: LayoutChangeEvent) {\n this.headersLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.props.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n onTabSelection(index: number) {\n if (this.state.props.selectedTabIndex != index) {\n this.state.props.onIndexChange && this.state.props.onIndexChange(index);\n }\n }\n\n setPosition() {\n const selectedTabIndex = this.state.props.selectedTabIndex;\n let toIndicatorPosition = 0;\n let toIndicatorWidth = this.headersLayout[selectedTabIndex]?.width || 0;\n let toHeaderScrollPosition = this.headerScrollPositionValue;\n let totalWidth = 0;\n this.headersLayout.forEach((p, i) => {\n if (i < selectedTabIndex) {\n toIndicatorPosition += p.width;\n }\n totalWidth += p.width;\n });\n toHeaderScrollPosition = -1 * (toIndicatorPosition - (this.headerPanelLayout?.width || 0) / 2 + toIndicatorWidth/ 2) ;\n const minScrollPosition = -1 * (totalWidth - (this.headerPanelLayout?.width || 0));\n const maxScrollPosition = 0;\n toHeaderScrollPosition = Math.max(minScrollPosition, toHeaderScrollPosition);\n toHeaderScrollPosition = Math.min(maxScrollPosition, toHeaderScrollPosition);\n Animated.parallel([\n Animated.timing(this.headerScrollPosition, {\n useNativeDriver: true,\n toValue: toHeaderScrollPosition,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth / 100,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorPosition, {\n useNativeDriver: true,\n toValue: (toIndicatorPosition - (100 - toIndicatorWidth) / 2),\n duration: 200,\n easing: Easing.linear\n })\n ]).start();\n }\n\n public renderSkeleton(props: WmTabheaderProps){\n return(\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this.props.data.map((header ,i) => {\n const isSelected = i === this.props.selectedTabIndex ;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header, \n isSelected ? this.styles.activeHeader : null]}>\n {\n createSkeleton(this.theme, { root: { borderRadius: 4 }} as WmSkeletonStyles, {\n ...this.styles.root,\n width: this.styles.root?.width || \"100%\",\n height: this.styles.root?.height || this.styles.activeHeaderText?.fontSize || 16\n })\n }\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n\n )\n }\n\n renderWidget(props: WmTabheaderProps) {\n this.setPosition();\n return (\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {props.data.map((header ,i) => {\n const isSelected = i === props.selectedTabIndex ;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header, \n isSelected ? this.styles.activeHeader : null]}>\n <Text numberOfLines={1} style={[\n this.styles.headerText, \n isSelected ? this.styles.activeHeaderText : null]}>{header.title}</Text>\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n ); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,MAAM,EAAsCC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC/F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAAqBC,cAAc,QAAQ,wEAAwE;AAGnH,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;AAG3E,eAAe,MAAMM,WAAW,SAASP,aAAa,CAAwD;EAS5GQ,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,gBAAgB,EAAE,EAAE,IAAII,gBAAgB,EAAE,CAAC;IAAC,2CARjC,IAAI;IAAA,uCACN,EAAE;IAAA,8CACd,IAAIV,QAAQ,CAACc,KAAK,CAAC,CAAC,CAAC;IAAA,mDAChB,CAAC;IAAA,2CACT,IAAId,QAAQ,CAACc,KAAK,CAAC,CAAC,CAAC;I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AY,GAAG,IAAI;MAAE,gBAC9C,oBAAC,IAAI;QAAC,aAAa,EAAE,CAAE;QAAC,KAAK,EAAE,CAC7B,IAAI,CAACP,MAAM,CAACgB,UAAU,EACtBX,UAAU,GAAG,IAAI,CAACL,MAAM,CAACW,gBAAgB,GAAG,IAAI;MAAE,GAAEP,MAAM,CAACa,KAAK,CAAQ,CACrE,CACE;IAEf,CAAC,CAAC,CACG,eACP,oBAAC,QAAQ,CAAC,IAAI;MAAC,KAAK,EAAE,CAAC,IAAI,CAACjB,MAAM,CAACa,eAAe,EAAE;QAClDhB,SAAS,EAAE,CAAC;UACVC,UAAU,EAAE,IAAI,CAACJ;QACnB,CAAC,EAAE;UACDoB,MAAM,EAAE,IAAI,CAACrB;QACf,CAAC;MACH,CAAC;IAAE,EAAiB,CACN;EAEpB;AACF"}
|
|
1
|
+
{"version":3,"names":["React","Animated","Easing","Text","View","BaseComponent","BaseComponentState","WmTabheaderProps","DEFAULT_CLASS","Tappable","createSkeleton","WmTabheaderState","WmTabheader","constructor","props","Value","headerScrollPosition","addListener","value","headerScrollPositionValue","setHeaderPanelPositon","nativeEvent","headerPanelLayout","layout","setHeaderPositon","index","headersLayout","selectedTabIndex","forceUpdate","onTabSelection","state","onIndexChange","setPosition","toIndicatorPosition","toIndicatorWidth","width","toHeaderScrollPosition","totalWidth","forEach","p","i","minScrollPosition","maxScrollPosition","Math","max","min","parallel","timing","useNativeDriver","toValue","duration","easing","linear","indicatorWidth","indicatorPosition","start","renderSkeleton","transform","translateX","bind","styles","root","data","map","header","isSelected","key","flex","activeHeader","theme","borderRadius","height","activeHeaderText","fontSize","activeIndicator","scaleX","renderWidget","_background","flexGrow","undefined","headerText","title"],"sources":["tabheader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, Easing, LayoutChangeEvent, LayoutRectangle, Text, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabheaderProps from './tabheader.props';\nimport { DEFAULT_CLASS, WmTabheaderStyles } from './tabheader.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmSkeleton, { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport class WmTabheaderState extends BaseComponentState<WmTabheaderProps> {\n}\n\nexport default class WmTabheader extends BaseComponent<WmTabheaderProps, WmTabheaderState, WmTabheaderStyles> {\n\n private headerPanelLayout: LayoutRectangle = null as any;\n private headersLayout: LayoutRectangle[] = [];\n private headerScrollPosition = new Animated.Value(0);\n private headerScrollPositionValue = 0;\n private indicatorPosition = new Animated.Value(0);\n private indicatorWidth = new Animated.Value(0);\n\n constructor(props: WmTabheaderProps) {\n super(props, DEFAULT_CLASS, new WmTabheaderProps(), new WmTabheaderState());\n this.headerScrollPosition.addListener(({value}) => this.headerScrollPositionValue = value);\n }\n\n setHeaderPanelPositon(nativeEvent: LayoutChangeEvent) {\n this.headerPanelLayout = nativeEvent.nativeEvent.layout;\n }\n\n setHeaderPositon(index: number, nativeEvent: LayoutChangeEvent) {\n this.headersLayout[index] = nativeEvent.nativeEvent.layout;\n if (index === this.props.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n onTabSelection(index: number) {\n if (this.state.props.selectedTabIndex != index) {\n this.state.props.onIndexChange && this.state.props.onIndexChange(index);\n }\n }\n\n setPosition() {\n const selectedTabIndex = this.state.props.selectedTabIndex;\n let toIndicatorPosition = 0;\n let toIndicatorWidth = this.headersLayout[selectedTabIndex]?.width || 0;\n let toHeaderScrollPosition = this.headerScrollPositionValue;\n let totalWidth = 0;\n this.headersLayout.forEach((p, i) => {\n if (i < selectedTabIndex) {\n toIndicatorPosition += p.width;\n }\n totalWidth += p.width;\n });\n toHeaderScrollPosition = -1 * (toIndicatorPosition - (this.headerPanelLayout?.width || 0) / 2 + toIndicatorWidth/ 2) ;\n const minScrollPosition = -1 * (totalWidth - (this.headerPanelLayout?.width || 0));\n const maxScrollPosition = 0;\n toHeaderScrollPosition = Math.max(minScrollPosition, toHeaderScrollPosition);\n toHeaderScrollPosition = Math.min(maxScrollPosition, toHeaderScrollPosition);\n Animated.parallel([\n Animated.timing(this.headerScrollPosition, {\n useNativeDriver: true,\n toValue: toHeaderScrollPosition,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth / 100,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorPosition, {\n useNativeDriver: true,\n toValue: (toIndicatorPosition - (100 - toIndicatorWidth) / 2),\n duration: 200,\n easing: Easing.linear\n })\n ]).start();\n }\n\n public renderSkeleton(props: WmTabheaderProps){\n return(\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this.props.data.map((header ,i) => {\n const isSelected = i === this.props.selectedTabIndex;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key} styles={{flex: 1}}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header, \n isSelected ? this.styles.activeHeader : null]}>\n {\n createSkeleton(this.theme, { root: { borderRadius: 4 }} as WmSkeletonStyles, {\n ...this.styles.root,\n width: this.styles.root?.width || \"100%\",\n height: this.styles.root?.height || this.styles.activeHeaderText?.fontSize || 16\n })\n }\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n\n )\n }\n\n renderWidget(props: WmTabheaderProps) {\n this.setPosition();\n return (\n <Animated.View style={{\n transform: [{\n translateX: this.headerScrollPosition\n }]\n }}\n onLayout={this.setHeaderPanelPositon.bind(this)}>\n <View style={this.styles.root}>\n {this._background}\n {props.data.map((header ,i) => {\n const isSelected = i === props.selectedTabIndex ;\n return (\n <Tappable onTap={this.onTabSelection.bind(this, i)} key={header.key} \n styles={this.styles.header.flexGrow ? {flexGrow: this.styles.header.flexGrow} : null}>\n <View onLayout={this.setHeaderPositon.bind(this, i)} style={[\n this.styles.header,\n {flexGrow: undefined},\n isSelected ? this.styles.activeHeader : null]}>\n <Text numberOfLines={1} style={[\n this.styles.headerText, \n isSelected ? this.styles.activeHeaderText : null]}>{header.title}</Text>\n </View>\n </Tappable>\n );\n })}\n </View>\n <Animated.View style={[this.styles.activeIndicator, {\n transform: [{\n translateX: this.indicatorPosition\n }, {\n scaleX: this.indicatorWidth\n }]\n }]}></Animated.View>\n </Animated.View>\n ); \n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,MAAM,EAAsCC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC/F,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAAqBC,cAAc,QAAQ,wEAAwE;AAGnH,OAAO,MAAMC,gBAAgB,SAASL,kBAAkB,CAAmB;AAG3E,eAAe,MAAMM,WAAW,SAASP,aAAa,CAAwD;EAS5GQ,WAAW,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,gBAAgB,EAAE,EAAE,IAAII,gBAAgB,EAAE,CAAC;IAAC,2CARjC,IAAI;IAAA,uCACN,EAAE;IAAA,8CACd,IAAIV,QAAQ,CAACc,KAAK,CAAC,CAAC,CAAC;IAAA,mDAChB,CAAC;IAAA,2CACT,IAAId,QAAQ,CAACc,KAAK,CAAC,CAAC,CAAC;IAAA,wCACxB,IAAId,QAAQ,CAACc,KAAK,CAAC,CAAC,CAAC;IAI5C,IAAI,C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CAACmC,IAAI,CAAC,IAAI,EAAEnB,CAAC,CAAE;QAAC,KAAK,EAAE,CAC1D,IAAI,CAACoB,MAAM,CAACI,MAAM,EAClB;UAACc,QAAQ,EAAEC;QAAS,CAAC,EACrBd,UAAU,GAAG,IAAI,CAACL,MAAM,CAACQ,YAAY,GAAG,IAAI;MAAE,gBAC9C,oBAAC,IAAI;QAAC,aAAa,EAAE,CAAE;QAAC,KAAK,EAAE,CAC7B,IAAI,CAACR,MAAM,CAACoB,UAAU,EACtBf,UAAU,GAAG,IAAI,CAACL,MAAM,CAACY,gBAAgB,GAAG,IAAI;MAAE,GAAER,MAAM,CAACiB,KAAK,CAAQ,CACrE,CACE;IAEf,CAAC,CAAC,CACG,eACP,oBAAC,QAAQ,CAAC,IAAI;MAAC,KAAK,EAAE,CAAC,IAAI,CAACrB,MAAM,CAACc,eAAe,EAAE;QAClDjB,SAAS,EAAE,CAAC;UACVC,UAAU,EAAE,IAAI,CAACJ;QACnB,CAAC,EAAE;UACDqB,MAAM,EAAE,IAAI,CAACtB;QACf,CAAC;MACH,CAAC;IAAE,EAAiB,CACN;EAEpB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingHorizontal","paddingVertical","justifyContent","headerIcon","color","tabHeaderIconColor","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","fontSize","textTransform","activeHeader","tabActiveHeaderBgColor","activeIndicator","tabActiveIndicatorBgColor","width","height","marginTop","activeHeaderIcon","tabActiveHeaderIconColor","activeHeaderText","tabActiveHeaderTextColor","skeleton"],"sources":["tabheader.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTabheaderStyles = BaseStyles & {\n activeIndicator: ViewStyle,\n header: ViewStyle,\n headerIcon: WmIconStyles,\n headerText: TextStyle,\n activeHeader: ViewStyle,\n activeHeaderIcon: WmIconStyles,\n activeHeaderText: TextStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-tabheader';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = {\n root: {\n flexDirection: 'row',\n minWidth: '100%',\n overflow: 'visible',\n backgroundColor: themeVariables.tabHeaderBgColor,\n },\n text: {},\n header: {\n backgroundColor: themeVariables.tabHeaderBgColor,\n paddingHorizontal: 12,\n paddingVertical: 12,\n minWidth: 80,\n flexDirection: 'row',\n justifyContent: 'center'\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: 'bold',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 4,\n marginTop: -4\n },\n activeHeaderIcon: {\n text: {\n color: themeVariables.tabActiveHeaderIconColor\n }\n } as WmIconStyles,\n activeHeaderText: {\n color: themeVariables.tabActiveHeaderTextColor \n },\n skeleton: {} as WmSkeletonStyles\n } as WmTabheaderStyles;\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAiB/D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAG;IAClBC,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE,MAAM;MAChBC,QAAQ,EAAE,SAAS;MACnBC,eAAe,EAAEP,cAAc,CAACQ;IACpC,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACJH,eAAe,EAAEP,cAAc,CAACQ,gBAAgB;MAChDG,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE,EAAE;MACnBP,QAAQ,EAAE,EAAE;MACZD,aAAa,EAAE,KAAK;MACpBS,cAAc,EAAE;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","minWidth","overflow","backgroundColor","tabHeaderBgColor","text","header","paddingHorizontal","paddingVertical","justifyContent","flexGrow","headerIcon","color","tabHeaderIconColor","headerText","tabHeaderTextColor","fontFamily","baseFont","fontWeight","fontSize","textTransform","activeHeader","tabActiveHeaderBgColor","activeIndicator","tabActiveIndicatorBgColor","width","height","marginTop","activeHeaderIcon","tabActiveHeaderIconColor","activeHeaderText","tabActiveHeaderTextColor","skeleton"],"sources":["tabheader.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTabheaderStyles = BaseStyles & {\n activeIndicator: ViewStyle,\n header: ViewStyle,\n headerIcon: WmIconStyles,\n headerText: TextStyle,\n activeHeader: ViewStyle,\n activeHeaderIcon: WmIconStyles,\n activeHeaderText: TextStyle,\n skeleton: WmSkeletonStyles \n};\n\nexport const DEFAULT_CLASS = 'app-tabheader';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = {\n root: {\n flexDirection: 'row',\n minWidth: '100%',\n overflow: 'visible',\n backgroundColor: themeVariables.tabHeaderBgColor,\n },\n text: {},\n header: {\n backgroundColor: themeVariables.tabHeaderBgColor,\n paddingHorizontal: 12,\n paddingVertical: 12,\n minWidth: 80,\n flexDirection: 'row',\n justifyContent: 'center',\n flexGrow: 1\n },\n headerIcon: {\n text: {\n color: themeVariables.tabHeaderIconColor\n }\n } as WmIconStyles,\n headerText: {\n color: themeVariables.tabHeaderTextColor,\n overflow: 'visible',\n fontFamily: themeVariables.baseFont,\n fontWeight: 'bold',\n fontSize: 16,\n textTransform: 'capitalize'\n },\n activeHeader: {\n backgroundColor: themeVariables.tabActiveHeaderBgColor\n },\n activeIndicator: {\n backgroundColor: themeVariables.tabActiveIndicatorBgColor,\n width: 100,\n height: 4,\n marginTop: -4\n },\n activeHeaderIcon: {\n text: {\n color: themeVariables.tabActiveHeaderIconColor\n }\n } as WmIconStyles,\n activeHeaderText: {\n color: themeVariables.tabActiveHeaderTextColor \n },\n skeleton: {} as WmSkeletonStyles\n } as WmTabheaderStyles;\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAiB/D,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CD,UAAU,CAACE,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAG;IAClBC,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE,MAAM;MAChBC,QAAQ,EAAE,SAAS;MACnBC,eAAe,EAAEP,cAAc,CAACQ;IACpC,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACJH,eAAe,EAAEP,cAAc,CAACQ,gBAAgB;MAChDG,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE,EAAE;MACnBP,QAAQ,EAAE,EAAE;MACZD,aAAa,EAAE,KAAK;MACpBS,cAAc,EAAE,QAAQ;MACxBC,QAAQ,EAAE;IACd,CAAC;IACDC,UAAU,EAAE;MACRN,IAAI,EAAE;QACFO,KAAK,EAAEhB,cAAc,CAACiB;MAC1B;IACJ,CAAiB;IACjBC,UAAU,EAAE;MACRF,KAAK,EAAEhB,cAAc,CAACmB,kBAAkB;MACxCb,QAAQ,EAAE,SAAS;MACnBc,UAAU,EAAEpB,cAAc,CAACqB,QAAQ;MACnCC,UAAU,EAAE,MAAM;MAClBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE;IACnB,CAAC;IACDC,YAAY,EAAE;MACVlB,eAAe,EAAEP,cAAc,CAAC0B;IACpC,CAAC;IACDC,eAAe,EAAE;MACbpB,eAAe,EAAEP,cAAc,CAAC4B,yBAAyB;MACzDC,KAAK,EAAE,GAAG;MACVC,MAAM,EAAE,CAAC;MACTC,SAAS,EAAE,CAAC;IAChB,CAAC;IACDC,gBAAgB,EAAE;MACdvB,IAAI,EAAE;QACFO,KAAK,EAAEhB,cAAc,CAACiC;MAC1B;IACJ,CAAiB;IACjBC,gBAAgB,EAAE;MACdlB,KAAK,EAAEhB,cAAc,CAACmC;IAC1B,CAAC;IACDC,QAAQ,EAAE,CAAC;EACf,CAAsB;EACtBnC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -49,7 +49,7 @@ export default class WmTabpane extends BaseComponent {
|
|
|
49
49
|
renderWidget(props) {
|
|
50
50
|
return /*#__PURE__*/React.createElement(View, {
|
|
51
51
|
style: this.styles.root
|
|
52
|
-
}, this.renderContent(props));
|
|
52
|
+
}, this._background, this.renderContent(props));
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
//# sourceMappingURL=tabpane.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmTabpaneProps","DEFAULT_CLASS","WmTabpaneState","WmTabpane","constructor","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","componentDidMount","tabs","parent","addTabPane","proxy","_onSelect","_onDeselect","select","selectTabPane","renderWidget","styles","root"],"sources":["tabpane.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabpaneProps from './tabpane.props';\nimport { DEFAULT_CLASS, WmTabpaneStyles } from './tabpane.styles';\nimport WmTabs from '../tabs.component';\n\nexport class WmTabpaneState extends BaseComponentState<WmTabpaneProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmTabpane extends BaseComponent<WmTabpaneProps, WmTabpaneState, WmTabpaneStyles> {\n\n constructor(props: WmTabpaneProps) {\n super(props, DEFAULT_CLASS, new WmTabpaneProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmTabpaneProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmTabpaneState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n componentDidMount() {\n const tabs = (this.parent) as WmTabs;\n tabs.addTabPane(this.proxy as WmTabpane);\n super.componentDidMount();\n }\n\n _onSelect() {\n this.invokeEventCallback('onSelect', [null, this.proxy]);\n }\n _onDeselect() {\n this.invokeEventCallback('onDeselect', [null, this.proxy]);\n }\n\n select() {\n (this.parent as WmTabs).selectTabPane(this);\n }\n\n renderWidget(props: WmTabpaneProps) {\n return (<View style={this.styles.root}>{this.renderContent(props)}</View>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,k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KAAqB,EAAE;IAClC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACqB,MAAM,CAACC;IAAK,GAAE,IAAI,
|
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmTabpaneProps","DEFAULT_CLASS","WmTabpaneState","WmTabpane","constructor","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","componentDidMount","tabs","parent","addTabPane","proxy","_onSelect","_onDeselect","select","selectTabPane","renderWidget","styles","root","_background"],"sources":["tabpane.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmTabpaneProps from './tabpane.props';\nimport { DEFAULT_CLASS, WmTabpaneStyles } from './tabpane.styles';\nimport WmTabs from '../tabs.component';\n\nexport class WmTabpaneState extends BaseComponentState<WmTabpaneProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmTabpane extends BaseComponent<WmTabpaneProps, WmTabpaneState, WmTabpaneStyles> {\n\n constructor(props: WmTabpaneProps) {\n super(props, DEFAULT_CLASS, new WmTabpaneProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmTabpaneProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmTabpaneState);\n });\n }\n return props.renderPartial(this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n componentDidMount() {\n const tabs = (this.parent) as WmTabs;\n tabs.addTabPane(this.proxy as WmTabpane);\n super.componentDidMount();\n }\n\n _onSelect() {\n this.invokeEventCallback('onSelect', [null, this.proxy]);\n }\n _onDeselect() {\n this.invokeEventCallback('onDeselect', [null, this.proxy]);\n }\n\n select() {\n (this.parent as WmTabs).selectTabPane(this);\n }\n\n renderWidget(props: WmTabpaneProps) {\n return (<View style={this.styles.root}>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;EACAE,WAAW,GAAG;IACZ,IAAI,CAACf,mBAAmB,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAACa,KAAK,CAAC,CAAC;EAC5D;EAEAG,MAAM,GAAG;IACN,IAAI,CAACL,MAAM,CAAYM,aAAa,CAAC,IAAI,CAAC;EAC7C;EAEAC,YAAY,CAACpB,KAAqB,EAAE;IAClC,oBAAQ,oBAAC,IAAI;MAAC,KAAK,EAAE,IAAI,CAACqB,MAAM,CAACC;IAAK,GAAE,IAAI,CAACC,WAAW,EAAE,IAAI,CAACpB,aAAa,CAACH,KAAK,CAAC,CAAQ;EAC7F;AACF"}
|
|
@@ -2,8 +2,10 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { View } from 'react-native';
|
|
6
6
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
7
|
+
import * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';
|
|
8
|
+
import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
|
|
7
9
|
import WmTabsProps from './tabs.props';
|
|
8
10
|
import { DEFAULT_CLASS } from './tabs.styles';
|
|
9
11
|
import WmTabheader from './tabheader/tabheader.component';
|
|
@@ -20,35 +22,27 @@ export default class WmTabs extends BaseComponent {
|
|
|
20
22
|
_defineProperty(this, "tabPanes", []);
|
|
21
23
|
_defineProperty(this, "newIndex", 0);
|
|
22
24
|
_defineProperty(this, "tabLayout", null);
|
|
23
|
-
_defineProperty(this, "tabPosition", new Animated.Value(0));
|
|
24
25
|
_defineProperty(this, "tabPaneHeights", []);
|
|
25
|
-
_defineProperty(this, "
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
_defineProperty(this, "animationView", null);
|
|
27
|
+
_defineProperty(this, "animationHandlers", {
|
|
28
|
+
bounds: e => {
|
|
29
|
+
var _this$tabLayout;
|
|
30
|
+
const activeTabIndex = this.state.selectedTabIndex,
|
|
31
|
+
w = ((_this$tabLayout = this.tabLayout) === null || _this$tabLayout === void 0 ? void 0 : _this$tabLayout.width) || 0,
|
|
32
|
+
noOfTabs = this.tabPanes.length;
|
|
33
|
+
return {
|
|
34
|
+
lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,
|
|
35
|
+
center: -1 * activeTabIndex * w,
|
|
36
|
+
upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w
|
|
37
|
+
};
|
|
29
38
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.tabPosition.flattenOffset();
|
|
36
|
-
let toIndex = this.state.selectedTabIndex;
|
|
37
|
-
if (Math.abs(dx) > 50) {
|
|
38
|
-
if (dx < 0) {
|
|
39
|
-
if (toIndex < this.tabPanes.length - 1) {
|
|
40
|
-
this.onChange(toIndex + 1);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
} else if (toIndex > 0) {
|
|
44
|
-
this.onChange(toIndex - 1);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
this.onChange(toIndex);
|
|
49
|
-
this.forceUpdate();
|
|
39
|
+
onLower: e => {
|
|
40
|
+
this.onChange(this.state.selectedTabIndex - 1);
|
|
41
|
+
},
|
|
42
|
+
onUpper: e => {
|
|
43
|
+
this.onChange(this.state.selectedTabIndex + 1);
|
|
50
44
|
}
|
|
51
|
-
})
|
|
45
|
+
});
|
|
52
46
|
const selectedIndex = props.defaultpaneindex || 0;
|
|
53
47
|
const tabsShown = [];
|
|
54
48
|
tabsShown[selectedIndex] = true;
|
|
@@ -68,16 +62,6 @@ export default class WmTabs extends BaseComponent {
|
|
|
68
62
|
this.forceUpdate();
|
|
69
63
|
}
|
|
70
64
|
}
|
|
71
|
-
animate() {
|
|
72
|
-
var _this$tabLayout;
|
|
73
|
-
let toIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.state.selectedTabIndex;
|
|
74
|
-
return Animated.timing(this.tabPosition, {
|
|
75
|
-
useNativeDriver: true,
|
|
76
|
-
toValue: -1 * toIndex * (((_this$tabLayout = this.tabLayout) === null || _this$tabLayout === void 0 ? void 0 : _this$tabLayout.width) || 0),
|
|
77
|
-
duration: 200,
|
|
78
|
-
easing: Easing.out(Easing.linear)
|
|
79
|
-
}).start();
|
|
80
|
-
}
|
|
81
65
|
setTabShown(tabIndex, callback) {
|
|
82
66
|
if (!this.state.tabsShown[tabIndex]) {
|
|
83
67
|
const tabsShown = [...this.state.tabsShown];
|
|
@@ -92,20 +76,28 @@ export default class WmTabs extends BaseComponent {
|
|
|
92
76
|
}
|
|
93
77
|
}
|
|
94
78
|
addTabPane(tabPane) {
|
|
95
|
-
this.tabPanes
|
|
96
|
-
|
|
79
|
+
const i = this.tabPanes.findIndex(t => t.props.name === tabPane.props.name);
|
|
80
|
+
if (i >= 0) {
|
|
81
|
+
this.tabPanes[i] = tabPane;
|
|
82
|
+
} else {
|
|
83
|
+
this.tabPanes[this.newIndex++] = tabPane;
|
|
84
|
+
}
|
|
97
85
|
}
|
|
98
86
|
selectTabPane(tabPane) {
|
|
99
|
-
this.
|
|
87
|
+
this.goToTab(this.tabPanes.indexOf(tabPane));
|
|
100
88
|
}
|
|
101
89
|
goToTab(index) {
|
|
102
|
-
|
|
90
|
+
var _this$tabLayout2, _this$animationView;
|
|
91
|
+
const position = -1 * index * (((_this$tabLayout2 = this.tabLayout) === null || _this$tabLayout2 === void 0 ? void 0 : _this$tabLayout2.width) || 0);
|
|
92
|
+
(_this$animationView = this.animationView) === null || _this$animationView === void 0 ? void 0 : _this$animationView.setPosition(position).then(() => this.onChange(index));
|
|
103
93
|
}
|
|
104
94
|
prev() {
|
|
105
|
-
|
|
95
|
+
var _this$animationView2;
|
|
96
|
+
(_this$animationView2 = this.animationView) === null || _this$animationView2 === void 0 ? void 0 : _this$animationView2.goToLower();
|
|
106
97
|
}
|
|
107
98
|
next() {
|
|
108
|
-
|
|
99
|
+
var _this$animationView3;
|
|
100
|
+
(_this$animationView3 = this.animationView) === null || _this$animationView3 === void 0 ? void 0 : _this$animationView3.goToLower();
|
|
109
101
|
}
|
|
110
102
|
onChange(newIndex) {
|
|
111
103
|
if (newIndex < 0 || newIndex >= this.tabPanes.length) {
|
|
@@ -115,7 +107,6 @@ export default class WmTabs extends BaseComponent {
|
|
|
115
107
|
const deselectedTab = this.tabPanes[this.state.selectedTabIndex];
|
|
116
108
|
this.newIndex = newIndex;
|
|
117
109
|
deselectedTab === null || deselectedTab === void 0 ? void 0 : deselectedTab._onDeselect();
|
|
118
|
-
this.animate(newIndex);
|
|
119
110
|
this.updateState({
|
|
120
111
|
selectedTabIndex: newIndex
|
|
121
112
|
}, () => {
|
|
@@ -146,8 +137,7 @@ export default class WmTabs extends BaseComponent {
|
|
|
146
137
|
styles: this.styles.tabHeader,
|
|
147
138
|
data: headerData,
|
|
148
139
|
showskeleton: this.props.showskeleton,
|
|
149
|
-
selectedTabIndex: this.state.selectedTabIndex
|
|
150
|
-
onIndexChange: this.onChange.bind(this)
|
|
140
|
+
selectedTabIndex: this.state.selectedTabIndex
|
|
151
141
|
}), /*#__PURE__*/React.createElement(View
|
|
152
142
|
//{...this.panResponder.panHandlers}
|
|
153
143
|
, {
|
|
@@ -156,13 +146,10 @@ export default class WmTabs extends BaseComponent {
|
|
|
156
146
|
//height: this.tabPaneHeights[this.state.selectedTabIndex],
|
|
157
147
|
overflow: 'hidden'
|
|
158
148
|
}
|
|
159
|
-
}, /*#__PURE__*/React.createElement(
|
|
149
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
160
150
|
style: {
|
|
161
151
|
flexDirection: 'row',
|
|
162
|
-
flexWrap: 'nowrap'
|
|
163
|
-
transform: [{
|
|
164
|
-
translateX: this.tabPosition
|
|
165
|
-
}]
|
|
152
|
+
flexWrap: 'nowrap'
|
|
166
153
|
}
|
|
167
154
|
}, tabPanes.map((p, i) => {
|
|
168
155
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -184,7 +171,7 @@ export default class WmTabs extends BaseComponent {
|
|
|
184
171
|
}));
|
|
185
172
|
return /*#__PURE__*/React.createElement(View, {
|
|
186
173
|
style: this.styles.root
|
|
187
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
174
|
+
}, this._background, /*#__PURE__*/React.createElement(View, {
|
|
188
175
|
onLayout: this.setTabLayout.bind(this),
|
|
189
176
|
style: {
|
|
190
177
|
width: '100%'
|
|
@@ -193,32 +180,46 @@ export default class WmTabs extends BaseComponent {
|
|
|
193
180
|
styles: this.styles.tabHeader,
|
|
194
181
|
data: headerData,
|
|
195
182
|
selectedTabIndex: this.state.selectedTabIndex,
|
|
196
|
-
onIndexChange: this.
|
|
197
|
-
}), /*#__PURE__*/React.createElement(View
|
|
198
|
-
|
|
199
|
-
, {
|
|
200
|
-
style: {
|
|
183
|
+
onIndexChange: this.goToTab.bind(this)
|
|
184
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
185
|
+
style: [{
|
|
201
186
|
width: '100%',
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
187
|
+
flex: 1
|
|
188
|
+
}, this.styles.root.height ? isWebPreviewMode() ? {
|
|
189
|
+
'overflow-x': 'hidden',
|
|
190
|
+
'overflow-y': 'auto'
|
|
191
|
+
} : {
|
|
192
|
+
overflow: 'scroll'
|
|
193
|
+
} : {
|
|
194
|
+
overflow: 'hidden',
|
|
195
|
+
maxHeight: this.tabPaneHeights[this.state.selectedTabIndex]
|
|
196
|
+
}]
|
|
197
|
+
}, /*#__PURE__*/React.createElement(SwipeAnimation.View, {
|
|
198
|
+
enableGestures: props.enablegestures,
|
|
206
199
|
style: {
|
|
207
200
|
flexDirection: 'row',
|
|
208
|
-
flexWrap: 'nowrap'
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
201
|
+
flexWrap: 'nowrap'
|
|
202
|
+
},
|
|
203
|
+
direction: "horizontal",
|
|
204
|
+
ref: r => {
|
|
205
|
+
this.animationView = r;
|
|
206
|
+
},
|
|
207
|
+
handlers: this.animationHandlers
|
|
213
208
|
}, tabPanes.map((p, i) => {
|
|
214
209
|
return /*#__PURE__*/React.createElement(View, {
|
|
210
|
+
style: {
|
|
211
|
+
width: '100%',
|
|
212
|
+
height: this.styles.root.height ? undefined : 1000000,
|
|
213
|
+
alignSelf: 'flex-start'
|
|
214
|
+
}
|
|
215
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
215
216
|
key: `tab-${p.props.title}-${i}`,
|
|
216
217
|
style: {
|
|
217
218
|
width: '100%',
|
|
218
219
|
alignSelf: 'flex-start'
|
|
219
220
|
},
|
|
220
221
|
onLayout: this.setTabPaneHeights.bind(this, i)
|
|
221
|
-
}, p);
|
|
222
|
+
}, p));
|
|
222
223
|
}))));
|
|
223
224
|
}
|
|
224
225
|
}
|