@wavemaker/app-rn-runtime 12.0.0-next.45102 → 12.0.0-next.45128
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 +31 -5
- 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/advanced/webview/webview.component.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/animatedview.component.js +6 -2
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +20 -6
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +14 -6
- 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/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +1 -2
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +9 -0
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +2 -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 +4 -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/spinner/spinner.component.js +2 -3
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js +4 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +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 +54 -2
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +3 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +4 -0
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/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 +6 -2
- 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/chart/stack-chart/stack-chart.component.js +37 -11
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +61 -12
- 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 +5 -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 +36 -2
- app-rn-runtime/components/container/container.component.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/gridcolumn/gridcolumn.component.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 +47 -6
- 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 +3 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.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.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +41 -5
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.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 +62 -13
- 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 +4 -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.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 +54 -33
- 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.component.js +5 -3
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +11 -4
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +25 -12
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -6
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +24 -3
- 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 +3 -2
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +16 -1
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +22 -5
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +6 -3
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +27 -7
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +23 -9
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +2 -2
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +21 -0
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +2 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
- 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/toggle/toggle.component.js +2 -4
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +19 -4
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
- 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/page/tabbar/curve.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.props.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/base.component.js +5 -3
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +4 -3
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/key.extractor.js.map +1 -1
- app-rn-runtime/core/props.provider.js +4 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +34 -27
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/ui-preferences.context.js +7 -0
- app-rn-runtime/core/ui-preferences.context.js.map +1 -0
- app-rn-runtime/core/utils.js +87 -4
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/package.json +30 -7
- app-rn-runtime/runtime/App.js +4 -8
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +43 -13
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +42 -2
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/runtime/watcher.js.map +1 -1
- app-rn-runtime/styles/background.component.js +1 -0
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/theme.js +5 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +1 -0
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/base-variable.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -6,19 +6,42 @@ import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/cor
|
|
6
6
|
import WmPageContentProps from './page-content.props';
|
7
7
|
import { DEFAULT_CLASS } from './page-content.styles';
|
8
8
|
import { ScrollView } from 'react-native-gesture-handler';
|
9
|
+
import WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';
|
9
10
|
export class WmPageContentState extends BaseComponentState {}
|
10
11
|
export default class WmPageContent extends BaseComponent {
|
11
12
|
constructor(props) {
|
12
13
|
super(props, DEFAULT_CLASS, new WmPageContentProps());
|
13
14
|
this.hideMode = HideMode.DONOT_ADD_TO_DOM;
|
14
15
|
}
|
16
|
+
renderSkeleton(props) {
|
17
|
+
if (this.props.skeletonanimationresource) {
|
18
|
+
return /*#__PURE__*/React.createElement(View, {
|
19
|
+
style: [{
|
20
|
+
width: '100%'
|
21
|
+
}, this.styles.root]
|
22
|
+
}, /*#__PURE__*/React.createElement(WmLottie, {
|
23
|
+
styles: {
|
24
|
+
content: {
|
25
|
+
...this.styles.root,
|
26
|
+
...this.styles.skeleton.root
|
27
|
+
}
|
28
|
+
},
|
29
|
+
source: this.props.skeletonanimationresource,
|
30
|
+
loop: true,
|
31
|
+
autoplay: true,
|
32
|
+
speed: this.props.skeletonanimationspeed
|
33
|
+
}));
|
34
|
+
}
|
35
|
+
return null;
|
36
|
+
}
|
15
37
|
renderWidget(props) {
|
16
38
|
const showScrollbar = this.styles.root.scrollbarColor != 'transparent';
|
39
|
+
// return ((props.scrollable || isWebPreviewMode()) && !this._showSkeleton) ? (
|
17
40
|
return props.scrollable || isWebPreviewMode() ? /*#__PURE__*/React.createElement(View, {
|
18
41
|
style: {
|
19
42
|
height: '100%',
|
20
43
|
width: '100%',
|
21
|
-
backgroundColor: this.styles.root.backgroundColor
|
44
|
+
backgroundColor: this._showSkeleton && this.styles.skeleton.root.backgroundColor ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor
|
22
45
|
}
|
23
46
|
}, this._background, /*#__PURE__*/React.createElement(ScrollView, {
|
24
47
|
contentContainerStyle: [this.styles.root, {
|
@@ -30,7 +53,9 @@ export default class WmPageContent extends BaseComponent {
|
|
30
53
|
},
|
31
54
|
scrollEventThrottle: 48
|
32
55
|
}, props.children)) : /*#__PURE__*/React.createElement(View, {
|
33
|
-
style: this.styles.root
|
56
|
+
style: [this.styles.root, {
|
57
|
+
backgroundColor: this._showSkeleton ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor
|
58
|
+
}]
|
34
59
|
}, this._background, props.children);
|
35
60
|
}
|
36
61
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","ScrollView","WmPageContentState","WmPageContent","constructor","props","hideMode","DONOT_ADD_TO_DOM","
|
1
|
+
{"version":3,"names":["React","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","ScrollView","WmLottie","WmPageContentState","WmPageContent","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderSkeleton","skeletonanimationresource","createElement","style","width","styles","root","content","skeleton","source","loop","autoplay","speed","skeletonanimationspeed","renderWidget","showScrollbar","scrollbarColor","scrollable","height","backgroundColor","_showSkeleton","_background","contentContainerStyle","showsVerticalScrollIndicator","onScroll","event","notify","scrollEventThrottle","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n\n}\n\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n public renderSkeleton(props: WmPageContentProps): React.ReactNode {\n if(this.props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles.root]}>\n <WmLottie styles={{ content: {...this.styles.root, ...this.styles.skeleton.root} }} source={this.props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n } \n return null;\n } \n\n\n renderWidget(props: WmPageContentProps) {\n const showScrollbar = (this.styles.root as any).scrollbarColor != 'transparent';\n // return ((props.scrollable || isWebPreviewMode()) && !this._showSkeleton) ? (\n return (props.scrollable || isWebPreviewMode()) ? (\n <View style={{height: '100%', width: '100%', backgroundColor: this._showSkeleton && this.styles.skeleton.root.backgroundColor ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor}}>\n {this._background}\n <ScrollView contentContainerStyle={[this.styles.root, {backgroundColor: 'transparent'}]}\n showsVerticalScrollIndicator={showScrollbar}\n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}>\n {props.children}\n </ScrollView>\n </View>\n ) : (\n <View style={[this.styles.root, \n {backgroundColor: this._showSkeleton ? \n this.styles.skeleton.root.backgroundColor : \n this.styles.root.backgroundColor}]}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAC1E,SAASC,UAAU,QAAQ,8BAA8B;AACzD,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAO,MAAMC,kBAAkB,SAASL,kBAAkB,CAAqB;AAI/E,eAAe,MAAMM,aAAa,SAASP,aAAa,CAA8D;EAEpHQ,WAAWA,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,kBAAkB,CAAC,CAAC,CAAC;IACrD,IAAI,CAACQ,QAAQ,GAAGX,QAAQ,CAACY,gBAAgB;EAC3C;EAEOC,cAAcA,CAACH,KAAyB,EAAmB;IAChE,IAAG,IAAI,CAACA,KAAK,CAACI,yBAAyB,EAAE;MACvC,oBAAOjB,KAAA,CAAAkB,aAAA,CAACjB,IAAI;QAACkB,KAAK,EAAE,CAAC;UAACC,KAAK,EAAE;QAAM,CAAC,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI;MAAE,gBACvDtB,KAAA,CAAAkB,aAAA,CAACT,QAAQ;QAACY,MAAM,EAAE;UAAEE,OAAO,EAAE;YAAC,GAAG,IAAI,CAACF,MAAM,CAACC,IAAI;YAAE,GAAG,IAAI,CAACD,MAAM,CAACG,QAAQ,CAACF;UAAI;QAAE,CAAE;QAACG,MAAM,EAAE,IAAI,CAACZ,KAAK,CAACI,yBAA0B;QAACS,I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,IAAI,CAACd,MAAM,CAACC,IAAI,CAACa;MAAe,CAAC;IAAE,GAClC,IAAI,CAACE,WAAW,EAChBxB,KAAK,CAAC+B,QACH,CACP;EACH;AACF","ignoreList":[]}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
|
-
import {
|
5
|
-
export default class WmPageContentProps extends
|
4
|
+
import { SkeletonAnimationProps } from '@wavemaker/app-rn-runtime/runtime/base-fragment.component';
|
5
|
+
export default class WmPageContentProps extends SkeletonAnimationProps {
|
6
6
|
constructor(...args) {
|
7
7
|
super(...args);
|
8
8
|
_defineProperty(this, "children", null);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["SkeletonAnimationProps","WmPageContentProps","constructor","args","_defineProperty"],"sources":["page-content.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SkeletonAnimationProps } from '@wavemaker/app-rn-runtime/runtime/base-fragment.component';\n\nexport default class WmPageContentProps extends SkeletonAnimationProps {\n children: any[] = null as any;\n scrollable: boolean = true;\n}"],"mappings":";;;AACA,SAASA,sBAAsB,QAAQ,2DAA2D;AAElG,eAAe,MAAMC,kBAAkB,SAASD,sBAAsB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBACjD,IAAI;IAAAA,eAAA,qBACA,IAAI;EAAA;AAC9B","ignoreList":[]}
|
@@ -8,7 +8,12 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
8
8
|
backgroundColor: themeVariables.pageContentBgColor,
|
9
9
|
minHeight: '100%'
|
10
10
|
},
|
11
|
-
text: {}
|
11
|
+
text: {},
|
12
|
+
skeleton: {
|
13
|
+
root: {
|
14
|
+
height: themeVariables.maxModalHeight
|
15
|
+
}
|
16
|
+
}
|
12
17
|
});
|
13
18
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
14
19
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","backgroundColor","pageContentBgColor","minHeight","text"],"sources":["page-content.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 WmPageContentStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-page-content';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPageContentStyles = defineStyles({\n root: {\n padding: 8,\n backgroundColor: themeVariables.pageContentBgColor,\n minHeight: '100%'\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\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","padding","backgroundColor","pageContentBgColor","minHeight","text","skeleton","height","maxModalHeight"],"sources":["page-content.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';\nimport { Dimensions } from 'react-native';\n\nexport type WmPageContentStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-page-content';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPageContentStyles = defineStyles({\n root: {\n padding: 8,\n backgroundColor: themeVariables.pageContentBgColor,\n minHeight: '100%'\n },\n text: {},\n skeleton: {\n root: {\n height: themeVariables.maxModalHeight\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,kBAAkB;AAC/CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE;MACFC,OAAO,EAAE,CAAC;MACVC,eAAe,EAAEL,cAAc,CAACM,kBAAkB;MAClDC,SAAS,EAAE;IACf,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNN,IAAI,EAAE;QACFO,MAAM,EAAEV,cAAc,CAACW;MAC3B;IACJ;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","PanResponder","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPageState","WmPage","constructor","props","_defineProperty","create","onStartShouldSetPanResponderCapture","e","notify","renderWidget","createElement","_extends","style","styles","root","panResponder","panHandlers","_background","children"],"sources":["page.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PanResponder, View } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageProps from './page.props';\nimport { DEFAULT_CLASS, WmPageStyles } from './page.styles';\n\nexport class WmPageState extends BaseComponentState<WmPageProps> {}\n\nexport default class WmPage extends BaseComponent<WmPageProps, WmPageState, WmPageStyles> {\n\n panResponder = PanResponder.create({\n onStartShouldSetPanResponderCapture: (e) => {\n this.notify('globaltouch', [e]);\n return false;\n },\n });\n constructor(props: WmPageProps) {\n super(props, DEFAULT_CLASS, );\n }\n
|
1
|
+
{"version":3,"names":["React","PanResponder","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPageState","WmPage","constructor","props","_defineProperty","create","onStartShouldSetPanResponderCapture","e","notify","renderWidget","createElement","_extends","style","styles","root","panResponder","panHandlers","_background","children"],"sources":["page.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PanResponder, View } from 'react-native';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageProps from './page.props';\nimport { DEFAULT_CLASS, WmPageStyles } from './page.styles';\nimport WmLottie from '../basic/lottie/lottie.component';\n\nexport class WmPageState extends BaseComponentState<WmPageProps> {}\n\nexport default class WmPage extends BaseComponent<WmPageProps, WmPageState, WmPageStyles> {\n\n panResponder = PanResponder.create({\n onStartShouldSetPanResponderCapture: (e) => {\n this.notify('globaltouch', [e]);\n return false;\n },\n });\n constructor(props: WmPageProps) {\n super(props, DEFAULT_CLASS, );\n }\n renderWidget(props: WmPageProps) {\n return (\n <View style={this.styles.root} {...this.panResponder.panHandlers}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,EAAEC,IAAI,QAAQ,cAAc;AAEjD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAsB,eAAe;AAG3D,OAAO,MAAMC,WAAW,SAASF,kBAAkB,CAAc;AAEjE,eAAe,MAAMG,MAAM,SAASJ,aAAa,CAAyC;EAQxFK,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEJ,aAAe,CAAC;IAACK,eAAA,uBAPjBT,YAAY,CAACU,MAAM,CAAC;MACjCC,mCAAmC,EAAGC,CAAC,IAAK;QAC1C,IAAI,CAACC,MAAM,CAAC,aAAa,EAAE,CAACD,CAAC,CAAC,CAAC;QAC/B,OAAO,KAAK;MACd;IACF,CAAC,CAAC;EAGF;EACAE,YAAYA,CAACN,KAAkB,EAAE;IAC/B,oBACET,KAAA,CAAAgB,aAAA,CAACd,IAAI,EAAAe,QAAA;MAACC,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAAK,IAAI,CAACC,YAAY,CAACC,WAAW,GAC7D,IAAI,CAACC,WAAW,EAChBd,KAAK,CAACe,QACH,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["page.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default interface WmPageProps extends BaseProps {\n children: any[]\n}"],"mappings":"","ignoreList":[]}
|
1
|
+
{"version":3,"names":[],"sources":["page.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SkeletonAnimationProps } from '@wavemaker/app-rn-runtime/runtime/base-fragment.component';\n\nexport default interface WmPageProps extends BaseProps {\n children: any[]\n}"],"mappings":"","ignoreList":[]}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
2
2
|
import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
3
|
+
import { Dimensions } from 'react-native';
|
3
4
|
export const DEFAULT_CLASS = 'app-page';
|
4
5
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
5
6
|
const defaultStyles = defineStyles({
|
@@ -11,7 +12,12 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
11
12
|
bottom: 0,
|
12
13
|
position: 'absolute'
|
13
14
|
},
|
14
|
-
text: {}
|
15
|
+
text: {},
|
16
|
+
skeleton: {
|
17
|
+
root: {
|
18
|
+
height: Dimensions.get('window').height
|
19
|
+
}
|
20
|
+
}
|
15
21
|
});
|
16
22
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
17
23
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","top","left","right","bottom","position","text"],"sources":["page.styles.ts"],"sourcesContent":["import BASE_THEME, { NamedStyles } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmPageStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-page';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPageStyles = defineStyles({\n root: {\n flexDirection: 'column',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n position: 'absolute'\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAuB,wCAAwC;AAEhF,SAAqBC,YAAY,QAAQ,+CAA+C;
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Dimensions","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","top","left","right","bottom","position","text","skeleton","height","get"],"sources":["page.styles.ts"],"sourcesContent":["import BASE_THEME, { NamedStyles } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\nimport { Dimensions } from 'react-native';\n\nexport type WmPageStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-page';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPageStyles = defineStyles({\n root: {\n flexDirection: 'column',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n position: 'absolute'\n },\n text: {},\n skeleton: {\n root: {\n height: Dimensions.get('window').height\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAuB,wCAAwC;AAEhF,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,UAAU,QAAQ,cAAc;AAMzC,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA2B,GAAGN,YAAY,CAAC;IAC7CO,IAAI,EAAE;MACFC,aAAa,EAAE,QAAQ;MACvBC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CAAC;MACTC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNR,IAAI,EAAE;QACFS,MAAM,EAAEf,UAAU,CAACgB,GAAG,CAAC,QAAQ,CAAC,CAACD;MACrC;IACJ;EACJ,CAAC,CAAC;EAEFX,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
|
@@ -2,14 +2,40 @@ import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
3
3
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
4
4
|
import { DEFAULT_CLASS } from './partial.styles';
|
5
|
+
import WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';
|
5
6
|
export class WmPartialState extends BaseComponentState {}
|
6
7
|
export default class WmPartial extends BaseComponent {
|
7
8
|
constructor(props) {
|
8
9
|
super(props, DEFAULT_CLASS);
|
9
10
|
}
|
11
|
+
renderSkeleton(props) {
|
12
|
+
var _this$styles;
|
13
|
+
const lottieContentStyles = (_this$styles = this.styles) === null || _this$styles === void 0 ? void 0 : _this$styles.skeleton;
|
14
|
+
if (this.props.skeletonanimationresource) {
|
15
|
+
return /*#__PURE__*/React.createElement(View, {
|
16
|
+
style: [{
|
17
|
+
width: '100%'
|
18
|
+
}, this.styles.root]
|
19
|
+
}, /*#__PURE__*/React.createElement(WmLottie, {
|
20
|
+
styles: {
|
21
|
+
content: lottieContentStyles.root
|
22
|
+
},
|
23
|
+
source: this.props.skeletonanimationresource,
|
24
|
+
loop: true,
|
25
|
+
autoplay: true,
|
26
|
+
speed: this.props.skeletonanimationspeed
|
27
|
+
}));
|
28
|
+
}
|
29
|
+
return null;
|
30
|
+
}
|
10
31
|
renderWidget(props) {
|
32
|
+
var _this$styles$skeleton;
|
33
|
+
const styles = this._showSkeleton ? {
|
34
|
+
...this.styles.root,
|
35
|
+
...((_this$styles$skeleton = this.styles.skeleton) === null || _this$styles$skeleton === void 0 ? void 0 : _this$styles$skeleton.root)
|
36
|
+
} : this.styles.root;
|
11
37
|
return /*#__PURE__*/React.createElement(View, {
|
12
|
-
style:
|
38
|
+
style: styles
|
13
39
|
}, this._background, props.children);
|
14
40
|
}
|
15
41
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPartialState","WmPartial","constructor","props","
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmLottie","WmPartialState","WmPartial","constructor","props","renderSkeleton","_this$styles","lottieContentStyles","styles","skeleton","skeletonanimationresource","createElement","style","width","root","content","source","loop","autoplay","speed","skeletonanimationspeed","renderWidget","_this$styles$skeleton","_showSkeleton","_background","children"],"sources":["partial.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 WmPartialProps from './partial.props';\nimport { DEFAULT_CLASS, WmPartialStyles } from './partial.styles';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport class WmPartialState extends BaseComponentState<WmPartialProps> {\n\n}\n\nexport default class WmPartial extends BaseComponent<WmPartialProps, WmPartialState, WmPartialStyles> {\n\n constructor(props: WmPartialProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n public renderSkeleton(props: WmPartialProps): React.ReactNode {\n const lottieContentStyles = this.styles?.skeleton as any as WmSkeletonStyles\n if(this.props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles.root]}>\n <WmLottie styles={{ content: lottieContentStyles.root}} source={this.props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n }\n return null;\n }\n\n renderWidget(props: WmPartialProps) {\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton?.root\n } : this.styles.root\n \n return (\n <View style={styles}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,QAAQ,MAAM,oEAAoE;AAGzF,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;AAIvE,eAAe,MAAMI,SAAS,SAASL,aAAa,CAAkD;EAEpGM,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEL,aAAe,CAAC;EAC/B;EAEOM,cAAcA,CAACD,KAAqB,EAAmB;IAAA,IAAAE,YAAA;IAC5D,MAAMC,mBAAmB,IAAAD,YAAA,GAAG,IAAI,CAACE,MAAM,cAAAF,YAAA,uBAAXA,YAAA,CAAaG,QAAmC;IAC5E,IAAG,IAAI,CAACL,KAAK,CAACM,yBAAyB,EAAE;MACvC,oBAAOf,KAAA,CAAAgB,aAAA,CAACf,IAAI;QAACgB,KAAK,EAAE,CAAC;UAACC,KAAK,EAAE;QAAM,CAAC,EAAE,IAAI,CAACL,MAAM,CAACM,IAAI;MAAE,gBACtDnB,KAAA,CAAAgB,aAAA,CAACX,QAAQ;QAACQ,MAAM,EAAE;UAAEO,OAAO,EAAER,mBAAmB,CAACO;QAAI,CAAE;QAACE,MAAM,EAAE,IAAI,CAACZ,KAAK,CAACM,yBAA0B;QAACO,IAAI,EAAE,IAAK;QAACC,QAAQ,EAAE,IAAK;QAACC,KAAK,EAAE,IAAI,CAACf,KAAK,CAACgB;MAAuB,CAAC,CACxK,CAAC;IACT;IACA,OAAO,IAAI;EACb;EAEAC,YAAYA,CAACjB,KAAqB,EAAE;IAAA,IAAAkB,qBAAA;IAClC,MAAMd,MAAM,GAAG,IAAI,CAACe,aAAa,GAAG;MAClC,GAAG,IAAI,CAACf,MAAM,CAACM,IAAI;MACnB,KAAAQ,qBAAA,GAAG,IAAI,CAACd,MAAM,CAACC,QAAQ,cAAAa,qBAAA,uBAApBA,qBAAA,CAAsBR,IAAI;IAC/B,CAAC,GAAG,IAAI,CAACN,MAAM,CAACM,IAAI;IAEpB,oBACEnB,KAAA,CAAAgB,aAAA,CAACf,IAAI;MAACgB,KAAK,EAAEJ;IAAO,GACjB,IAAI,CAACgB,WAAW,EAChBpB,KAAK,CAACqB,QACH,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["partial.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default interface WmPartialProps extends
|
1
|
+
{"version":3,"names":[],"sources":["partial.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SkeletonAnimationProps } from '@wavemaker/app-rn-runtime/runtime/base-fragment.component';\n\nexport default interface WmPartialProps extends SkeletonAnimationProps {\n children: any[];\n}"],"mappings":"","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","text"],"sources":["partial.styles.ts"],"sourcesContent":["import BASE_THEME, { NamedStyles } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmPartialStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-partial';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPartialStyles = defineStyles({\n root: {\n width: \"100%\"\n },\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAuB,wCAAwC;AAChF,SAAqBC,YAAY,QAAQ,+CAA+C;
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","text","skeleton","height"],"sources":["partial.styles.ts"],"sourcesContent":["import BASE_THEME, { NamedStyles } 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 WmPartialStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-partial';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPartialStyles = defineStyles({\n root: {\n width: \"100%\"\n },\n text: {},\n skeleton: {\n root: {\n height: 200\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAuB,wCAAwC;AAChF,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA8B,GAAGL,YAAY,CAAC;IAChDM,IAAI,EAAE;MACFC,KAAK,EAAE;IACX,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNH,IAAI,EAAE;QACFI,MAAM,EAAE;MACZ;IACJ;EACJ,CAAC,CAAC;EAEFN,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["d3Shape","scale","n","line","width","height","path","x","d","y","lineCurvedDown","iPosition","circle","position","circleWidth","trim","curved","curve","curveBasis","getPathDown","iHeight","centerWidth","clippedTabbarHeight"],"sources":["curve.tsx"],"sourcesContent":["import * as d3Shape from \"d3-shape\";\n// import { scale } from \"react-native-size-scaling\";\nconst scale = (n: number) => n;\n\ninterface LineDatum {\n x: number;\n y: number;\n missing?: boolean;\n}\n\n//** Path Line */\nconst line = (width : number, height: number) => {\n const path: any = d3Shape\n .line<LineDatum>()\n .x((d) => d.x)\n .y((d) => d.y)([\n { x: width / 2, y: 0 },\n { x: width, y: 0 },\n { x: width, y: height },\n { x: 0, y: height},\n { x: 0, y: 0 },\n { x: width / 2, y: 0 },\n ]);\n \nreturn path;\n};\n\n//** Path Curved*/\nconst lineCurvedDown = (iPosition: number, height: number, circle: number) => {\n const position = iPosition;\n const circleWidth = circle + position;\n const trim = (position + circleWidth) / 2;\n \n const curved: any = d3Shape\n .line<LineDatum>()\n .x((d) => d.x)\n .y((d) => d.y)\n .curve(d3Shape.curveBasis)([\n { x: position - scale(20), y: 0 }, // border center left\n { x: position - scale(10), y: scale(2) },\n { x: position - scale(2), y: scale(10) },\n { x: position, y: scale(17) },\n \n { x: trim - scale(25), y: height / 2 + scale(2) },\n { x: trim - scale(10), y: height / 2 + scale(10) },\n { x: trim, y: height / 2 + scale(10) },\n { x: trim + scale(10), y: height / 2 + scale(10) },\n { x: trim + scale(25), y: height / 2 + scale(2) },\n \n { x: circleWidth, y: scale(17) }, // border center right\n { x: circleWidth + scale(2), y: scale(10) },\n { x: circleWidth + scale(10), y: 0 },\n { x: circleWidth + scale(20), y: 0 },\n ]);\n return curved;\n};\n\nexport const getPathDown = (width: number, iHeight: number, centerWidth: number, clippedTabbarHeight: number) => {\n const height = scale(iHeight);\n const circleWidth = scale(centerWidth) + scale(16);\n return `${line(width, clippedTabbarHeight)} ${lineCurvedDown(\n width / 2 - circleWidth / 2,\n height,\n circleWidth\n )}`;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,OAAO,MAAM,UAAU;AACnC;AACA,MAAMC,KAAK,GAAIC,CAAS,IAAKA,CAAC;AAQ9B;AACA,MAAMC,IAAI,GAAGA,CAACC,KAAc,EAAEC,MAAc,KAAK;EAC/C,MAAMC,IAAS,GAAGN,OAAO,CACxBG,IAAI,CAAY,CAAC,CACjBI,CAAC,CAAEC,CAAC,IAAKA,CAAC,CAACD,CAAC,CAAC,CACbE,CAAC,CAAED,CAAC,IAAKA,CAAC,CAACC,CAAC,CAAC,CAAC,CACb;IAAEF,CAAC,EAAEH,KAAK,GAAG,CAAC;IAAEK,CAAC,EAAE;EAAE,CAAC,EACtB;IAAEF,CAAC,EAAEH,KAAK;IAAEK,CAAC,EAAE;EAAE,CAAC,EAClB;IAAEF,CAAC,EAAEH,KAAK;IAAEK,CAAC,EAAEJ;EAAO,CAAC,EACvB;IAAEE,CAAC,EAAE,CAAC;IAAEE,CAAC,EAAEJ;EAAM,CAAC,EAClB;IAAEE,CAAC,EAAE,CAAC;IAAEE,CAAC,EAAE;EAAE,CAAC,EACd;IAAEF,CAAC,EAAEH,KAAK,GAAG,CAAC;IAAEK,CAAC,EAAE;EAAE,CAAC,CACvB,CAAC;EAEJ,OAAOH,IAAI;AACX,CAAC;;AAED;AACA,MAAMI,cAAc,GAAGA,C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CAAC,EACtC;IAAEM,CAAC,EAAEQ,IAAI,GAAGd,KAAK,CAAC,EAAE,CAAC;IAAEQ,CAAC,EAAEJ,MAAM,GAAG,CAAC,GAAGJ,KAAK,CAAC,EAAE;EAAE,CAAC,EAClD;IAAEM,CAAC,EAAEQ,IAAI,GAAGd,KAAK,CAAC,EAAE,CAAC;IAAEQ,CAAC,EAAEJ,MAAM,GAAG,CAAC,GAAGJ,KAAK,CAAC,CAAC;EAAE,CAAC,EAEjD;IAAEM,CAAC,EAAEO,WAAW;IAAEL,CAAC,EAAER,KAAK,CAAC,EAAE;EAAE,CAAC;EAAE;EAClC;IAAEM,CAAC,EAAEO,WAAW,GAAGb,KAAK,CAAC,CAAC,CAAC;IAAEQ,CAAC,EAAER,KAAK,CAAC,EAAE;EAAE,CAAC,EAC3C;IAAEM,CAAC,EAAEO,WAAW,GAAGb,KAAK,CAAC,EAAE,CAAC;IAAEQ,CAAC,EAAE;EAAE,CAAC,EACpC;IAAEF,CAAC,EAAEO,WAAW,GAAGb,KAAK,CAAC,EAAE,CAAC;IAAEQ,CAAC,EAAE;EAAE,CAAC,CACrC,CAAC;EACJ,OAAOO,MAAM;AACf,CAAC;AAED,OAAO,MAAMG,WAAW,GAAGA,CAACf,KAAa,EAAEgB,OAAe,EAAEC,WAAmB,EAAEC,mBAA2B,KAAK;EAC/G,MAAMjB,MAAM,GAAGJ,KAAK,CAACmB,OAAO,CAAC;EAC7B,MAAMN,WAAW,GAAGb,KAAK,CAACoB,WAAW,CAAC,GAAGpB,KAAK,CAAC,EAAE,CAAC;EAClD,
|
1
|
+
{"version":3,"names":["d3Shape","scale","n","line","width","height","path","x","d","y","lineCurvedDown","iPosition","circle","position","circleWidth","trim","curved","curve","curveBasis","getPathDown","iHeight","centerWidth","clippedTabbarHeight"],"sources":["curve.tsx"],"sourcesContent":["import * as d3Shape from \"d3-shape\";\n// import { scale } from \"react-native-size-scaling\";\nconst scale = (n: number) => n;\n\ninterface LineDatum {\n x: number;\n y: number;\n missing?: boolean;\n}\n\n//** Path Line */\nconst line = (width : number, height: number) => {\n const path: any = d3Shape\n .line<LineDatum>()\n .x((d) => d.x)\n .y((d) => d.y)([\n { x: width / 2, y: 0 },\n { x: width, y: 0 },\n { x: width, y: height },\n { x: 0, y: height},\n { x: 0, y: 0 },\n { x: width / 2, y: 0 },\n ]);\n \nreturn path;\n};\n\n//** Path Curved*/\nconst lineCurvedDown = (iPosition: number, height: number, circle: number) => {\n const position = iPosition;\n const circleWidth = circle + position;\n const trim = (position + circleWidth) / 2;\n \n const curved: any = d3Shape\n .line<LineDatum>()\n .x((d) => d.x)\n .y((d) => d.y)\n .curve(d3Shape.curveBasis)([\n { x: position - scale(20), y: 0 }, // border center left\n { x: position - scale(10), y: scale(2) },\n { x: position - scale(2), y: scale(10) },\n { x: position, y: scale(17) },\n \n { x: trim - scale(25), y: height / 2 + scale(2) },\n { x: trim - scale(10), y: height / 2 + scale(10) },\n { x: trim, y: height / 2 + scale(10) },\n { x: trim + scale(10), y: height / 2 + scale(10) },\n { x: trim + scale(25), y: height / 2 + scale(2) },\n \n { x: circleWidth, y: scale(17) }, // border center right\n { x: circleWidth + scale(2), y: scale(10) },\n { x: circleWidth + scale(10), y: 0 },\n { x: circleWidth + scale(20), y: 0 },\n ]);\n return curved;\n};\n\nexport const getPathDown = (width: number, iHeight: number, centerWidth: number, clippedTabbarHeight: number) => {\n const height = scale(iHeight);\n const circleWidth = scale(centerWidth) + scale(16);\n return `${line(width, clippedTabbarHeight)} ${lineCurvedDown(\n width / 2 - circleWidth / 2,\n height,\n circleWidth\n )}`;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,OAAO,MAAM,UAAU;AACnC;AACA,MAAMC,KAAK,GAAIC,CAAS,IAAKA,CAAC;AAQ9B;AACA,MAAMC,IAAI,GAAGA,CAACC,KAAc,EAAEC,MAAc,KAAK;EAC/C,MAAMC,IAAS,GAAGN,OAAO,CACxBG,IAAI,CAAY,CAAC,CACjBI,CAAC,CAAEC,C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,CAAC;IAAEQ,CAAC,EAAE;EAAE,CAAC,CACrC,CAAC;EACJ,OAAOO,MAAM;AACf,CAAC;AAED,OAAO,MAAMG,WAAW,GAAGA,CAACf,KAAa,EAAEgB,OAAe,EAAEC,WAAmB,EAAEC,mBAA2B,KAAK;EAC/G,MAAMjB,MAAM,GAAGJ,KAAK,CAACmB,OAAO,CAAC;EAC7B,MAAMN,WAAW,GAAGb,KAAK,CAACoB,WAAW,CAAC,GAAGpB,KAAK,CAAC,EAAE,CAAC;EAClD,OAAO,GAAGE,IAAI,CAACC,KAAK,EAAEkB,mBAAmB,CAAC,IAAIZ,cAAc,CAC1DN,KAAK,GAAG,CAAC,GAAGU,WAAW,GAAG,CAAC,EAC3BT,MAAM,EACNS,WACF,CAAC,EAAE;AACL,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","View","TouchableOpacity","Dimensions","Keyboard","ThemeProvider","ModalConsumer","WmIcon","NavigationServiceConsumer","BaseNavComponent","BaseNavState","WmTabbarProps","DEFAULT_CLASS","Svg","Path","getPathDown","ThemeVariables","scale","n","WmTabbarState","constructor","args","_defineProperty","WmTabbar","props","get","width","cleanup","push","addListener","keyBoardShown","forceUpdate","remove","renderTabItem","item","testId","onSelect","floating","isActive","getDisplayLabel","getDisplayExpression","label","increasedGap","Number","indexBeforeMid","state","dataItems","length","classname","indexOf","styles","tabItem","paddingRight","createElement","_extends","getTestPropsForAction","style","centerHubItem","key","onPress","activeTabItem","theme","mergeStyle","tabIcon","centerHubIcon","activeTabIcon","iconclass","icon","tabLabel","centerHubLabel","activeTabLabel","numberOfLines","onItemSelect","navigationService","link","openUrl","invokeEventCallback","proxy","prepareModalOptions","content","o","modalOptions","modalStyle","bottom","tabbarHeight","contentStyle","modalContent","isVisible","renderWidget","max","tabItems","tabItemsLength","isClippedTabbar","middleIndex","Math","floor","returnpathDown","maxWidth","root","height","moreItems","moreItemsCount","ceil","j","i","row","zIndex","position","backgroundColor","INSTANCE","transparent","fill","tabbarBackgroundColor","d","Fragment","modalService","showMore","showModal","value","moreMenu","map","a","moreMenuRow","index","hideModal","menu","onLayout","e","nativeEvent","layout","filter","morebuttonlabel","morebuttoniconclass","updateState"],"sources":["tabbar.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Text, View, TouchableOpacity, Dimensions, Keyboard } from 'react-native';\n\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\n\nimport WmTabbarProps from './tabbar.props';\nimport { DEFAULT_CLASS, WmTabbarStyles } from './tabbar.styles';\nimport Svg, { Path } from 'react-native-svg';\nimport { getPathDown } from './curve';\n// import { scale } from 'react-native-size-scaling';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\ninterface TabDataItem extends NavigationDataItem {\n floating: boolean;\n indexBeforeMid: number;\n}\n\nconst scale = (n: number) => n;\n\nclass WmTabbarState<T extends BaseNavProps> extends BaseNavState<T> {\n showMore = false;\n modalOptions = {} as ModalOptions;\n dataItems: TabDataItem[] = [];\n}\n\nexport default class WmTabbar extends BaseNavComponent<WmTabbarProps, WmTabbarState<WmTabbarProps>, WmTabbarStyles> {\n\n private tabbarHeight = 0;\n private keyBoardShown = false;\n\n constructor(props: WmTabbarProps) {\n super(props, DEFAULT_CLASS, new WmTabbarProps(), new WmTabbarState());\n this.cleanup.push(Keyboard.addListener('keyboardWillShow', () => {\n this.keyBoardShown = true;\n this.forceUpdate();\n }).remove);\n this.cleanup.push(Keyboard.addListener('keyboardWillHide', () => {\n this.keyBoardShown = false;\n this.forceUpdate();\n }).remove);\n }\n\n private maxWidth = Dimensions.get(\"window\").width; \n private returnpathDown: any;\n\n renderTabItem(item: TabDataItem, testId: string, props: WmTabbarProps, onSelect: Function, floating = false) {\n\n const isActive = props.isActive && props.isActive(item);\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n let increasedGap = Number(testId) === item?.indexBeforeMid && (this.state.dataItems.length % 2!=0) && ((props.classname || '').indexOf('clipped-tabbar') >= 0)\n ? [this.styles.tabItem, { paddingRight: 70 }]\n : [this.styles.tabItem];\n \n return (\n <TouchableOpacity \n {...this.getTestPropsForAction('item' + testId)}\n style={[increasedGap, floating? this.styles.centerHubItem: {}]}\n key={`${item.label}_${testId}`}\n onPress={() => onSelect && onSelect()}>\n <View key={item.key}>\n <View style={[isActive && !floating ? this.styles.activeTabItem : {}]}>\n <WmIcon\n styles={this.theme.mergeStyle({}, this.styles.tabIcon, floating? this.styles.centerHubIcon: {}, isActive ? this.styles.activeTabIcon : {})}\n iconclass={item.icon}\n ></WmIcon>\n </View>\n </View>\n <Text style={[this.styles.tabLabel, floating? this.styles.centerHubLabel: {}, isActive ? this.styles.activeTabLabel : {}]} numberOfLines={1}>\n {getDisplayLabel(item.label)}\n </Text>\n </TouchableOpacity>\n );\n }\n \n onItemSelect(item: NavigationDataItem, navigationService: NavigationService) {\n item.link && navigationService.openUrl(item.link);\n this.invokeEventCallback('onSelect', [null, this.proxy, item]);\n }\n\n prepareModalOptions(content: ReactNode) {\n const o = this.state.modalOptions;\n o.content = content;\n o.modalStyle = {\n bottom: this.tabbarHeight\n };\n o.contentStyle = this.styles.modalContent; \n return o;\n }\n\n isVisible(): boolean {\n return super.isVisible() && !this.keyBoardShown;\n }\n\n renderWidget(props: WmTabbarProps) {\n let max = 5;\n const tabItems = this.state.dataItems;\n const tabItemsLength = tabItems.length;\n const isClippedTabbar = ((props.classname || '').indexOf('clipped-tabbar') >= 0) && (tabItemsLength % 2 !== 0);\n if (isClippedTabbar && tabItemsLength % 2 !== 0) {\n const middleIndex = Math.floor(tabItemsLength / 2);\n tabItems[middleIndex]['floating'] = true;\n tabItems[middleIndex - 1]['indexBeforeMid'] = middleIndex-1;\n }\n this.returnpathDown = getPathDown(this.maxWidth, 65 ,60,this.styles.root.height as number);\n const moreItems = [] as any[][];\n if (tabItems.length > max) {\n const moreItemsCount = Math.ceil((tabItems.length + 1 - max)/ max) * max;\n let j = 0;\n for (let i = max-1; i < moreItemsCount;) {\n const row = [];\n for (let j = 0; j < max; j++) {\n row[j] = tabItems[i++] || {key: 'tabItem' + i} as TabDataItem;\n }\n moreItems.push(row);\n }\n max = max - 1;\n }\n return (\n <NavigationServiceConsumer>\n {(navigationService) =>\n (<View style={this.styles.root}>\n {isClippedTabbar ? (\n <Svg width={this.maxWidth} height={scale(this.styles.root.height as number)} style={{zIndex: -1,position: 'absolute',backgroundColor: ThemeVariables.INSTANCE.transparent}}>\n <Path fill={ThemeVariables.INSTANCE.tabbarBackgroundColor} {...{ d: this.returnpathDown }}/>\n </Svg>\n ): <></>} \n <ModalConsumer>\n {(modalService: ModalService) => {\n if (this.state.showMore) {\n modalService.showModal(this.prepareModalOptions((\n <ThemeProvider value={this.theme} >\n <View style={this.styles.moreMenu}>\n {moreItems.map((a, i) =>\n (<View key={i} style={this.styles.moreMenuRow}>\n {a.map((item, index) => this.renderTabItem(item, i + '', props, () => this.onItemSelect(item, navigationService)))}\n </View>)\n )}\n </View>\n </ThemeProvider>)));\n } else {\n modalService.hideModal(this.state.modalOptions);\n }\n return null;\n }}\n </ModalConsumer>\n <View style={this.styles.menu}\n onLayout={e => { this.tabbarHeight = e.nativeEvent.layout.height}}> \n {tabItems.filter((item, i) => i < max)\n .map((item, i) => this.renderTabItem(item, i + '', props, () => this.onItemSelect(item, navigationService), item.floating))}\n {tabItems.length > max && (\n this.renderTabItem({\n label: props.morebuttonlabel,\n icon: props.morebuttoniconclass\n } as TabDataItem, 6666 +'', props, () => {\n this.updateState({showMore: !this.state.showMore} as WmTabbarState<WmTabbarProps>);\n })\n )}\n </View>\n </View>)}\n </NavigationServiceConsumer>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AAEjF,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,SAASC,gBAAgB,EAAEC,YAAY,QAA4B,2EAA2E;AAE9I,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAC5C,SAASC,WAAW,QAAQ,SAAS;AACrC;AACA,OAAOC,cAAc,MAAM,kDAAkD;AAO7E,MAAMC,KAAK,GAAIC,CAAS,IAAKA,CAAC;AAE9B,MAAMC,aAAa,SAAiCT,YAAY,CAAI;EAAAU,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBACvD,KAAK;IAAAA,eAAA,uBACD,CAAC,CAAC;IAAAA,eAAA,oBACU,EAAE;EAAA;AAC/B;AAEA,eAAe,MAAMC,QAAQ,SAASd,gBAAgB,CAA8D;EAKlHW,WAAWA,CAACI,KAAoB,EAAE;IAChC,KAAK,CAACA,KAAK,EAAEZ,aAAa,EAAE,IAAID,aAAa,CAAC,CAAC,EAAE,IAAIQ,aAAa,CAAC,CAAC,CAAC;IAACG,eAAA,uBAJjD,CAAC;IAAAA,eAAA,wBACA,KAAK;IAAAA,eAAA,mBAcVnB,UAAU,CAACsB,GAAG,CAAC,QAAQ,CAAC,CAACC,KAAK;IAAAJ,eAAA;IAV/C,IAAI,CAACK,OAAO,CAACC,IAAI,CAACxB,QAAQ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K;MAC5BC,QAAQ,EAAEC,CAAC,IAAI;QAAE,IAAI,CAAC3C,YAAY,GAAG2C,CAAC,CAACC,WAAW,CAACC,MAAM,CAAC9B,MAAM;MAAA;IAAE,GACjET,QAAQ,CAACwC,MAAM,CAAC,CAAChG,IAAI,EAAEsE,CAAC,KAAKA,CAAC,GAAGf,GAAG,CAAC,CACnC+B,GAAG,CAAC,CAACtF,IAAI,EAAEsE,CAAC,KAAK,IAAI,CAACvE,aAAa,CAACC,IAAI,EAAEsE,CAAC,GAAG,EAAE,EAAEhF,KAAK,EAAE,MAAM,IAAI,CAACgD,YAAY,CAACtC,IAAI,EAAEuC,iBAAiB,CAAC,EAAEvC,IAAI,CAACG,QAAQ,CAAC,CAAC,EAC5HqD,QAAQ,CAAC3C,MAAM,GAAG0C,GAAG,IACpB,IAAI,CAACxD,aAAa,CAAC;MACjBQ,KAAK,EAAEjB,KAAK,CAAC2G,eAAe;MAC5BhE,IAAI,EAAE3C,KAAK,CAAC4G;IACd,CAAC,EAAiB,IAAI,GAAE,EAAE,EAAE5G,KAAK,EAAG,MAAM;MACxC,IAAI,CAAC6G,WAAW,CAAC;QAACjB,QAAQ,EAAE,CAAC,IAAI,CAACvE,KAAK,CAACuE;MAAQ,CAAiC,CAAC;IACpF,CAAC,CAEC,CACF,CACmB,CAAC;EAEhC;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Text","View","TouchableOpacity","Dimensions","Keyboard","ThemeProvider","ModalConsumer","WmIcon","NavigationServiceConsumer","BaseNavComponent","BaseNavState","WmTabbarProps","DEFAULT_CLASS","Svg","Path","getPathDown","ThemeVariables","scale","n","WmTabbarState","constructor","args","_defineProperty","WmTabbar","props","get","width","cleanup","push","addListener","keyBoardShown","forceUpdate","remove","renderTabItem","item","testId","onSelect","floating","isActive","getDisplayLabel","getDisplayExpression","label","increasedGap","Number","indexBeforeMid","state","dataItems","length","classname","indexOf","styles","tabItem","paddingRight","createElement","_extends","getTestPropsForAction","style","centerHubItem","key","onPress","activeTabItem","theme","mergeStyle","tabIcon","centerHubIcon","activeTabIcon","iconclass","icon","tabLabel","centerHubLabel","activeTabLabel","numberOfLines","onItemSelect","navigationService","link","openUrl","invokeEventCallback","proxy","prepareModalOptions","content","o","modalOptions","modalStyle","bottom","tabbarHeight","contentStyle","modalContent","isVisible","renderWidget","max","tabItems","tabItemsLength","isClippedTabbar","middleIndex","Math","floor","returnpathDown","maxWidth","root","height","moreItems","moreItemsCount","ceil","j","i","row","zIndex","position","backgroundColor","INSTANCE","transparent","fill","tabbarBackgroundColor","d","Fragment","modalService","showMore","showModal","value","moreMenu","map","a","moreMenuRow","index","hideModal","menu","onLayout","e","nativeEvent","layout","filter","morebuttonlabel","morebuttoniconclass","updateState"],"sources":["tabbar.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Text, View, TouchableOpacity, Dimensions, Keyboard } from 'react-native';\n\nimport { ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport NavigationService, { NavigationServiceConsumer } from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport { BaseNavProps } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.props';\nimport { BaseNavComponent, BaseNavState, NavigationDataItem } from '@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.component';\n\nimport WmTabbarProps from './tabbar.props';\nimport { DEFAULT_CLASS, WmTabbarStyles } from './tabbar.styles';\nimport Svg, { Path } from 'react-native-svg';\nimport { getPathDown } from './curve';\n// import { scale } from 'react-native-size-scaling';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\ninterface TabDataItem extends NavigationDataItem {\n floating: boolean;\n indexBeforeMid: number;\n}\n\nconst scale = (n: number) => n;\n\nclass WmTabbarState<T extends BaseNavProps> extends BaseNavState<T> {\n showMore = false;\n modalOptions = {} as ModalOptions;\n dataItems: TabDataItem[] = [];\n}\n\nexport default class WmTabbar extends BaseNavComponent<WmTabbarProps, WmTabbarState<WmTabbarProps>, WmTabbarStyles> {\n\n private tabbarHeight = 0;\n private keyBoardShown = false;\n\n constructor(props: WmTabbarProps) {\n super(props, DEFAULT_CLASS, new WmTabbarProps(), new WmTabbarState());\n this.cleanup.push(Keyboard.addListener('keyboardWillShow', () => {\n this.keyBoardShown = true;\n this.forceUpdate();\n }).remove);\n this.cleanup.push(Keyboard.addListener('keyboardWillHide', () => {\n this.keyBoardShown = false;\n this.forceUpdate();\n }).remove);\n }\n\n private maxWidth = Dimensions.get(\"window\").width; \n private returnpathDown: any;\n\n renderTabItem(item: TabDataItem, testId: string, props: WmTabbarProps, onSelect: Function, floating = false) {\n\n const isActive = props.isActive && props.isActive(item);\n const getDisplayLabel = this.props.getDisplayExpression || ((label: string) => label);\n let increasedGap = Number(testId) === item?.indexBeforeMid && (this.state.dataItems.length % 2!=0) && ((props.classname || '').indexOf('clipped-tabbar') >= 0)\n ? [this.styles.tabItem, { paddingRight: 70 }]\n : [this.styles.tabItem];\n \n return (\n <TouchableOpacity \n {...this.getTestPropsForAction('item' + testId)}\n style={[increasedGap, floating? this.styles.centerHubItem: {}]}\n key={`${item.label}_${testId}`}\n onPress={() => onSelect && onSelect()}>\n <View key={item.key}>\n <View style={[isActive && !floating ? this.styles.activeTabItem : {}]}>\n <WmIcon\n styles={this.theme.mergeStyle({}, this.styles.tabIcon, floating? this.styles.centerHubIcon: {}, isActive ? this.styles.activeTabIcon : {})}\n iconclass={item.icon}\n ></WmIcon>\n </View>\n </View>\n <Text style={[this.styles.tabLabel, floating? this.styles.centerHubLabel: {}, isActive ? this.styles.activeTabLabel : {}]} numberOfLines={1}>\n {getDisplayLabel(item.label)}\n </Text>\n </TouchableOpacity>\n );\n }\n \n onItemSelect(item: NavigationDataItem, navigationService: NavigationService) {\n item.link && navigationService.openUrl(item.link);\n this.invokeEventCallback('onSelect', [null, this.proxy, item]);\n }\n\n prepareModalOptions(content: ReactNode) {\n const o = this.state.modalOptions;\n o.content = content;\n o.modalStyle = {\n bottom: this.tabbarHeight\n };\n o.contentStyle = this.styles.modalContent; \n return o;\n }\n\n isVisible(): boolean {\n return super.isVisible() && !this.keyBoardShown;\n }\n\n renderWidget(props: WmTabbarProps) {\n let max = 5;\n const tabItems = this.state.dataItems;\n const tabItemsLength = tabItems.length;\n const isClippedTabbar = ((props.classname || '').indexOf('clipped-tabbar') >= 0) && (tabItemsLength % 2 !== 0);\n if (isClippedTabbar && tabItemsLength % 2 !== 0) {\n const middleIndex = Math.floor(tabItemsLength / 2);\n tabItems[middleIndex]['floating'] = true;\n tabItems[middleIndex - 1]['indexBeforeMid'] = middleIndex-1;\n }\n this.returnpathDown = getPathDown(this.maxWidth, 65 ,60,this.styles.root.height as number);\n const moreItems = [] as any[][];\n if (tabItems.length > max) {\n const moreItemsCount = Math.ceil((tabItems.length + 1 - max)/ max) * max;\n let j = 0;\n for (let i = max-1; i < moreItemsCount;) {\n const row = [];\n for (let j = 0; j < max; j++) {\n row[j] = tabItems[i++] || {key: 'tabItem' + i} as TabDataItem;\n }\n moreItems.push(row);\n }\n max = max - 1;\n }\n return (\n <NavigationServiceConsumer>\n {(navigationService) =>\n (<View style={this.styles.root}>\n {isClippedTabbar ? (\n <Svg width={this.maxWidth} height={scale(this.styles.root.height as number)} style={{zIndex: -1,position: 'absolute',backgroundColor: ThemeVariables.INSTANCE.transparent}}>\n <Path fill={ThemeVariables.INSTANCE.tabbarBackgroundColor} {...{ d: this.returnpathDown }}/>\n </Svg>\n ): <></>} \n <ModalConsumer>\n {(modalService: ModalService) => {\n if (this.state.showMore) {\n modalService.showModal(this.prepareModalOptions((\n <ThemeProvider value={this.theme} >\n <View style={this.styles.moreMenu}>\n {moreItems.map((a, i) =>\n (<View key={i} style={this.styles.moreMenuRow}>\n {a.map((item, index) => this.renderTabItem(item, i + '', props, () => this.onItemSelect(item, navigationService)))}\n </View>)\n )}\n </View>\n </ThemeProvider>)));\n } else {\n modalService.hideModal(this.state.modalOptions);\n }\n return null;\n }}\n </ModalConsumer>\n <View style={this.styles.menu}\n onLayout={e => { this.tabbarHeight = e.nativeEvent.layout.height}}> \n {tabItems.filter((item, i) => i < max)\n .map((item, i) => this.renderTabItem(item, i + '', props, () => this.onItemSelect(item, navigationService), item.floating))}\n {tabItems.length > max && (\n this.renderTabItem({\n label: props.morebuttonlabel,\n icon: props.morebuttoniconclass\n } as TabDataItem, 6666 +'', props, () => {\n this.updateState({showMore: !this.state.showMore} as WmTabbarState<WmTabbarProps>);\n })\n )}\n </View>\n </View>)}\n </NavigationServiceConsumer>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AAEjF,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,SAASC,gBAAgB,EAAEC,YAAY,QAA4B,2EAA2E;AAE9I,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAC5C,SAASC,WAAW,QAAQ,SAAS;AACrC;AACA,OAAOC,cAAc,MAAM,kDAAkD;AAO7E,MAAMC,KAAK,GAAIC,CAAS,IAAKA,CAAC;AAE9B,MAAMC,aAAa,SAAiCT,YAAY,CAAI;EAAAU,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBACvD,KAAK;IAAAA,eAAA,uBACD,CAAC,CAAC;IAAAA,eAAA,oBACU,EAAE;EAAA;AAC/B;AAEA,eAAe,MAAMC,QAAQ,SAASd,gBAAgB,CAA8D;EAKlHW,WAA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"morebuttonlabel", 'more');
|
10
10
|
_defineProperty(this, "itemchildren", 'children');
|
11
11
|
_defineProperty(this, "isActive", item => false);
|
12
|
+
_defineProperty(this, "onSelect", void 0);
|
12
13
|
_defineProperty(this, "dataset", [{
|
13
14
|
'label': 'Home',
|
14
15
|
'icon': 'wm-sl-r sl-home'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseNavProps","WmTabbarProps","constructor","args","_defineProperty","item"],"sources":["tabbar.props.ts"],"sourcesContent":["import { BaseNavProps } from '../../navigation/basenav/basenav.props';\n\nexport default class WmTabbarProps extends BaseNavProps {\n morebuttoniconclass = 'wi wi-more-horiz';\n morebuttonlabel = 'more';\n itemchildren?: string = 'children';\n isActive = (item: any) => false;\n dataset?: any = [{\n 'label' : 'Home',\n 'icon' : 'wm-sl-r sl-home'\n },{\n 'label' : 'Analytics',\n 'icon' : 'wm-sl-r sl-graph-ascend'\n },{\n 'label' : 'Alerts',\n 'icon' : 'wm-sl-r sl-alarm-bell'\n },{\n 'label' : 'Settings',\n 'icon' : 'wm-sl-r sl-settings'\n }]\n}\n"],"mappings":";;;AAAA,SAASA,YAAY,QAAQ,wCAAwC;
|
1
|
+
{"version":3,"names":["BaseNavProps","WmTabbarProps","constructor","args","_defineProperty","item"],"sources":["tabbar.props.ts"],"sourcesContent":["import { BaseNavProps } from '../../navigation/basenav/basenav.props';\nimport WmTabbar from './tabbar.component';\n\nexport default class WmTabbarProps extends BaseNavProps {\n morebuttoniconclass? = 'wi wi-more-horiz';\n morebuttonlabel? = 'more';\n itemchildren?: string = 'children';\n isActive? = (item: any) => false;\n onSelect? : (event: any, widget: WmTabbar) => any;\n dataset?: any = [{\n 'label' : 'Home',\n 'icon' : 'wm-sl-r sl-home'\n },{\n 'label' : 'Analytics',\n 'icon' : 'wm-sl-r sl-graph-ascend'\n },{\n 'label' : 'Alerts',\n 'icon' : 'wm-sl-r sl-alarm-bell'\n },{\n 'label' : 'Settings',\n 'icon' : 'wm-sl-r sl-settings'\n }]\n}\n"],"mappings":";;;AAAA,SAASA,YAAY,QAAQ,wCAAwC;AAGrE,eAAe,MAAMC,aAAa,SAASD,YAAY,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,8BAC/B,kBAAkB;IAAAA,eAAA,0BACtB,MAAM;IAAAA,eAAA,uBACD,UAAU;IAAAA,eAAA,mBACrBC,IAAS,IAAK,KAAK;IAAAD,eAAA;IAAAA,eAAA,kBAEhB,CAAC;MACb,OAAO,EAAG,MAAM;MAChB,MAAM,EAAI;IACZ,CAAC,EAAC;MACA,OAAO,EAAG,WAAW;MACrB,MAAM,EAAI;IACZ,CAAC,EAAC;MACA,OAAO,EAAG,QAAQ;MAClB,MAAM,EAAI;IACZ,CAAC,EAAC;MACA,OAAO,EAAG,UAAU;MACpB,MAAM,EAAI;IACZ,CAAC,CAAC;EAAA;AACN","ignoreList":[]}
|
@@ -2,14 +2,40 @@ import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
3
3
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
4
4
|
import { DEFAULT_CLASS } from './prefab-container.styles';
|
5
|
+
import WmLottie from '../basic/lottie/lottie.component';
|
5
6
|
export class WmPrefabContainerState extends BaseComponentState {}
|
6
7
|
export default class WmPrefabContainer extends BaseComponent {
|
7
8
|
constructor(props) {
|
8
9
|
super(props, DEFAULT_CLASS);
|
9
10
|
}
|
11
|
+
renderSkeleton(props) {
|
12
|
+
var _this$styles;
|
13
|
+
const lottieContentStyles = (_this$styles = this.styles) === null || _this$styles === void 0 ? void 0 : _this$styles.skeleton;
|
14
|
+
if (this.props.skeletonanimationresource) {
|
15
|
+
var _this$styles2;
|
16
|
+
return /*#__PURE__*/React.createElement(View, {
|
17
|
+
style: [{
|
18
|
+
width: '100%'
|
19
|
+
}, (_this$styles2 = this.styles) === null || _this$styles2 === void 0 ? void 0 : _this$styles2.root]
|
20
|
+
}, /*#__PURE__*/React.createElement(WmLottie, {
|
21
|
+
styles: {
|
22
|
+
content: lottieContentStyles.root
|
23
|
+
},
|
24
|
+
source: this.props.skeletonanimationresource,
|
25
|
+
loop: true,
|
26
|
+
autoplay: true,
|
27
|
+
speed: this.props.skeletonanimationspeed
|
28
|
+
}));
|
29
|
+
}
|
30
|
+
return null;
|
31
|
+
}
|
10
32
|
renderWidget(props) {
|
33
|
+
const styles = this._showSkeleton ? {
|
34
|
+
...this.styles.root,
|
35
|
+
...this.styles.skeleton.root
|
36
|
+
} : this.styles.root;
|
11
37
|
return /*#__PURE__*/React.createElement(View, {
|
12
|
-
style:
|
38
|
+
style: styles
|
13
39
|
}, this._background, props.children);
|
14
40
|
}
|
15
41
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmPrefabContainerState","WmPrefabContainer","constructor","props","
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmLottie","WmPrefabContainerState","WmPrefabContainer","constructor","props","renderSkeleton","_this$styles","lottieContentStyles","styles","skeleton","skeletonanimationresource","_this$styles2","createElement","style","width","root","content","source","loop","autoplay","speed","skeletonanimationspeed","renderWidget","_showSkeleton","_background","children"],"sources":["prefab-container.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 WmPrefabContainerProps from './prefab-container.props';\nimport { DEFAULT_CLASS, WmPrefabContainerStyles } from './prefab-container.styles';\nimport WmLottie from '../basic/lottie/lottie.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\n\nexport class WmPrefabContainerState extends BaseComponentState<WmPrefabContainerProps> {\n\n}\n\n\nexport default class WmPrefabContainer extends BaseComponent<WmPrefabContainerProps, WmPrefabContainerState, WmPrefabContainerStyles> {\n\n constructor(props: WmPrefabContainerProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n public renderSkeleton(props: WmPrefabContainerProps): React.ReactNode {\n const lottieContentStyles = this.styles?.skeleton as any as WmSkeletonStyles\n if(this.props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles?.root]}>\n <WmLottie styles={{ content: lottieContentStyles.root}} source={this.props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n }\n return null;\n }\n\n renderWidget(props: WmPrefabContainerProps) {\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._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,SAASC,aAAa,QAAiC,2BAA2B;AAClF,OAAOC,QAAQ,MAAM,kCAAkC;AAGvD,OAAO,MAAMC,sBAAsB,SAASH,kBAAkB,CAAyB;AAKvF,eAAe,MAAMI,iBAAiB,SAASL,aAAa,CAA0E;EAEpIM,WAAWA,CAACC,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,EAAEL,aAAe,CAAC;EAC/B;EAEOM,cAAcA,CAACD,KAA6B,EAAmB;IAAA,IAAAE,YAAA;IACpE,MAAMC,mBAAmB,IAAAD,YAAA,GAAG,IAAI,CAACE,MAAM,cAAAF,YAAA,uBAAXA,YAAA,CAAaG,QAAmC;IAC5E,IAAG,IAAI,CAACL,KAAK,CAACM,yBAAyB,EAAE;MAAA,IAAAC,aAAA;MACvC,oBAAOhB,KAAA,CAAAiB,aAAA,CAAChB,IAAI;QAACiB,KAAK,EAAE,CAAC;UAACC,KAAK,EAAE;QAAM,CAAC,GAAAH,aAAA,GAAE,IAAI,CAACH,MAAM,cAAAG,aAAA,uBAAXA,aAAA,CAAaI,IAAI;MAAE,gBACvDpB,KAAA,CAAAiB,aAAA,CAACZ,QAAQ;QAACQ,MAAM,EAAE;UAAEQ,OAAO,EAAET,mBAAmB,CAACQ;QAAI,CAAE;QAACE,MAAM,EAAE,IAAI,CAACb,KAAK,CAACM,yBAA0B;QAACQ,IAAI,EAAE,IAAK;QAACC,QAAQ,EAAE,IAAK;QAACC,KAAK,EAAE,IAAI,CAAChB,KAAK,CAACiB;MAAuB,CAAC,CACtK,CAAC;IACX;IACA,OAAO,IAAI;EACb;EAEAC,YAAYA,CAAClB,KAA6B,EAAE;IAC1C,MAAMI,MAAM,GAAG,IAAI,CAACe,aAAa,GAAG;MAClC,GAAG,IAAI,CAACf,MAAM,CAACO,IAAI;MACnB,GAAG,IAAI,CAACP,MAAM,CAACC,QAAQ,CAACM;IAC1B,CAAC,GAAG,IAAI,CAACP,MAAM,CAACO,IAAI;IACpB,oBACEpB,KAAA,CAAAiB,aAAA,CAAChB,IAAI;MAACiB,KAAK,EAAEL;IAAO,GACjB,IAAI,CAACgB,WAAW,EAChBpB,KAAK,CAACqB,QACH,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["prefab-container.props.ts"],"sourcesContent":["import {
|
1
|
+
{"version":3,"names":[],"sources":["prefab-container.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SkeletonAnimationProps } from '@wavemaker/app-rn-runtime/runtime/base-fragment.component';\n\n\n\nexport default interface WmPrefabContainerProps extends SkeletonAnimationProps {\n children: any[];\n}"],"mappings":"","ignoreList":[]}
|
@@ -4,7 +4,12 @@ export const DEFAULT_CLASS = 'app-prefab';
|
|
4
4
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
5
5
|
const defaultStyles = defineStyles({
|
6
6
|
root: {},
|
7
|
-
text: {}
|
7
|
+
text: {},
|
8
|
+
skeleton: {
|
9
|
+
root: {
|
10
|
+
height: 200
|
11
|
+
}
|
12
|
+
}
|
8
13
|
});
|
9
14
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
10
15
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text"],"sources":["prefab-container.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 WmPrefabContainerStyles =
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","skeleton","height"],"sources":["prefab-container.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 '../basic/skeleton/skeleton.styles';\n\nexport type WmPrefabContainerStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-prefab';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPrefabContainerStyles = defineStyles({\n root: {},\n text: {},\n skeleton: {\n root: {\n height: 200\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAsC,GAAGL,YAAY,CAAC;IACxDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNF,IAAI,EAAE;QACFG,MAAM,EAAE;MACZ;IACJ;EACJ,CAAC,CAAC;EAEFL,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
|
@@ -52,8 +52,9 @@ export class BaseProps extends StyleProps {
|
|
52
52
|
_defineProperty(this, "classname", null);
|
53
53
|
_defineProperty(this, "listener", null);
|
54
54
|
_defineProperty(this, "showindevice", null);
|
55
|
-
_defineProperty(this, "showskeleton",
|
55
|
+
_defineProperty(this, "showskeleton", undefined);
|
56
56
|
_defineProperty(this, "deferload", false);
|
57
|
+
_defineProperty(this, "showskeletonchildren", true);
|
57
58
|
}
|
58
59
|
}
|
59
60
|
export class BaseComponent extends React.Component {
|
@@ -122,6 +123,7 @@ export class BaseComponent extends React.Component {
|
|
122
123
|
if (this.propertyProvider.has(propName)) {
|
123
124
|
// @ts-ignore
|
124
125
|
const props = {};
|
126
|
+
this.propertyProvider.overrideProp(propName, value);
|
125
127
|
props[propName] = value;
|
126
128
|
this.updateState({
|
127
129
|
props: props
|
@@ -275,7 +277,7 @@ export class BaseComponent extends React.Component {
|
|
275
277
|
}
|
276
278
|
isVisible() {
|
277
279
|
const show = this.state.props.show;
|
278
|
-
return show !== false && show !== 'false' && show !== '0' && !isNil(show);
|
280
|
+
return show !== false && show !== 'false' && show !== '0' && !isNil(show) && show !== "";
|
279
281
|
}
|
280
282
|
refresh() {
|
281
283
|
this.forceUpdate();
|
@@ -403,7 +405,7 @@ export class BaseComponent extends React.Component {
|
|
403
405
|
return /*#__PURE__*/React.createElement(ParentContext.Consumer, null, parent => {
|
404
406
|
var _this$parent;
|
405
407
|
this.setParent(parent);
|
406
|
-
this._showSkeleton = ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent._showSkeleton) ||
|
408
|
+
this._showSkeleton = this.state.props.showskeleton !== false && (((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent._showSkeleton) || this.state.props.showskeleton === true);
|
407
409
|
return /*#__PURE__*/React.createElement(ParentContext.Provider, {
|
408
410
|
value: this
|
409
411
|
}, /*#__PURE__*/React.createElement(ThemeConsumer, null, theme => {
|