@wavemaker/app-rn-runtime 12.0.0-next.45752 → 12.0.0-next.46502
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +14 -2
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +9 -2
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
- app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +15 -2
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +10 -2
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +13 -3
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +10 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +3 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +5 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +6 -3
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +6 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js +7 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +23 -0
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +58 -11
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +44 -3
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js +7 -0
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +43 -4
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +3 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -2
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +41 -6
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +28 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js +6 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +8 -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 +6 -2
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +18 -0
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +3 -0
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -1
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +1 -0
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +32 -24
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +16 -2
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js +8 -0
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +14 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +43 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +17 -3
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +24 -1
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +33 -8
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +2 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +11 -3
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +24 -0
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +13 -3
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +15 -0
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +26 -2
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +3 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +3 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +24 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +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 +4 -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 +70 -14
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/page.props.js.map +1 -1
- app-rn-runtime/components/page/page.styles.js +7 -1
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +27 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.styles.js +6 -1
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/AppConfig.js.map +1 -1
- app-rn-runtime/core/base.component.js +33 -6
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +9 -7
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/props.provider.js +0 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/storage.service.js +15 -0
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +10 -4
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +5 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/core/wm-component-tree.js +58 -0
- app-rn-runtime/core/wm-component-tree.js.map +1 -0
- app-rn-runtime/package.json +13 -6
- app-rn-runtime/runtime/App.js +23 -9
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +1 -0
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +46 -13
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +38 -2
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +3 -0
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +4 -4
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +17 -1
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +10 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +2 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/http.service.js +5 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +14 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Animated","Easing","Text","View","BaseComponent","BaseComponentState","WmTabheaderProps","DEFAULT_CLASS","Tappable","createSkeleton","BackgroundComponent","WmIcon","WmTabheaderState","WmTabheader","constructor","props","_defineProperty","Value","headerScrollPosition","addListener","value","headerScrollPositionValue","setHeaderPanelPositon","nativeEvent","headerPanelLayout","layout","forceUpdate","setHeaderPositon","index","headersLayout","selectedTabIndex","onTabSelection","state","onIndexChange","setPosition","_this$state$props$sel","_this$headersLayout$s","_this$headerPanelLayo","_this$headerPanelLayo2","toIndicatorPosition","toIndicatorWidth","width","toHeaderScrollPosition","totalWidth","data","length","forEach","p","i","minScrollPosition","maxScrollPosition","Math","max","min","positionIndicator","position","isRTL","parallel","timing","useNativeDriver","toValue","duration","easing","linear","indicatorWidth","reverseIndicatorWidth","indicatorPosition","start","renderSkeleton","createElement","style","transform","translateX","onLayout","bind","styles","root","map","header","_this$styles$root","_this$styles$root2","_this$styles$activeHe","isSelected","onTap","key","flex","activeHeader","theme","borderRadius","height","activeHeaderText","fontSize","activeIndicator","scaleX","renderWidget","arrowIndicator","overflow","zIndex","_background","_extends","getTestPropsForAction","flexGrow","undefined","id","getTestId","mergeStyle","headerIcon","activeHeaderIcon","iconclass","icon","numberOfLines","headerText","getTestPropsForLabel","title","backgroundImage","image","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","arrowIndicatorDot"],"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';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\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 reverseIndicatorWidth = 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 this.forceUpdate();\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 ?? 0;\n let toIndicatorPosition = 0;\n let toIndicatorWidth = this.headersLayout[selectedTabIndex]?.width || 0;\n let toHeaderScrollPosition = this.headerScrollPositionValue;\n let totalWidth = 0;\n if (this.state.props.data.length !== this.headersLayout.length) {\n return;\n }\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 let positionIndicator = (toIndicatorPosition - (100 - toIndicatorWidth) / 2);\n let position = this.isRTL?-positionIndicator:positionIndicator;\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.reverseIndicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth ? 100 / toIndicatorWidth : 0,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorPosition, {\n useNativeDriver: true,\n toValue: position,\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 || \"80%\",\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 const arrowIndicator = this.styles.arrowIndicator as any;\n return (\n <View style={{overflow: 'hidden', zIndex: 16}}>\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)}\n {...this.getTestPropsForAction(i +'')}\n key={header.key}\n styles={this.styles.header.flexGrow ? {flexGrow: this.styles.header.flexGrow} : null}>\n <View onLayout={this.setHeaderPositon.bind(this, i)}>\n <View style={[\n this.styles.header,\n {flexGrow: undefined},\n isSelected ? this.styles.activeHeader : null]}>\n <WmIcon\n id={this.getTestId(i + 'icon')}\n styles={this.theme.mergeStyle({}, this.styles.headerIcon, isSelected ? this.styles.activeHeaderIcon : null)}\n iconclass={header.icon}></WmIcon>\n <Text numberOfLines={1} style={[\n this.styles.headerText,\n isSelected ? this.styles.activeHeaderText : null]}\n {...this.getTestPropsForLabel(i + '_title')}\n >{header.title}</Text>\n </View>\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 }]}>\n <Animated.View style={[{\n transform: [{\n scaleX: this.reverseIndicatorWidth\n }]\n },\n this.styles.arrowIndicator\n ]}>\n {arrowIndicator.backgroundImage ? (<BackgroundComponent\n image={arrowIndicator.backgroundImage}\n position={arrowIndicator.backgroundPosition}\n size={arrowIndicator.backgroundSize}\n repeat={arrowIndicator.backgroundRepeat}\n resizeMode={arrowIndicator.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}\n ></BackgroundComponent>) : null }\n <View style={this.styles.arrowIndicatorDot}></View>\n </Animated.View>\n </Animated.View>\n </Animated.View>\n </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;AAEnH,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAO,MAAMC,gBAAgB,SAASP,kBAAkB,CAAmB;AAG3E,eAAe,MAAMQ,WAAW,SAAST,aAAa,CAAwD;EAU5GU,WAAWA,CAACC,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIM,gBAAgB,CAAC,CAAC,CAAC;IAACI,eAAA,4BATjC,IAAI;IAAAA,eAAA,wBACN,EAAE;IAAAA,eAAA,+BACd,IAAIhB,QAAQ,CAACiB,KAAK,CAAC,CAAC,CAAC;IAAAD,eAAA,oCAChB,CAAC;IAAAA,eAAA,4BACT,IAAIhB,QAAQ,CAACiB,KAAK,CAAC,CAAC,CAAC;IAAAD,eAAA,gCACjB,IAAIhB,QAAQ,CAACiB,KAAK,CAAC,CAAC,CAAC;IAAAD,eAAA,yBAC5B,IAAIhB,QAAQ,CAACiB,KAAK,CAAC,CAAC,CAAC;IAI5C,IAAI,CAACC,oBA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DrB,SAAS,EAAE,CAAC;UACVC,UAAU,EAAE,IAAI,CAACN;QACnB,CAAC,EAAE;UACD2B,MAAM,EAAE,IAAI,CAAC7B;QACf,CAAC;MACH,CAAC;IAAE,gBACDjE,KAAA,CAAAsE,aAAA,CAACrE,QAAQ,CAACG,IAAI;MAACmE,KAAK,EAAE,CAAC;QACnBC,SAAS,EAAE,CAAC;UACVsB,MAAM,EAAE,IAAI,CAAC5B;QACf,CAAC;MACH,CAAC,EACD,IAAI,CAACU,MAAM,CAACoB,cAAc;IAC1B,GACCA,cAAc,CAACmB,eAAe,gBAAInH,KAAA,CAAAsE,aAAA,CAAC3D,mBAAmB;MACvDyG,KAAK,EAAEpB,cAAc,CAACmB,eAAgB;MACtC3D,QAAQ,EAAEwC,cAAc,CAACqB,kBAAmB;MAC5CC,IAAI,EAAEtB,cAAc,CAACuB,cAAe;MACpCC,MAAM,EAAExB,cAAc,CAACyB,gBAAiB;MACxCC,UAAU,EAAE1B,cAAc,CAAC2B,oBAAqB;MAChDpD,KAAK,EAAE;QAACkB,YAAY,EAAE,IAAI,CAACb,MAAM,CAACC,IAAI,CAACY;MAAY;IAAE,CACjC,CAAC,GAAI,IAAI,eAC7BzF,KAAA,CAAAsE,aAAA,CAAClE,IAAI;MAACmE,KAAK,EAAE,IAAI,CAACK,MAAM,CAACgD;IAAkB,CAAO,CACrC,CACF,CACF,CACT,CAAC;EAEX;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Animated","Easing","Text","View","BaseComponent","BaseComponentState","WmTabheaderProps","DEFAULT_CLASS","Tappable","createSkeleton","BackgroundComponent","WmIcon","WmTabheaderState","WmTabheader","constructor","props","_defineProperty","Value","headerScrollPosition","addListener","value","headerScrollPositionValue","setHeaderPanelPositon","nativeEvent","headerPanelLayout","layout","forceUpdate","setHeaderPositon","index","headersLayout","selectedTabIndex","onTabSelection","state","onIndexChange","setPosition","_this$headersLayout$s","_this$headerPanelLayo","_this$headerPanelLayo2","toIndicatorPosition","toIndicatorWidth","width","toHeaderScrollPosition","totalWidth","data","length","forEach","p","i","minScrollPosition","maxScrollPosition","Math","max","min","positionIndicator","position","isRTL","parallel","timing","useNativeDriver","toValue","duration","easing","linear","indicatorWidth","reverseIndicatorWidth","indicatorPosition","start","renderSkeleton","createElement","style","transform","translateX","onLayout","bind","styles","root","map","header","_this$styles$root","_this$styles$root2","_this$styles$activeHe","isSelected","onTap","key","flex","activeHeader","theme","borderRadius","height","activeHeaderText","fontSize","activeIndicator","scaleX","renderWidget","arrowIndicator","overflow","zIndex","_background","_extends","getTestPropsForAction","flexGrow","undefined","id","getTestId","mergeStyle","headerIcon","activeHeaderIcon","iconclass","icon","numberOfLines","headerText","getTestPropsForLabel","title","backgroundImage","image","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","arrowIndicatorDot"],"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';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\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 reverseIndicatorWidth = 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 this.forceUpdate();\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 ? this.state.props.selectedTabIndex : 0\n let toIndicatorPosition = 0;\n let toIndicatorWidth = this.headersLayout[selectedTabIndex]?.width || 0;\n let toHeaderScrollPosition = this.headerScrollPositionValue;\n let totalWidth = 0;\n if (this.state.props.data.length !== this.headersLayout.length) {\n return;\n }\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 let positionIndicator = (toIndicatorPosition - (100 - toIndicatorWidth) / 2);\n let position = this.isRTL?-positionIndicator:positionIndicator;\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.reverseIndicatorWidth, {\n useNativeDriver: true,\n toValue: toIndicatorWidth ? 100 / toIndicatorWidth : 0,\n duration: 200,\n easing: Easing.linear\n }),\n Animated.timing(this.indicatorPosition, {\n useNativeDriver: true,\n toValue: position,\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 || \"80%\",\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 const arrowIndicator = this.styles.arrowIndicator as any;\n return (\n <View style={{overflow: 'hidden', zIndex: 16}}>\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)}\n {...this.getTestPropsForAction(i +'')}\n key={header.key}\n styles={this.styles.header.flexGrow ? {flexGrow: this.styles.header.flexGrow} : null}>\n <View onLayout={this.setHeaderPositon.bind(this, i)}>\n <View style={[\n this.styles.header,\n {flexGrow: undefined},\n isSelected ? this.styles.activeHeader : null]}>\n <WmIcon\n id={this.getTestId(i + 'icon')}\n styles={this.theme.mergeStyle({}, this.styles.headerIcon, isSelected ? this.styles.activeHeaderIcon : null)}\n iconclass={header.icon}></WmIcon>\n <Text numberOfLines={1} style={[\n this.styles.headerText,\n isSelected ? this.styles.activeHeaderText : null]}\n {...this.getTestPropsForLabel(i + '_title')}\n >{header.title}</Text>\n </View>\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 }]}>\n <Animated.View style={[{\n transform: [{\n scaleX: this.reverseIndicatorWidth\n }]\n },\n this.styles.arrowIndicator\n ]}>\n {arrowIndicator.backgroundImage ? (<BackgroundComponent\n image={arrowIndicator.backgroundImage}\n position={arrowIndicator.backgroundPosition}\n size={arrowIndicator.backgroundSize}\n repeat={arrowIndicator.backgroundRepeat}\n resizeMode={arrowIndicator.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}\n ></BackgroundComponent>) : null }\n <View style={this.styles.arrowIndicatorDot}></View>\n </Animated.View>\n </Animated.View>\n </Animated.View>\n </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;AAEnH,SAASC,mBAAmB,QAAQ,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AU,EAAE1B,cAAc,CAAC2B,oBAAqB;MAChDpD,KAAK,EAAE;QAACkB,YAAY,EAAE,IAAI,CAACb,MAAM,CAACC,IAAI,CAACY;MAAY;IAAE,CACjC,CAAC,GAAI,IAAI,eAC7BxF,KAAA,CAAAqE,aAAA,CAACjE,IAAI;MAACkE,KAAK,EAAE,IAAI,CAACK,MAAM,CAACgD;IAAkB,CAAO,CACrC,CACF,CACF,CACT,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -16,6 +16,7 @@ export class WmTabpaneState extends BaseComponentState {
|
|
16
16
|
export default class WmTabpane extends BaseComponent {
|
17
17
|
constructor(props) {
|
18
18
|
super(props, DEFAULT_CLASS, new WmTabpaneProps(), new WmTabpaneState());
|
19
|
+
_defineProperty(this, "paneId", "");
|
19
20
|
this.subscribe('scroll', event => {
|
20
21
|
return this.state.isActive;
|
21
22
|
});
|
@@ -41,9 +42,18 @@ export default class WmTabpane extends BaseComponent {
|
|
41
42
|
}
|
42
43
|
componentDidMount() {
|
43
44
|
const tabs = this.parent;
|
44
|
-
tabs
|
45
|
+
// When skeleton is enabled in the tabs component, the parent would be WMSkeleton which doesnot have addTabPane function
|
46
|
+
if (tabs.addTabPane) {
|
47
|
+
tabs.addTabPane(this.proxy);
|
48
|
+
}
|
45
49
|
super.componentDidMount();
|
46
50
|
}
|
51
|
+
componentWillUnmount() {
|
52
|
+
const tabs = this.parent;
|
53
|
+
if (tabs.removeTabPane) {
|
54
|
+
tabs.removeTabPane(this);
|
55
|
+
}
|
56
|
+
}
|
47
57
|
_onSelect() {
|
48
58
|
this.updateState({
|
49
59
|
isActive: true
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","ScrollView","BaseComponent","BaseComponentState","WmTabpaneProps","DEFAULT_CLASS","WmTabpaneState","constructor","args","_defineProperty","WmTabpane","props","subscribe","event","state","isActive","onPartialLoad","invokeEventCallback","renderContent","renderPartial","isPartialLoaded","setTimeout","updateState","bind","children","showView","isVisible","componentDidMount","tabs","parent","addTabPane","proxy","_onSelect","_onDeselect","select","selectTabPane","renderWidget","createElement","style","styles","root","onScroll","notify","_background"],"sources":["tabpane.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler'\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 isActive = false;\n}\n\nexport default class WmTabpane extends BaseComponent<WmTabpaneProps, WmTabpaneState, WmTabpaneStyles> {\n\n constructor(props: WmTabpaneProps) {\n super(props, DEFAULT_CLASS, new WmTabpaneProps(), new WmTabpaneState());\n this.subscribe('scroll', (event: any) => {\n return this.state.isActive;\n });\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(props, this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n showView(): boolean {\n return this.isVisible() && this.state.isActive;\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.updateState({\n isActive: true\n } as WmTabpaneState);\n this.invokeEventCallback('onSelect', [null, this.proxy]);\n }\n _onDeselect() {\n this.updateState({\n isActive: false\n } as WmTabpaneState);\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 (<ScrollView style={this.styles.root} \n onScroll={(event) => {this.notify('scroll', [event])}}>\n {this._background}\n {this.renderContent(props)}\n </ScrollView>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAGjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;EAAAI,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BACnD,KAAK;IAAAA,eAAA,mBACZ,KAAK;EAAA;AAClB;AAEA,eAAe,MAAMC,SAAS,SAASR,aAAa,CAAkD;EAEpGK,WAAWA,CAACI,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,EAAE,IAAIE,cAAc,CAAC,CAAC,CAAC;
|
1
|
+
{"version":3,"names":["React","ScrollView","BaseComponent","BaseComponentState","WmTabpaneProps","DEFAULT_CLASS","WmTabpaneState","constructor","args","_defineProperty","WmTabpane","props","subscribe","event","state","isActive","onPartialLoad","invokeEventCallback","renderContent","renderPartial","isPartialLoaded","setTimeout","updateState","bind","children","showView","isVisible","componentDidMount","tabs","parent","addTabPane","proxy","componentWillUnmount","removeTabPane","_onSelect","_onDeselect","select","selectTabPane","renderWidget","createElement","style","styles","root","onScroll","notify","_background"],"sources":["tabpane.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler'\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 isActive = false;\n}\n\nexport default class WmTabpane extends BaseComponent<WmTabpaneProps, WmTabpaneState, WmTabpaneStyles> {\n public paneId: string = \"\";\n constructor(props: WmTabpaneProps) {\n super(props, DEFAULT_CLASS, new WmTabpaneProps(), new WmTabpaneState());\n this.subscribe('scroll', (event: any) => {\n return this.state.isActive;\n });\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(props, this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n showView(): boolean {\n return this.isVisible() && this.state.isActive;\n }\n\n componentDidMount() {\n const tabs = (this.parent) as WmTabs;\n // When skeleton is enabled in the tabs component, the parent would be WMSkeleton which doesnot have addTabPane function\n if(tabs.addTabPane) {\n tabs.addTabPane(this.proxy as WmTabpane);\n }\n super.componentDidMount();\n }\n\n componentWillUnmount() {\n const tabs = (this.parent) as WmTabs;\n if(tabs.removeTabPane) {\n tabs.removeTabPane(this)\n }\n }\n\n _onSelect() {\n this.updateState({\n isActive: true\n } as WmTabpaneState);\n this.invokeEventCallback('onSelect', [null, this.proxy]);\n }\n _onDeselect() {\n this.updateState({\n isActive: false\n } as WmTabpaneState);\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 (<ScrollView style={this.styles.root} \n onScroll={(event) => {this.notify('scroll', [event])}}>\n {this._background}\n {this.renderContent(props)}\n </ScrollView>);\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAGjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB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KAAkB,CAAC;IAC1C;IACA,KAAK,CAACJ,iBAAiB,CAAC,CAAC;EAC3B;EAEAK,oBAAoBA,CAAA,EAAG;IACrB,MAAMJ,IAAI,GAAI,IAAI,CAACC,MAAiB;IACpC,IAAGD,IAAI,CAACK,aAAa,EAAE;MACrBL,IAAI,CAACK,aAAa,CAAC,IAAI,CAAC;IAC1B;EACF;EAEAC,SAASA,CAAA,EAAG;IACV,IAAI,CAACZ,WAAW,CAAC;MACfP,QAAQ,EAAE;IACZ,CAAmB,CAAC;IACpB,IAAI,CAACE,mBAAmB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAACc,KAAK,CAAC,CAAC;EAC1D;EACAI,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACb,WAAW,CAAC;MACfP,QAAQ,EAAE;IACZ,CAAmB,CAAC;IACpB,IAAI,CAACE,mBAAmB,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAACc,KAAK,CAAC,CAAC;EAC5D;EAEAK,MAAMA,CAAA,EAAG;IACN,IAAI,CAACP,MAAM,CAAYQ,aAAa,CAAC,IAAI,CAAC;EAC7C;EAEAC,YAAYA,CAAC3B,KAAqB,EAAE;IAClC,oBAAQX,KAAA,CAAAuC,aAAA,CAACtC,UAAU;MAACuC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC,IAAK;MAC5CC,QAAQ,EAAG9B,KAAK,IAAK;QAAC,IAAI,CAAC+B,MAAM,CAAC,QAAQ,EAAE,CAAC/B,KAAK,CAAC,CAAC;MAAA;IAAE,GACjD,IAAI,CAACgC,WAAW,EAChB,IAAI,CAAC3B,aAAa,CAACP,KAAK,CACf,CAAC;EACjB;AACF","ignoreList":[]}
|
@@ -10,6 +10,7 @@ export default class WmTabpaneProps extends BaseProps {
|
|
10
10
|
_defineProperty(this, "title", 'Tab Title');
|
11
11
|
_defineProperty(this, "renderPartial", void 0);
|
12
12
|
_defineProperty(this, "isPartialLoaded", false);
|
13
|
+
_defineProperty(this, "invokeVariables", true);
|
13
14
|
}
|
14
15
|
}
|
15
16
|
//# sourceMappingURL=tabpane.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmTabpaneProps","constructor","args","_defineProperty"],"sources":["tabpane.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTabpaneProps extends BaseProps {\n children?: any;\n paneicon?: string = null as any;\n title: string = 'Tab Title';\n renderPartial?: Function;\n isPartialLoaded? = false;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,mBAEhC,IAAI;IAAAA,eAAA,gBACR,WAAW;IAAAA,eAAA;IAAAA,eAAA,0BAER,KAAK;EAAA;
|
1
|
+
{"version":3,"names":["BaseProps","WmTabpaneProps","constructor","args","_defineProperty"],"sources":["tabpane.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTabpaneProps extends BaseProps {\n children?: any;\n paneicon?: string = null as any;\n title: string = 'Tab Title';\n renderPartial?: Function;\n isPartialLoaded? = false;\n invokeVariables = true;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,mBAEhC,IAAI;IAAAA,eAAA,gBACR,WAAW;IAAAA,eAAA;IAAAA,eAAA,0BAER,KAAK;IAAAA,eAAA,0BACN,IAAI;EAAA;AACxB","ignoreList":[]}
|
@@ -9,6 +9,7 @@ import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
|
|
9
9
|
import WmTabsProps from './tabs.props';
|
10
10
|
import { DEFAULT_CLASS } from './tabs.styles';
|
11
11
|
import WmTabheader from './tabheader/tabheader.component';
|
12
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
12
13
|
export class WmTabsState extends BaseComponentState {
|
13
14
|
constructor(...args) {
|
14
15
|
super(...args);
|
@@ -71,11 +72,19 @@ export default class WmTabs extends BaseComponent {
|
|
71
72
|
}
|
72
73
|
}
|
73
74
|
addTabPane(tabPane) {
|
74
|
-
|
75
|
+
tabPane.paneId = `tabPane${this.newIndex++}`;
|
76
|
+
const i = this.tabPanes.findIndex(t => t.paneId === tabPane.paneId);
|
75
77
|
if (i >= 0) {
|
76
78
|
this.tabPanes[i] = tabPane;
|
77
79
|
} else {
|
78
|
-
this.tabPanes
|
80
|
+
this.tabPanes.push(tabPane);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
removeTabPane(tabPane) {
|
84
|
+
const i = this.tabPanes.findIndex(t => t.paneId === tabPane.paneId);
|
85
|
+
if (i >= 0) {
|
86
|
+
this.tabPanes.splice(i, 1);
|
87
|
+
this.newIndex--;
|
79
88
|
}
|
80
89
|
}
|
81
90
|
selectTabPane(tabPane) {
|
@@ -122,7 +131,7 @@ export default class WmTabs extends BaseComponent {
|
|
122
131
|
});
|
123
132
|
});
|
124
133
|
}
|
125
|
-
|
134
|
+
renderSkeletonContent(props) {
|
126
135
|
const tabPanes = React.Children.toArray(this.props.children).filter((item, index) => item.props.show != false);
|
127
136
|
const headerData = tabPanes.map((p, i) => ({
|
128
137
|
title: p.props.title || 'Tab Title',
|
@@ -164,9 +173,28 @@ export default class WmTabs extends BaseComponent {
|
|
164
173
|
alignSelf: 'flex-start'
|
165
174
|
},
|
166
175
|
onLayout: this.setTabPaneHeights.bind(this, i)
|
167
|
-
}, p
|
176
|
+
}, /*#__PURE__*/React.cloneElement(p, {
|
177
|
+
"invokeVariables": false
|
178
|
+
}));
|
168
179
|
}))));
|
169
180
|
}
|
181
|
+
renderSkeleton(props) {
|
182
|
+
if (!props.showskeletonchildren) {
|
183
|
+
var _this$props;
|
184
|
+
const skeletonStyles = ((_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.styles) === null || _this$props === void 0 ? void 0 : _this$props.skeleton) || {
|
185
|
+
root: {},
|
186
|
+
text: {}
|
187
|
+
};
|
188
|
+
return createSkeleton(this.theme, skeletonStyles, {
|
189
|
+
...this.styles.root
|
190
|
+
}, /*#__PURE__*/React.createElement(View, {
|
191
|
+
style: [this.styles.root, {
|
192
|
+
opacity: 0
|
193
|
+
}]
|
194
|
+
}, this.renderSkeletonContent(props)));
|
195
|
+
}
|
196
|
+
return this.renderSkeletonContent(props);
|
197
|
+
}
|
170
198
|
onPropertyChange(name, $new, $old) {
|
171
199
|
super.onPropertyChange(name, $new, $old);
|
172
200
|
switch (name) {
|
@@ -180,6 +208,9 @@ export default class WmTabs extends BaseComponent {
|
|
180
208
|
});
|
181
209
|
}
|
182
210
|
}
|
211
|
+
getBackground() {
|
212
|
+
return this._showSkeleton ? null : this._background;
|
213
|
+
}
|
183
214
|
renderWidget(props) {
|
184
215
|
const tabPanes = React.Children.toArray(props.children).filter((item, index) => item.props.show != false);
|
185
216
|
const headerData = tabPanes.map((p, i) => ({
|
@@ -187,9 +218,13 @@ export default class WmTabs extends BaseComponent {
|
|
187
218
|
icon: p.props.paneicon || '',
|
188
219
|
key: `tab-${p.props.title}-${i}`
|
189
220
|
}));
|
221
|
+
const styles = this._showSkeleton ? {
|
222
|
+
...this.styles.root,
|
223
|
+
...this.styles.skeleton.root
|
224
|
+
} : this.styles.root;
|
190
225
|
return /*#__PURE__*/React.createElement(View, {
|
191
|
-
style:
|
192
|
-
}, this.
|
226
|
+
style: styles
|
227
|
+
}, this.getBackground(), /*#__PURE__*/React.createElement(View, {
|
193
228
|
onLayout: this.setTabLayout.bind(this),
|
194
229
|
style: {
|
195
230
|
width: '100%'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","SwipeAnimation","isWebPreviewMode","WmTabsProps","DEFAULT_CLASS","WmTabheader","WmTabsState","constructor","args","_defineProperty","WmTabs","props","bounds","e","_this$tabLayout","activeTabIndex","state","selectedTabIndex","w","tabLayout","width","noOfTabs","tabPanes","length","lower","center","upper","onLower","onChange","onUpper","setTabLayout","event","nativeEvent","layout","forceUpdate","goToTab","setTabPaneHeights","index","_nativeEvent$nativeEv","tabPaneHeights","height","setTabShown","tabIndex","callback","tabsShown","setTimeout","updateState","addTabPane","tabPane","i","findIndex","t","name","newIndex","selectTabPane","indexOf","selectedTabPane","_this$tabLayout2","position","animationView","setPosition","then","prev","_this$animationView","goToLower","next","_this$animationView2","oldIndex","deselectedTab","_onDeselect","selectedTab","_onSelect","invokeEventCallback","proxy","renderSkeleton","Children","toArray","children","filter","item","show","headerData","map","p","title","icon","key","createElement","style","styles","root","borderBottomWidth","onLayout","bind","tabHeader","data","showskeleton","overflow","flexDirection","flexWrap","alignSelf","onPropertyChange","$new","$old","selectedIndex","renderWidget","paneicon","_background","id","getTestId","onIndexChange","flex","maxHeight","tabContent","enableGestures","enablegestures","alignItems","direction","ref","r","handlers","animationHandlers","undefined"],"sources":["tabs.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmTabsProps from './tabs.props';\nimport { DEFAULT_CLASS, WmTabsStyles } from './tabs.styles';\nimport WmTabpane from './tabpane/tabpane.component';\nimport WmTabheader from './tabheader/tabheader.component';\n\nexport class WmTabsState extends BaseComponentState<WmTabsProps> {\n tabsShown: boolean[] = [];\n selectedTabIndex: number = 0;\n}\n\nexport default class WmTabs extends BaseComponent<WmTabsProps, WmTabsState, WmTabsStyles> {\n public tabPanes = [] as WmTabpane[];\n private newIndex = 0;\n private tabLayout: LayoutRectangle = null as any;\n private tabPaneHeights: number[] = [];\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.selectedTabIndex,\n w = this.tabLayout?.width || 0,\n noOfTabs = this.tabPanes.length;\n return {\n lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,\n center: -1 * activeTabIndex * w,\n upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w\n };\n },\n onLower: (e) => {\n this.onChange(this.state.selectedTabIndex - 1);\n },\n onUpper: (e) => {\n this.onChange(this.state.selectedTabIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmTabsProps) {\n super(props, DEFAULT_CLASS, new WmTabsProps(), new WmTabsState());\n }\n\n setTabLayout(event: LayoutChangeEvent) {\n this.tabLayout = event.nativeEvent.layout;\n this.forceUpdate(() => {\n this.goToTab();\n });\n }\n\n setTabPaneHeights(index: number, nativeEvent: LayoutChangeEvent) {\n this.tabPaneHeights[index] = nativeEvent.nativeEvent.layout?.height;\n if (index === this.state.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n setTabShown(tabIndex: number, callback: () => any) {\n if (!this.state.tabsShown[tabIndex]) {\n const tabsShown = [...this.state.tabsShown];\n tabsShown[tabIndex] = true;\n setTimeout(() => {\n this.updateState({\n tabsShown: tabsShown\n } as WmTabsState, callback);\n }, 300);\n } else {\n callback && callback();\n }\n }\n\n addTabPane(tabPane: WmTabpane) {\n const i = this.tabPanes.findIndex(t => t.props.name === tabPane.props.name);\n if (i >= 0) {\n this.tabPanes[i] = tabPane;\n } else {\n this.tabPanes[this.newIndex++] = tabPane;\n }\n }\n\n selectTabPane(tabPane: WmTabpane) {\n this.goToTab(this.tabPanes.indexOf(tabPane));\n }\n\n get selectedTabPane() {\n return this.tabPanes[this.state.selectedTabIndex];\n }\n\n goToTab(index = this.state.selectedTabIndex) {\n if (index < 0 || index >= this.tabPanes.length) {\n return;\n }\n const position = -1 * index * (this.tabLayout?.width || 0);\n if(this.animationView) {\n this.animationView.setPosition(position)\n .then(() => this.onChange(index));\n } else {\n this.onChange(index);\n }\n }\n\n prev() {\n this.animationView?.goToLower();\n }\n\n next() {\n this.animationView?.goToLower();\n }\n\n onChange(newIndex: number) {\n if (newIndex < 0 || newIndex >= this.tabPanes.length) {\n return;\n }\n const oldIndex = this.state.selectedTabIndex;\n const deselectedTab = this.tabPanes[this.state.selectedTabIndex];\n this.newIndex = newIndex;\n deselectedTab?._onDeselect();\n this.updateState({\n selectedTabIndex: newIndex\n } as WmTabsState, () => {\n this.setTabShown(newIndex, () => {\n const selectedTab = this.tabPanes[newIndex];\n selectedTab?._onSelect();\n this.invokeEventCallback('onChange', [{}, this.proxy, newIndex, oldIndex]);\n });\n });\n }\n\n public renderSkeleton(props: WmTabsProps){\n const tabPanes = React.Children.toArray(this.props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: '', key: `tab-${p.props.title}-${i}`}));\n return(\n <View style={[this.styles.root, { borderBottomWidth: 0}]}>\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n styles={this.styles.tabHeader}\n data={headerData}\n showskeleton={this.props.showskeleton}\n selectedTabIndex={this.state.selectedTabIndex}\n ></WmTabheader>\n <View\n //{...this.panResponder.panHandlers}\n style={{\n width: '100%',\n //height: this.tabPaneHeights[this.state.selectedTabIndex],\n overflow: 'hidden'\n }} >\n <View style={{\n flexDirection: 'row',\n flexWrap: 'nowrap'\n }}>\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>);\n })}\n </View>\n </View>\n </View>\n\n )\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"defaultpaneindex\":\n const selectedIndex = $new || 0;\n const tabsShown: boolean[] = [];\n tabsShown[selectedIndex] = true;\n this.updateState({\n selectedTabIndex: selectedIndex,\n tabsShown: tabsShown\n } as WmTabsState);\n }\n }\n\n renderWidget(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: p.props.paneicon || '', key: `tab-${p.props.title}-${i}`}));\n return (\n <View style={this.styles.root}>\n {this._background}\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n id={this.getTestId('headers')}\n styles={this.styles.tabHeader}\n data={headerData}\n selectedTabIndex={this.state.selectedTabIndex}\n onIndexChange={this.goToTab.bind(this)}\n ></WmTabheader>\n <View\n style={[{\n width: '100%',\n flex: 1\n }, this.styles.root.height ?\n (isWebPreviewMode() ? {'overflowX': 'hidden','overflowY': 'auto'} as any : {overflow: 'scroll'})\n : {\n overflow: 'hidden',\n maxHeight: this.tabPaneHeights[this.state.selectedTabIndex],\n }, this.styles.tabContent]} >\n <SwipeAnimation.View\n enableGestures={props.enablegestures}\n style={{\n flexDirection: 'row',\n flexWrap: 'nowrap',\n alignItems: 'flex-start'\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n >\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{\n width: '100%',\n height: this.styles.root.height ? undefined : 1000000,\n alignSelf: 'flex-start'}}>\n <View\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>\n </View>);\n })}\n </SwipeAnimation.View>\n </View>\n </View>\n );\n }\n}\n"],"mappings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version":3,"names":["React","View","BaseComponent","BaseComponentState","SwipeAnimation","isWebPreviewMode","WmTabsProps","DEFAULT_CLASS","WmTabheader","createSkeleton","WmTabsState","constructor","args","_defineProperty","WmTabs","props","bounds","e","_this$tabLayout","activeTabIndex","state","selectedTabIndex","w","tabLayout","width","noOfTabs","tabPanes","length","lower","center","upper","onLower","onChange","onUpper","setTabLayout","event","nativeEvent","layout","forceUpdate","goToTab","setTabPaneHeights","index","_nativeEvent$nativeEv","tabPaneHeights","height","setTabShown","tabIndex","callback","tabsShown","setTimeout","updateState","addTabPane","tabPane","paneId","newIndex","i","findIndex","t","push","removeTabPane","splice","selectTabPane","indexOf","selectedTabPane","_this$tabLayout2","position","animationView","setPosition","then","prev","_this$animationView","goToLower","next","_this$animationView2","oldIndex","deselectedTab","_onDeselect","selectedTab","_onSelect","invokeEventCallback","proxy","renderSkeletonContent","Children","toArray","children","filter","item","show","headerData","map","p","title","icon","key","createElement","style","styles","root","borderBottomWidth","onLayout","bind","tabHeader","data","showskeleton","overflow","flexDirection","flexWrap","alignSelf","cloneElement","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","skeleton","text","theme","opacity","onPropertyChange","name","$new","$old","selectedIndex","getBackground","_showSkeleton","_background","renderWidget","paneicon","id","getTestId","onIndexChange","flex","maxHeight","tabContent","enableGestures","enablegestures","alignItems","direction","ref","r","handlers","animationHandlers","undefined"],"sources":["tabs.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmTabsProps from './tabs.props';\nimport { DEFAULT_CLASS, WmTabsStyles } from './tabs.styles';\nimport WmTabpane from './tabpane/tabpane.component';\nimport WmTabheader from './tabheader/tabheader.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTabsState extends BaseComponentState<WmTabsProps> {\n tabsShown: boolean[] = [];\n selectedTabIndex: number = 0;\n}\n\nexport default class WmTabs extends BaseComponent<WmTabsProps, WmTabsState, WmTabsStyles> {\n public tabPanes = [] as WmTabpane[];\n private newIndex = 0;\n private tabLayout: LayoutRectangle = null as any;\n private tabPaneHeights: number[] = [];\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.selectedTabIndex,\n w = this.tabLayout?.width || 0,\n noOfTabs = this.tabPanes.length;\n return {\n lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,\n center: -1 * activeTabIndex * w,\n upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w\n };\n },\n onLower: (e) => {\n this.onChange(this.state.selectedTabIndex - 1);\n },\n onUpper: (e) => {\n this.onChange(this.state.selectedTabIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmTabsProps) {\n super(props, DEFAULT_CLASS, new WmTabsProps(), new WmTabsState());\n }\n\n setTabLayout(event: LayoutChangeEvent) {\n this.tabLayout = event.nativeEvent.layout;\n this.forceUpdate(() => {\n this.goToTab();\n });\n }\n\n setTabPaneHeights(index: number, nativeEvent: LayoutChangeEvent) {\n this.tabPaneHeights[index] = nativeEvent.nativeEvent.layout?.height;\n if (index === this.state.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n setTabShown(tabIndex: number, callback: () => any) {\n if (!this.state.tabsShown[tabIndex]) {\n const tabsShown = [...this.state.tabsShown];\n tabsShown[tabIndex] = true;\n setTimeout(() => {\n this.updateState({\n tabsShown: tabsShown\n } as WmTabsState, callback);\n }, 300);\n } else {\n callback && callback();\n }\n }\n\n addTabPane(tabPane: WmTabpane) {\n tabPane.paneId = `tabPane${this.newIndex++}`;\n const i = this.tabPanes.findIndex(t => t.paneId === tabPane.paneId);\n if (i >= 0) {\n this.tabPanes[i] = tabPane;\n } else {\n this.tabPanes.push(tabPane)\n }\n }\n\n removeTabPane(tabPane: WmTabpane) {\n const i = this.tabPanes.findIndex(t => t.paneId === tabPane.paneId);\n if (i >= 0) {\n this.tabPanes.splice(i, 1); \n this.newIndex--;\n }\n }\n\n selectTabPane(tabPane: WmTabpane) {\n this.goToTab(this.tabPanes.indexOf(tabPane));\n }\n\n get selectedTabPane() {\n return this.tabPanes[this.state.selectedTabIndex];\n }\n\n goToTab(index = this.state.selectedTabIndex) {\n if (index < 0 || index >= this.tabPanes.length) {\n return;\n }\n const position = -1 * index * (this.tabLayout?.width || 0);\n if(this.animationView) {\n this.animationView.setPosition(position)\n .then(() => this.onChange(index));\n } else {\n this.onChange(index);\n }\n }\n\n prev() {\n this.animationView?.goToLower();\n }\n\n next() {\n this.animationView?.goToLower();\n }\n\n onChange(newIndex: number) {\n if (newIndex < 0 || newIndex >= this.tabPanes.length) {\n return;\n }\n const oldIndex = this.state.selectedTabIndex;\n const deselectedTab = this.tabPanes[this.state.selectedTabIndex];\n this.newIndex = newIndex;\n deselectedTab?._onDeselect();\n this.updateState({\n selectedTabIndex: newIndex\n } as WmTabsState, () => {\n this.setTabShown(newIndex, () => {\n const selectedTab = this.tabPanes[newIndex];\n selectedTab?._onSelect();\n this.invokeEventCallback('onChange', [{}, this.proxy, newIndex, oldIndex]);\n });\n });\n }\n\n public renderSkeletonContent(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(this.props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: '', key: `tab-${p.props.title}-${i}`}));\n return(\n <View style={[this.styles.root, { borderBottomWidth: 0}]}>\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n styles={this.styles.tabHeader}\n data={headerData}\n showskeleton={this.props.showskeleton}\n selectedTabIndex={this.state.selectedTabIndex}\n ></WmTabheader>\n <View\n //{...this.panResponder.panHandlers}\n style={{\n width: '100%',\n //height: this.tabPaneHeights[this.state.selectedTabIndex],\n overflow: 'hidden'\n }} >\n <View style={{\n flexDirection: 'row',\n flexWrap: 'nowrap'\n }}>\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {React.cloneElement(p, { \"invokeVariables\": false })}\n {/* {p} */}\n </View>);\n })}\n </View>\n </View>\n </View>\n )\n }\n\n public renderSkeleton(props: WmTabsProps){\n if(!props.showskeletonchildren) {\n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n {this.renderSkeletonContent(props)}\n </View>)) \n }\n return this.renderSkeletonContent(props);\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"defaultpaneindex\":\n const selectedIndex = $new || 0;\n const tabsShown: boolean[] = [];\n tabsShown[selectedIndex] = true;\n this.updateState({\n selectedTabIndex: selectedIndex,\n tabsShown: tabsShown\n } as WmTabsState);\n }\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n\n\n renderWidget(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: p.props.paneicon || '', key: `tab-${p.props.title}-${i}`}));\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <View style={styles}>\n {this.getBackground()}\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n id={this.getTestId('headers')}\n styles={this.styles.tabHeader}\n data={headerData}\n selectedTabIndex={this.state.selectedTabIndex}\n onIndexChange={this.goToTab.bind(this)}\n ></WmTabheader>\n <View\n style={[{\n width: '100%',\n flex: 1\n }, this.styles.root.height ?\n (isWebPreviewMode() ? {'overflowX': 'hidden','overflowY': 'auto'} as any : {overflow: 'scroll'})\n : {\n overflow: 'hidden',\n maxHeight: this.tabPaneHeights[this.state.selectedTabIndex],\n }, this.styles.tabContent]} >\n <SwipeAnimation.View\n enableGestures={props.enablegestures}\n style={{\n flexDirection: 'row',\n flexWrap: 'nowrap',\n alignItems: 'flex-start'\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n >\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{\n width: '100%',\n height: this.styles.root.height ? undefined : 1000000,\n alignSelf: 'flex-start'}}>\n <View\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>\n </View>);\n })}\n </SwipeAnimation.View>\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA6CC,IAAI,QAAQ,cAAc;AACvE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAE3D,OAAOC,WAAW,MAAM,iCAAiC;AAEzD,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,WAAW,SAASP,kBAAkB,CAAc;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,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,IAAI,CAAC2E,MAAM,CAACoC,UAAU;IAAE,gBAC3BpI,KAAA,CAAA8F,aAAA,CAAC1F,cAAc,CAACH,IAAI;MAClBoI,cAAc,EAAEtH,KAAK,CAACuH,cAAe;MACrCvC,KAAK,EAAE;QACLU,aAAa,EAAE,KAAK;QACpBC,QAAQ,EAAE,QAAQ;QAClB6B,UAAU,EAAE;MACd,CAAE;MACFC,SAAS,EAAC,YAAY;MACtBC,GAAG,EAAGC,CAAC,IAAK;QAAC,IAAI,CAACxE,aAAa,GAAGwE,CAAC;MAAA,CAAE;MACrCC,QAAQ,EAAI,IAAI,CAACC;IAAkB,GAElClH,QAAQ,CAAC+D,GAAG,CAAC,CAACC,CAAM,EAAEnC,CAAC,KAAK;MAC3B,oBACAvD,KAAA,CAAA8F,aAAA,CAAC7F,IAAI;QACH4F,GAAG,EAAE,OAAOH,CAAC,CAAC3E,KAAK,CAAC4E,KAAK,IAAIpC,CAAC,EAAG;QACjCwC,KAAK,EAAE;UACLvE,KAAK,EAAE,MAAM;UACboB,MAAM,EAAE,IAAI,CAACoD,MAAM,CAACC,IAAI,CAACrD,MAAM,GAAIiG,SAAS,GAAG,OAAO;UACtDlC,SAAS,EAAE;QAAY;MAAE,gBAC3B3G,KAAA,CAAA8F,aAAA,CAAC7F,IAAI;QACH8F,KAAK,EAAE;UAACvE,KAAK,EAAE,MAAM;UAAEmF,SAAS,EAAE;QAAY,CAAE;QAChDR,QAAQ,EAAE,IAAI,CAAC3D,iBAAiB,CAAC4D,IAAI,CAAC,IAAI,EAAE7C,CAAC;MAAE,GAE9CmC,CACG,CACF,CAAC;IACT,CAAC,CACkB,CACjB,CACF,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -12,7 +12,10 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
12
12
|
},
|
13
13
|
text: {},
|
14
14
|
tabContent: {},
|
15
|
-
tabHeader: {}
|
15
|
+
tabHeader: {},
|
16
|
+
skeleton: {
|
17
|
+
root: {}
|
18
|
+
}
|
16
19
|
});
|
17
20
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
18
21
|
addStyle('tabs-with-arrow-indicator', '', {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","elevation","borderBottomWidth","borderStyle","borderColor","tabBorderColor","text","tabContent","tabHeader","backgroundColor","transparent","header","marginBottom","activeIndicator","justifyContent","alignItems","marginTop","height","arrowIndicator","display","tabArrowIndicatorBgColor","width","transform","rotateZ","arrowIndicatorDot","tabArrowIndicatorDotColor","borderRadius","translateX","translateY"],"sources":["tabs.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmTabheaderStyles } from './tabheader/tabheader.styles';\n\nexport type WmTabsStyles = BaseStyles & {\n tabHeader: WmTabheaderStyles,\n tabContent: ViewStyle\n};\n\nexport const DEFAULT_CLASS = 'app-tabs';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTabsStyles = defineStyles({\n root: {\n minHeight: 240,\n elevation: 0,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.tabBorderColor\n },\n text: {},\n tabContent: {},\n tabHeader: {} as WmTabheaderStyles\n });\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('tabs-with-arrow-indicator', '', {\n tabHeader: {\n root: {\n backgroundColor: themeVariables.transparent\n },\n header: {\n marginBottom: 16\n },\n activeIndicator: {\n justifyContent: 'center',\n alignItems: 'center',\n marginTop: 2,\n height: 0\n },\n arrowIndicator: {\n display: 'flex',\n backgroundColor: themeVariables.tabArrowIndicatorBgColor,\n width: 24,\n height: 24,\n justifyContent: 'center',\n alignItems: 'center',\n transform: [{\n rotateZ: '45deg'\n }]\n },\n arrowIndicatorDot: {\n display: 'flex',\n backgroundColor: themeVariables.tabArrowIndicatorDotColor,\n width: 4,\n height: 4, \n borderRadius: 8,\n transform: [{\n translateX: -2\n }, {\n translateY: -2\n }]\n }\n } as WmTabheaderStyles\n });\n});\n"],"mappings":"AACA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","elevation","borderBottomWidth","borderStyle","borderColor","tabBorderColor","text","tabContent","tabHeader","skeleton","backgroundColor","transparent","header","marginBottom","activeIndicator","justifyContent","alignItems","marginTop","height","arrowIndicator","display","tabArrowIndicatorBgColor","width","transform","rotateZ","arrowIndicatorDot","tabArrowIndicatorDotColor","borderRadius","translateX","translateY"],"sources":["tabs.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmTabheaderStyles } from './tabheader/tabheader.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTabsStyles = BaseStyles & {\n tabHeader: WmTabheaderStyles,\n tabContent: ViewStyle,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-tabs';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTabsStyles = defineStyles({\n root: {\n minHeight: 240,\n elevation: 0,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.tabBorderColor\n },\n text: {},\n tabContent: {},\n tabHeader: {} as WmTabheaderStyles,\n skeleton: { \n root: {\n }\n } as WmSkeletonStyles\n });\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('tabs-with-arrow-indicator', '', {\n tabHeader: {\n root: {\n backgroundColor: themeVariables.transparent\n },\n header: {\n marginBottom: 16\n },\n activeIndicator: {\n justifyContent: 'center',\n alignItems: 'center',\n marginTop: 2,\n height: 0\n },\n arrowIndicator: {\n display: 'flex',\n backgroundColor: themeVariables.tabArrowIndicatorBgColor,\n width: 24,\n height: 24,\n justifyContent: 'center',\n alignItems: 'center',\n transform: [{\n rotateZ: '45deg'\n }]\n },\n arrowIndicatorDot: {\n display: 'flex',\n backgroundColor: themeVariables.tabArrowIndicatorDotColor,\n width: 4,\n height: 4, \n borderRadius: 8,\n transform: [{\n translateX: -2\n }, {\n translateY: -2\n }]\n }\n } as WmTabheaderStyles\n });\n});\n"],"mappings":"AACA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,SAAS,EAAE,GAAG;MACdC,SAAS,EAAE,CAAC;MACZC,iBAAiB,EAAE,CAAC;MACpBC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAER,cAAc,CAACS;IAC9B,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,UAAU,EAAE,CAAC,CAAC;IACdC,SAAS,EAAE,CAAC,CAAsB;IAClCC,QAAQ,EAAE;MACRV,IAAI,EAAE,CACN;IACF;EACJ,CAAC,CAAC;EACFF,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,2BAA2B,EAAE,EAAE,EAAE;IACxCW,SAAS,EAAE;MACTT,IAAI,EAAE;QACJW,eAAe,EAAEd,cAAc,CAACe;MAClC,CAAC;MACDC,MAAM,EAAE;QACNC,YAAY,EAAE;MAChB,CAAC;MACDC,eAAe,EAAE;QACfC,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE,QAAQ;QACpBC,SAAS,EAAE,CAAC;QACZC,MAAM,EAAE;MACV,CAAC;MACDC,cAAc,EAAE;QACdC,OAAO,EAAE,MAAM;QACfV,eAAe,EAAEd,cAAc,CAACyB,wBAAwB;QACxDC,KAAK,EAAE,EAAE;QACTJ,MAAM,EAAE,EAAE;QACVH,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE,QAAQ;QACpBO,SAAS,EAAE,CAAC;UACVC,OAAO,EAAE;QACX,CAAC;MACH,CAAC;MACDC,iBAAiB,EAAE;QACjBL,OAAO,EAAE,MAAM;QACfV,eAAe,EAAEd,cAAc,CAAC8B,yBAAyB;QACzDJ,KAAK,EAAE,CAAC;QACRJ,MAAM,EAAE,CAAC;QACTS,YAAY,EAAE,CAAC;QACfJ,SAAS,EAAE,CAAC;UACVK,UAAU,EAAE,CAAC;QACf,CAAC,EAAE;UACDC,UAAU,EAAE,CAAC;QACf,CAAC;MACH;IACF;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -1,23 +1,49 @@
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
2
2
|
import React from 'react';
|
3
|
+
import { View } from 'react-native';
|
3
4
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
4
5
|
import WmTileProps from './tile.props';
|
5
6
|
import { DEFAULT_CLASS } from './tile.styles';
|
6
7
|
import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
7
8
|
import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
|
9
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
8
10
|
export class WmTileState extends BaseComponentState {}
|
9
11
|
export default class WmTile extends BaseComponent {
|
10
12
|
constructor(props) {
|
11
13
|
super(props, DEFAULT_CLASS, new WmTileProps());
|
12
14
|
}
|
15
|
+
renderSkeleton(props) {
|
16
|
+
if (!props.showskeletonchildren) {
|
17
|
+
var _this$props;
|
18
|
+
const skeletonStyles = ((_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.styles) === null || _this$props === void 0 ? void 0 : _this$props.skeleton) || {
|
19
|
+
root: {},
|
20
|
+
text: {}
|
21
|
+
};
|
22
|
+
return createSkeleton(this.theme, skeletonStyles, {
|
23
|
+
...this.styles.root
|
24
|
+
}, /*#__PURE__*/React.createElement(View, {
|
25
|
+
style: [this.styles.root, {
|
26
|
+
opacity: 0
|
27
|
+
}]
|
28
|
+
}, props.children));
|
29
|
+
}
|
30
|
+
return null;
|
31
|
+
}
|
32
|
+
getBackground() {
|
33
|
+
return this._showSkeleton ? null : this._background;
|
34
|
+
}
|
13
35
|
renderWidget(props) {
|
36
|
+
const styles = this._showSkeleton ? {
|
37
|
+
...this.styles.root,
|
38
|
+
...this.styles.skeleton.root
|
39
|
+
} : this.styles.root;
|
14
40
|
return /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
15
41
|
target: this
|
16
42
|
}), /*#__PURE__*/React.createElement(Animatedview, {
|
17
43
|
entryanimation: props.animation,
|
18
44
|
delay: props.animationdelay,
|
19
|
-
style:
|
20
|
-
}, this.
|
45
|
+
style: styles
|
46
|
+
}, this.getBackground(), props.children));
|
21
47
|
}
|
22
48
|
}
|
23
49
|
//# sourceMappingURL=tile.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","BaseComponent","BaseComponentState","WmTileProps","DEFAULT_CLASS","Tappable","Animatedview","WmTileState","WmTile","constructor","props","
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmTileProps","DEFAULT_CLASS","Tappable","Animatedview","createSkeleton","WmTileState","WmTile","constructor","props","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","styles","skeleton","root","text","theme","createElement","style","opacity","children","getBackground","_showSkeleton","_background","renderWidget","_extends","getTestPropsForAction","target","entryanimation","animation","delay","animationdelay"],"sources":["tile.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 WmTileProps from './tile.props';\nimport { DEFAULT_CLASS, WmTileStyles } from './tile.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTileState extends BaseComponentState<WmTileProps> {}\n\nexport default class WmTile extends BaseComponent<WmTileProps, WmTileState, WmTileStyles> {\n\n constructor(props: WmTileProps) {\n super(props, DEFAULT_CLASS, new WmTileProps());\n }\n \n public renderSkeleton(props: WmTileProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n {props.children}\n </View>))\n }\n return null;\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n renderWidget(props: WmTileProps) {\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root;\n \n return (<Tappable {...this.getTestPropsForAction()} target={this}>\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={styles}>{this.getBackground()}{props.children}</Animatedview>\n </Tappable>);\n }\n}\n\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ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,IAAI,CAACV,MAAM,CAACE,IAAI;MACnB,GAAG,IAAI,CAACF,MAAM,CAACC,QAAQ,CAACC;IACzB,CAAC,GAAG,IAAI,CAACF,MAAM,CAACE,IAAI;IAErB,oBAAQnB,KAAA,CAAAsB,aAAA,CAAChB,QAAQ,EAAAwB,QAAA,KAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,MAAM,EAAE;IAAK,iBAC/DhC,KAAA,CAAAsB,aAAA,CAACf,YAAY;MAAC0B,cAAc,EAAErB,KAAK,CAACsB,SAAU;MAACC,KAAK,EAAEvB,KAAK,CAACwB,cAAe;MAACb,KAAK,EAAEN;IAAO,GAAE,IAAI,CAACS,aAAa,CAAC,CAAC,EAAEd,KAAK,CAACa,QAAuB,CACvI,CAAC;EACb;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmTileProps","constructor","args","_defineProperty"],"sources":["tile.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTileProps extends BaseProps {\n animation: string = null as any;\n animationdelay?: number = null as any;\n children: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,WAAW,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC7B,IAAI;IAAAA,eAAA,yBACE,IAAI;IAAAA,eAAA;EAAA;AAEhC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["BaseProps","WmTileProps","constructor","args","_defineProperty"],"sources":["tile.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTileProps extends BaseProps {\n animation: string = null as any;\n animationdelay?: number = null as any;\n children: any;\n}\n\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,WAAW,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC7B,IAAI;IAAAA,eAAA,yBACE,IAAI;IAAAA,eAAA;EAAA;AAEhC","ignoreList":[]}
|
@@ -10,7 +10,12 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
10
10
|
borderColor: themeVariables.transparent,
|
11
11
|
padding: 12
|
12
12
|
},
|
13
|
-
text: {}
|
13
|
+
text: {},
|
14
|
+
skeleton: {
|
15
|
+
root: {
|
16
|
+
width: '100%'
|
17
|
+
}
|
18
|
+
}
|
14
19
|
});
|
15
20
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
16
21
|
addStyle('tile-template-text', '', {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","borderRadius","borderWidth","borderStyle","borderColor","transparent","padding","text","color","tilePrimaryTextColor","marginBottom","backgroundColor","tileWellbgColor","tileWellBorderColor"],"sources":["tile.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmTileStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-tile';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTileStyles = defineStyles({\n root: {\n borderRadius: 6,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.transparent,\n padding: 12\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n\n addStyle('tile-template-text', '', {\n text: {\n color: themeVariables.tilePrimaryTextColor\n }\n } as any);\n\n addStyle('well', '', {\n root: {\n padding: 20,\n marginBottom: 20,\n borderWidth: 1,\n backgroundColor: themeVariables.tileWellbgColor,\n borderColor: themeVariables.tileWellBorderColor,\n borderStyle: 'solid',\n borderRadius: 2\n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","borderRadius","borderWidth","borderStyle","borderColor","transparent","padding","text","skeleton","width","color","tilePrimaryTextColor","marginBottom","backgroundColor","tileWellbgColor","tileWellBorderColor"],"sources":["tile.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTileStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-tile';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTileStyles = defineStyles({\n root: {\n borderRadius: 6,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.transparent,\n padding: 12\n },\n text: {},\n skeleton: {\n root:{\n width: '100%',\n },\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n\n addStyle('tile-template-text', '', {\n text: {\n color: themeVariables.tilePrimaryTextColor\n }\n } as any);\n\n addStyle('well', '', {\n root: {\n padding: 20,\n marginBottom: 20,\n borderWidth: 1,\n backgroundColor: themeVariables.tileWellbgColor,\n borderColor: themeVariables.tileWellBorderColor,\n borderStyle: 'solid',\n borderRadius: 2\n }\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,YAAY,EAAE,CAAC;MACfC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,WAAW;MACvCC,OAAO,EAAE;IACX,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACRR,IAAI,EAAC;QACHS,KAAK,EAAE;MACT;IACF;EACJ,CAAC,CAAC;EAEFX,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAE1CD,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE;IACjCS,IAAI,EAAE;MACJG,KAAK,EAAEb,cAAc,CAACc;IACxB;EACF,CAAQ,CAAC;EAETb,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE;IACnBE,IAAI,EAAE;MACJM,OAAO,EAAE,EAAE;MACXM,YAAY,EAAE,EAAE;MAChBV,WAAW,EAAE,CAAC;MACdW,eAAe,EAAEhB,cAAc,CAACiB,eAAe;MAC/CV,WAAW,EAAEP,cAAc,CAACkB,mBAAmB;MAC/CZ,WAAW,EAAE,OAAO;MACpBF,YAAY,EAAE;IAChB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -14,6 +14,7 @@ import WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.c
|
|
14
14
|
import WmProgressCircle from '@wavemaker/app-rn-runtime/components/basic/progress-circle/progress-circle.component';
|
15
15
|
import WmPopover from '@wavemaker/app-rn-runtime/components/navigation/popover/popover.component';
|
16
16
|
import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
|
17
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
17
18
|
export class WmWizardState extends BaseComponentState {
|
18
19
|
constructor(...args) {
|
19
20
|
super(...args);
|
@@ -54,7 +55,7 @@ export default class WmWizard extends BaseComponent {
|
|
54
55
|
}
|
55
56
|
componentDidMount() {
|
56
57
|
super.componentDidMount();
|
57
|
-
if (this.props.defaultstep) {
|
58
|
+
if (this.props.defaultstep && this.props.defaultstep != 'none') {
|
58
59
|
this.updateDefaultStep();
|
59
60
|
}
|
60
61
|
}
|
@@ -179,6 +180,7 @@ export default class WmWizard extends BaseComponent {
|
|
179
180
|
const isFirstStep = index === 0;
|
180
181
|
const isActiveStep = index === this.state.currentStep;
|
181
182
|
const isNumberTextLayout = this.state.props.classname === 'number-text-inline';
|
183
|
+
const wizardStepCountVisibility = index >= this.state.currentStep && !this.state.isDone || !this.state.currentStep;
|
182
184
|
return item.state.props.show != false ? /*#__PURE__*/React.createElement(View, {
|
183
185
|
style: [this.styles.headerWrapper, isNumberTextLayout ? {
|
184
186
|
paddingRight: isActiveStep ? 0 : 5,
|
@@ -190,9 +192,9 @@ export default class WmWizard extends BaseComponent {
|
|
190
192
|
onPress: this.updateCurrentStep.bind(this, index, false),
|
191
193
|
disabled: index >= this.state.currentStep || !this.state.props.headernavigation,
|
192
194
|
accessibilityRole: "header"
|
193
|
-
}, /*#__PURE__*/React.createElement(View, _extends({
|
195
|
+
}, !this._showSkeleton ? /*#__PURE__*/React.createElement(View, _extends({
|
194
196
|
style: this.getStepStyle(index)
|
195
|
-
}, this.getTestPropsForAction('step' + index)),
|
197
|
+
}, this.getTestPropsForAction('step' + index)), wizardStepCountVisibility && /*#__PURE__*/React.createElement(Text, _extends({
|
196
198
|
style: isActiveStep ? [this.styles.activeStep, this.styles.activeStepCounter] : this.styles.stepCounter
|
197
199
|
}, this.getTestPropsForLabel('step' + (index + 1) + '_indicator')), index + 1), (index < this.state.currentStep || this.state.isDone) && /*#__PURE__*/React.createElement(WmIcon, {
|
198
200
|
id: this.getTestId('status'),
|
@@ -202,7 +204,14 @@ export default class WmWizard extends BaseComponent {
|
|
202
204
|
}
|
203
205
|
}),
|
204
206
|
iconclass: item.state.props.iconclass || 'wm-sl-l sl-check'
|
205
|
-
}))
|
207
|
+
})) : /*#__PURE__*/React.createElement(WmLabel, {
|
208
|
+
showskeleton: true,
|
209
|
+
styles: {
|
210
|
+
root: {
|
211
|
+
...this.getStepStyle(index)[0]
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}), isActiveStep && /*#__PURE__*/React.createElement(Text, _extends({
|
206
215
|
style: this.styles.stepTitle
|
207
216
|
}, this.getTestPropsForLabel('step' + (index + 1) + '_title')), item.state.props.title || 'Step Title'), this.numberOfSteps > 1 && isActiveStep && /*#__PURE__*/React.createElement(View, {
|
208
217
|
style: [this.styles.numberTextStepConnector, {
|
@@ -254,15 +263,39 @@ export default class WmWizard extends BaseComponent {
|
|
254
263
|
skip() {
|
255
264
|
this.next('skip');
|
256
265
|
}
|
266
|
+
getBackground() {
|
267
|
+
return this._showSkeleton ? null : this._background;
|
268
|
+
}
|
269
|
+
renderSkeleton(props) {
|
270
|
+
if (!props.showskeletonchildren) {
|
271
|
+
var _this$props;
|
272
|
+
const skeletonStyles = ((_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.styles) === null || _this$props === void 0 ? void 0 : _this$props.skeleton) || {
|
273
|
+
root: {},
|
274
|
+
text: {}
|
275
|
+
};
|
276
|
+
return createSkeleton(this.theme, skeletonStyles, {
|
277
|
+
...this.styles.root
|
278
|
+
}, /*#__PURE__*/React.createElement(View, {
|
279
|
+
style: [this.styles.root, {
|
280
|
+
opacity: 0
|
281
|
+
}]
|
282
|
+
}, props.children));
|
283
|
+
}
|
284
|
+
return null;
|
285
|
+
}
|
257
286
|
renderWidget(props) {
|
258
287
|
var _this$state$props$cla;
|
259
288
|
this.numberOfSteps = this.steps.length;
|
260
289
|
const activeStep = this.steps[this.state.currentStep];
|
261
290
|
const isSkippable = activeStep && activeStep.state.props.enableskip;
|
262
291
|
const isProgressCircleHeader = (_this$state$props$cla = this.state.props.classname) === null || _this$state$props$cla === void 0 ? void 0 : _this$state$props$cla.includes('progress-circle-header');
|
292
|
+
const styles = this._showSkeleton ? {
|
293
|
+
...this.styles.root,
|
294
|
+
...this.styles.skeleton.root
|
295
|
+
} : this.styles.root;
|
263
296
|
return /*#__PURE__*/React.createElement(View, {
|
264
|
-
style:
|
265
|
-
}, this.
|
297
|
+
style: styles
|
298
|
+
}, this.getBackground(), /*#__PURE__*/React.createElement(View, {
|
266
299
|
style: this.styles.wizardHeader
|
267
300
|
}, activeStep && isProgressCircleHeader ? this.renderProgressCircleHeader(activeStep, this.state.currentStep) : this.steps ? this.steps.map((step, i) => this.renderWizardHeader(step, i)) : null), /*#__PURE__*/React.createElement(View, {
|
268
301
|
style: this.styles.wizardBody
|