@wavemaker/app-rn-runtime 12.0.0-next.45752 → 12.0.0-next.46502
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +14 -2
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +9 -2
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
- app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +15 -2
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +10 -2
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +13 -3
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +10 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +3 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +5 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +6 -3
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +6 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js +7 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +23 -0
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +58 -11
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +44 -3
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js +7 -0
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +43 -4
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +3 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -2
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +41 -6
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +28 -2
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js +6 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +8 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +18 -0
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +3 -0
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -1
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +1 -0
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +32 -24
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +16 -2
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js +8 -0
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +14 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +43 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +17 -3
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +24 -1
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +33 -8
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +2 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +11 -3
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +24 -0
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +13 -3
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +15 -0
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +26 -2
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +3 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +3 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +24 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +70 -14
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/page.props.js.map +1 -1
- app-rn-runtime/components/page/page.styles.js +7 -1
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +27 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.styles.js +6 -1
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/AppConfig.js.map +1 -1
- app-rn-runtime/core/base.component.js +33 -6
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +9 -7
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/props.provider.js +0 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/storage.service.js +15 -0
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +10 -4
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +5 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/core/wm-component-tree.js +58 -0
- app-rn-runtime/core/wm-component-tree.js.map +1 -0
- app-rn-runtime/package.json +13 -6
- app-rn-runtime/runtime/App.js +23 -9
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +1 -0
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +46 -13
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +38 -2
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +3 -0
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +4 -4
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +17 -1
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +10 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +2 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/http.service.js +5 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +14 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","groupHeaderTitle","backgroundColor","groupHeadingBgColor","paddingLeft","paddingRight","lineHeight","checkedItem","item","flexDirection","alignContent","marginRight","marginTop","skeleton","width","height","checkicon","borderRadius","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","opacity","checkedDisabledColor"],"sources":["checkboxset.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","groupHeaderTitle","backgroundColor","groupHeadingBgColor","paddingLeft","paddingRight","lineHeight","checkedItem","selectedLabel","item","flexDirection","alignContent","marginRight","marginTop","skeleton","width","height","checkicon","borderRadius","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","opacity","checkedDisabledColor"],"sources":["checkboxset.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmCheckboxsetStyles = BaseStyles & {\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n checkedItem: AllStyle;\n uncheckicon: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkboxset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxsetStyles = defineStyles({\n root: {},\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8,\n },\n groupHeaderTitle: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n } as AllStyle,\n checkedItem: {} as AllStyle,\n selectedLabel: {} as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\n skeleton: {\n root: {\n width: '100%',\n height: 16\n }\n } as any as WmSkeletonStyles,\n checkicon : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n backgroundColor: themeVariables.primaryColor,\n justifyContent: 'center',\n alignItems: 'center',\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 18,\n },\n icon : {\n color: themeVariables.checkedIconColor,\n padding: 0\n }\n } as WmIconStyles,\n uncheckicon : {\n root: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderRadius: 4,\n borderColor: themeVariables.uncheckedBorderColor,\n },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\n });\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {\n opacity: 0.8\n },\n text : {\n color: themeVariables.checkedDisabledColor\n }\n });\n\n addStyle(DEFAUL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AE;QACJI,QAAQ,EAAE;MACZ,CAAC;MACD2B,IAAI,EAAG;QACL1B,KAAK,EAAET,cAAc,CAACoC,gBAAgB;QACtCC,OAAO,EAAE;MACX;IACJ,CAAiB;IACfC,WAAW,EAAG;MACZnC,IAAI,EAAE;QACJuB,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVY,WAAW,EAAE,CAAC;QACdV,YAAY,EAAE,CAAC;QACfI,WAAW,EAAEjC,cAAc,CAACwC;MAC9B,CAAC;MACDpC,IAAI,EAAE,CAAC,CAAC;MACR+B,IAAI,EAAG;QACL1B,KAAK,EAAE;MACT;IACJ;EACA,CAAC,CAAC;EAEFR,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAE;MACJsC,OAAO,EAAE;IACX,CAAC;IACDrC,IAAI,EAAG;MACLK,KAAK,EAAET,cAAc,CAAC0C;IACxB;EACF,CAAC,CAAC;EAEFzC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
|
@@ -12,6 +12,7 @@ import { BaseDatasetComponent, BaseDatasetState } from '@wavemaker/app-rn-runtim
|
|
12
12
|
import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
|
13
13
|
import WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';
|
14
14
|
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
15
|
+
import WmLabel from '../../basic/label/label.component';
|
15
16
|
export class WmChipsState extends BaseDatasetState {
|
16
17
|
constructor(...args) {
|
17
18
|
super(...args);
|
@@ -198,12 +199,18 @@ export default class WmChips extends BaseDatasetComponent {
|
|
198
199
|
color: isSelected ? this.styles.activeChipLabel.color : null
|
199
200
|
}
|
200
201
|
})
|
201
|
-
}) : null, /*#__PURE__*/React.createElement(WmPicture, {
|
202
|
+
}) : null, this._showSkeleton ? null : /*#__PURE__*/React.createElement(WmPicture, {
|
202
203
|
id: this.getTestId('chip' + index + 'picture'),
|
203
204
|
styles: this.styles.imageStyles,
|
204
205
|
picturesource: item.imgSrc,
|
205
206
|
shape: "circle"
|
206
|
-
}), /*#__PURE__*/React.createElement(
|
207
|
+
}), this._showSkeleton ? /*#__PURE__*/React.createElement(WmLabel, {
|
208
|
+
styles: {
|
209
|
+
root: {
|
210
|
+
width: 50
|
211
|
+
}
|
212
|
+
}
|
213
|
+
}) : /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForAction('chip' + index + 'label'), {
|
207
214
|
style: [this.styles.chipLabel, isSelected ? this.styles.activeChipLabel : null]
|
208
215
|
}), item.displayexp || item.displayfield), !this.isDefaultView() && !this.state.props.disabled ? /*#__PURE__*/React.createElement(WmIcon, {
|
209
216
|
id: this.getTestId('clearbtn'),
|
@@ -235,6 +242,13 @@ export default class WmChips extends BaseDatasetComponent {
|
|
235
242
|
(_this$searchRef2 = this.searchRef) === null || _this$searchRef2 === void 0 || _this$searchRef2.computePosition();
|
236
243
|
}
|
237
244
|
}
|
245
|
+
renderSkeleton() {
|
246
|
+
return /*#__PURE__*/React.createElement(View, {
|
247
|
+
style: this.styles.root
|
248
|
+
}, /*#__PURE__*/React.createElement(View, {
|
249
|
+
style: this.styles.chipsWrapper
|
250
|
+
}, [{}, {}, {}].map((item, index) => this.renderChip(item, index))));
|
251
|
+
}
|
238
252
|
renderWidget(props) {
|
239
253
|
const chips = this.state.chipsList;
|
240
254
|
return /*#__PURE__*/React.createElement(View, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","TouchableOpacity","Text","clone","findIndex","get","isUndefined","pull","forEach","filter","find","isEqual","merge","WmChipsProps","DEFAULT_CLASS","WmSearch","BaseDatasetComponent","BaseDatasetState","WmIcon","WmPicture","AccessibilityWidgetType","getAccessibilityProps","WmChipsState","constructor","args","_defineProperty","WmChips","props","onComponentInit","c","searchRef","val","onPropertyChange","name","$new","$old","length","updateState","chipsList","reset","_this$searchRef","state","query","onDataItemsUpdate","isDefaultQuery","updateDefaultQueryModel","addItem","$event","widget","_this$props","_this$props2","newChipList","allowAdd","push","queryModel","isFormFieldWidget","isDuplicate","resetSearchModel","invokeEvent","invokeEventCallback","toBoolean","setDatavalue","computeDisplayValue","displayValue","dataItems","item","selected","map","displayexp","displayfield","selectChip","chipItem","maxsize","selectedItem","d","key","dataValue","datafield","updateDatavalue","updateMaxSize","prevDatavalue","createCustomDataModel","dataObject","isCustom","clearSearch","chipListLength","saturate","removeItem","index","allowRemove","isDefaultView","_this$state$dataItems","searchable","renderChip","isSelected","createElement","_extends","getTestPropsForAction","CHIPS","style","styles","chip","activeChip","onPress","disabled","readonly","id","getTestId","iconclass","iconsize","doneIcon","icon","color","activeChipLabel","imageStyles","picturesource","imgSrc","shape","chipLabel","clearIcon","onTap","selectedItems","componentDidMount","componentDidUpdate","prevProps","prevState","_this$searchRef2","computePosition","renderWidget","chips","root","chipsWrapper","searchContainer","flexDirection","inputposition","search","placeholder","maxSizeReached","listener","dataset","searchkey","minchars","autofocus","displayexpression","getDisplayExpression","displayimagesrc","onSubmit","bind","onChange","_this$props$listener","_this$props$listener2","onComponentChange","showSearchIcon","showclear","type","flexWrap"],"sources":["chips.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, TouchableOpacity, Text } from 'react-native';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge } from 'lodash';\nimport WmChipsProps from './chips.props';\nimport { DEFAULT_CLASS, WmChipsStyles } from './chips.styles';\nimport WmSearch from '@wavemaker/app-rn-runtime/components/basic/search/search.component';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nexport class WmChipsState extends BaseDatasetState<WmChipsProps> {\n chipsList: any = [];\n saturate: any;\n}\n\nexport default class WmChips extends BaseDatasetComponent<WmChipsProps, WmChipsState, WmChipsStyles> {\n constructor(props: WmChipsProps) {\n super(props, DEFAULT_CLASS, new WmChipsProps(), new WmChipsState());\n }\n\n private searchRef: WmSearch = null as any;\n private maxSizeReached = 'Max size reached';\n private isDefaultQuery: boolean = true;\n private prevDatavalue: any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmSearch) {\n this.searchRef = c;\n }\n }\n };\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'datavalue':\n if (!$new || $new.length === 0) {\n this.updateState({\n chipsList : []\n } as WmChipsState);\n }\n }\n }\n\n reset() {\n if (this.searchRef?.state.props.query) {\n this.searchRef.reset();\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isDefaultQuery = true;\n this.updateDefaultQueryModel();\n }\n\n addItem($event: any, widget: any) {\n let newChipList = clone(this.state.chipsList),\n allowAdd;\n newChipList.push(widget.queryModel);\n const isFormFieldWidget = get(this.props, 'formfield');\n if (this.isDuplicate(widget.queryModel)) {\n this.resetSearchModel();\n return;\n }\n\n // @ts-ignore\n allowAdd = isFormFieldWidget ? this.props?.invokeEvent('onBeforeadd', [null, this, widget.queryModel]) : this.invokeEventCallback('onBeforeadd', [null, this, widget.queryModel]);\n\n if (!isUndefined(allowAdd) && !this.toBoolean(allowAdd)) {\n return;\n }\n\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n\n // @ts-ignore\n isFormFieldWidget ? this.props?.invokeEvent('onAdd', [null, this, widget.queryModel]) : this.invokeEventCallback('onAdd', [null, this, widget.queryModel]);\n this.resetSearchModel();\n }\n\n computeDisplayValue() {\n this.updateState({\n props: {\n displayValue: ((this.state.dataItems || [] as any)\n .filter((item: any) => item.selected)\n .map((item: any) => item.displayexp || item.displayfield)) || ''\n }\n } as WmChipsState);\n }\n\n selectChip(chipItem: any) {\n if (!chipItem.selected && this.state.props.maxsize > 0 && (this.state.chipsList.length === this.state.props.maxsize)) {\n return;\n }\n chipItem.selected = !chipItem.selected;\n const newChipList: any = [];\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, chipItem.key));\n selectedItem.selected = chipItem.selected;\n forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n newChipList.push(item);\n }\n });\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n }\n\n setDatavalue(newChipList: any) {\n const dataValue = newChipList.map((item: any) => item.datafield);\n this.updateDatavalue(dataValue);\n this.updateMaxSize(newChipList.length);\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [null, this, dataValue, this.prevDatavalue])\n }\n this.prevDatavalue = dataValue;\n }\n\n toBoolean = (val: any) => ((val && val !== 'false') ? true : false);\n\n // Prepare datavalue object from a string(junk) value when datafield is allFields.\n createCustomDataModel(val: string) {\n return {\n key: `${this.state.props.name}_item${this.state.chipsList.length}`,\n dataObject: val,\n displayfield: val,\n datafield: val,\n isCustom: true\n }\n }\n\n resetSearchModel() {\n (this as any).searchRef.isDefaultQuery = false;\n this.searchRef.clearSearch();\n }\n\n isDuplicate(item: any) {\n return findIndex(this.state.chipsList, {datafield: item.datafield}) > -1;\n }\n\n // Check if max size is reached\n private updateMaxSize(chipListLength: number) {\n const saturate = this.state.props.maxsize > 0 && (chipListLength || this.state.chipsList.length) === this.state.props.maxsize;\n this.updateState({\n saturate: saturate\n } as WmChipsState);\n }\n\n removeItem(item: any, index: any) {\n let newChipList = clone(this.state.chipsList);\n const isFormFieldWidget = get(this.props, 'formfield');\n newChipList = pull(newChipList, item);\n // prevent deletion if the before-remove event callback returns false\n // @ts-ignore\n const allowRemove = isFormFieldWidget ? this.props.invokeEvent('onBeforeremove',[null, this, item]) : this.invokeEventCallback('onBeforeremove',[null, this, item]);\n if (!isUndefined(allowRemove) && !this.toBoolean(allowRemove)) {\n return;\n }\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n this.setDatavalue(newChipList);\n // @ts-ignore\n isFormFieldWidget ? this.props.invokeEvent('onRemove', [null, this, item]) : this.invokeEventCallback('onRemove', [null, this, item]);\n }\n\n private isDefaultView() {\n return !this.state.props.searchable && this.state.dataItems?.length <= 10;\n }\n\n renderChip(item: any, index: any) {\n const isSelected = this.isDefaultView() ? item.selected : true;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction('chip'+ index)}\n {...getAccessibilityProps(AccessibilityWidgetType.CHIPS, {...this.state.props, selected: isSelected})}\n style={[this.styles.chip, isSelected ? this.styles.activeChip : null]}\n key={'chipitem_'+ index}\n onPress={() => {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n if (this.isDefaultView()) {\n this.selectChip(item);\n }\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onChipclick', [null, this, item]);\n // @ts-ignore\n this.props.invokeEvent('onChipselect', [null, this, item]);\n } else {\n this.invokeEventCallback('onChipclick', [null, this, item]);\n this.invokeEventCallback('onChipselect', [null, this, item]);\n }\n }}>\n {isSelected && this.isDefaultView() ? <WmIcon id={this.getTestId('checkicon')} iconclass={'wm-sl-l sl-check'} iconsize={16} styles={merge({}, this.styles.doneIcon, {icon: {color: isSelected ? this.styles.activeChipLabel.color : null}})}></WmIcon> : null}\n <WmPicture id={this.getTestId('chip'+ index + 'picture')} styles={this.styles.imageStyles} picturesource={item.imgSrc} shape='circle'></WmPicture>\n <Text {...this.getTestPropsForAction('chip'+ index+'label')}style={[this.styles.chipLabel, isSelected ? this.styles.activeChipLabel : null]}>{item.displayexp || item.displayfield}</Text>\n {!this.isDefaultView() && !this.state.props.disabled ? <WmIcon id={this.getTestId('clearbtn')} iconclass={'wi wi-clear'} iconsize={16} styles={this.styles.clearIcon} onTap={() => this.removeItem(item, index)}></WmIcon> : null}\n </TouchableOpacity>\n )\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItems = filter(this.state.dataItems, (item) => item.selected);\n if (selectedItems.length) {\n this.updateState({\n chipsList: selectedItems\n } as WmChipsState);\n }\n this.isDefaultQuery = false;\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n componentDidUpdate(prevProps: WmChipsProps, prevState: WmChipsState) {\n super.componentDidUpdate(prevProps, prevState);\n if (prevState.chipsList !== this.state.chipsList) {\n this.searchRef?.computePosition();\n }\n }\n\n renderWidget(props: WmChipsProps) {\n const chips = this.state.chipsList;\n return (<View style={this.styles.root}>\n\n <View style={this.styles.chipsWrapper}>\n {\n this.isDefaultView() ? this.state.dataItems.map((item: any, index: any) => this.renderChip(item, index)) : null\n }\n { props.searchable || !this.isDefaultView() ?\n <View style={[this.styles.searchContainer, {flexDirection: props.inputposition === 'first' ? 'column' : 'column-reverse'}]}>\n <WmSearch\n id={this.getTestId('search')}\n name=\"app-chip-search\"\n styles={this.styles.search}\n placeholder={this.state.saturate ? this.maxSizeReached : props.placeholder}\n listener={this.listener}\n dataset={props.dataset}\n searchkey={props.searchkey}\n minchars={props.minchars}\n autofocus={props.autofocus}\n disabled={props.disabled || props.readonly || this.state.saturate}\n readonly={props.readonly}\n displayexpression={props.displayexpression}\n getDisplayExpression={props.getDisplayExpression}\n displayimagesrc={props.displayimagesrc}\n displayfield={props.displayfield}\n datafield={props.datafield}\n onSubmit={this.addItem.bind(this)}\n onChange={() => {\n this.isDefaultQuery = false;\n this.props.listener?.onComponentChange && this.props.listener?.onComponentChange(this)\n }}\n showSearchIcon={false}\n showclear={false}\n type={props.minchars === 0 ? 'autocomplete' : 'search'}/>\n <View style={{ flexDirection: 'row', flexWrap: 'wrap'}}>\n {chips && chips.length ?\n chips.map((item: any, index: any) => this.renderChip(item, index))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AE,IAAI,CAACpG,OAAO,CAACqG,IAAI,CAAC,IAAI,CAAE;MAClCC,QAAQ,EAAEA,CAAA,KAAM;QAAA,IAAAC,oBAAA,EAAAC,qBAAA;QACd,IAAI,CAAC1G,cAAc,GAAG,KAAK;QAC3B,EAAAyG,oBAAA,OAAI,CAAC1H,KAAK,CAAC+G,QAAQ,cAAAW,oBAAA,uBAAnBA,oBAAA,CAAqBE,iBAAiB,OAAAD,qBAAA,GAAI,IAAI,CAAC3H,KAAK,CAAC+G,QAAQ,cAAAY,qBAAA,uBAAnBA,qBAAA,CAAqBC,iBAAiB,CAAC,IAAI,CAAC;MACxF,CAAE;MACFC,cAAc,EAAE,KAAM;MACtBC,SAAS,EAAE,KAAM;MACjBC,IAAI,EAAE/H,KAAK,CAACkH,QAAQ,KAAK,CAAC,GAAG,cAAc,GAAG;IAAS,CAAC,CAAC,eACzD9I,KAAA,CAAAgG,aAAA,CAAC/F,IAAI;MAACmG,KAAK,EAAE;QAAEkC,aAAa,EAAE,KAAK;QAAEsB,QAAQ,EAAE;MAAM;IAAE,GACpD1B,KAAK,IAAIA,KAAK,CAAC7F,MAAM,GACtB6F,KAAK,CAAC9D,GAAG,CAAC,CAACF,IAAS,EAAEuB,KAAU,KAAK,IAAI,CAACK,UAAU,CAAC5B,IAAI,EAAEuB,KAAK,CAAC,CAAC,GAChE,IACE,CACJ,CAAC,GACJ,IACD,CACF,CAAC;EACT;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","View","TouchableOpacity","Text","clone","findIndex","get","isUndefined","pull","forEach","filter","find","isEqual","merge","WmChipsProps","DEFAULT_CLASS","WmSearch","BaseDatasetComponent","BaseDatasetState","WmIcon","WmPicture","AccessibilityWidgetType","getAccessibilityProps","WmLabel","WmChipsState","constructor","args","_defineProperty","WmChips","props","onComponentInit","c","searchRef","val","onPropertyChange","name","$new","$old","length","updateState","chipsList","reset","_this$searchRef","state","query","onDataItemsUpdate","isDefaultQuery","updateDefaultQueryModel","addItem","$event","widget","_this$props","_this$props2","newChipList","allowAdd","push","queryModel","isFormFieldWidget","isDuplicate","resetSearchModel","invokeEvent","invokeEventCallback","toBoolean","setDatavalue","computeDisplayValue","displayValue","dataItems","item","selected","map","displayexp","displayfield","selectChip","chipItem","maxsize","selectedItem","d","key","dataValue","datafield","updateDatavalue","updateMaxSize","prevDatavalue","createCustomDataModel","dataObject","isCustom","clearSearch","chipListLength","saturate","removeItem","index","allowRemove","isDefaultView","_this$state$dataItems","searchable","renderChip","isSelected","createElement","_extends","getTestPropsForAction","CHIPS","style","styles","chip","activeChip","onPress","disabled","readonly","id","getTestId","iconclass","iconsize","doneIcon","icon","color","activeChipLabel","_showSkeleton","imageStyles","picturesource","imgSrc","shape","root","width","chipLabel","clearIcon","onTap","selectedItems","componentDidMount","componentDidUpdate","prevProps","prevState","_this$searchRef2","computePosition","renderSkeleton","chipsWrapper","renderWidget","chips","searchContainer","flexDirection","inputposition","search","placeholder","maxSizeReached","listener","dataset","searchkey","minchars","autofocus","displayexpression","getDisplayExpression","displayimagesrc","onSubmit","bind","onChange","_this$props$listener","_this$props$listener2","onComponentChange","showSearchIcon","showclear","type","flexWrap"],"sources":["chips.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, TouchableOpacity, Text, DimensionValue } from 'react-native';\nimport { LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge } from 'lodash';\nimport WmChipsProps from './chips.props';\nimport { DEFAULT_CLASS, WmChipsStyles } from './chips.styles';\nimport WmSearch from '@wavemaker/app-rn-runtime/components/basic/search/search.component';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport WmLabel from '../../basic/label/label.component';\n\nexport class WmChipsState extends BaseDatasetState<WmChipsProps> {\n chipsList: any = [];\n saturate: any;\n}\n\nexport default class WmChips extends BaseDatasetComponent<WmChipsProps, WmChipsState, WmChipsStyles> {\n constructor(props: WmChipsProps) {\n super(props, DEFAULT_CLASS, new WmChipsProps(), new WmChipsState());\n }\n\n private searchRef: WmSearch = null as any;\n private maxSizeReached = 'Max size reached';\n private isDefaultQuery: boolean = true;\n private prevDatavalue: any;\n\n private listener: LifecycleListener = {\n onComponentInit: (c) => {\n if (c instanceof WmSearch) {\n this.searchRef = c;\n }\n }\n };\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'datavalue':\n if (!$new || $new.length === 0) {\n this.updateState({\n chipsList : []\n } as WmChipsState);\n }\n }\n }\n\n reset() {\n if (this.searchRef?.state.props.query) {\n this.searchRef.reset();\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isDefaultQuery = true;\n this.updateDefaultQueryModel();\n }\n\n addItem($event: any, widget: any) {\n let newChipList = clone(this.state.chipsList),\n allowAdd;\n newChipList.push(widget.queryModel);\n const isFormFieldWidget = get(this.props, 'formfield');\n if (this.isDuplicate(widget.queryModel)) {\n this.resetSearchModel();\n return;\n }\n\n // @ts-ignore\n allowAdd = isFormFieldWidget ? this.props?.invokeEvent('onBeforeadd', [null, this, widget.queryModel]) : this.invokeEventCallback('onBeforeadd', [null, this, widget.queryModel]);\n\n if (!isUndefined(allowAdd) && !this.toBoolean(allowAdd)) {\n return;\n }\n\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n\n // @ts-ignore\n isFormFieldWidget ? this.props?.invokeEvent('onAdd', [null, this, widget.queryModel]) : this.invokeEventCallback('onAdd', [null, this, widget.queryModel]);\n this.resetSearchModel();\n }\n\n computeDisplayValue() {\n this.updateState({\n props: {\n displayValue: ((this.state.dataItems || [] as any)\n .filter((item: any) => item.selected)\n .map((item: any) => item.displayexp || item.displayfield)) || ''\n }\n } as WmChipsState);\n }\n\n selectChip(chipItem: any) {\n if (!chipItem.selected && this.state.props.maxsize > 0 && (this.state.chipsList.length === this.state.props.maxsize)) {\n return;\n }\n chipItem.selected = !chipItem.selected;\n const newChipList: any = [];\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, chipItem.key));\n selectedItem.selected = chipItem.selected;\n forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n newChipList.push(item);\n }\n });\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n\n this.setDatavalue(newChipList);\n }\n\n setDatavalue(newChipList: any) {\n const dataValue = newChipList.map((item: any) => item.datafield);\n this.updateDatavalue(dataValue);\n this.updateMaxSize(newChipList.length);\n if (!this.props.invokeEvent) {\n this.invokeEventCallback('onChange', [null, this, dataValue, this.prevDatavalue])\n }\n this.prevDatavalue = dataValue;\n }\n\n toBoolean = (val: any) => ((val && val !== 'false') ? true : false);\n\n // Prepare datavalue object from a string(junk) value when datafield is allFields.\n createCustomDataModel(val: string) {\n return {\n key: `${this.state.props.name}_item${this.state.chipsList.length}`,\n dataObject: val,\n displayfield: val,\n datafield: val,\n isCustom: true\n }\n }\n\n resetSearchModel() {\n (this as any).searchRef.isDefaultQuery = false;\n this.searchRef.clearSearch();\n }\n\n isDuplicate(item: any) {\n return findIndex(this.state.chipsList, {datafield: item.datafield}) > -1;\n }\n\n // Check if max size is reached\n private updateMaxSize(chipListLength: number) {\n const saturate = this.state.props.maxsize > 0 && (chipListLength || this.state.chipsList.length) === this.state.props.maxsize;\n this.updateState({\n saturate: saturate\n } as WmChipsState);\n }\n\n removeItem(item: any, index: any) {\n let newChipList = clone(this.state.chipsList);\n const isFormFieldWidget = get(this.props, 'formfield');\n newChipList = pull(newChipList, item);\n // prevent deletion if the before-remove event callback returns false\n // @ts-ignore\n const allowRemove = isFormFieldWidget ? this.props.invokeEvent('onBeforeremove',[null, this, item]) : this.invokeEventCallback('onBeforeremove',[null, this, item]);\n if (!isUndefined(allowRemove) && !this.toBoolean(allowRemove)) {\n return;\n }\n this.updateState({\n chipsList: newChipList\n } as WmChipsState);\n this.setDatavalue(newChipList);\n // @ts-ignore\n isFormFieldWidget ? this.props.invokeEvent('onRemove', [null, this, item]) : this.invokeEventCallback('onRemove', [null, this, item]);\n }\n\n private isDefaultView() {\n return !this.state.props.searchable && this.state.dataItems?.length <= 10;\n }\n\n renderChip(item: any, index: any) {\n const isSelected = this.isDefaultView() ? item.selected : true;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction('chip'+ index)}\n {...getAccessibilityProps(AccessibilityWidgetType.CHIPS, {...this.state.props, selected: isSelected})}\n style={[this.styles.chip, isSelected ? this.styles.activeChip : null]}\n key={'chipitem_'+ index}\n onPress={() => {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n if (this.isDefaultView()) {\n this.selectChip(item);\n }\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onChipclick', [null, this, item]);\n // @ts-ignore\n this.props.invokeEvent('onChipselect', [null, this, item]);\n } else {\n this.invokeEventCallback('onChipclick', [null, this, item]);\n this.invokeEventCallback('onChipselect', [null, this, item]);\n }\n }}>\n {isSelected && this.isDefaultView() ? <WmIcon id={this.getTestId('checkicon')} iconclass={'wm-sl-l sl-check'} iconsize={16} styles={merge({}, this.styles.doneIcon, {icon: {color: isSelected ? this.styles.activeChipLabel.color : null}})}></WmIcon> : null}\n { this._showSkeleton ? null : <WmPicture id={this.getTestId('chip'+ index + 'picture')} styles={this.styles.imageStyles} picturesource={item.imgSrc} shape='circle'></WmPicture>}\n { this._showSkeleton ? <WmLabel styles={{root: {width: 50}}}/> : <Text {...this.getTestPropsForAction('chip'+ index+'label')}style={[this.styles.chipLabel, isSelected ? this.styles.activeChipLabel : null]}>{item.displayexp || item.displayfield}</Text>}\n {!this.isDefaultView() && !this.state.props.disabled ? <WmIcon id={this.getTestId('clearbtn')} iconclass={'wi wi-clear'} iconsize={16} styles={this.styles.clearIcon} onTap={() => this.removeItem(item, index)}></WmIcon> : null}\n </TouchableOpacity>\n )\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItems = filter(this.state.dataItems, (item) => item.selected);\n if (selectedItems.length) {\n this.updateState({\n chipsList: selectedItems\n } as WmChipsState);\n }\n this.isDefaultQuery = false;\n }\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n componentDidUpdate(prevProps: WmChipsProps, prevState: WmChipsState) {\n super.componentDidUpdate(prevProps, prevState);\n if (prevState.chipsList !== this.state.chipsList) {\n this.searchRef?.computePosition();\n }\n } \n renderSkeleton(): React.ReactNode {\n return (<View style={this.styles.root}>\n <View style={this.styles.chipsWrapper}>{ \n [{}, {}, {}].map((item: any, index: any) => this.renderChip(item, index)) }\n </View>\n </View>)\n }\n\n renderWidget(props: WmChipsProps) {\n const chips = this.state.chipsList;\n return (<View style={this.styles.root}>\n\n <View style={this.styles.chipsWrapper}>\n {\n this.isDefaultView() ? this.state.dataItems.map((item: any, index: any) => this.renderChip(item, index)) : null\n }\n { props.searchable || !this.isDefaultView() ?\n <View style={[this.styles.searchContainer, {flexDirection: props.inputposition === 'first' ? 'column' : 'column-reverse'}]}>\n <WmSearch\n id={this.getTestId('search')}\n name=\"app-chip-search\"\n styles={this.styles.search}\n placeholder={this.state.saturate ? this.maxSizeReached : props.placeholder}\n listener={this.listener}\n dataset={props.dataset}\n searchkey={props.searchkey}\n minchars={props.minchars}\n autofocus={props.autofocus}\n disabled={props.disabled || props.readonly || this.state.saturate}\n readonly={props.readonly}\n displayexpression={props.displayexpression}\n getDisplayExpression={props.getDisplayExpression}\n displayimagesrc={props.displayimagesrc}\n displayfield={props.displayfield}\n datafield={props.datafield}\n onSubmit={this.addItem.bind(this)}\n onChange={() => {\n this.isDefaultQuery = false;\n this.props.listener?.onComponentChange && this.props.listener?.onComponentChange(this)\n }}\n showSearchIcon={false}\n showclear={false}\n type={props.minchars === 0 ? 'autocomplete' : 'search'}/>\n <View style={{ flexDirection: 'row', flexWrap: 'wrap'}}>\n {chips && chips.length ?\n chips.map((item: any, index: any) => this.renderChip(item, index))\n : null}\n </View>\n </View>\n : null }\n </View>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAwB,cAAc;AAE3E,SAASC,KAAK,EAAEC,SAAS,EAAEC,GAAG,EAAEC,WAAW,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AACxG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,OAAO,MAAM,mCAAmC;AAEvD,OAAO,MAAMC,YAAY,SAASN,gBAAgB,CAAe;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC9C,EAAE;IAAAA,eAAA;EAAA;AAErB;AAEA,eAAe,MAAMC,OAAO,SAASX,oBAAoB,CAA4C;EACnGQ,WAAWA,CAACI,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEd,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAIU,YAAY,CAAC,CAAC,CAAC;IAACG,eAAA,oBAGxC,IAAI;IAAAA,eAAA,yBACT,kBAAkB;IAAAA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,iBAAiB,CAAC,IAAI,CAAC;MACxF,CAAE;MACFC,cAAc,EAAE,KAAM;MACtBC,SAAS,EAAE,KAAM;MACjBC,IAAI,EAAElI,KAAK,CAACqH,QAAQ,KAAK,CAAC,GAAG,cAAc,GAAG;IAAS,CAAC,CAAC,eACzDlJ,KAAA,CAAAiG,aAAA,CAAChG,IAAI;MAACoG,KAAK,EAAE;QAAEqC,aAAa,EAAE,KAAK;QAAEsB,QAAQ,EAAE;MAAM;IAAE,GACpDxB,KAAK,IAAIA,KAAK,CAAClG,MAAM,GACtBkG,KAAK,CAACnE,GAAG,CAAC,CAACF,IAAS,EAAEuB,KAAU,KAAK,IAAI,CAACK,UAAU,CAAC5B,IAAI,EAAEuB,KAAK,CAAC,CAAC,GAChE,IACE,CACJ,CAAC,GACJ,IACD,CACF,CAAC;EACT;AACF","ignoreList":[]}
|
@@ -76,6 +76,14 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
76
76
|
width: 32,
|
77
77
|
height: 32
|
78
78
|
}
|
79
|
+
},
|
80
|
+
skeleton: {
|
81
|
+
root: {
|
82
|
+
width: 80,
|
83
|
+
borderRadius: 8,
|
84
|
+
padding: 4,
|
85
|
+
minHeight: 32
|
86
|
+
}
|
79
87
|
}
|
80
88
|
});
|
81
89
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexWrap","text","chipsWrapper","flexDirection","chip","margin","backgroundColor","chipContainerColor","borderRadius","alignItems","justifyContent","paddingVertical","paddingHorizontal","minWidth","minHeight","borderWidth","borderColor","chipborderColor","elevation","chipLabel","fontSize","paddingLeft","fontFamily","baseFont","fontWeight","paddingRight","color","chipDefaultTextColor","activeChip","chipSelectedContainerColor","chipSelectedOutlineColor","activeChipLabel","chipActiveTextColor","searchContainer","width","search","marginBottom","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","doneIcon","icon","chipIconColor","clearIcon","imageStyles","height","opacity","inputDisabledBgColor"],"sources":["chips.styles.ts"],"sourcesContent":["import { TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSearchStyles } from '@wavemaker/app-rn-runtime/components/basic/search/search.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmPictureStyles } from '@wavemaker/app-rn-runtime/components/basic/picture/picture.styles';\n\nexport type WmChipsStyles = BaseStyles & {\n chip: AllStyle;\n chipLabel: TextStyle;\n chipsWrapper: AllStyle;\n search: WmSearchStyles;\n searchContainer: AllStyle;\n activeChip: AllStyle;\n activeChipLabel: TextStyle;\n clearIcon: WmIconStyles;\n doneIcon: WmIconStyles;\n imageStyles: WmPictureStyles
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexWrap","text","chipsWrapper","flexDirection","chip","margin","backgroundColor","chipContainerColor","borderRadius","alignItems","justifyContent","paddingVertical","paddingHorizontal","minWidth","minHeight","borderWidth","borderColor","chipborderColor","elevation","chipLabel","fontSize","paddingLeft","fontFamily","baseFont","fontWeight","paddingRight","color","chipDefaultTextColor","activeChip","chipSelectedContainerColor","chipSelectedOutlineColor","activeChipLabel","chipActiveTextColor","searchContainer","width","search","marginBottom","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","doneIcon","icon","chipIconColor","clearIcon","imageStyles","height","skeleton","padding","opacity","inputDisabledBgColor"],"sources":["chips.styles.ts"],"sourcesContent":["import { TextStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSearchStyles } from '@wavemaker/app-rn-runtime/components/basic/search/search.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmPictureStyles } from '@wavemaker/app-rn-runtime/components/basic/picture/picture.styles';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmChipsStyles = BaseStyles & {\n chip: AllStyle;\n chipLabel: TextStyle;\n chipsWrapper: AllStyle;\n search: WmSearchStyles;\n searchContainer: AllStyle;\n activeChip: AllStyle;\n activeChipLabel: TextStyle;\n clearIcon: WmIconStyles;\n doneIcon: WmIconStyles;\n imageStyles: WmPictureStyles;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-chips';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmChipsStyles = defineStyles({\n root: {\n flexWrap: 'wrap',\n },\n text: {},\n chipsWrapper: {\n flexDirection: 'row',\n flexWrap: 'wrap'\n },\n chip: {\n margin: 2,\n backgroundColor: themeVariables.chipContainerColor,\n borderRadius: 8,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingVertical: 4,\n paddingHorizontal: 4,\n minWidth: 80,\n minHeight: 32,\n borderWidth: 1,\n borderColor: themeVariables.chipborderColor,\n elevation: 1\n },\n chipLabel : {\n fontSize: 14,\n paddingLeft: 8,\n fontFamily: themeVariables.baseFont,\n fontWeight: '500',\n paddingRight: 12,\n color: themeVariables.chipDefaultTextColor,\n borderColor: themeVariables.chipborderColor\n },\n activeChip: {\n backgroundColor: themeVariables.chipSelectedContainerColor, \n borderColor: themeVariables.chipSelectedOutlineColor,\n borderWidth: 0\n },\n activeChipLabel: {\n color: themeVariables.chipActiveTextColor\n },\n searchContainer: {\n width: '100%',\n flexDirection: 'column'\n },\n search: {\n root: {\n marginBottom: 8\n },\n text: {\n borderRightWidth: 1,\n borderTopRightRadius: 4,\n borderBottomRightRadius: 4\n }\n } as WmSearchStyles,\n doneIcon: {\n icon: {\n paddingLeft: 8,\n fontSize: 18,\n color: themeVariables.chipIconColor,\n }\n } as WmIconStyles,\n clearIcon: {\n icon: {\n color: themeVariables.chipIconColor,\n paddingRight: 8,\n fontSize: 18\n }\n } as WmIconStyles,\n imageStyles: {\n root: {\n width: 32,\n height: 32\n }\n } as WmPictureStyles,\n skeleton: {\n root:{\n width: 80,\n borderRadius: 8,\n padding:4,\n minHeight: 32,\n }\n } as any as WmSkeletonStyles,\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n chip: {\n opacity: 0.5\n },\n search: {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n }\n });\n});\n"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAoBxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGL,YAAY,CAAC;IAC9CM,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,YAAY,EAAE;MACZC,aAAa,EAAE,KAAK;MACpBH,QAAQ,EAAE;IACZ,CAAC;IACDI,IAAI,EAAE;MACJC,MAAM,EAAE,CAAC;MACTC,eAAe,EAAEV,cAAc,CAACW,kBAAkB;MAClDC,YAAY,EAAE,CAAC;MACfL,aAAa,EAAE,KAAK;MACpBM,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,eAAe,EAAE,CAAC;MAClBC,iBAAiB,EAAE,CAAC;MACpBC,QAAQ,EAAE,EAAE;MACZC,SAAS,EAAE,EAAE;MACbC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAEpB,cAAc,CAACqB,eAAe;MAC3CC,SAAS,EAAE;IACb,CAAC;IACDC,SAAS,EAAG;MACVC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE,C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AE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCU,IAAI,EAAE;MACJ4C,OAAO,EAAE;IACX,CAAC;IACDb,MAAM,EAAE;MACNpC,IAAI,EAAG;QACLO,eAAe,EAAEV,cAAc,CAACqD;MAClC;IACF;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -12,6 +12,7 @@ import { BaseNumberComponent, BaseNumberState } from '@wavemaker/app-rn-runtime/
|
|
12
12
|
import { isNull } from "lodash";
|
13
13
|
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
14
14
|
import { countDecimalDigits, validateInputOnDevice } from '@wavemaker/app-rn-runtime/core/utils';
|
15
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
15
16
|
export class WmCurrencyState extends BaseNumberState {
|
16
17
|
constructor(...args) {
|
17
18
|
super(...args);
|
@@ -42,6 +43,13 @@ export default class WmCurrency extends BaseNumberComponent {
|
|
42
43
|
classes.push(super.getStyleClassName());
|
43
44
|
return classes.join(' ');
|
44
45
|
}
|
46
|
+
renderTextSkeleton(props) {
|
47
|
+
return this.props.floatinglabel ? /*#__PURE__*/React.createElement(React.Fragment, null, createSkeleton(this.theme, {}, {
|
48
|
+
...props
|
49
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, createSkeleton(this.theme, {}, {
|
50
|
+
...this.styles.skeleton.root
|
51
|
+
}));
|
52
|
+
}
|
45
53
|
renderWidget(props) {
|
46
54
|
var _this$state$textValue;
|
47
55
|
let opts = {};
|
@@ -50,10 +58,10 @@ export default class WmCurrency extends BaseNumberComponent {
|
|
50
58
|
return /*#__PURE__*/React.createElement(View, {
|
51
59
|
style: this.styles.root
|
52
60
|
}, /*#__PURE__*/React.createElement(View, {
|
53
|
-
style: this.styles.labelWrapper
|
54
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
61
|
+
style: this._showSkeleton && !this.props.floatinglabel ? this.styles.skeletonLabelWrapper.root : this.styles.labelWrapper
|
62
|
+
}, this._showSkeleton ? /*#__PURE__*/React.createElement(React.Fragment, null, this.renderTextSkeleton(this.styles.skeletonLabel.root)) : /*#__PURE__*/React.createElement(Text, {
|
55
63
|
style: this.styles.label
|
56
|
-
}, this.state.currencySymbol)), /*#__PURE__*/React.createElement(View, {
|
64
|
+
}, this.state.currencySymbol)), this._showSkeleton ? /*#__PURE__*/React.createElement(React.Fragment, null, this.renderTextSkeleton(this.styles.skeletonTextInputWrapper.root)) : /*#__PURE__*/React.createElement(View, {
|
57
65
|
style: {
|
58
66
|
flex: 1
|
59
67
|
}
|
@@ -68,13 +76,15 @@ export default class WmCurrency extends BaseNumberComponent {
|
|
68
76
|
},
|
69
77
|
keyboardType: "numeric",
|
70
78
|
placeholderTextColor: this.styles.placeholderText.color,
|
71
|
-
|
79
|
+
isInputFocused: this.state.isInputFocused,
|
80
|
+
style: [this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]
|
72
81
|
}, opts, {
|
73
82
|
floatingLabel: props.floatinglabel,
|
74
83
|
floatingLabelStyle: this.styles.floatingLabel,
|
75
84
|
activeFloatingLabelStyle: this.styles.activeFloatingLabel,
|
76
85
|
editable: props.disabled || props.readonly ? false : true,
|
77
86
|
placeholder: props.placeholder,
|
87
|
+
background: this._background,
|
78
88
|
onBlur: this.onBlur.bind(this),
|
79
89
|
onFocus: this.onFocus.bind(this),
|
80
90
|
onKeyPress: this.validateInputEntry.bind(this),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","Text","Platform","WmCurrencyProps","CURRENCY_INFO","WMTextInput","DEFAULT_CLASS","BaseNumberComponent","BaseNumberState","isNull","AccessibilityWidgetType","getAccessibilityProps","countDecimalDigits","validateInputOnDevice","WmCurrencyState","constructor","args","_defineProperty","WmCurrency","props","onPropertyChange","name","$new","$old","updateState","currencySymbol","symbol","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","style","styles","root","labelWrapper","label","flex","_extends","getTestPropsForInput","CURRENCY","ref","widgetRef","selectionStart","selectionEnd","cursor","keyboardType","placeholderTextColor","placeholderText","color","input","text","isValid","invalid","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","editable","disabled","readonly","placeholder","onBlur","bind","onFocus","onKeyPress","validateInputEntry","onChangeText","isValidText","validText","decimalPlaces","decimalPlacesInNumber","restrictDecimalRegex","RegExp","updatedCurrencyText","replace","_this$widgetRef","setNativeProps","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["currency.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform } from 'react-native';\n\nimport WmCurrencyProps from './currency.props';\nimport { CURRENCY_INFO } from '@wavemaker/app-rn-runtime/core/currency-constants';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { DEFAULT_CLASS, WmCurrencyStyles } from './currency.styles';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { isNull } from \"lodash\";\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { countDecimalDigits, validateInputOnDevice } from '@wavemaker/app-rn-runtime/core/utils';\nexport class WmCurrencyState extends BaseNumberState<WmCurrencyProps> {\n currencySymbol: any;\n}\n\nexport default class WmCurrency extends BaseNumberComponent<WmCurrencyProps, WmCurrencyState, WmCurrencyStyles> {\n\n constructor(props: WmCurrencyProps) {\n super(props, DEFAULT_CLASS, new WmCurrencyProps(), new WmCurrencyState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'currency':\n if ($new) {\n this.updateState({\n currencySymbol: CURRENCY_INFO[$new].symbol,\n } as WmCurrencyState);\n }\n break;\n\n }\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-currency-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n renderWidget(props: WmCurrencyProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (<View style={this.styles.root}>\n <View style={this.styles.labelWrapper}>\n <Text style={this.styles.label}>{this.state.currencySymbol}</Text>\n </View>\n <View style={{flex: 1}}>\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.CURRENCY, props)}\n ref={(ref: any) => {\n this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }\n }}\n keyboardType=\"numeric\"\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n const {isValidText, validText} = validateInputOnDevice(text, \"currency\");\n const decimalPlaces = props.decimalPlaces;\n const decimalPlacesInNumber = countDecimalDigits(validText);\n const restrictDecimalRegex = new RegExp(`(\\\\.\\\\d{${decimalPlaces}})\\\\d*`);\n const updatedCurrencyText = validText.replace(restrictDecimalRegex, '$1');\n\n if (!isValidText || decimalPlaces < decimalPlacesInNumber) {\n (this.widgetRef as any)?.setNativeProps({ text: updatedCurrencyText });\n }\n\n this.onChangeText.bind(this)(updatedCurrencyText, 'currency');\n }}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n </View>\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAEnD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,mDAAmD;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,mBAAmB,EACnBC,eAAe,QACV,4EAA4E;AACnF,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,kBAAkB,EAAEC,qBAAqB,QAAQ,sCAAsC;AAChG,OAAO,MAAMC,eAAe,SAASN,eAAe,CAAkB;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;EAAA;AAEtE;AAEA,eAAe,MAAMC,UAAU,SAASX,mBAAmB,CAAqD;EAE9GQ,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEb,aAAa,EAAE,IAAIH,eAAe,CAAC,CAAC,EAAE,IAAIW,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAM,gBAAgBA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,EAAE;IACnD,KAAK,CAACH,gBAAgB,CAACC,IAAI,EAAEC,IAAI,EAAEC,IAAI,CAAC;IACxC,QAAQF,IAAI;MACV,KAAK,UAAU;QACb,IAAIC,IAAI,EAAE;UACR,IAAI,CAACE,WAAW,CAAC;YACfC,cAAc,EAAErB,aAAa,CAACkB,IAAI,CAAC,CAACI;UACtC,CAAoB,CAAC;QACvB;QACA;IAEJ;EACF;EAEOC,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CA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C3D,MAAMG,oBAAoB,GAAG,IAAIC,MAAM,CAAC,WAAWH,aAAa,QAAQ,CAAC;QACzE,MAAMI,mBAAmB,GAAGL,SAAS,CAACM,OAAO,CAACH,oBAAoB,EAAE,IAAI,CAAC;QAEzE,IAAI,CAACJ,WAAW,IAAIE,aAAa,GAAGC,qBAAqB,EAAE;UAAA,IAAAK,eAAA;UACzD,CAAAA,eAAA,GAAC,IAAI,CAAClC,SAAS,cAAAkC,eAAA,eAAfA,eAAA,CAAyBC,cAAc,CAAC;YAAE1B,IAAI,EAAEuB;UAAoB,CAAC,CAAC;QACxE;QAEA,IAAI,CAACP,YAAY,CAACJ,IAAI,CAAC,IAAI,CAAC,CAACW,mBAAmB,EAAE,UAAU,CAAC;MAC/D,CAAE;MACFI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAAChB,IAAI,CAAC,IAAI,CAAE;MACvCiB,qBAAqB,EAAE,IAAI,CAAC/C,MAAM,CAACkB,IAAI,CAAC8B,UAAU,KAAK;IAAO,EAC/D,CACK,CACF,CAAC;EACT;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","View","Text","Platform","WmCurrencyProps","CURRENCY_INFO","WMTextInput","DEFAULT_CLASS","BaseNumberComponent","BaseNumberState","isNull","AccessibilityWidgetType","getAccessibilityProps","countDecimalDigits","validateInputOnDevice","createSkeleton","WmCurrencyState","constructor","args","_defineProperty","WmCurrency","props","onPropertyChange","name","$new","$old","updateState","currencySymbol","symbol","getStyleClassName","classes","state","floatinglabel","push","join","renderTextSkeleton","createElement","Fragment","theme","styles","skeleton","root","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","style","_showSkeleton","skeletonLabelWrapper","labelWrapper","skeletonLabel","label","skeletonTextInputWrapper","flex","_extends","getTestPropsForInput","CURRENCY","ref","widgetRef","selectionStart","selectionEnd","cursor","keyboardType","placeholderTextColor","placeholderText","color","isInputFocused","input","text","isValid","invalid","focused","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","editable","disabled","readonly","placeholder","background","_background","onBlur","bind","onFocus","onKeyPress","validateInputEntry","onChangeText","isValidText","validText","decimalPlaces","decimalPlacesInNumber","restrictDecimalRegex","RegExp","updatedCurrencyText","replace","_this$widgetRef","setNativeProps","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["currency.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, DimensionValue } from 'react-native';\n\nimport WmCurrencyProps from './currency.props';\nimport { CURRENCY_INFO } from '@wavemaker/app-rn-runtime/core/currency-constants';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { DEFAULT_CLASS, WmCurrencyStyles } from './currency.styles';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { isNull } from \"lodash\";\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { countDecimalDigits, validateInputOnDevice } from '@wavemaker/app-rn-runtime/core/utils';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport class WmCurrencyState extends BaseNumberState<WmCurrencyProps> {\n currencySymbol: any;\n}\n\nexport default class WmCurrency extends BaseNumberComponent<WmCurrencyProps, WmCurrencyState, WmCurrencyStyles> {\n\n constructor(props: WmCurrencyProps) {\n super(props, DEFAULT_CLASS, new WmCurrencyProps(), new WmCurrencyState());\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case 'currency':\n if ($new) {\n this.updateState({\n currencySymbol: CURRENCY_INFO[$new].symbol,\n } as WmCurrencyState);\n }\n break;\n\n }\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-currency-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderTextSkeleton(props:any): React.ReactNode { \n return this.props.floatinglabel ? <>{createSkeleton(this.theme, {} as WmSkeletonStyles, {...props})}</>\n : <>{createSkeleton(this.theme, {} as WmSkeletonStyles, {\n ...this.styles.skeleton.root,\n })}</>\n }\n\n renderWidget(props: WmCurrencyProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (<View style={this.styles.root}>\n <View style={ (this._showSkeleton && !this.props.floatinglabel) ? this.styles.skeletonLabelWrapper.root : this.styles.labelWrapper }>\n {this._showSkeleton ? <>{this.renderTextSkeleton(this.styles.skeletonLabel.root)}</> :\n <Text style={this.styles.label}>{this.state.currencySymbol}</Text>}\n </View>\n {this._showSkeleton ? <>{this.renderTextSkeleton(this.styles.skeletonTextInputWrapper.root)}</> :<View style={{flex: 1}}>\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.CURRENCY, props)}\n ref={(ref: any) => {\n this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }\n }}\n keyboardType=\"numeric\"\n placeholderTextColor={this.styles.placeholderText.color as any}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.input, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n background={this._background}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n const {isValidText, validText} = validateInputOnDevice(text, \"currency\");\n const decimalPlaces = props.decimalPlaces;\n const decimalPlacesInNumber = countDecimalDigits(validText);\n const restrictDecimalRegex = new RegExp(`(\\\\.\\\\d{${decimalPlaces}})\\\\d*`);\n const updatedCurrencyText = validText.replace(restrictDecimalRegex, '$1');\n\n if (!isValidText || decimalPlaces < decimalPlacesInNumber) {\n (this.widgetRef as any)?.setNativeProps({ text: updatedCurrencyText });\n }\n\n this.onChangeText.bind(this)(updatedCurrencyText, 'currency');\n }}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n </View> }\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAwB,cAAc;AAEnE,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,mDAAmD;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,mBAAmB,EACnBC,eAAe,QACV,4EAA4E;AACnF,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,kBAAkB,EAAEC,qBAAqB,QAAQ,sCAAsC;AAChG,SAASC,cAAc,QAAQ,wEAAwE;AAGvG,OAAO,MAAMC,eAAe,SAASP,eAAe,CAAkB;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;EAAA;AAEtE;AAEA,eAAe,MAAMC,UAAU,SAASZ,mBAAmB,CAAqD;EAE9GS,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEd,aAAa,EAAE,IAAIH,eAAe,CAAC,CAAC,EAAE,IAAIY,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAM,gBAAgBA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,EAAE;IACnD,KAAK,CAACH,gBAAgB,CAACC,IAAI,EAAEC,IA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AW;UAAEC;QAAS,CAAC,GAAG9E,qBAAqB,CAACyD,IAAI,EAAE,UAAU,CAAC;QACxE,MAAMsB,aAAa,GAAGxE,KAAK,CAACwE,aAAa;QACzC,MAAMC,qBAAqB,GAAGjF,kBAAkB,CAAC+E,SAAS,CAAC;QAC3D,MAAMG,oBAAoB,GAAG,IAAIC,MAAM,CAAC,WAAWH,aAAa,QAAQ,CAAC;QACzE,MAAMI,mBAAmB,GAAGL,SAAS,CAACM,OAAO,CAACH,oBAAoB,EAAE,IAAI,CAAC;QAEzE,IAAI,CAACJ,WAAW,IAAIE,aAAa,GAAGC,qBAAqB,EAAE;UAAA,IAAAK,eAAA;UACzD,CAAAA,eAAA,GAAC,IAAI,CAACtC,SAAS,cAAAsC,eAAA,eAAfA,eAAA,CAAyBC,cAAc,CAAC;YAAE7B,IAAI,EAAE0B;UAAoB,CAAC,CAAC;QACxE;QAEA,IAAI,CAACP,YAAY,CAACJ,IAAI,CAAC,IAAI,CAAC,CAACW,mBAAmB,EAAE,UAAU,CAAC;MAC/D,CAAE;MACFI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAAChB,IAAI,CAAC,IAAI,CAAE;MACvCiB,qBAAqB,EAAE,IAAI,CAAChE,MAAM,CAACgC,IAAI,CAACiC,UAAU,KAAK;IAAO,EAC/D,CACK,CACF,CAAC;EACT;AACF","ignoreList":[]}
|
@@ -36,7 +36,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
36
36
|
paddingTop: 8,
|
37
37
|
paddingBottom: 8,
|
38
38
|
paddingLeft: 16,
|
39
|
-
paddingRight: 16
|
39
|
+
paddingRight: 16,
|
40
|
+
display: 'flex',
|
41
|
+
justifyContent: 'center'
|
40
42
|
},
|
41
43
|
label: {
|
42
44
|
marginVertical: 0.7,
|
@@ -50,9 +52,49 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
50
52
|
invalid: {
|
51
53
|
borderBottomColor: themeVariables.inputInvalidBorderColor
|
52
54
|
},
|
55
|
+
focused: {
|
56
|
+
borderColor: themeVariables.inputFocusBorderColor
|
57
|
+
},
|
53
58
|
placeholderText: {
|
54
59
|
color: themeVariables.inputPlaceholderColor
|
55
60
|
},
|
61
|
+
skeleton: {
|
62
|
+
root: {
|
63
|
+
borderRadius: 6,
|
64
|
+
paddingLeft: 16,
|
65
|
+
paddingRight: 16,
|
66
|
+
minHeight: 42,
|
67
|
+
paddingTop: 8,
|
68
|
+
paddingBottom: 8,
|
69
|
+
width: '100%',
|
70
|
+
height: 40
|
71
|
+
}
|
72
|
+
},
|
73
|
+
skeletonLabel: {
|
74
|
+
root: {
|
75
|
+
width: 20,
|
76
|
+
height: 28,
|
77
|
+
borderRadius: 4,
|
78
|
+
display: 'flex',
|
79
|
+
justifyContent: 'center',
|
80
|
+
alignItems: 'center'
|
81
|
+
}
|
82
|
+
},
|
83
|
+
skeletonTextInputWrapper: {
|
84
|
+
root: {
|
85
|
+
width: 80,
|
86
|
+
height: 16,
|
87
|
+
borderRadius: 4,
|
88
|
+
marginLeft: 16
|
89
|
+
}
|
90
|
+
},
|
91
|
+
skeletonLabelWrapper: {
|
92
|
+
root: {
|
93
|
+
minHeight: 42,
|
94
|
+
width: '100%',
|
95
|
+
borderWidth: 0
|
96
|
+
}
|
97
|
+
},
|
56
98
|
floatingLabel: {},
|
57
99
|
activeFloatingLabel: {}
|
58
100
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","flexDirection","text","fontSize","input","paddingTop","paddingBottom","paddingLeft","paddingRight","flex","transparent","labelWrapper","primaryColor","borderTopLeftRadius","borderBottomLeftRadius","width","label","marginVertical","color","primaryContrastColor","textAlignVertical","textAlign","fontWeight","fontFamily","baseFont","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","inputPlaceholderColor","floatingLabel","activeFloatingLabel","OS","borderTopRightRadius","borderBottomRightRadius","inputDisabledBgColor","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["currency.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Platform } from 'react-native';\n\nexport type WmCurrencyStyles = BaseStyles & {\n label: AllStyle;\n invalid: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n placeholderText: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-currency';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCurrencyStyles = defineStyles({\n root: {\n minHeight: 42,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n flexDirection: 'row'\n },\n text: {\n fontSize: 16\n },\n input : {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16,\n flex: 1,\n borderWidth: 1,\n borderColor: themeVariables.transparent,\n borderStyle: 'solid'\n },\n labelWrapper: {\n minHeight: 42,\n backgroundColor: themeVariables.primaryColor,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n width: 48,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16\n },\n label: {\n marginVertical: 0.7,\n color: themeVariables.primaryContrastColor,\n textAlignVertical: 'center',\n textAlign: 'center',\n fontWeight: 'bold',\n fontFamily: themeVariables.baseFont,\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n labelWrapper:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n textAlign: 'left',\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AACxF,SAASC,QAAQ,QAAQ,cAAc;
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","flexDirection","text","fontSize","input","paddingTop","paddingBottom","paddingLeft","paddingRight","flex","transparent","labelWrapper","primaryColor","borderTopLeftRadius","borderBottomLeftRadius","width","display","justifyContent","label","marginVertical","color","primaryContrastColor","textAlignVertical","textAlign","fontWeight","fontFamily","baseFont","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","inputPlaceholderColor","skeleton","height","skeletonLabel","alignItems","skeletonTextInputWrapper","marginLeft","skeletonLabelWrapper","floatingLabel","activeFloatingLabel","OS","borderTopRightRadius","borderBottomRightRadius","inputDisabledBgColor","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["currency.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Platform } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmCurrencyStyles = BaseStyles & {\n label: AllStyle;\n invalid: AllStyle;\n focused: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n placeholderText: AllStyle;\n skeleton: WmSkeletonStyles;\n skeletonLabel: WmSkeletonStyles;\n skeletonTextInputWrapper: WmSkeletonStyles;\n skeletonLabelWrapper: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-currency';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCurrencyStyles = defineStyles({\n root: {\n minHeight: 42,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n flexDirection: 'row'\n },\n text: {\n fontSize: 16\n },\n input : {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16,\n flex: 1,\n borderWidth: 1,\n borderColor: themeVariables.transparent,\n borderStyle: 'solid'\n },\n labelWrapper: {\n minHeight: 42,\n backgroundColor: themeVariables.primaryColor,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n width: 48,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingRight: 16,\n display: 'flex',\n justifyContent: 'center'\n },\n label: {\n marginVertical: 0.7,\n color: themeVariables.primaryContrastColor,\n textAlignVertical: 'center',\n textAlign: 'center',\n fontWeight: 'bold',\n fontFamily: themeVariables.baseFont,\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root:{\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16,\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n width: '100%',\n height: 40\n },\n } as any as WmSkeletonStyles,\n skeletonLabel: {\n root: {\n width:20,\n height:28,\n borderRadius:4,\n display:'flex',\n justifyContent:'center',\n alignItems:'center'\n }\n } as any as WmSkeletonStyles,\n skeletonTextInputWrapper: {\n root: {\n width:80,\n height:16,\n borderRadius:4,\n marginLeft:16\n }\n } as any as WmSkeletonStyles,\n skeletonLabelWrapper: {\n root: {\n minHeight:42,\n width:'100%',\n borderWidth:0,\n }\n } as any as WmSkeletonStyles,\n floatingLabel: {},\n activeFloatingLabel: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n labelWrapper:{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6,\n }\n }:{});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n textAlign: 'left',\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AACxF,SAASC,QAAQ,QAAQ,cAAc;AAgBvC,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjDO,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,aAAa,EAAE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a,EAAE;MACbM,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACR9C,QAAQ,EAAE,EAAE;MACZoB,SAAS,EAAE,MAAM;MACjBH,KAAK,EAAE/B,cAAc,CAAC6D;IACxB,CAAC;IACDR,mBAAmB,EAAE;MACnBtB,KAAK,EAAE/B,cAAc,CAAC8D;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -20,6 +20,7 @@ import AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.
|
|
20
20
|
import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';
|
21
21
|
import WmDatePickerModal from './wheelpickermodal/date/date-picker-modal.component';
|
22
22
|
import WmTimePickerModal from './wheelpickermodal/time/time-picker-modal.component';
|
23
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
23
24
|
export class BaseDatetimeState extends BaseComponentState {
|
24
25
|
constructor(...args) {
|
25
26
|
super(...args);
|
@@ -98,7 +99,6 @@ export default class BaseDatetime extends BaseComponent {
|
|
98
99
|
switch (name) {
|
99
100
|
//@ts-ignore
|
100
101
|
case 'datavalue':
|
101
|
-
this.invokeEventCallback('onChange', [null, this, $new, $old]);
|
102
102
|
this.prevDatavalue = $old;
|
103
103
|
if (props.datavalue === CURRENT_TIME) {
|
104
104
|
this.monitorAndUpdateCurrentTime();
|
@@ -166,16 +166,18 @@ export default class BaseDatetime extends BaseComponent {
|
|
166
166
|
}
|
167
167
|
}
|
168
168
|
onDateChange($event, date) {
|
169
|
+
const prevDate = this.format(this.state.dateValue, this.momentPattern(this.state.props.outputformat)) || undefined;
|
169
170
|
this.validate(date);
|
170
171
|
this.modes.shift();
|
172
|
+
const newDate = this.format(date, this.momentPattern(this.state.props.outputformat));
|
171
173
|
this.updateState({
|
172
174
|
isFocused: false,
|
173
175
|
showDatePicker: !!this.modes.length,
|
174
176
|
props: {
|
175
|
-
datavalue:
|
177
|
+
datavalue: newDate,
|
176
178
|
timestamp: this.format(date, 'timestamp')
|
177
179
|
}
|
178
|
-
});
|
180
|
+
}, () => this.invokeEventCallback('onChange', [null, this, newDate, prevDate]));
|
179
181
|
}
|
180
182
|
onBlur() {
|
181
183
|
if (Platform.OS === 'web') {
|
@@ -348,6 +350,19 @@ export default class BaseDatetime extends BaseComponent {
|
|
348
350
|
}
|
349
351
|
return 'wm-sl-l sl-calendar';
|
350
352
|
}
|
353
|
+
renderSkeleton(props) {
|
354
|
+
return this.state.props.floatinglabel || this.state.displayValue || this.state.props.placeholder ? /*#__PURE__*/React.createElement(View, {
|
355
|
+
style: {
|
356
|
+
display: 'flex',
|
357
|
+
...this.styles.container,
|
358
|
+
...this.styles.root
|
359
|
+
}
|
360
|
+
}, createSkeleton(this.theme, {}, {
|
361
|
+
...this.styles.skeleton.root
|
362
|
+
}), createSkeleton(this.theme, {}, {
|
363
|
+
...this.styles.skeleton.icon
|
364
|
+
})) : null;
|
365
|
+
}
|
351
366
|
renderWidget(props) {
|
352
367
|
var _props$floatinglabel;
|
353
368
|
const is12HourFormat = (props === null || props === void 0 ? void 0 : props.datepattern) && /hh:mm(:ss|:sss)? a/.test(props.datepattern);
|
@@ -420,7 +435,10 @@ export default class BaseDatetime extends BaseComponent {
|
|
420
435
|
isFocused: false,
|
421
436
|
showDatePickerModal: false
|
422
437
|
}, () => this.onBlur());
|
423
|
-
}
|
438
|
+
},
|
439
|
+
dateheadertitle: props.dateheadertitle,
|
440
|
+
dateconfirmationtitle: props.dateconfirmationtitle,
|
441
|
+
datecanceltitle: props.datecanceltitle
|
424
442
|
}), Platform.OS !== 'web' && props.iswheelpicker && this.state.showTimePickerModal && /*#__PURE__*/React.createElement(WmTimePickerModal, {
|
425
443
|
selectedDateTime: this.state.dateValue,
|
426
444
|
is24Hour: is24Hour,
|
@@ -445,7 +463,10 @@ export default class BaseDatetime extends BaseComponent {
|
|
445
463
|
this.onBlur();
|
446
464
|
this.modes.shift();
|
447
465
|
});
|
448
|
-
}
|
466
|
+
},
|
467
|
+
timeheadertitle: props.timeheadertitle,
|
468
|
+
timeconfirmationtitle: props.timeconfirmationtitle,
|
469
|
+
timecanceltitle: props.timecanceltitle
|
449
470
|
})));
|
450
471
|
}
|
451
472
|
}
|