@wavemaker/app-rn-runtime 11.4.0-next.28151 → 11.4.0-next.28701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/actions/base-action.js.map +1 -1
- app-rn-runtime/actions/login-action.js.map +1 -1
- app-rn-runtime/actions/logout-action.js.map +1 -1
- app-rn-runtime/actions/navigation-action.js.map +1 -1
- app-rn-runtime/actions/notification-action.js.map +1 -1
- app-rn-runtime/actions/timer-action.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +16 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.props.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -0
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +5 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +1 -3
- app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +232 -0
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -0
- app-rn-runtime/components/basic/audio/audio.props.js +15 -0
- app-rn-runtime/components/basic/audio/audio.props.js.map +1 -0
- app-rn-runtime/components/basic/audio/audio.styles.js +61 -0
- app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -0
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.styles.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.props.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.props.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.styles.js +5 -0
- app-rn-runtime/components/basic/icon/icon.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +2 -1
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.props.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +8 -0
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/message/message.props.js.map +1 -1
- app-rn-runtime/components/basic/message/message.styles.js +22 -0
- app-rn-runtime/components/basic/message/message.styles.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.component.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.props.js.map +1 -1
- app-rn-runtime/components/basic/modal/modal.styles.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +3 -3
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.styles.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/local-data-provider.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +1 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +1 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +47 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +3 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.props.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.styles.js +8 -0
- app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +2 -2
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/theme/chart.theme.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +63 -119
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js +1 -0
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +14 -4
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +42 -7
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js.map +1 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js.map +1 -1
- 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/gridcolumn/gridcolumn.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js.map +1 -1
- 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.map +1 -1
- 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/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js.map +1 -1
- 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 +9 -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 +30 -5
- 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/tabheader/tabheader.styles.js +10 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -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 +5 -2
- 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 +39 -0
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- 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.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +15 -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 +53 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- 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.props.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.props.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -2
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.props.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -2
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/form/form.styles.js.map +1 -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.map +1 -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 +77 -16
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +2 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.props.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js +9 -0
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -2
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.props.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.props.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +22 -0
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +1 -0
- app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +1 -0
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.props.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +6 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +1 -1
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +9 -0
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +5 -2
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +9 -0
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +9 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +9 -0
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +6 -4
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +1 -1
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +5 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +1 -1
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.props.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +1 -1
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.props.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +10 -0
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +2 -1
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.props.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.props.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +36 -0
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +5 -3
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +5 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +5 -3
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +5 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +17 -11
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +28 -3
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.styles.js +6 -0
- app-rn-runtime/components/navigation/menu/menu.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.styles.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.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.props.js.map +1 -1
- 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.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.props.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.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/core/asset.provider.js.map +1 -1
- app-rn-runtime/core/base.component.js +19 -14
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +37 -0
- app-rn-runtime/core/components/textinput.component.js.map +1 -0
- app-rn-runtime/core/device/camera-service.js.map +1 -1
- app-rn-runtime/core/device/scan-service.js.map +1 -1
- app-rn-runtime/core/display.manager.js.map +1 -1
- app-rn-runtime/core/event-notifier.js.map +1 -1
- app-rn-runtime/core/fixed-view.component.js.map +1 -1
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/i18n.service.js +2 -0
- app-rn-runtime/core/i18n.service.js.map +1 -0
- app-rn-runtime/core/if.component.js +3 -3
- app-rn-runtime/core/if.component.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/core/injector.js +2 -1
- app-rn-runtime/core/injector.js.map +1 -1
- app-rn-runtime/core/logger.js +4 -1
- app-rn-runtime/core/logger.js.map +1 -1
- app-rn-runtime/core/modal.service.js.map +1 -1
- app-rn-runtime/core/navigation.service.js.map +1 -1
- app-rn-runtime/core/network.service.js +17 -15
- app-rn-runtime/core/network.service.js.map +1 -1
- app-rn-runtime/core/partial.service.js.map +1 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/scroll-view.component.js.map +1 -1
- app-rn-runtime/core/security.service.js.map +1 -1
- app-rn-runtime/core/spinner.service.js.map +1 -1
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +11 -2
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/toast.service.js.map +1 -1
- app-rn-runtime/core/utils.js +3 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/core/viewport.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +9 -4
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +30 -30
- app-rn-runtime/runtime/App.js +14 -6
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +11 -2
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +4 -4
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +2 -0
- 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 +1 -5
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/lib-patch.js.map +1 -1
- app-rn-runtime/runtime/memo.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-display-manager.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +20 -0
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +7 -7
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +3 -2
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
- app-rn-runtime/runtime/services/device/calendar-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +2 -3
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/contacts-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/location-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/runtime/services/partial.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/MediaQueryList.js.map +1 -1
- app-rn-runtime/styles/background.component.js +51 -12
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/style-prop.validator.js +4 -0
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/style-props.js.map +1 -1
- app-rn-runtime/styles/theme.js +8 -3
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +53 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/base-variable.js +3 -3
- app-rn-runtime/variables/base-variable.js.map +1 -1
- app-rn-runtime/variables/device/calendar/create-event.operation.js.map +1 -1
- app-rn-runtime/variables/device/calendar/delete-event.operation.js.map +1 -1
- app-rn-runtime/variables/device/calendar/get-events.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-image.operation.js.map +1 -1
- app-rn-runtime/variables/device/camera/capture-video.operation.js.map +1 -1
- app-rn-runtime/variables/device/contacts/get-contacts.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/app-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/current-geo-position.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/device-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/device/vibrate.operation.js.map +1 -1
- app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
- app-rn-runtime/variables/device/operation.provider.js.map +1 -1
- app-rn-runtime/variables/device/scan/scan.operation.js.map +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/http.service.js +1 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/model-variable.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +8 -3
- app-rn-runtime/variables/service-variable.js.map +1 -1
- app-rn-runtime/variables/utils/dataset-util.js.map +1 -1
- app-rn-runtime/variables/utils/inflight-queue.js.map +1 -1
- app-rn-runtime/variables/utils/variable.utils.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["axios","Platform","endsWith","DocumentPicker","FileExtensionTypesMap","namedParameters","copyToCacheDirectory","multiple","type","UploadFileOperation","chooseFile","getDocumentAsync","then","response","OS","file","uri","invoke","params","serverUrl","remoteFolder","Promise","resolve","localFile","browse","filePath","fileName","split","pop","arr","fileExtension","length","fileObj","name","formData","FormData","append","url","method","headers","data","error"],"sources":["upload-file.operation.tsx"],"sourcesContent":["import axios from 'axios';\nimport { Platform } from 'react-native';\nimport { endsWith } from 'lodash-es';\nimport * as DocumentPicker from 'expo-document-picker';\n\nimport { Operation } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport { FileExtensionTypesMap } from '@wavemaker/app-rn-runtime/core/file-extension-types';\n\nexport interface UploadFileInput {\n localFile: string;\n remoteFolder: string;\n serverUrl: string;\n browse: boolean;\n}\n\nexport interface UploadFileOutput {\n fileName: string;\n path: string;\n length: number;\n success: boolean;\n inlinePath: string;\n errorMessage: string;\n}\n\nconst namedParameters = {\n copyToCacheDirectory: false,\n multiple: false,\n type: '*/*'\n};\n\nexport class UploadFileOperation implements Operation {\n\n public chooseFile() {\n return DocumentPicker.getDocumentAsync(namedParameters).then((response: any) => {\n return Platform.OS === 'web' ? response.file : response.uri;\n });\n }\n\n public invoke(params: UploadFileInput): Promise<UploadFileOutput> {\n params.serverUrl = endsWith(params.serverUrl, '/') ? params.serverUrl : params.serverUrl + '/';\n let serverUrl = params.serverUrl + 'services/file/uploadFile';\n if (params.remoteFolder) {\n serverUrl = serverUrl + '?relativePath=' + params.remoteFolder\n }\n return Promise.resolve().then(() => {\n if (!params.localFile && params.browse) {\n return this.chooseFile();\n } else {\n return params.localFile;\n }\n }).then((filePath: string) => {\n if (!filePath) {\n return;\n }\n const fileName: string | undefined = filePath.split('/').pop() || '';\n const arr: any = fileName.split('.');\n const fileExtension: string = '.' + arr[arr.length - 1];\n let fileObj = {\n uri: filePath,\n type: FileExtensionTypesMap[fileExtension],\n name: fileName,\n };\n\n let formData = new FormData();\n formData.append('files', fileObj);\n return axios({\n url: serverUrl,\n method: 'POST',\n headers: {\n 'Content-Type': 'multipart/form-data'\n },\n data: formData\n }).then(\n (response) => {\n return response.data[0];\n }, error => error);\n });\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,QAAQ,QAAQ,WAAW;AACpC,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AAGtD,SAASC,qBAAqB,QAAQ,qDAAqD;AAkB3F,MAAMC,eAAe,GAAG;EACtBC,oBAAoB,EAAE,KAAK;EAC3BC,QAAQ,EAAE,KAAK;EACfC,IAAI,EAAE;AACR,CAAC;AAED,OAAO,MAAMC,mBAAmB,CAAsB;EAE7CC,
|
|
1
|
+
{"version":3,"names":["axios","Platform","endsWith","DocumentPicker","FileExtensionTypesMap","namedParameters","copyToCacheDirectory","multiple","type","UploadFileOperation","chooseFile","getDocumentAsync","then","response","OS","file","uri","invoke","params","serverUrl","remoteFolder","Promise","resolve","localFile","browse","filePath","fileName","split","pop","arr","fileExtension","length","fileObj","name","formData","FormData","append","url","method","headers","data","error"],"sources":["upload-file.operation.tsx"],"sourcesContent":["import axios from 'axios';\nimport { Platform } from 'react-native';\nimport { endsWith } from 'lodash-es';\nimport * as DocumentPicker from 'expo-document-picker';\n\nimport { Operation } from '@wavemaker/app-rn-runtime/variables/device/operation.provider';\nimport { FileExtensionTypesMap } from '@wavemaker/app-rn-runtime/core/file-extension-types';\n\nexport interface UploadFileInput {\n localFile: string;\n remoteFolder: string;\n serverUrl: string;\n browse: boolean;\n}\n\nexport interface UploadFileOutput {\n fileName: string;\n path: string;\n length: number;\n success: boolean;\n inlinePath: string;\n errorMessage: string;\n}\n\nconst namedParameters = {\n copyToCacheDirectory: false,\n multiple: false,\n type: '*/*'\n};\n\nexport class UploadFileOperation implements Operation {\n\n public chooseFile() {\n return DocumentPicker.getDocumentAsync(namedParameters).then((response: any) => {\n return Platform.OS === 'web' ? response.file : response.uri;\n });\n }\n\n public invoke(params: UploadFileInput): Promise<UploadFileOutput> {\n params.serverUrl = endsWith(params.serverUrl, '/') ? params.serverUrl : params.serverUrl + '/';\n let serverUrl = params.serverUrl + 'services/file/uploadFile';\n if (params.remoteFolder) {\n serverUrl = serverUrl + '?relativePath=' + params.remoteFolder\n }\n return Promise.resolve().then(() => {\n if (!params.localFile && params.browse) {\n return this.chooseFile();\n } else {\n return params.localFile;\n }\n }).then((filePath: string) => {\n if (!filePath) {\n return;\n }\n const fileName: string | undefined = filePath.split('/').pop() || '';\n const arr: any = fileName.split('.');\n const fileExtension: string = '.' + arr[arr.length - 1];\n let fileObj = {\n uri: filePath,\n type: FileExtensionTypesMap[fileExtension],\n name: fileName,\n };\n\n let formData = new FormData();\n formData.append('files', fileObj);\n return axios({\n url: serverUrl,\n method: 'POST',\n headers: {\n 'Content-Type': 'multipart/form-data'\n },\n data: formData\n }).then(\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,IAAK;MAC5B,IAAI,CAACA,QAAQ,EAAE;QACb;MACF;MACA,MAAMC,QAA4B,GAAGD,QAAQ,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,IAAI,EAAE;MACpE,MAAMC,GAAQ,GAAGH,QAAQ,CAACC,KAAK,CAAC,GAAG,CAAC;MACpC,MAAMG,aAAqB,GAAG,GAAG,GAAGD,GAAG,CAACA,GAAG,CAACE,MAAM,GAAG,CAAC,CAAC;MACvD,IAAIC,OAAO,GAAG;QACZhB,GAAG,EAAES,QAAQ;QACbjB,IAAI,EAAEJ,qBAAqB,CAAC0B,aAAa,CAAC;QAC1CG,IAAI,EAAEP;MACR,CAAC;MAED,IAAIQ,QAAQ,GAAG,IAAIC,QAAQ,CAAC,CAAC;MAC7BD,QAAQ,CAACE,MAAM,CAAC,OAAO,EAAEJ,OAAO,CAAC;MACjC,OAAOhC,KAAK,CAAC;QACXqC,GAAG,EAAElB,SAAS;QACdmB,MAAM,EAAE,MAAM;QACdC,OAAO,EAAE;UACP,cAAc,EAAE;QAClB,CAAC;QACDC,IAAI,EAAEN;MACR,CAAC,CAAC,CAACtB,IAAI,CACJC,QAAQ,IAAK;QACd,OAAOA,QAAQ,CAAC2B,IAAI,CAAC,CAAC,CAAC;MACzB,CAAC,EAAEC,KAAK,IAAIA,KAAK,CAAC;IACpB,CAAC,CAAC;EACJ;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registry","Map","OperationProvider","set","name","operation","get"],"sources":["operation.provider.ts"],"sourcesContent":["export interface Operation {\n invoke(params?: Input, onSuccess?: Function, onError?: Function, operation?: string): Promise<Output>;\n}\n\nexport interface Input {\n}\n\nexport interface Output {\n}\n\nconst registry = new Map<string, Operation>();\n\nexport class OperationProvider {\n\n public set(name: string, operation: Operation) {\n return registry.set(name, operation);\n }\n\n public get(name: string) {\n return registry.get(name);\n }\n}\n\nexport default new OperationProvider();"],"mappings":"AAUA,MAAMA,QAAQ,GAAG,IAAIC,GAAG,
|
|
1
|
+
{"version":3,"names":["registry","Map","OperationProvider","set","name","operation","get"],"sources":["operation.provider.ts"],"sourcesContent":["export interface Operation {\n invoke(params?: Input, onSuccess?: Function, onError?: Function, operation?: string): Promise<Output>;\n}\n\nexport interface Input {\n}\n\nexport interface Output {\n}\n\nconst registry = new Map<string, Operation>();\n\nexport class OperationProvider {\n\n public set(name: string, operation: Operation) {\n return registry.set(name, operation);\n }\n\n public get(name: string) {\n return registry.get(name);\n }\n}\n\nexport default new OperationProvider();"],"mappings":"AAUA,MAAMA,QAAQ,GAAG,IAAIC,GAAG,CAAoB,CAAC;AAE7C,OAAO,MAAMC,iBAAiB,CAAC;EAEtBC,GAAGA,CAACC,IAAY,EAAEC,SAAoB,EAAE;IAC7C,OAAOL,QAAQ,CAACG,GAAG,CAACC,IAAI,EAAEC,SAAS,CAAC;EACtC;EAEOC,GAAGA,CAACF,IAAY,EAAE;IACvB,OAAOJ,QAAQ,CAACM,GAAG,CAACF,IAAI,CAAC;EAC3B;AACF;AAEA,eAAe,IAAIF,iBAAiB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ScanOperation","constructor","scan","invoke","params","scanBarcode"],"sources":["scan.operation.tsx"],"sourcesContent":["import { ScanService } from \"@wavemaker/app-rn-runtime/core/device/scan-service\";\nimport { Operation, Input, Output } from '../operation.provider';\n\nexport interface ScanInput extends Input {\n barcodeFormat: string;\n}\n\nexport interface ScanOutput extends Output {\n text : string;\n format : string;\n cancelled : boolean;\n}\n\nexport class ScanOperation implements Operation {\n\n constructor(private scan: ScanService) {}\n\n public invoke(params: ScanInput): Promise<ScanOutput> {\n return this.scan.scanBarcode(params);\n }\n}\n"],"mappings":"AAaA,OAAO,MAAMA,aAAa,CAAsB;EAE9CC,
|
|
1
|
+
{"version":3,"names":["ScanOperation","constructor","scan","invoke","params","scanBarcode"],"sources":["scan.operation.tsx"],"sourcesContent":["import { ScanService } from \"@wavemaker/app-rn-runtime/core/device/scan-service\";\nimport { Operation, Input, Output } from '../operation.provider';\n\nexport interface ScanInput extends Input {\n barcodeFormat: string;\n}\n\nexport interface ScanOutput extends Output {\n text : string;\n format : string;\n cancelled : boolean;\n}\n\nexport class ScanOperation implements Operation {\n\n constructor(private scan: ScanService) {}\n\n public invoke(params: ScanInput): Promise<ScanOutput> {\n return this.scan.scanBarcode(params);\n }\n}\n"],"mappings":"AAaA,OAAO,MAAMA,aAAa,CAAsB;EAE9CC,WAAWA,CAASC,IAAiB,EAAE;IAAA,KAAnBA,IAAiB,GAAjBA,IAAiB;EAAG;EAEjCC,MAAMA,CAACC,MAAiB,EAAuB;IACpD,OAAO,IAAI,CAACF,IAAI,CAACG,WAAW,CAACD,MAAM,CAAC;EACtC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseVariable","VariableEvents","OperationProvider","DeviceVariable","constructor","config","dataSet","isList","invoke","params","onSuccess","onError","operation","get","service","Promise","resolve","notify","BEFORE_INVOKE","then","data","SUCCESS","err","ERROR","AFTER_INVOKE"],"sources":["device-variable.ts"],"sourcesContent":["import { BaseVariable, VariableConfig, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport OperationProvider, { Input, Output } from './device/operation.provider';\n\nexport interface DeviceVariableConfig extends VariableConfig {\n service: string;\n operation: string;\n}\n\nexport class DeviceVariable extends BaseVariable<DeviceVariableConfig> {\n\n constructor(config: DeviceVariableConfig) {\n super(config);\n this.dataSet = this.isList ? [] : {};\n }\n\n invoke(params: any, onSuccess?: Function, onError?: Function): Promise<DeviceVariable> {\n super.invoke(params, onSuccess, onError);\n const operation = OperationProvider.get(`${this.config.service}.${this.config.operation}`);\n if (!operation) {\n return Promise.resolve(this);\n }\n this.notify(VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);\n\n return operation.invoke(this.params as Input, onSuccess, onError)\n .then((data: Output) => {\n this.dataSet = data;\n this.config.onSuccess && this.config.onSuccess(this, this.dataSet);\n this.notify(VariableEvents.SUCCESS, [this, this.dataSet]);\n }, (err: Output) => {\n this.config.onError && this.config.onError(this, null);\n this.notify(VariableEvents.ERROR, [this, this.dataSet]);\n }).then(() => {\n this.notify(VariableEvents.AFTER_INVOKE, [this, this.dataSet]);\n return this;\n });\n }\n}\n"],"mappings":"AAAA,SAASA,YAAY,EAAkBC,cAAc,QAAQ,mDAAmD;AAChH,OAAOC,iBAAiB,MAAyB,6BAA6B;AAO9E,OAAO,MAAMC,cAAc,SAASH,YAAY,CAAuB;EAErEI,
|
|
1
|
+
{"version":3,"names":["BaseVariable","VariableEvents","OperationProvider","DeviceVariable","constructor","config","dataSet","isList","invoke","params","onSuccess","onError","operation","get","service","Promise","resolve","notify","BEFORE_INVOKE","then","data","SUCCESS","err","ERROR","AFTER_INVOKE"],"sources":["device-variable.ts"],"sourcesContent":["import { BaseVariable, VariableConfig, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport OperationProvider, { Input, Output } from './device/operation.provider';\n\nexport interface DeviceVariableConfig extends VariableConfig {\n service: string;\n operation: string;\n}\n\nexport class DeviceVariable extends BaseVariable<DeviceVariableConfig> {\n\n constructor(config: DeviceVariableConfig) {\n super(config);\n this.dataSet = this.isList ? [] : {};\n }\n\n invoke(params: any, onSuccess?: Function, onError?: Function): Promise<DeviceVariable> {\n super.invoke(params, onSuccess, onError);\n const operation = OperationProvider.get(`${this.config.service}.${this.config.operation}`);\n if (!operation) {\n return Promise.resolve(this);\n }\n this.notify(VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);\n\n return operation.invoke(this.params as Input, onSuccess, onError)\n .then((data: Output) => {\n this.dataSet = data;\n this.config.onSuccess && this.config.onSuccess(this, this.dataSet);\n this.notify(VariableEvents.SUCCESS, [this, this.dataSet]);\n }, (err: Output) => {\n this.config.onError && this.config.onError(this, null);\n this.notify(VariableEvents.ERROR, [this, this.dataSet]);\n }).then(() => {\n this.notify(VariableEvents.AFTER_INVOKE, [this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IAAI,IAAI,CAACN,MAAM,CAACM,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;MACtD,IAAI,CAACM,MAAM,CAAChB,cAAc,CAACsB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAACjB,OAAO,CAAC,CAAC;IACzD,CAAC,CAAC,CAACa,IAAI,CAAC,MAAM;MACZ,IAAI,CAACF,MAAM,CAAChB,cAAc,CAACuB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAAClB,OAAO,CAAC,CAAC;MAC9D,OAAO,IAAI;IACf,CAAC,CAAC;EACJ;AACF"}
|
|
@@ -10,7 +10,7 @@ export class HttpService {
|
|
|
10
10
|
requestBody = options.data,
|
|
11
11
|
url = options.url;
|
|
12
12
|
variable.cancelTokenSource = axios.CancelToken.source();
|
|
13
|
-
if (!isWebPreviewMode() && ((variable === null || variable === void 0
|
|
13
|
+
if (!isWebPreviewMode() && ((variable === null || variable === void 0 || (_variable$serviceInfo = variable.serviceInfo) === null || _variable$serviceInfo === void 0 ? void 0 : _variable$serviceInfo.consumes) || [])[0] === 'multipart/form-data') {
|
|
14
14
|
headers['Content-Type'] = 'multipart/form-data';
|
|
15
15
|
let formData = new FormData();
|
|
16
16
|
(variable.serviceInfo.parameters || []).forEach(p => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["axios","WS_CONSTANTS","isWebPreviewMode","injector","HttpService","send","options","variable","serviceInfo","headers","requestBody","data","url","cancelTokenSource","CancelToken","source","consumes","formData","FormData","parameters","forEach","p","v","params","name","append","methodType","isNonDataMethod","NON_DATA_AXIOS_METHODS","indexOf","toUpperCase","axiosConfig","cancelToken","token","withCredentials","Promise","resolve","reject","apply","then","result","err","sendCall","requestParams","response","getLocale","appConfig","get","appLocale","messages","cancel","uploadFile","event","error","httpService"],"sources":["http.service.ts"],"sourcesContent":["import axios from 'axios';\nimport { HttpClientService } from '@wavemaker/variables/src/types/http-client.service';\nimport { WS_CONSTANTS } from '@wavemaker/app-rn-runtime/variables/utils/variable.constants';\nimport { get, isEmpty } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport class HttpService implements HttpClientService {\n\n send(options: any, variable: any) {\n const serviceInfo = variable.serviceInfo;\n let headers: any = options.headers,\n requestBody: any = options.data,\n url: string = options.url;\n variable.cancelTokenSource = axios.CancelToken.source();\n if (!isWebPreviewMode() && (variable?.serviceInfo?.consumes||[])[0] === 'multipart/form-data') {\n headers['Content-Type'] = 'multipart/form-data';\n let formData = new FormData();\n (variable.serviceInfo.parameters||[]).forEach((p: any) => {\n const v = variable.params[p.name];\n if (v) {\n formData.append(p.name, variable.params[p.name]);\n }\n });\n requestBody = formData;\n }\n const methodType: string = serviceInfo.methodType;\n const isNonDataMethod: boolean = WS_CONSTANTS.NON_DATA_AXIOS_METHODS.indexOf(methodType.toUpperCase()) > -1;\n const axiosConfig = {\n headers: headers,\n cancelToken: variable.cancelTokenSource.token,\n withCredentials: true\n };\n return new Promise((resolve, reject) => {\n // @ts-ignore\n axios[methodType].apply(variable, ( isNonDataMethod ? [url, axiosConfig] : [url, requestBody || {}, axiosConfig]))\n .then((result: any) => {\n resolve(result);\n }, (err: any) => {\n reject(err);\n })\n })\n }\n\n sendCall(requestParams: any, variable: any) {\n return new Promise((resolve, reject) => {\n this.send(requestParams, variable).then((response: any) => {\n resolve(response);\n }, (err: any) => {\n reject(err);\n });\n });\n }\n\n getLocale() {\n const appConfig = injector.get<AppConfig>('APP_CONFIG');\n return appConfig.appLocale.messages;\n }\n\n cancel(variable: any) {\n variable.cancelTokenSource.cancel();\n }\n\n uploadFile(url: any, data: any, variable: any, options?: any) {\n const requestParams = {\n url: url,\n data: data\n }\n return new Promise((resolve, reject) => {\n return this.send(requestParams, variable).then((event: any) => {\n resolve(event.data);\n }, (error: any) => {\n reject(error);\n });\n });\n }\n}\n\nconst httpService = new HttpService();\n\nexport default httpService;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,8DAA8D;AAG3F,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAO,MAAMC,WAAW,CAA8B;EAEpDC,
|
|
1
|
+
{"version":3,"names":["axios","WS_CONSTANTS","isWebPreviewMode","injector","HttpService","send","options","variable","_variable$serviceInfo","serviceInfo","headers","requestBody","data","url","cancelTokenSource","CancelToken","source","consumes","formData","FormData","parameters","forEach","p","v","params","name","append","methodType","isNonDataMethod","NON_DATA_AXIOS_METHODS","indexOf","toUpperCase","axiosConfig","cancelToken","token","withCredentials","Promise","resolve","reject","apply","then","result","err","sendCall","requestParams","response","getLocale","appConfig","get","appLocale","messages","cancel","uploadFile","event","error","httpService"],"sources":["http.service.ts"],"sourcesContent":["import axios from 'axios';\nimport { HttpClientService } from '@wavemaker/variables/src/types/http-client.service';\nimport { WS_CONSTANTS } from '@wavemaker/app-rn-runtime/variables/utils/variable.constants';\nimport { get, isEmpty } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport class HttpService implements HttpClientService {\n\n send(options: any, variable: any) {\n const serviceInfo = variable.serviceInfo;\n let headers: any = options.headers,\n requestBody: any = options.data,\n url: string = options.url;\n variable.cancelTokenSource = axios.CancelToken.source();\n if (!isWebPreviewMode() && (variable?.serviceInfo?.consumes||[])[0] === 'multipart/form-data') {\n headers['Content-Type'] = 'multipart/form-data';\n let formData = new FormData();\n (variable.serviceInfo.parameters||[]).forEach((p: any) => {\n const v = variable.params[p.name];\n if (v) {\n formData.append(p.name, variable.params[p.name]);\n }\n });\n requestBody = formData;\n }\n const methodType: string = serviceInfo.methodType;\n const isNonDataMethod: boolean = WS_CONSTANTS.NON_DATA_AXIOS_METHODS.indexOf(methodType.toUpperCase()) > -1;\n const axiosConfig = {\n headers: headers,\n cancelToken: variable.cancelTokenSource.token,\n withCredentials: true\n };\n return new Promise((resolve, reject) => {\n // @ts-ignore\n axios[methodType].apply(variable, ( isNonDataMethod ? [url, axiosConfig] : [url, requestBody || {}, axiosConfig]))\n .then((result: any) => {\n resolve(result);\n }, (err: any) => {\n reject(err);\n })\n })\n }\n\n sendCall(requestParams: any, variable: any) {\n return new Promise((resolve, reject) => {\n this.send(requestParams, variable).then((response: any) => {\n resolve(response);\n }, (err: any) => {\n reject(err);\n });\n });\n }\n\n getLocale() {\n const appConfig = injector.get<AppConfig>('APP_CONFIG');\n return appConfig.appLocale.messages;\n }\n\n cancel(variable: any) {\n variable.cancelTokenSource.cancel();\n }\n\n uploadFile(url: any, data: any, variable: any, options?: any) {\n const requestParams = {\n url: url,\n data: data\n }\n return new Promise((resolve, reject) => {\n return this.send(requestParams, variable).then((event: any) => {\n resolve(event.data);\n }, (error: any) => {\n reject(error);\n });\n });\n }\n}\n\nconst httpService = new HttpService();\n\nexport default httpService;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,8DAA8D;AAG3F,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAO,MAAMC,WAAW,CAA8B;EAEpDC,IAAIA,CAACC,OAAY,EAAEC,QAAa,EAAE;IAAA,IAAAC,qBAAA;IAChC,MAAMC,WAAW,GAAGF,QAAQ,CAACE,WAAW;IACxC,IAAIC,OAAY,GAAGJ,OAAO,CAACI,OAAO;MAChCC,WAAgB,GAAGL,OAAO,CAACM,IAAI;MAC/BC,GAAW,GAAGP,OAAO,CAACO,GAAG;IACzBN,QAAQ,CAACO,iBAAiB,GAAGd,KAAK,CAACe,WAAW,CAACC,MAAM,CAAC,CAAC;IACzD,IAAI,CAACd,gBAAgB,CAAC,CAAC,IAA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G,IAAInD,WAAW,CAAC,CAAC;AAErC,eAAemD,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VariableEvents","ModelVariable","_ModelVariable","constructor","config","variable","name","dataSet","paramProvider","isList","invoke","params","onSuccess","onError","result","notify","BEFORE_INVOKE","execute","SUCCESS","error","ERROR","AFTER_INVOKE"],"sources":["model-variable.ts"],"sourcesContent":["import { BaseVariable, VariableConfig, VariableEvents } from './base-variable';\nimport { ModelVariable as _ModelVariable } from '@wavemaker/variables/src/model/variable/model-variable';\n\nexport class ModelVariable extends _ModelVariable {\n config: any;\n\n constructor(config: VariableConfig) {\n const variable = {\n name: config.name,\n dataSet: config.paramProvider(),\n isList: config.isList\n }\n super(variable);\n this.config = config;\n this.invoke();\n }\n\n invoke(params?: {}, onSuccess?: Function, onError?: Function) {\n let result;\n this.notify(VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);\n try{\n result = super.execute(params, ()=>{});\n this.config.onSuccess && this.config.onSuccess(this, this.dataSet);\n onSuccess && onSuccess(this, this.dataSet);\n this.notify(VariableEvents.SUCCESS, [this, this.dataSet]);\n }\n catch(error){\n this.config.onError && this.config.onError(this, this.dataSet);\n onError && onError(this, this.dataSet);\n this.notify(VariableEvents.ERROR, [this, this.dataSet]);\n }\n\n this.notify(VariableEvents.AFTER_INVOKE, [this, this.dataSet]);\n return result;\n }\n}\n"],"mappings":";;;AAAA,SAAuCA,cAAc,QAAQ,iBAAiB;AAC9E,SAASC,aAAa,IAAIC,cAAc,QAAQ,wDAAwD;AAExG,OAAO,MAAMD,aAAa,SAASC,cAAc,CAAC;EAGhDC,
|
|
1
|
+
{"version":3,"names":["VariableEvents","ModelVariable","_ModelVariable","constructor","config","variable","name","dataSet","paramProvider","isList","_defineProperty","invoke","params","onSuccess","onError","result","notify","BEFORE_INVOKE","execute","SUCCESS","error","ERROR","AFTER_INVOKE"],"sources":["model-variable.ts"],"sourcesContent":["import { BaseVariable, VariableConfig, VariableEvents } from './base-variable';\nimport { ModelVariable as _ModelVariable } from '@wavemaker/variables/src/model/variable/model-variable';\n\nexport class ModelVariable extends _ModelVariable {\n config: any;\n\n constructor(config: VariableConfig) {\n const variable = {\n name: config.name,\n dataSet: config.paramProvider(),\n isList: config.isList\n }\n super(variable);\n this.config = config;\n this.invoke();\n }\n\n invoke(params?: {}, onSuccess?: Function, onError?: Function) {\n let result;\n this.notify(VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);\n try{\n result = super.execute(params, ()=>{});\n this.config.onSuccess && this.config.onSuccess(this, this.dataSet);\n onSuccess && onSuccess(this, this.dataSet);\n this.notify(VariableEvents.SUCCESS, [this, this.dataSet]);\n }\n catch(error){\n this.config.onError && this.config.onError(this, this.dataSet);\n onError && onError(this, this.dataSet);\n this.notify(VariableEvents.ERROR, [this, this.dataSet]);\n }\n\n this.notify(VariableEvents.AFTER_INVOKE, [this, this.dataSet]);\n return result;\n }\n}\n"],"mappings":";;;AAAA,SAAuCA,cAAc,QAAQ,iBAAiB;AAC9E,SAASC,aAAa,IAAIC,cAAc,QAAQ,wDAAwD;AAExG,OAAO,MAAMD,aAAa,SAASC,cAAc,CAAC;EAGhDC,WAAWA,CAACC,MAAsB,EAAE;IAClC,MAAMC,QAAQ,GAAG;MACfC,IAAI,EAAEF,MAAM,CAACE,IAAI;MACjBC,OAAO,EAAEH,MAAM,CAACI,aAAa,CAAC,CAAC;MAC/BC,MAAM,EAAEL,MAAM,CAACK;IACjB,CAAC;IACD,KAAK,CAACJ,QAAQ,CAAC;IAACK,eAAA;IAChB,IAAI,CAACN,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACO,MAAM,CAAC,CAAC;EACf;EAEAA,MAAMA,CAACC,MAAW,EAAEC,SAAoB,EAAEC,OAAkB,EAAE;IAC5D,IAAIC,MAAM;IACV,IAAI,CAACC,MAAM,CAAChB,cAAc,CAACiB,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,CAACV,OAAO,CAAC,CAAC;IAC/D,IAAG;MACDQ,MAAM,GAAG,KAAK,CAACG,OAAO,CAACN,MAAM,EAAE,MAAI,CAAC,CAAC,CAAC;MACtC,IAAI,CAACR,MAAM,CAACS,SAAS,IAAI,IAAI,CAACT,MAAM,CAACS,SAAS,CAAC,IAAI,EAAE,IAAI,CAACN,OAAO,CAAC;MAClEM,SAAS,IAAIA,SAAS,CAAC,IAAI,EAAE,IAAI,CAACN,OAAO,CAAC;MAC1C,IAAI,CAACS,MAAM,CAAChB,cAAc,CAACmB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAACZ,OAAO,CAAC,CAAC;IAC3D,CAAC,CACD,OAAMa,KAAK,EAAC;MACV,IAAI,CAAChB,MAAM,CAACU,OAAO,IAAI,IAAI,CAACV,MAAM,CAACU,OAAO,CAAC,IAAI,EAAE,IAAI,CAACP,OAAO,CAAC;MAC9DO,OAAO,IAAIA,OAAO,CAAC,IAAI,EAAE,IAAI,CAACP,OAAO,CAAC;MACtC,IAAI,CAACS,MAAM,CAAChB,cAAc,CAACqB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAACd,OAAO,CAAC,CAAC;IACzD;IAEA,IAAI,CAACS,MAAM,CAAChB,cAAc,CAACsB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAACf,OAAO,CAAC,CAAC;IAC9D,OAAOQ,MAAM;EACf;AACF"}
|
|
@@ -7,10 +7,10 @@ import { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';
|
|
|
7
7
|
import { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';
|
|
8
8
|
import httpService from '@wavemaker/app-rn-runtime/variables/http.service';
|
|
9
9
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
10
|
-
var _ServiceVariableEvents
|
|
11
|
-
(function (_ServiceVariableEvents) {
|
|
10
|
+
var _ServiceVariableEvents = /*#__PURE__*/function (_ServiceVariableEvents) {
|
|
12
11
|
_ServiceVariableEvents["BEFORE_INVOKE"] = "beforeInvoke";
|
|
13
|
-
|
|
12
|
+
return _ServiceVariableEvents;
|
|
13
|
+
}(_ServiceVariableEvents || {});
|
|
14
14
|
export class ServiceVariable extends _ServiceVariable {
|
|
15
15
|
constructor(config) {
|
|
16
16
|
const variableConfig = {
|
|
@@ -27,15 +27,20 @@ export class ServiceVariable extends _ServiceVariable {
|
|
|
27
27
|
serviceInfo: config.getServiceInfo(),
|
|
28
28
|
httpClientService: httpService,
|
|
29
29
|
onSuccess: (context, args) => {
|
|
30
|
+
this.notify(VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);
|
|
31
|
+
this.notify(VariableEvents.SUCCESS, [args.variable, args.data, args.options]);
|
|
30
32
|
return config.onSuccess && config.onSuccess(args.variable, args.data, args.options);
|
|
31
33
|
},
|
|
32
34
|
onError: (context, args) => {
|
|
35
|
+
this.notify(VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);
|
|
36
|
+
this.notify(VariableEvents.ERROR, [args.variable, args.data, args.options]);
|
|
33
37
|
return config.onError && config.onError(args.variable, args.data, args.options);
|
|
34
38
|
},
|
|
35
39
|
onCanUpdate: (context, args) => {
|
|
36
40
|
return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);
|
|
37
41
|
},
|
|
38
42
|
onBeforeUpdate: (context, args) => {
|
|
43
|
+
this.notify(VariableEvents.BEFORE_INVOKE, [args.variable, args.inputData, args.options]);
|
|
39
44
|
return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);
|
|
40
45
|
},
|
|
41
46
|
onResult: (context, args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VariableEvents","isEqual","deepCopy","ServiceVariable","_ServiceVariable","httpService","injector","_ServiceVariableEvents","constructor","config","variableConfig","name","dataSet","paramProvider","dataBinding","isList","service","serviceType","maxResults","_context","operation","operationId","serviceInfo","getServiceInfo","httpClientService","onSuccess","context","args","variable","data","options","onError","onCanUpdate","onBeforeUpdate","inputData","onResult","onBeforeDatasetReady","get","subscribe","AFTER_INVOKE","invokeOnParamChange","last","params","latest","invoke","Promise","resolve","doNext","currentPage","reject","onDataUpdated","appConfig","refresh","inputFields","console","error"],"sources":["service-variable.ts"],"sourcesContent":["import { VariableConfig, VariableEvents } from './base-variable';\nimport { isEqual, assignIn } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';\nimport httpService from '@wavemaker/app-rn-runtime/variables/http.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface ServiceVariableConfig extends VariableConfig {\n baseUrl: string;\n maxResults: number;\n _context: any;\n serviceType: string;\n onCanUpdate: any;\n onBeforeUpdate: any;\n onResult: any;\n onBeforeDatasetReady: any;\n inFlightBehavior: string;\n getServiceInfo: Function;\n}\n\nenum _ServiceVariableEvents {\n BEFORE_INVOKE = 'beforeInvoke'\n}\nexport type ServiceVariableEvents = _ServiceVariableEvents | VariableEvents;\n\nexport class ServiceVariable extends _ServiceVariable {\n private cancelTokenSource: any;\n params: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n\n constructor(public config: ServiceVariableConfig) {\n const variableConfig = {\n name: config.name,\n dataSet: config.paramProvider(),\n dataBinding: {},\n isList: config.isList,\n service: config.service,\n serviceType: config.serviceType,\n maxResults: config.maxResults,\n _context: config._context,\n operation: config.operation,\n operationId: config.operationId,\n serviceInfo: config.getServiceInfo(),\n httpClientService: httpService,\n onSuccess: (context: any, args: any) => {\n return config.onSuccess && config.onSuccess(args.variable, args.data, args.options);\n },\n onError: (context: any, args: any) => {\n return config.onError && config.onError(args.variable, args.data, args.options);\n },\n onCanUpdate: (context: any, args: any) => {\n return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);\n },\n onBeforeUpdate: (context: any, args: any) => {\n return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);\n },\n onResult: (context: any, args: any) => {\n return config.onResult && config.onResult(args.variable, args.data, args.options);\n },\n onBeforeDatasetReady: (context: any, args: any) => {\n return config.onBeforeDatasetReady && config.onBeforeDatasetReady(args.variable, args.data, args.options);\n }\n }\n super(variableConfig);\n this.subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.dataBinding = {};\n });\n }\n\n invokeOnParamChange() {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n this.invoke(latest);\n }\n return Promise.resolve(this);\n }\n\n public doNext(currentPage: number) {\n // this.invoke({\n // page: currentPage\n // });\n return Promise.reject(this);\n }\n\n onDataUpdated() {\n this.appConfig.refresh(false);\n }\n\n invoke(options? : any, onSuccess?: Function, onError?: Function) {\n this.params = this.config.paramProvider();\n this.params = deepCopy({} as any, this.params, this.dataBinding);\n if (options) {\n this.params = deepCopy({} as any, this.params, options.inputFields ? options.inputFields : options);\n }\n options = options || {};\n options.inputFields = this.params;\n // service definitions data depends on whether user logged in or not\n // Try to get the latest definition\n this.serviceInfo = this.config.getServiceInfo();\n if (!this.serviceInfo) {\n console.error(`Service Info is missing for (${this.name}) variable.`)\n }\n return super.invoke(options, onSuccess, onError);\n }\n\n // cancel($file?: any) {\n // // CHecks if there is any pending requests in the queue\n // if ($queue.requestsQueue.has(this)) {\n // // If the request is a File upload request then modify the elements associated with file upload\n // // else unsubscribe from the observable on the variable.\n // if (false) {\n // // $file._uploadProgress.unsubscribe();\n // // $file.status = 'abort';\n // // this.totalFilesCount--;\n // // initiateCallback(VARIABLE_CONSTANTS.EVENT.ABORT, variable, $file);\n // // if (!this.isFileUploadInProgress(variable.dataBinding) && this.totalFilesCount === 0) {\n // // $queue.process(variable);\n // // // notify inflight variable\n // // this.notifyInflight(variable, false);\n // // }\n // } else {\n // if (true) {\n // this.cancelTokenSource.cancel();\n // $queue.process(this);\n // // notify inflight variable\n // //this.notifyInflight(variable, false);\n // }\n // }\n // }\n // }\n\n // setInput(key: any, val?: any, options?: any) {\n // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));\n // return this.params;\n // }\n}\n"],"mappings":";;;AAAA,SAAyBA,cAAc,QAAQ,iBAAiB;AAChE,SAASC,OAAO,QAAkB,QAAQ;AAE1C,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAASC,eAAe,IAAIC,gBAAgB,QAAQ,0DAA0D;AAC9G,OAAOC,WAAW,MAAM,kDAAkD;AAC1E,OAAOC,QAAQ,MAAM,yCAAyC;AAAC,IAe1DC,sBAAsB;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,KAAtBA,sBAAsB;AAK3B,OAAO,MAAMJ,eAAe,SAASC,gBAAgB,CAAC;EAKpDI,WAAW,CAAQC,MAA6B,EAAE;IAChD,MAAMC,cAAc,GAAG;MACrBC,IAAI,EAAEF,MAAM,CAACE,IAAI;MACjBC,OAAO,EAAEH,MAAM,CAACI,aAAa,EAAE;MAC/BC,WAAW,EAAE,CAAC,CAAC;MACfC,MAAM,EAAEN,MAAM,CAACM,MAAM;MACrBC,OAAO,EAAEP,MAAM,CAACO,OAAO;MACvBC,WAAW,EAAER,MAAM,CAACQ,WAAW;MAC/BC,UAAU,EAAET,MAAM,CAACS,UAAU;MAC7BC,QAAQ,EAAEV,MAAM,CAACU,QAAQ;MACzBC,SAAS,EAAEX,MAAM,CAACW,SAAS;MAC3BC,WAAW,EAAEZ,MAAM,CAACY,WAAW;MAC/BC,WAAW,EAAEb,MAAM,CAACc,cAAc,EAAE;MACpCC,iBAAiB,EAAEnB,WAAW;MAC9BoB,SAAS,EAAE,CAACC,OAAY,EAAEC,IAAS,KAAK;QACtC,OAAOlB,MAAM,CAACgB,SAAS,IAAIhB,MAAM,CAACgB,SAAS,CAACE,IAAI,CAACC,QAAQ,EAAED,IAAI,CAACE,IAAI,EAAEF,IAAI,CAACG,OAAO,CAAC;MACrF,CAAC;MACDC,OAAO,EAAE,CAACL,O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E,gCAA+B,IAAI,CAAC5C,IAAK,aAAY,CAAC;IACvE;IACA,OAAO,KAAK,CAACiC,MAAM,CAACd,OAAO,EAAEL,SAAS,EAAEM,OAAO,CAAC;EAClD;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;AACF"}
|
|
1
|
+
{"version":3,"names":["VariableEvents","isEqual","deepCopy","ServiceVariable","_ServiceVariable","httpService","injector","_ServiceVariableEvents","constructor","config","variableConfig","name","dataSet","paramProvider","dataBinding","isList","service","serviceType","maxResults","_context","operation","operationId","serviceInfo","getServiceInfo","httpClientService","onSuccess","context","args","notify","AFTER_INVOKE","variable","data","options","SUCCESS","onError","ERROR","onCanUpdate","onBeforeUpdate","BEFORE_INVOKE","inputData","onResult","onBeforeDatasetReady","_defineProperty","get","subscribe","invokeOnParamChange","last","params","latest","invoke","Promise","resolve","doNext","currentPage","reject","onDataUpdated","appConfig","refresh","inputFields","console","error"],"sources":["service-variable.ts"],"sourcesContent":["import { VariableConfig, VariableEvents } from './base-variable';\nimport { isEqual, assignIn } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';\nimport httpService from '@wavemaker/app-rn-runtime/variables/http.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface ServiceVariableConfig extends VariableConfig {\n baseUrl: string;\n maxResults: number;\n _context: any;\n serviceType: string;\n onCanUpdate: any;\n onBeforeUpdate: any;\n onResult: any;\n onBeforeDatasetReady: any;\n inFlightBehavior: string;\n getServiceInfo: Function;\n}\n\nenum _ServiceVariableEvents {\n BEFORE_INVOKE = 'beforeInvoke'\n}\nexport type ServiceVariableEvents = _ServiceVariableEvents | VariableEvents;\n\nexport class ServiceVariable extends _ServiceVariable {\n private cancelTokenSource: any;\n params: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n\n constructor(public config: ServiceVariableConfig) {\n const variableConfig = {\n name: config.name,\n dataSet: config.paramProvider(),\n dataBinding: {},\n isList: config.isList,\n service: config.service,\n serviceType: config.serviceType,\n maxResults: config.maxResults,\n _context: config._context,\n operation: config.operation,\n operationId: config.operationId,\n serviceInfo: config.getServiceInfo(),\n httpClientService: httpService,\n onSuccess: (context: any, args: any) => {\n this.notify(VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);\n this.notify(VariableEvents.SUCCESS, [args.variable, args.data, args.options]);\n return config.onSuccess && config.onSuccess(args.variable, args.data, args.options);\n },\n onError: (context: any, args: any) => {\n this.notify(VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);\n this.notify(VariableEvents.ERROR, [args.variable, args.data, args.options]);\n return config.onError && config.onError(args.variable, args.data, args.options);\n },\n onCanUpdate: (context: any, args: any) => {\n return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);\n },\n onBeforeUpdate: (context: any, args: any) => {\n this.notify(VariableEvents.BEFORE_INVOKE, [args.variable, args.inputData, args.options]);\n return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);\n },\n onResult: (context: any, args: any) => {\n return config.onResult && config.onResult(args.variable, args.data, args.options);\n },\n onBeforeDatasetReady: (context: any, args: any) => {\n return config.onBeforeDatasetReady && config.onBeforeDatasetReady(args.variable, args.data, args.options);\n }\n }\n super(variableConfig);\n this.subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.dataBinding = {};\n });\n }\n\n invokeOnParamChange() {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n this.invoke(latest);\n }\n return Promise.resolve(this);\n }\n\n public doNext(currentPage: number) {\n // this.invoke({\n // page: currentPage\n // });\n return Promise.reject(this);\n }\n\n onDataUpdated() {\n this.appConfig.refresh(false);\n }\n\n invoke(options? : any, onSuccess?: Function, onError?: Function) {\n this.params = this.config.paramProvider();\n this.params = deepCopy({} as any, this.params, this.dataBinding);\n if (options) {\n this.params = deepCopy({} as any, this.params, options.inputFields ? options.inputFields : options);\n }\n options = options || {};\n options.inputFields = this.params;\n // service definitions data depends on whether user logged in or not\n // Try to get the latest definition\n this.serviceInfo = this.config.getServiceInfo();\n if (!this.serviceInfo) {\n console.error(`Service Info is missing for (${this.name}) variable.`)\n }\n return super.invoke(options, onSuccess, onError);\n }\n\n // cancel($file?: any) {\n // // CHecks if there is any pending requests in the queue\n // if ($queue.requestsQueue.has(this)) {\n // // If the request is a File upload request then modify the elements associated with file upload\n // // else unsubscribe from the observable on the variable.\n // if (false) {\n // // $file._uploadProgress.unsubscribe();\n // // $file.status = 'abort';\n // // this.totalFilesCount--;\n // // initiateCallback(VARIABLE_CONSTANTS.EVENT.ABORT, variable, $file);\n // // if (!this.isFileUploadInProgress(variable.dataBinding) && this.totalFilesCount === 0) {\n // // $queue.process(variable);\n // // // notify inflight variable\n // // this.notifyInflight(variable, false);\n // // }\n // } else {\n // if (true) {\n // this.cancelTokenSource.cancel();\n // $queue.process(this);\n // // notify inflight variable\n // //this.notifyInflight(variable, false);\n // }\n // }\n // }\n // }\n\n // setInput(key: any, val?: any, options?: any) {\n // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));\n // return this.params;\n // }\n}\n"],"mappings":";;;AAAA,SAAyBA,cAAc,QAAQ,iBAAiB;AAChE,SAASC,OAAO,QAAkB,QAAQ;AAE1C,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAASC,eAAe,IAAIC,gBAAgB,QAAQ,0DAA0D;AAC9G,OAAOC,WAAW,MAAM,kDAAkD;AAC1E,OAAOC,QAAQ,MAAM,yCAAyC;AAAC,IAe1DC,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA,EAAtBA,sBAAsB;AAK3B,OAA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ACe,MAAM,GAAG7C,QAAQ,CAAC,CAAC,CAAC,EAAS,IAAI,CAAC6C,MAAM,EAAEf,OAAO,CAAC0B,WAAW,GAAG1B,OAAO,CAAC0B,WAAW,GAAG1B,OAAO,CAAC;IACrG;IACAA,OAAO,GAAGA,OAAO,IAAI,CAAC,CAAC;IACvBA,OAAO,CAAC0B,WAAW,GAAG,IAAI,CAACX,MAAM;IAC/B;IACF;IACA,IAAI,CAACzB,WAAW,GAAG,IAAI,CAACb,MAAM,CAACc,cAAc,CAAC,CAAC;IAC/C,IAAI,CAAC,IAAI,CAACD,WAAW,EAAE;MACrBqC,OAAO,CAACC,KAAK,CAAE,gCAA+B,IAAI,CAACjD,IAAK,aAAY,CAAC;IACvE;IACA,OAAO,KAAK,CAACsC,MAAM,CAACjB,OAAO,EAAEP,SAAS,EAAES,OAAO,CAAC;EAClD;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isUndefined","isBoolean","isEqual","isObject","isArray","get","set","findIndex","DatasetUtil","isValidDataset","dataSet","isList","getValue","key","index","setValue","value","getTargetNode","options","parentIndex","undefined","path","getItem","setItem","i","innerArray","innerElemindex","getChildDetails","targetNode","addItem","length","splice","removeItem","exactMatch","getValidDataset","getCount","Object","keys"],"sources":["dataset-util.ts"],"sourcesContent":["import { isUndefined, isBoolean, isEqual, isObject, isArray, get, set, findIndex } from \"lodash\";\nexport default class DatasetUtil {\n\n static isValidDataset(dataSet: any, isList?: boolean) {\n if (!dataSet || (isList && !isArray(dataSet))) {\n return false;\n }\n return dataSet;\n }\n\n static getValue(dataSet: any, key: any, index: any, isList?: boolean) {\n index = index || 0;\n return isList ? dataSet[index][key] : dataSet[key];\n }\n\n static setValue(dataSet: any, key: any, value: any, isList?: boolean) {\n if (key && !isList) {\n dataSet[key] = value;\n }\n return dataSet;\n }\n\n private static getTargetNode(dataSet: any, options: any) {\n dataSet = options.parentIndex !== undefined ? dataSet[options.parentIndex] : dataSet;\n return get(dataSet, options.path);\n }\n\n static getItem(dataSet: any, index: any, isList?: boolean) {\n return isList ? dataSet[index] : dataSet;\n }\n\n static setItem(dataSet: any, i: any, value: any, options?: any) {\n let index;\n if (isUndefined(i) || !options.isList) {\n return dataSet;\n }\n\n if (isObject(i)) {\n index = findIndex(dataSet, i);\n } else {\n index = i;\n }\n\n if (options.path) {\n const innerArray = DatasetUtil.getTargetNode(dataSet, options);\n const innerElemindex = findIndex(innerArray, i);\n if (innerElemindex > -1) {\n innerArray[innerElemindex] = value;\n }\n } else {\n if (index > -1) {\n dataSet[index] = value;\n }\n }\n\n return dataSet;\n }\n\n /**\n * This method is to get target node options like path, parentIndex and isList\n * Example: if we have parent dataset as object and we are performing operations on inner list then we have to set isList as true.\n * So finding the target node type and updating the isList option.\n */\n static getChildDetails (dataSet: any, options: any, isList: boolean) {\n let parentIndex, path;\n if (options && options.path) {\n path = options.path;\n let targetNode;\n if (isList) {\n parentIndex = options.parentIndex || 0;\n targetNode = get(dataSet[parentIndex], options.path);\n } else {\n targetNode = get(dataSet, options.path);\n }\n isList = targetNode ? isArray(targetNode) ? true : false : true;\n }\n return {path, isList, parentIndex};\n }\n\n static addItem(dataSet: any, value: any, index: any, options?: any) {\n if (isUndefined(value) || !options.isList) {\n return dataSet;\n }\n\n if (options.path) {\n const innerArray = DatasetUtil.getTargetNode(dataSet, options);\n if (innerArray) {\n // check for index sanity\n index = index !== undefined ? index : innerArray.length;\n innerArray.splice(index, 0, value);\n } else {\n options.parentIndex !== undefined ? set(dataSet[options.parentIndex], options.path, [value]) : set(dataSet, options.path, [value]);\n }\n\n } else {\n index = index !== undefined ? index : dataSet.length;\n dataSet.splice(index, 0, value);\n }\n\n return dataSet;\n }\n\n /**\n *\n * @param dataSet\n * @param i, can be index value of the object/element in array\n * or\n * the whole object which needs to be removed\n * @param exactMatch\n * @returns {any}\n */\n static removeItem(dataSet: any, i: any, options: any) {\n let index, exactMatch;\n i = i !== undefined ? i : dataSet.length - 1;\n\n if (isBoolean(options)) {\n exactMatch = options;\n }\n if (isObject(options)) {\n // @ts-ignore\n exactMatch = options.exactMatch;\n }\n\n if (isObject(i)) {\n if (options.path) {\n const innerArray = DatasetUtil.getTargetNode(dataSet, options);\n const innerElemindex = findIndex(innerArray, i);\n if (innerElemindex > -1 && (!exactMatch || (exactMatch && isEqual(innerArray[innerElemindex], i)))) {\n innerArray.splice(innerElemindex, 1);\n }\n } else {\n index = findIndex(dataSet, i);\n // When exactMatch property is set to true delete only when every property values are same*/\n if (index > -1 && (!exactMatch || (exactMatch && isEqual(dataSet[index], i)))) {\n dataSet.splice(index, 1);\n }\n }\n } else {\n dataSet.splice(i, 1);\n }\n return dataSet;\n }\n\n static getValidDataset(isList?: boolean) {\n return isList ? [] : {};\n }\n\n static getCount(dataSet: any, isList?: boolean) {\n return isList ? dataSet.length : Object.keys(dataSet).length;\n }\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAEC,GAAG,EAAEC,SAAS,QAAQ,QAAQ;AAChG,eAAe,MAAMC,WAAW,CAAC;EAE/B,OAAOC,
|
|
1
|
+
{"version":3,"names":["isUndefined","isBoolean","isEqual","isObject","isArray","get","set","findIndex","DatasetUtil","isValidDataset","dataSet","isList","getValue","key","index","setValue","value","getTargetNode","options","parentIndex","undefined","path","getItem","setItem","i","innerArray","innerElemindex","getChildDetails","targetNode","addItem","length","splice","removeItem","exactMatch","getValidDataset","getCount","Object","keys"],"sources":["dataset-util.ts"],"sourcesContent":["import { isUndefined, isBoolean, isEqual, isObject, isArray, get, set, findIndex } from \"lodash\";\nexport default class DatasetUtil {\n\n static isValidDataset(dataSet: any, isList?: boolean) {\n if (!dataSet || (isList && !isArray(dataSet))) {\n return false;\n }\n return dataSet;\n }\n\n static getValue(dataSet: any, key: any, index: any, isList?: boolean) {\n index = index || 0;\n return isList ? dataSet[index][key] : dataSet[key];\n }\n\n static setValue(dataSet: any, key: any, value: any, isList?: boolean) {\n if (key && !isList) {\n dataSet[key] = value;\n }\n return dataSet;\n }\n\n private static getTargetNode(dataSet: any, options: any) {\n dataSet = options.parentIndex !== undefined ? dataSet[options.parentIndex] : dataSet;\n return get(dataSet, options.path);\n }\n\n static getItem(dataSet: any, index: any, isList?: boolean) {\n return isList ? dataSet[index] : dataSet;\n }\n\n static setItem(dataSet: any, i: any, value: any, options?: any) {\n let index;\n if (isUndefined(i) || !options.isList) {\n return dataSet;\n }\n\n if (isObject(i)) {\n index = findIndex(dataSet, i);\n } else {\n index = i;\n }\n\n if (options.path) {\n const innerArray = DatasetUtil.getTargetNode(dataSet, options);\n const innerElemindex = findIndex(innerArray, i);\n if (innerElemindex > -1) {\n innerArray[innerElemindex] = value;\n }\n } else {\n if (index > -1) {\n dataSet[index] = value;\n }\n }\n\n return dataSet;\n }\n\n /**\n * This method is to get target node options like path, parentIndex and isList\n * Example: if we have parent dataset as object and we are performing operations on inner list then we have to set isList as true.\n * So finding the target node type and updating the isList option.\n */\n static getChildDetails (dataSet: any, options: any, isList: boolean) {\n let parentIndex, path;\n if (options && options.path) {\n path = options.path;\n let targetNode;\n if (isList) {\n parentIndex = options.parentIndex || 0;\n targetNode = get(dataSet[parentIndex], options.path);\n } else {\n targetNode = get(dataSet, options.path);\n }\n isList = targetNode ? isArray(targetNode) ? true : false : true;\n }\n return {path, isList, parentIndex};\n }\n\n static addItem(dataSet: any, value: any, index: any, options?: any) {\n if (isUndefined(value) || !options.isList) {\n return dataSet;\n }\n\n if (options.path) {\n const innerArray = DatasetUtil.getTargetNode(dataSet, options);\n if (innerArray) {\n // check for index sanity\n index = index !== undefined ? index : innerArray.length;\n innerArray.splice(index, 0, value);\n } else {\n options.parentIndex !== undefined ? set(dataSet[options.parentIndex], options.path, [value]) : set(dataSet, options.path, [value]);\n }\n\n } else {\n index = index !== undefined ? index : dataSet.length;\n dataSet.splice(index, 0, value);\n }\n\n return dataSet;\n }\n\n /**\n *\n * @param dataSet\n * @param i, can be index value of the object/element in array\n * or\n * the whole object which needs to be removed\n * @param exactMatch\n * @returns {any}\n */\n static removeItem(dataSet: any, i: any, options: any) {\n let index, exactMatch;\n i = i !== undefined ? i : dataSet.length - 1;\n\n if (isBoolean(options)) {\n exactMatch = options;\n }\n if (isObject(options)) {\n // @ts-ignore\n exactMatch = options.exactMatch;\n }\n\n if (isObject(i)) {\n if (options.path) {\n const innerArray = DatasetUtil.getTargetNode(dataSet, options);\n const innerElemindex = findIndex(innerArray, i);\n if (innerElemindex > -1 && (!exactMatch || (exactMatch && isEqual(innerArray[innerElemindex], i)))) {\n innerArray.splice(innerElemindex, 1);\n }\n } else {\n index = findIndex(dataSet, i);\n // When exactMatch property is set to true delete only when every property values are same*/\n if (index > -1 && (!exactMatch || (exactMatch && isEqual(dataSet[index], i)))) {\n dataSet.splice(index, 1);\n }\n }\n } else {\n dataSet.splice(i, 1);\n }\n return dataSet;\n }\n\n static getValidDataset(isList?: boolean) {\n return isList ? [] : {};\n }\n\n static getCount(dataSet: any, isList?: boolean) {\n return isList ? dataSet.length : Object.keys(dataSet).length;\n }\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAEC,GAAG,EAAEC,SAAS,QAAQ,QAAQ;AAChG,eAAe,MAAMC,WAAW,CAAC;EAE/B,OAAOC,cAAcA,CAACC,OAAY,EAAEC,MAAgB,EAAE;IACpD,IAAI,CAACD,OAAO,IAAKC,MAAM,IAAI,CAACP,OAAO,CAACM,OAAO,CAAE,EAAE;MAC7C,OAAO,KAAK;IACd;IACA,OAAOA,OAAO;EAChB;EAEA,OAAOE,QAAQA,CAACF,OAAY,EAAEG,GAAQ,EAAEC,K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,SAAS,CAACkB,UAAU,EAAED,CAAC,CAAC;QAC/C,IAAIE,cAAc,GAAG,CAAC,CAAC,KAAK,CAACO,UAAU,IAAKA,UAAU,IAAI/B,OAAO,CAACuB,UAAU,CAACC,cAAc,CAAC,EAAEF,CAAC,CAAE,CAAC,EAAE;UAClGC,UAAU,CAACM,MAAM,CAACL,cAAc,EAAE,CAAC,CAAC;QACtC;MACF,CAAC,MAAM;QACLZ,KAAK,GAAGP,SAAS,CAACG,OAAO,EAAEc,CAAC,CAAC;QAC7B;QACA,IAAIV,KAAK,GAAG,CAAC,CAAC,KAAK,CAACmB,UAAU,IAAKA,UAAU,IAAI/B,OAAO,CAACQ,OAAO,CAACI,KAAK,CAAC,EAAEU,CAAC,CAAE,CAAC,EAAE;UAC7Ed,OAAO,CAACqB,MAAM,CAACjB,KAAK,EAAE,CAAC,CAAC;QAC1B;MACF;IACF,CAAC,MAAM;MACLJ,OAAO,CAACqB,MAAM,CAACP,CAAC,EAAE,CAAC,CAAC;IACtB;IACA,OAAOd,OAAO;EAChB;EAEA,OAAOwB,eAAeA,CAACvB,MAAgB,EAAE;IACvC,OAAOA,MAAM,GAAG,EAAE,GAAG,CAAC,CAAC;EACzB;EAEA,OAAOwB,QAAQA,CAACzB,OAAY,EAAEC,MAAgB,EAAE;IAC9C,OAAOA,MAAM,GAAGD,OAAO,CAACoB,MAAM,GAAGM,MAAM,CAACC,IAAI,CAAC3B,OAAO,CAAC,CAACoB,MAAM;EAC9D;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InflightQueue","Map","addToQueue","variable","param2","requestsQueue","has","get","push","processes","resolve","reject","active","set","rejectProcess","process","clear","delete","nextProcess","length","config","inFlightBehavior","i","splice","submit","Promise","$queue"],"sources":["inflight-queue.ts"],"sourcesContent":["class InflightQueue {\n requestsQueue = new Map();\n\n /**\n * pushes the process against a variable in its queue\n * @param variable\n * @param {{resolve: (value?: any) => void; reject: (reason?: any) => void}} param2\n * the resolve callback will be called on\n */\n private addToQueue(variable: any, param2: {resolve: (value?: (any)) => void; reject: (reason?: any) => void}) {\n if (this.requestsQueue.has(variable)) {\n this.requestsQueue.get(variable).push(param2);\n } else {\n const processes = [];\n processes.push({resolve: param2.resolve, reject: param2.reject, active: false});\n this.requestsQueue.set(variable, processes);\n }\n }\n\n /**\n * Calls the reject method against the passed process\n * @param process\n */\n private rejectProcess(process: any) {\n process.reject('PROCESS_REJECTED_IN_QUEUE');\n }\n\n /**\n * clears the queue against a variable\n * @param variable\n */\n public clear(variable: any) {\n this.requestsQueue.delete(variable);\n }\n\n /**\n * executes the n/w calls for a specified variable pushed in its respective queue (pushed while it was inFlight)\n * @param variable\n */\n process(variable: any) {\n const processes: [any] = this.requestsQueue.get(variable);\n let nextProcess;\n\n // process request queue for the variable only if it is not empty\n if (!processes || !processes.length) {\n this.clear(variable);\n return;\n }\n\n // If only one item in queue\n if (processes.length === 1) {\n nextProcess = processes[0];\n if (nextProcess.active) {\n this.clear(variable);\n } else {\n nextProcess.active = true;\n nextProcess.resolve();\n }\n return;\n }\n\n switch (variable.config.inFlightBehavior) {\n case 'executeLast':\n for (let i = 0; i < processes.length - 2; i++) {\n this.rejectProcess(processes[i]);\n }\n processes.splice(0, processes.length - 1);\n this.process(variable);\n break;\n case 'executeAll':\n nextProcess = processes.splice(0, 1)[0];\n if (nextProcess.active) {\n nextProcess = processes.splice(0, 1)[0];\n }\n nextProcess.active = true;\n nextProcess.resolve();\n break;\n default:\n for (let i = 0; i < processes.length - 1; i++) {\n this.rejectProcess(processes[i]);\n }\n this.clear(variable);\n break;\n }\n }\n\n /**\n * initializes the queue against a variable and makes the first process call\n * If already initialized and a process in queue is in progress, the queue is not processed.\n * To process the next item in the queue, the process method has to be called from the caller.\n * @param variable\n * @returns {Promise<any>}\n */\n submit(variable: any) {\n return new Promise((resolve, reject) => {\n this.addToQueue(variable, {resolve: resolve, reject: reject});\n\n if (this.requestsQueue.get(variable).length === 1) {\n this.process(variable);\n }\n });\n }\n}\n\nexport const $queue = new InflightQueue();\n"],"mappings":";;;AAAA,MAAMA,aAAa,CAAC;
|
|
1
|
+
{"version":3,"names":["InflightQueue","constructor","_defineProperty","Map","addToQueue","variable","param2","requestsQueue","has","get","push","processes","resolve","reject","active","set","rejectProcess","process","clear","delete","nextProcess","length","config","inFlightBehavior","i","splice","submit","Promise","$queue"],"sources":["inflight-queue.ts"],"sourcesContent":["class InflightQueue {\n requestsQueue = new Map();\n\n /**\n * pushes the process against a variable in its queue\n * @param variable\n * @param {{resolve: (value?: any) => void; reject: (reason?: any) => void}} param2\n * the resolve callback will be called on\n */\n private addToQueue(variable: any, param2: {resolve: (value?: (any)) => void; reject: (reason?: any) => void}) {\n if (this.requestsQueue.has(variable)) {\n this.requestsQueue.get(variable).push(param2);\n } else {\n const processes = [];\n processes.push({resolve: param2.resolve, reject: param2.reject, active: false});\n this.requestsQueue.set(variable, processes);\n }\n }\n\n /**\n * Calls the reject method against the passed process\n * @param process\n */\n private rejectProcess(process: any) {\n process.reject('PROCESS_REJECTED_IN_QUEUE');\n }\n\n /**\n * clears the queue against a variable\n * @param variable\n */\n public clear(variable: any) {\n this.requestsQueue.delete(variable);\n }\n\n /**\n * executes the n/w calls for a specified variable pushed in its respective queue (pushed while it was inFlight)\n * @param variable\n */\n process(variable: any) {\n const processes: [any] = this.requestsQueue.get(variable);\n let nextProcess;\n\n // process request queue for the variable only if it is not empty\n if (!processes || !processes.length) {\n this.clear(variable);\n return;\n }\n\n // If only one item in queue\n if (processes.length === 1) {\n nextProcess = processes[0];\n if (nextProcess.active) {\n this.clear(variable);\n } else {\n nextProcess.active = true;\n nextProcess.resolve();\n }\n return;\n }\n\n switch (variable.config.inFlightBehavior) {\n case 'executeLast':\n for (let i = 0; i < processes.length - 2; i++) {\n this.rejectProcess(processes[i]);\n }\n processes.splice(0, processes.length - 1);\n this.process(variable);\n break;\n case 'executeAll':\n nextProcess = processes.splice(0, 1)[0];\n if (nextProcess.active) {\n nextProcess = processes.splice(0, 1)[0];\n }\n nextProcess.active = true;\n nextProcess.resolve();\n break;\n default:\n for (let i = 0; i < processes.length - 1; i++) {\n this.rejectProcess(processes[i]);\n }\n this.clear(variable);\n break;\n }\n }\n\n /**\n * initializes the queue against a variable and makes the first process call\n * If already initialized and a process in queue is in progress, the queue is not processed.\n * To process the next item in the queue, the process method has to be called from the caller.\n * @param variable\n * @returns {Promise<any>}\n */\n submit(variable: any) {\n return new Promise((resolve, reject) => {\n this.addToQueue(variable, {resolve: resolve, reject: reject});\n\n if (this.requestsQueue.get(variable).length === 1) {\n this.process(variable);\n }\n });\n }\n}\n\nexport const $queue = new InflightQueue();\n"],"mappings":";;;AAAA,MAAMA,aAAa,CAAC;EAAAC,YAAA;IAAAC,eAAA,wBACF,IAAIC,GAAG,CAAC,CAAC;EAAA;EAEzB;AACF;AACA;AACA;AACA;AACA;EACUC,UAAUA,CAACC,QAAa,EAAEC,MAA0E,EAAE;IAC5G,IAAI,IAAI,CAACC,aAAa,CAACC,GAAG,CAACH,QAAQ,CAAC,EAAE;MACpC,IAAI,CAACE,aAAa,CAACE,GAAG,CAACJ,QAAQ,CAAC,CAACK,IAAI,CAACJ,MAAM,CAAC;IAC/C,CAAC,MAAM;MACL,MAAMK,SAAS,GAAG,EAAE;MACpBA,SAAS,CAACD,IAAI,CAAC;QAACE,OAAO,EAAEN,MAAM,CAACM,OAAO;QAAEC,MAAM,EAAEP,MAAM,CAACO,MAAM;QAAEC,MAAM,EAAE;MAAK,CAAC,CAAC;MAC/E,IAAI,CAACP,aAAa,CAACQ,GAAG,CAACV,QAAQ,EAAEM,SAAS,CAAC;IAC7C;EACF;;EAEA;AACF;AACA;AACA;EACUK,aAAaA,CAACC,OAAY,EAAE;IAClCA,OAAO,CAACJ,MAAM,CAAC,2BAA2B,CAAC;EAC7C;;EAEA;AACF;AACA;AACA;EACSK,KAAKA,CAACb,QAAa,EAAE;IAC1B,IAAI,CAACE,aAAa,CAACY,MAAM,CAACd,QAAQ,CAAC;EAC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AAO,CAAC,CAAC;QACrB;MACF;QACE,KAAK,IAAIY,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGb,SAAS,CAACU,MAAM,GAAG,CAAC,EAAEG,CAAC,EAAE,EAAE;UAC7C,IAAI,CAACR,aAAa,CAACL,SAAS,CAACa,CAAC,CAAC,CAAC;QAClC;QACA,IAAI,CAACN,KAAK,CAACb,QAAQ,CAAC;QACpB;IACJ;EACF;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEqB,MAAMA,CAACrB,QAAa,EAAE;IACpB,OAAO,IAAIsB,OAAO,CAAC,CAACf,OAAO,EAAEC,MAAM,KAAK;MACtC,IAAI,CAACT,UAAU,CAACC,QAAQ,EAAE;QAACO,OAAO,EAAEA,OAAO;QAAEC,MAAM,EAAEA;MAAM,CAAC,CAAC;MAE7D,IAAI,IAAI,CAACN,aAAa,CAACE,GAAG,CAACJ,QAAQ,CAAC,CAACgB,MAAM,KAAK,CAAC,EAAE;QACjD,IAAI,CAACJ,OAAO,CAACZ,QAAQ,CAAC;MACxB;IACF,CAAC,CAAC;EACJ;AACF;AAEA,OAAO,MAAMuB,MAAM,GAAG,IAAI5B,aAAa,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forEach","get","isNumber","isObject","isEqual","omit","keys","_setInput","targetObj","key","val","options","lastKey","paramObj","type","parseInt","indexOf","split","pop","findValueOf","join","paramVal","paramKey","obj","create","parts","skipProcessing","part","length","subParts","match","subPart","shift","push","undefined","_key","tempObj","getValidJSON","value","content","parsedIntValue","isNaN","JSON","parse","e","parseErrors","errors","errMsg","error","errorDetails","i","parseError","errorObj","message","replace","parameters","template","map","regEx","isPageable","pageable","first","last","number","numberOfElements","size","sort","totalElements","totalPages","paginatedObj"],"sources":["variable.utils.ts"],"sourcesContent":["import { forEach, get, isNumber, isObject, isEqual, omit, keys } from \"lodash\";\n/**\n * sets the value against passed key on the \"inputFields\" object in the variable\n * @param targetObj: the object in which the key, value is to be set\n * @param variable\n * @param key: can be:\n * - a string e.g. \"username\"\n * - an object, e.g. {\"username\": \"john\", \"ssn\": \"11111\"}\n * @param val\n * - if key is string, the value against it (for that data type)\n * - if key is object, not required\n * @param options\n * @returns {any}\n */\n\nexport const _setInput = (targetObj: any, key: any, val: any, options?: any) => {\n targetObj = targetObj || {};\n let keys,\n lastKey,\n paramObj: any = {};\n\n // content type check\n if (isObject(options)) {\n // @ts-ignore\n switch (options.type) {\n case 'file':\n //val = getBlob(val, options.contentType);\n break;\n case 'number':\n val = isNumber(val) ? val : parseInt(val, 10);\n break;\n }\n }\n\n if (isObject(key)) {\n // check if the passed parameter is an object itself\n paramObj = key;\n } else if (key.indexOf('.') > -1) {\n // check for '.' in key e.g. 'employee.department'\n keys = key.split('.');\n lastKey = keys.pop();\n // Finding the object based on the key\n targetObj = findValueOf(targetObj, keys.join('.'), true);\n key = lastKey;\n paramObj[key] = val;\n } else {\n paramObj[key] = val;\n }\n\n forEach(paramObj, function (paramVal, paramKey) {\n targetObj[paramKey] = paramVal;\n });\n return targetObj;\n}\n\n/*\n * Util method to find the value of a key in the object\n * if key not found and create is true, an object is created against that node\n * Examples:\n * var a = {\n * b: {\n * c : {\n * d: 'test'\n * }\n * }\n * }\n * Utils.findValue(a, 'b.c.d') --> 'test'\n * Utils.findValue(a, 'b.c') --> {d: 'test'}\n * Utils.findValue(a, 'e') --> undefined\n * Utils.findValue(a, 'e', true) --> {} and a will become:\n * {\n * b: {\n * c : {\n * d: 'test'\n * }\n * },\n * e: {\n * }\n * }\n */\nexport const findValueOf = (obj: any, key: any, create?: any) => {\n\n if (!obj || !key) {\n return;\n }\n\n if (!create) {\n return get(obj, key);\n }\n\n const parts = key.split('.'),\n keys: any = [];\n\n let skipProcessing;\n\n // @ts-ignore\n parts.forEach((part: any) => {\n if (!parts.length) { // if the part of a key is not valid, skip the processing.\n skipProcessing = true;\n return false;\n }\n\n const subParts = part.match(/\\w+/g);\n let subPart;\n\n while (subParts.length) {\n subPart = subParts.shift();\n keys.push({ 'key': subPart, 'value': subParts.length ? [] : {} }); // determine whether to create an array or an object\n }\n });\n\n if (skipProcessing) {\n return undefined;\n }\n\n keys.forEach((_key: any) => {\n let tempObj = obj[_key.key];\n if (!isObject(tempObj)) {\n tempObj = getValidJSON(tempObj);\n if (!tempObj) {\n tempObj = _key.value;\n }\n }\n obj[_key.key] = tempObj;\n obj = tempObj;\n });\n\n return obj;\n};\n\nexport const getValidJSON = (content: any) => {\n if (!content) {\n return undefined;\n }\n try {\n const parsedIntValue = parseInt(content, 10);\n /*obtaining json from editor content string*/\n return isObject(content) || !isNaN(parsedIntValue) ? content : JSON.parse(content);\n } catch (e) {\n /*terminating execution if new variable object is not valid json.*/\n return undefined;\n }\n}\n\nexport const parseErrors = (errors: any) => {\n let errMsg = '';\n if (errors && errors.error && errors.error.length) {\n errors.error.forEach((errorDetails: any, i: Number) => {\n errMsg += parseError(errorDetails) + (i > 0 ? '\\n' : '');\n });\n }\n return errMsg;\n}\n\nexport const parseError = (errorObj: any) => {\n let errMsg;\n errMsg = errorObj.message ? replace(errorObj.message, errorObj.parameters, true) : ((errorObj.parameters && errorObj.parameters[0]) || '');\n return errMsg;\n}\n\n/*\n * Util method to replace patterns in string with object keys or array values\n * Examples:\n * Utils.replace('Hello, ${first} ${last} !', {first: 'wavemaker', last: 'ng'}) --> Hello, wavemaker ng\n * Utils.replace('Hello, ${0} ${1} !', ['wavemaker','ng']) --> Hello, wavemaker ng\n * Examples if parseError is true:\n * Utils.replace('Hello, {0} {1} !', ['wavemaker','ng']) --> Hello, wavemaker ng\n */\nexport const replace = (template: any, map: any, parseError?: boolean) => {\n let regEx = /\\$\\{([^\\}]+)\\}/g;\n if (!template) {\n return;\n }\n if (parseError) {\n regEx = /\\{([^\\}]+)\\}/g;\n }\n\n return template.replace(regEx, function (match: any, key: any) {\n return get(map, key);\n });\n};\n\n/*Function to check whether the specified object is a pageable object or not.*/\nexport const isPageable = (obj: any): boolean => {\n const pageable = {\n content: [],\n first: true,\n last: true,\n number: 0,\n numberOfElements: 10,\n size: 20,\n sort: null,\n totalElements: 10,\n totalPages: 1\n };\n // paginated object may or may not contain 'empty' property. In either case, Pageable should return as true.\n const paginatedObj = omit(obj, 'empty');\n return isEqual(keys(pageable), keys(paginatedObj).sort());\n};\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,QAAQ,QAAQ;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,SAAS,GAAG,CAACC,SAAc,EAAEC,GAAQ,EAAEC,GAAQ,EAAEC,OAAa,KAAK;EAC9EH,SAAS,GAAGA,SAAS,IAAI,CAAC,CAAC;EAC3B,IAAIF,IAAI;IACNM,OAAO;IACPC,QAAa,GAAG,CAAC,CAAC;;EAEpB;EACA,IAAIV,QAAQ,CAACQ,OAAO,CAAC,EAAE;IACrB;IACA,QAAQA,OAAO,CAACG,IAAI;MAClB,KAAK,MAAM;QACT;QACA;MACF,KAAK,QAAQ;QACXJ,GAAG,GAAGR,QAAQ,CAACQ,GAAG,CAAC,GAAGA,GAAG,GAAGK,QAAQ,CAACL,GAAG,EAAE,EAAE,CAAC;QAC7C;IAAM;EAEZ;EAEA,IAAIP,QAAQ,CAACM,GAAG,CAAC,EAAE;IACjB;IACAI,QAAQ,GAAGJ,GAAG;EAChB,CAAC,MAAM,IAAIA,GAAG,CAACO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;IAChC;IACAV,IAAI,GAAGG,GAAG,CAACQ,KAAK,CAAC,GAAG,CAAC;IACrBL,OAAO,GAAGN,IAAI,CAACY,GAAG,EAAE;IACpB;IACAV,SAAS,GAAGW,WAAW,CAACX,SAAS,EAAEF,IAAI,CAACc,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IACxDX,GAAG,GAA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ACH,IAAI,EAAE,CAAC;AAC3D,CAAC"}
|
|
1
|
+
{"version":3,"names":["forEach","get","isNumber","isObject","isEqual","omit","keys","_setInput","targetObj","key","val","options","lastKey","paramObj","type","parseInt","indexOf","split","pop","findValueOf","join","paramVal","paramKey","obj","create","parts","skipProcessing","part","length","subParts","match","subPart","shift","push","undefined","_key","tempObj","getValidJSON","value","content","parsedIntValue","isNaN","JSON","parse","e","parseErrors","errors","errMsg","error","errorDetails","i","parseError","errorObj","message","replace","parameters","template","map","regEx","isPageable","pageable","first","last","number","numberOfElements","size","sort","totalElements","totalPages","paginatedObj"],"sources":["variable.utils.ts"],"sourcesContent":["import { forEach, get, isNumber, isObject, isEqual, omit, keys } from \"lodash\";\n/**\n * sets the value against passed key on the \"inputFields\" object in the variable\n * @param targetObj: the object in which the key, value is to be set\n * @param variable\n * @param key: can be:\n * - a string e.g. \"username\"\n * - an object, e.g. {\"username\": \"john\", \"ssn\": \"11111\"}\n * @param val\n * - if key is string, the value against it (for that data type)\n * - if key is object, not required\n * @param options\n * @returns {any}\n */\n\nexport const _setInput = (targetObj: any, key: any, val: any, options?: any) => {\n targetObj = targetObj || {};\n let keys,\n lastKey,\n paramObj: any = {};\n\n // content type check\n if (isObject(options)) {\n // @ts-ignore\n switch (options.type) {\n case 'file':\n //val = getBlob(val, options.contentType);\n break;\n case 'number':\n val = isNumber(val) ? val : parseInt(val, 10);\n break;\n }\n }\n\n if (isObject(key)) {\n // check if the passed parameter is an object itself\n paramObj = key;\n } else if (key.indexOf('.') > -1) {\n // check for '.' in key e.g. 'employee.department'\n keys = key.split('.');\n lastKey = keys.pop();\n // Finding the object based on the key\n targetObj = findValueOf(targetObj, keys.join('.'), true);\n key = lastKey;\n paramObj[key] = val;\n } else {\n paramObj[key] = val;\n }\n\n forEach(paramObj, function (paramVal, paramKey) {\n targetObj[paramKey] = paramVal;\n });\n return targetObj;\n}\n\n/*\n * Util method to find the value of a key in the object\n * if key not found and create is true, an object is created against that node\n * Examples:\n * var a = {\n * b: {\n * c : {\n * d: 'test'\n * }\n * }\n * }\n * Utils.findValue(a, 'b.c.d') --> 'test'\n * Utils.findValue(a, 'b.c') --> {d: 'test'}\n * Utils.findValue(a, 'e') --> undefined\n * Utils.findValue(a, 'e', true) --> {} and a will become:\n * {\n * b: {\n * c : {\n * d: 'test'\n * }\n * },\n * e: {\n * }\n * }\n */\nexport const findValueOf = (obj: any, key: any, create?: any) => {\n\n if (!obj || !key) {\n return;\n }\n\n if (!create) {\n return get(obj, key);\n }\n\n const parts = key.split('.'),\n keys: any = [];\n\n let skipProcessing;\n\n // @ts-ignore\n parts.forEach((part: any) => {\n if (!parts.length) { // if the part of a key is not valid, skip the processing.\n skipProcessing = true;\n return false;\n }\n\n const subParts = part.match(/\\w+/g);\n let subPart;\n\n while (subParts.length) {\n subPart = subParts.shift();\n keys.push({ 'key': subPart, 'value': subParts.length ? [] : {} }); // determine whether to create an array or an object\n }\n });\n\n if (skipProcessing) {\n return undefined;\n }\n\n keys.forEach((_key: any) => {\n let tempObj = obj[_key.key];\n if (!isObject(tempObj)) {\n tempObj = getValidJSON(tempObj);\n if (!tempObj) {\n tempObj = _key.value;\n }\n }\n obj[_key.key] = tempObj;\n obj = tempObj;\n });\n\n return obj;\n};\n\nexport const getValidJSON = (content: any) => {\n if (!content) {\n return undefined;\n }\n try {\n const parsedIntValue = parseInt(content, 10);\n /*obtaining json from editor content string*/\n return isObject(content) || !isNaN(parsedIntValue) ? content : JSON.parse(content);\n } catch (e) {\n /*terminating execution if new variable object is not valid json.*/\n return undefined;\n }\n}\n\nexport const parseErrors = (errors: any) => {\n let errMsg = '';\n if (errors && errors.error && errors.error.length) {\n errors.error.forEach((errorDetails: any, i: Number) => {\n errMsg += parseError(errorDetails) + (i > 0 ? '\\n' : '');\n });\n }\n return errMsg;\n}\n\nexport const parseError = (errorObj: any) => {\n let errMsg;\n errMsg = errorObj.message ? replace(errorObj.message, errorObj.parameters, true) : ((errorObj.parameters && errorObj.parameters[0]) || '');\n return errMsg;\n}\n\n/*\n * Util method to replace patterns in string with object keys or array values\n * Examples:\n * Utils.replace('Hello, ${first} ${last} !', {first: 'wavemaker', last: 'ng'}) --> Hello, wavemaker ng\n * Utils.replace('Hello, ${0} ${1} !', ['wavemaker','ng']) --> Hello, wavemaker ng\n * Examples if parseError is true:\n * Utils.replace('Hello, {0} {1} !', ['wavemaker','ng']) --> Hello, wavemaker ng\n */\nexport const replace = (template: any, map: any, parseError?: boolean) => {\n let regEx = /\\$\\{([^\\}]+)\\}/g;\n if (!template) {\n return;\n }\n if (parseError) {\n regEx = /\\{([^\\}]+)\\}/g;\n }\n\n return template.replace(regEx, function (match: any, key: any) {\n return get(map, key);\n });\n};\n\n/*Function to check whether the specified object is a pageable object or not.*/\nexport const isPageable = (obj: any): boolean => {\n const pageable = {\n content: [],\n first: true,\n last: true,\n number: 0,\n numberOfElements: 10,\n size: 20,\n sort: null,\n totalElements: 10,\n totalPages: 1\n };\n // paginated object may or may not contain 'empty' property. In either case, Pageable should return as true.\n const paginatedObj = omit(obj, 'empty');\n return isEqual(keys(pageable), keys(paginatedObj).sort());\n};\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,QAAQ,QAAQ;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,SAAS,GAAGA,CAACC,SAAc,EAAEC,GAAQ,EAAEC,GAAQ,EAAEC,OAAa,KAAK;EAC9EH,SAAS,GAAGA,SAAS,IAAI,CAAC,CAAC;EAC3B,IAAIF,IAAI;IACNM,OAAO;IACPC,QAAa,GAAG,CAAC,CAAC;;EAEpB;EACA,IAAIV,QAAQ,CAACQ,OAAO,CAAC,EAAE;IACrB;IACA,QAAQA,OAAO,CAACG,IAAI;MAClB,KAAK,MAAM;QACT;QACA;MACF,KAAK,QAAQ;QACXJ,GAA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