@wavemaker/app-rn-runtime 11.9.2-rc.193 → 11.9.3-1.5914
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/actions/notification-action.js +1 -1
- app-rn-runtime/actions/timer-action.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.props.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.props.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +62 -48
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +2 -2
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +7 -9
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +2 -2
- app-rn-runtime/components/advanced/login/login.props.js +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +2 -2
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.props.js +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +2 -2
- app-rn-runtime/components/advanced/webview/webview.props.js +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js +1 -1
- app-rn-runtime/components/basic/animatedview.component.js +2 -2
- app-rn-runtime/components/basic/audio/audio.component.js +1 -1
- app-rn-runtime/components/basic/audio/audio.props.js +1 -1
- app-rn-runtime/components/basic/button/button.component.js +1 -1
- app-rn-runtime/components/basic/button/button.props.js +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.props.js +1 -1
- app-rn-runtime/components/basic/custom/custom.props.js +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +2 -2
- app-rn-runtime/components/basic/icon/icon.props.js +1 -1
- app-rn-runtime/components/basic/label/label.component.js +2 -2
- app-rn-runtime/components/basic/label/label.props.js +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +1 -1
- app-rn-runtime/components/basic/lottie/lottie.props.js +1 -1
- app-rn-runtime/components/basic/message/message.component.js +2 -2
- app-rn-runtime/components/basic/message/message.props.js +1 -1
- app-rn-runtime/components/basic/modal/modal.props.js +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +12 -6
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.props.js +2 -1
- app-rn-runtime/components/basic/picture/picture.props.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.props.js +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +2 -2
- app-rn-runtime/components/basic/progress-circle/progress-circle.props.js +1 -1
- app-rn-runtime/components/basic/search/local-data-provider.js +1 -1
- app-rn-runtime/components/basic/search/search.component.js +5 -5
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +2 -2
- app-rn-runtime/components/basic/spinner/spinner.props.js +1 -1
- app-rn-runtime/components/basic/tooltip/tooltip.props.js +1 -1
- app-rn-runtime/components/basic/video/video.component.js +101 -24
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.props.js +8 -1
- app-rn-runtime/components/basic/video/video.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -2
- app-rn-runtime/components/chart/area-chart/area-chart.props.js +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +1 -1
- app-rn-runtime/components/chart/basechart.component.js +1 -1
- app-rn-runtime/components/chart/basechart.props.js +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.props.js +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.props.js +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -2
- app-rn-runtime/components/chart/pie-chart/pie-chart.props.js +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +2 -2
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +2 -2
- app-rn-runtime/components/container/accordion/accordion.props.js +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.props.js +1 -1
- app-rn-runtime/components/container/container.component.js +2 -2
- app-rn-runtime/components/container/container.props.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.props.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.props.js +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.props.js +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.props.js +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +4 -4
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js +1 -1
- app-rn-runtime/components/container/partial-host.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +31 -17
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js +2 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +5 -4
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js +2 -1
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +1 -1
- app-rn-runtime/components/container/tile/tile.props.js +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +4 -4
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js +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 +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.props.js +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.props.js +1 -1
- app-rn-runtime/components/data/card/card.component.js +1 -1
- app-rn-runtime/components/data/card/card.props.js +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.props.js +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.props.js +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -2
- app-rn-runtime/components/data/form/form-field/form-field.props.js +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.props.js +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -1
- app-rn-runtime/components/data/form/form.props.js +1 -1
- app-rn-runtime/components/data/list/list-action-template/list-action-template.props.js +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -1
- app-rn-runtime/components/data/list/list.component.js +13 -3
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -1
- app-rn-runtime/components/data/liveform/liveform.component.js +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.props.js +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +1 -1
- app-rn-runtime/components/device/camera/camera.props.js +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.component.js +1 -1
- app-rn-runtime/components/dialogs/alertdialog/alertdialog.props.js +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.component.js +1 -1
- app-rn-runtime/components/dialogs/confirmdialog/confirmdialog.props.js +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +2 -2
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.props.js +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.props.js +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.props.js +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.component.js +1 -1
- app-rn-runtime/components/input/basedataset/basedataset.props.js +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +11 -5
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.props.js +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
- app-rn-runtime/components/input/calendar/calendar.props.js +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/calendar/views/month-view.js +2 -2
- app-rn-runtime/components/input/calendar/views/month-view.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +2 -2
- app-rn-runtime/components/input/checkbox/checkbox.props.js +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +2 -2
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +33 -5
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.props.js +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +2 -2
- app-rn-runtime/components/input/currency/currency.props.js +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +2 -2
- app-rn-runtime/components/input/epoch/date-picker.component.js +2 -2
- app-rn-runtime/components/input/epoch/date-picker.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -1
- app-rn-runtime/components/input/epoch/time/time.props.js +1 -1
- app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +1 -1
- app-rn-runtime/components/input/epoch/wheel-time-picker.component.js +1 -1
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js +1 -1
- app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.props.js +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -1
- app-rn-runtime/components/input/number/number.component.js +2 -2
- app-rn-runtime/components/input/number/number.props.js +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +2 -2
- app-rn-runtime/components/input/radioset/radioset.props.js +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +1 -1
- app-rn-runtime/components/input/rating/rating.props.js +1 -1
- app-rn-runtime/components/input/select/select.component.js +3 -3
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.props.js +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +4 -4
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.props.js +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +1 -1
- app-rn-runtime/components/input/switch/switch.props.js +1 -1
- app-rn-runtime/components/input/text/text.component.js +1 -1
- app-rn-runtime/components/input/text/text.props.js +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +2 -2
- app-rn-runtime/components/input/toggle/toggle.props.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.component.js +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +1 -1
- app-rn-runtime/components/navigation/menu/menu.props.js +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.props.js +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -2
- app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +2 -2
- app-rn-runtime/components/navigation/popover/popover.props.js +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.props.js +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +1 -1
- app-rn-runtime/components/page/page.component.js +2 -2
- app-rn-runtime/components/page/partial-container/partial-container.props.js +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +3 -3
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -1
- app-rn-runtime/core/base.component.js +2 -2
- app-rn-runtime/core/components/textinput.component.js +1 -1
- app-rn-runtime/core/constant.service.js +1 -1
- app-rn-runtime/core/event-notifier.js +1 -1
- app-rn-runtime/core/fixed-view.component.js +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +1 -1
- app-rn-runtime/core/key.extractor.js +1 -1
- app-rn-runtime/core/logger.js +1 -1
- app-rn-runtime/core/network.service.js +1 -1
- app-rn-runtime/core/props.provider.js +1 -1
- app-rn-runtime/core/scroll-view.component.js +2 -2
- app-rn-runtime/core/storage.service.js +1 -1
- app-rn-runtime/core/tappable.component.js +2 -2
- app-rn-runtime/core/viewport.js +1 -1
- app-rn-runtime/core/wm-component-tree.js +1 -1
- app-rn-runtime/gestures/swipe.animation.js +1 -1
- app-rn-runtime/package.json +43 -44
- app-rn-runtime/runtime/App.js +13 -5
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +6 -2
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +2 -2
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +1 -1
- app-rn-runtime/runtime/base-prefab.component.js +1 -1
- app-rn-runtime/runtime/memo.component.js +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js +1 -1
- app-rn-runtime/runtime/services/app-display-manager.service.js +1 -1
- app-rn-runtime/runtime/services/app-i18n.service.js +2 -1
- app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js +1 -1
- app-rn-runtime/runtime/services/device/camera-service.js +10 -10
- app-rn-runtime/runtime/services/device/camera-service.js.map +1 -1
- app-rn-runtime/runtime/services/device/permissions.js +2 -2
- app-rn-runtime/runtime/services/device/permissions.js.map +1 -1
- app-rn-runtime/runtime/services/device/scan-service.js +35 -9
- app-rn-runtime/runtime/services/device/scan-service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js +1 -1
- app-rn-runtime/runtime/watcher.js +1 -1
- app-rn-runtime/styles/background.component.js +2 -2
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/style-props.js +1 -1
- app-rn-runtime/styles/theme.js +1 -1
- app-rn-runtime/styles/theme.variables.js +2 -2
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/base-variable.js +1 -1
- app-rn-runtime/variables/device/device/network-info.operation.js +1 -1
- app-rn-runtime/variables/live-variable.js +1 -1
- app-rn-runtime/variables/model-variable.js +1 -1
- app-rn-runtime/variables/service-variable.js +1 -1
- app-rn-runtime/variables/utils/inflight-queue.js +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["includes","intersection","isNaN","isFinite","toArray","isNil","BaseComponent","BaseComponentState","DEFAULT_CLASS","Platform","countDecimalDigits","validateField","BaseNumberState","constructor","args","_defineProperty","BaseNumberComponent","props","defaultClass","defaultProps","defaultState","DECIMAL","GROUP","onChange","event","state","updateon","updateDatavalue","target","value","focus","_this$widgetRef","widgetRef","validateOnDevice","type","_value$match","isCurrencyField","isValidText","test","Number","match","length","onChangeText","shouldFormateToNumber","newValue","parseNumber","replace","isValidTextOnDevice","decimalPlacesInNumber","decimalPlaces","updateState","textValue","validate","invokeChange","e","OS","cursor","selectionStart","setState","validationObj","isValid","errorType","handleValidation","regexp","condition","RegExp","val","parts","split","NaN","number","join","decimal","sum","parseFloat","toFixed","Object","is","source","model","toString","oldValue","datavalue","validNumber","isValidNumber","invokeEventCallback","proxy","Promise","resolve","hastwowaybinding","setProp","setTimeout","then","onFieldChange","onBlur","isDisplayValuePresent","textVal","newVal","undefined","triggerValidation","oldVal","isInputFocused","onFocus","countDecimals","decimalValue","validateInputEntry","$event","ctrlKey","key","validity","inputValue","step","preventDefault","getValueInRange","minvalue","maxvalue","required","isInteger","resetValidations","onPropertyChange","name","$new","$old","isDefault","bind","displayValue"],"sources":["basenumber.component.ts"],"sourcesContent":["import { includes, intersection, isNaN, isFinite, toArray, isNil } from 'lodash';\nimport BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\nimport { BaseComponent, BaseComponentState } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { BaseNumberStyles } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.styles';\nimport { DEFAULT_CLASS } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles\";\nimport { Platform, TextInput } from 'react-native';\nimport { countDecimalDigits, validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseNumberState <T extends BaseNumberProps> extends BaseComponentState<T> {\n isValid: boolean = true;\n isInputFocused: boolean = false;\n textValue: string = '';\n isDefault = false;\n errorType = '';\n}\n\nexport abstract class BaseNumberComponent< T extends BaseNumberProps, S extends BaseNumberState<T>, L extends BaseNumberStyles> extends BaseComponent<T, S, L> {\n private DECIMAL;\n private GROUP;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n this.DECIMAL = '.';\n this.GROUP = ',';\n }\n\n onChange(event: any) {\n if (this.state.props.updateon === 'default') {\n this.updateDatavalue(event.target.value, event);\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n validateOnDevice(value: string, type: 'number' | 'currency') {\n const isCurrencyField = type === 'currency';\n let isValidText = true;\n\n // * no alphabets except E, may contain E only once\n if (/[a-df-zA-DF-Z]/.test(value) || !/^[^eE]*[eE]?[^eE]*$/.test(value)) {\n isValidText = false;\n }\n\n // * currency only: check for negative number\n if (isCurrencyField && (Number(value) < 0 || /-/g.test(value))) {\n isValidText = false;\n }\n\n // * number only: not more than one minus and doesn't end with minus (-)\n if (!isCurrencyField && (Number(value.match(/-/g)?.length) > 1) || /\\w-/.test(value)) {\n isValidText = false;\n }\n\n // * check for more than one decimal point\n if (/^\\d*\\.\\d*\\..*$/.test(value)) {\n isValidText = false;\n }\n\n // * check for spaces and comma\n if (/[\\s,]/.test(value)) {\n isValidText = false;\n }\n\n return isValidText;\n }\n\n onChangeText(value: string, type: 'number' | 'currency', shouldFormateToNumber?: boolean) {\n const newValue = shouldFormateToNumber ? `${this.parseNumber(value.replace(/[^0-9.]/g, ''))}` : value;\n const isValidTextOnDevice = this.validateOnDevice(newValue, type);\n if (!isValidTextOnDevice) {\n return;\n }\n\n const decimalPlacesInNumber = countDecimalDigits(newValue);\n\n if (this.props.decimalPlaces < decimalPlacesInNumber) {\n return;\n }\n\n this.updateState({\n textValue: newValue\n } as S, () => {\n if (this.state.props.updateon === 'default') {\n this.validate(newValue);\n this.updateDatavalue(newValue, null);\n }\n }\n );\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.setState({ textValue: e.target.value });\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as S);\n\n }\n\n handleValidation(value: any) {\n const props = this.state.props;\n if (props.regexp) {\n const condition = new RegExp(props.regexp, 'g');\n return condition.test(value);\n }\n return true;\n }\n\n /**\n * Method parses the Localized number(string) to a valid number.\n * if the string dose not result to a valid number then returns NaN.\n * @param {string} val Localized number.\n * @returns {number}\n */\n private parseNumber(val: string): any {\n // splits string into two parts. decimal and number.\n const parts = val.split(this.DECIMAL);\n if (!parts.length) {\n return;\n }\n if (parts.length > 2) {\n return NaN;\n }\n // If number have decimal point and not have a decimal value then return.\n if (parts[1] === '') {\n return NaN;\n }\n // replaces all group separators form the number.\n const number = Number(parts[0].split(this.GROUP).join(''));\n const decimal = Number(`0.${parts[1] || 0}`);\n if (Number.isNaN(number) || Number.isNaN(decimal)) {\n return NaN;\n }\n const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;\n // if the number is negative then calculate the number as number - decimal\n // Ex: number = -123 and decimal = 0.45 then number - decimal = -123-045 = -123.45\n // If entered number is -0.1 to -0.9 then the number is -0 and decimal is 0.1 to 0.9. Now calaculate the number as number-decimal\n // Ex: number = -0 and decimal = 0.1 then number-decimal = -0-0.1 = -0.1\n if (number === 0) {\n return Object.is(0, number) ? sum : number - decimal;\n }\n return number > 0 ? sum : number - decimal;\n }\n\n updateDatavalue(value: any, event?: any, source?: any) {\n const model = value && this.parseNumber(value.toString());\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (value === oldValue) {\n return;\n }\n const validNumber = this.isValidNumber(model) || value === oldValue + '.';\n if (!validNumber) {\n this.invokeEventCallback('onError', [ event, this.proxy, value, oldValue ]);\n return;\n }\n\n new Promise((resolve) => {\n if (props.hastwowaybinding) {\n this.setProp(\"datavalue\", value);\n setTimeout(()=>this.updateState({props: { \"datavalue\": value }} as S), 0);\n resolve(true);\n } else {\n this.updateState({\n props: {\n datavalue: model || Number(value)\n }\n } as S, () => resolve(true));\n }\n }).then(() => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, model, oldValue]);\n if (source === 'blur') {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n });\n }\n\n onBlur(event: any, isDisplayValuePresent?: boolean) {\n const textVal = this.state.textValue || '';\n let newVal = isDisplayValuePresent ? textVal : event.target.value || textVal;\n this.validate(newVal);\n if (newVal === '' || newVal == undefined) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n },10)\n }\n if (this.state.props.updateon === 'blur' || this.state.props.updateon === 'default') {\n let oldVal = this.state.props.datavalue || '';\n if (oldVal !== newVal && this.state.props.updateon === 'blur') {\n this.updateDatavalue(newVal, event, 'blur');\n } else {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n this.setState({ isInputFocused: false});\n }\n }\n\n onFocus(event: any) {\n this.invokeEventCallback('onFocus', [ event, this.proxy]);\n this.setState({ isInputFocused: true});\n }\n\n /**\n * returns the number of decimal places a number have.\n * @param value: number\n * @returns {number}\n */\n private countDecimals(value: any) {\n if (value && ((value % 1) !== 0)) {\n const decimalValue = value.toString().split('.')[1];\n return decimalValue && decimalValue.length;\n }\n return 0;\n }\n\n public validateInputEntry($event: any) {\n const props = this.state.props;\n\n // allow actions if control key is pressed or if backspace is pressed. (for Mozilla).\n if ($event.ctrlKey || includes(['Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Enter', 'Delete'], $event.key)) {\n return;\n }\n\n const validity = new RegExp(`^[\\\\d\\\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, 'i');\n const inputValue = $event.target.value;\n // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).\n if (inputValue && this.countDecimals(props.step) && (this.countDecimals(inputValue) >= this.countDecimals(props.step))) {\n $event.preventDefault();\n }\n // validates if user entered an invalid character.\n if (!validity.test($event.key)) {\n $event.preventDefault();\n }\n // a decimal value can be entered only once in the input.\n if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) {\n $event.preventDefault();\n }\n // 'e' can be entered only once in the input.\n if (intersection(toArray(inputValue), ['e', 'E']).length && includes('eE', $event.key)) {\n $event.preventDefault();\n }\n if ((includes(inputValue, '+') || includes(inputValue, '-')) && ($event.key === '+' || $event.key === '-')) {\n $event.preventDefault();\n }\n this.invokeEventCallback('onKeypress', [ $event, this.proxy]);\n }\n\n /**\n * returns a valid number by validating the minimum and maximum values.\n * @param {number} value\n * @returns {number}\n */\n private getValueInRange(value: number): number {\n const props = this.state.props;\n if (props.minvalue && !isNil(value) && !isNaN(props.minvalue) && value < props.minvalue) {\n this.updateState({ errorType: 'minvalue'} as S);\n return props.minvalue;\n }\n if (props.maxvalue && !isNil(value) && !isNaN(props.maxvalue) && value > props.maxvalue) {\n this.updateState({ errorType: 'maxvalue'} as S);\n return props.maxvalue;\n }\n return value;\n }\n\n /**\n * Adds validations for the number before updating the widget model. like validating min and max value for the widget.\n * @param {number} val number to be validated\n * @returns {number}\n */\n private isValidNumber(val: number): boolean {\n const props = this.state.props;\n\n //empty number widget should not show validation error when required is false\n // @ts-ignore\n if (this.state.props.required === false && val === '') {\n return true;\n }\n // id number is infinite then consider it as invalid value\n if (isNaN(val) || !isFinite(val) || (!Number.isInteger(props.step) &&\n this.countDecimals(val) > this.countDecimals(props.step))) {\n this.updateState({\n isValid: false,\n } as S);\n return false;\n }\n if (val !== this.getValueInRange(val)) {\n this.updateState({\n isValid: false,\n } as S);\n return true;\n }\n this.resetValidations();\n return true;\n }\n\n // resets all the flags related to the widget's validation.\n protected resetValidations() {\n this.updateState({\n isValid: true,\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'minvalue':\n case 'maxvalue':\n if ($new|| $old) {\n this.isValidNumber($new);\n }\n break;\n case 'datavalue':\n this.updateState({\n textValue: $new,\n } as S);\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as S, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n break;\n case 'displayValue': \n this.updateState({\n displayValue: $new,\n } as any)\n }\n }\n}\n"],"mappings":";;;AAAA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,QAAQ,QAAQ;AAEhF,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,SAASC,aAAa,QAAQ,wEAAwE;AACtG,SAASC,QAAQ,QAAmB,cAAc;AAClD,SAASC,kBAAkB,EAAEC,aAAa,QAAQ,sCAAsC;A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,KAAK,UAAU;MACf,KAAK,UAAU;QACb,IAAIC,IAAI,IAAGC,IAAI,EAAE;UACf,IAAI,CAACtC,aAAa,CAACqC,IAAI,CAAC;QAC1B;QACA;MACF,KAAK,WAAW;QACd,IAAI,CAACvE,WAAW,CAAC;UACfC,SAAS,EAAEsE;QACb,CAAM,CAAC;QACP,MAAME,SAAS,GAAG,IAAI,CAAClG,KAAK,CAACkG,SAAS;QACtC,IAAIA,SAAS,EAAE;UACb,IAAI,CAACzE,WAAW,CAAC;YAAEyE,SAAS,EAAE;UAAM,CAAC,EAAO,IAAI,CAAC1G,KAAK,CAAC4E,aAAa,IAAI,IAAI,CAAC5E,KAAK,CAAC4E,aAAa,CAAC+B,IAAI,CAAC,IAAI,EAAE,WAAW,EAAEH,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC,CAAC;QAClJ,CAAC,MAAM;UACL,IAAI,CAAC1G,KAAK,CAAC4E,aAAa,IAAI,IAAI,CAAC5E,KAAK,CAAC4E,aAAa,CAAC,WAAW,EAAE4B,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAC;QAC1F;QACA;MACF,KAAK,cAAc;QACjB,IAAI,CAACzE,WAAW,CAAC;UACf2E,YAAY,EAAEJ;QAChB,CAAQ,CAAC;IACb;EACF;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["includes","intersection","isNaN","isFinite","toArray","isNil","BaseComponent","BaseComponentState","DEFAULT_CLASS","Platform","countDecimalDigits","validateField","BaseNumberState","constructor","args","_defineProperty","BaseNumberComponent","props","defaultClass","defaultProps","defaultState","DECIMAL","GROUP","onChange","event","state","updateon","updateDatavalue","target","value","focus","_this$widgetRef","widgetRef","validateOnDevice","type","_value$match","isCurrencyField","isValidText","test","Number","match","length","onChangeText","shouldFormateToNumber","newValue","parseNumber","replace","isValidTextOnDevice","decimalPlacesInNumber","decimalPlaces","updateState","textValue","validate","invokeChange","e","OS","cursor","selectionStart","setState","validationObj","isValid","errorType","handleValidation","regexp","condition","RegExp","val","parts","split","NaN","number","join","decimal","sum","parseFloat","toFixed","Object","is","source","model","toString","oldValue","datavalue","validNumber","isValidNumber","invokeEventCallback","proxy","Promise","resolve","hastwowaybinding","newProps","setImmediate","setProp","then","onFieldChange","onBlur","isDisplayValuePresent","textVal","newVal","undefined","setTimeout","triggerValidation","oldVal","isInputFocused","onFocus","countDecimals","decimalValue","validateInputEntry","$event","ctrlKey","key","validity","inputValue","step","preventDefault","getValueInRange","minvalue","maxvalue","required","isInteger","resetValidations","onPropertyChange","name","$new","$old","isDefault","bind","displayValue"],"sources":["basenumber.component.ts"],"sourcesContent":["import { includes, intersection, isNaN, isFinite, toArray, isNil } from 'lodash';\nimport BaseNumberProps from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.props';\nimport { BaseComponent, BaseComponentState } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { BaseNumberStyles } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.styles';\nimport { DEFAULT_CLASS } from \"@wavemaker/app-rn-runtime/components/navigation/basenav/basenav.styles\";\nimport { Platform, TextInput } from 'react-native';\nimport { countDecimalDigits, validateField } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class BaseNumberState <T extends BaseNumberProps> extends BaseComponentState<T> {\n isValid: boolean = true;\n isInputFocused: boolean = false;\n textValue: string = '';\n isDefault = false;\n errorType = '';\n}\n\nexport abstract class BaseNumberComponent< T extends BaseNumberProps, S extends BaseNumberState<T>, L extends BaseNumberStyles> extends BaseComponent<T, S, L> {\n private DECIMAL;\n private GROUP;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n this.DECIMAL = '.';\n this.GROUP = ',';\n }\n\n onChange(event: any) {\n if (this.state.props.updateon === 'default') {\n this.updateDatavalue(event.target.value, event);\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n validateOnDevice(value: string, type: 'number' | 'currency') {\n const isCurrencyField = type === 'currency';\n let isValidText = true;\n\n // * no alphabets except E, may contain E only once\n if (/[a-df-zA-DF-Z]/.test(value) || !/^[^eE]*[eE]?[^eE]*$/.test(value)) {\n isValidText = false;\n }\n\n // * currency only: check for negative number\n if (isCurrencyField && (Number(value) < 0 || /-/g.test(value))) {\n isValidText = false;\n }\n\n // * number only: not more than one minus and doesn't end with minus (-)\n if (!isCurrencyField && (Number(value.match(/-/g)?.length) > 1) || /\\w-/.test(value)) {\n isValidText = false;\n }\n\n // * check for more than one decimal point\n if (/^\\d*\\.\\d*\\..*$/.test(value)) {\n isValidText = false;\n }\n\n // * check for spaces and comma\n if (/[\\s,]/.test(value)) {\n isValidText = false;\n }\n\n return isValidText;\n }\n\n onChangeText(value: string, type: 'number' | 'currency', shouldFormateToNumber?: boolean) {\n const newValue = shouldFormateToNumber ? `${this.parseNumber(value.replace(/[^0-9.]/g, ''))}` : value;\n const isValidTextOnDevice = this.validateOnDevice(newValue, type);\n if (!isValidTextOnDevice) {\n return;\n }\n\n const decimalPlacesInNumber = countDecimalDigits(newValue);\n\n if (this.props.decimalPlaces < decimalPlacesInNumber) {\n return;\n }\n\n this.updateState({\n textValue: newValue\n } as S, () => {\n if (this.state.props.updateon === 'default') {\n this.validate(newValue);\n this.updateDatavalue(newValue, null);\n }\n }\n );\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.setState({ textValue: e.target.value });\n }\n }\n\n validate(value: any) {\n const validationObj = validateField(this.state.props, value);\n this.updateState({\n isValid: validationObj.isValid,\n errorType: validationObj.errorType\n } as S);\n\n }\n\n handleValidation(value: any) {\n const props = this.state.props;\n if (props.regexp) {\n const condition = new RegExp(props.regexp, 'g');\n return condition.test(value);\n }\n return true;\n }\n\n /**\n * Method parses the Localized number(string) to a valid number.\n * if the string dose not result to a valid number then returns NaN.\n * @param {string} val Localized number.\n * @returns {number}\n */\n private parseNumber(val: string): any {\n // splits string into two parts. decimal and number.\n const parts = val.split(this.DECIMAL);\n if (!parts.length) {\n return;\n }\n if (parts.length > 2) {\n return NaN;\n }\n // If number have decimal point and not have a decimal value then return.\n if (parts[1] === '') {\n return NaN;\n }\n // replaces all group separators form the number.\n const number = Number(parts[0].split(this.GROUP).join(''));\n const decimal = Number(`0.${parts[1] || 0}`);\n if (Number.isNaN(number) || Number.isNaN(decimal)) {\n return NaN;\n }\n const sum = parts.length > 1 ? parseFloat((number + decimal).toFixed(parts[1].length)) : number + decimal;\n // if the number is negative then calculate the number as number - decimal\n // Ex: number = -123 and decimal = 0.45 then number - decimal = -123-045 = -123.45\n // If entered number is -0.1 to -0.9 then the number is -0 and decimal is 0.1 to 0.9. Now calaculate the number as number-decimal\n // Ex: number = -0 and decimal = 0.1 then number-decimal = -0-0.1 = -0.1\n if (number === 0) {\n return Object.is(0, number) ? sum : number - decimal;\n }\n return number > 0 ? sum : number - decimal;\n }\n\n updateDatavalue(value: any, event?: any, source?: any) {\n const model = value && this.parseNumber(value.toString());\n const props = this.state.props;\n const oldValue = props.datavalue;\n if (value === oldValue) {\n return;\n }\n const validNumber = this.isValidNumber(model) || value === oldValue + '.';\n if (!validNumber) {\n this.invokeEventCallback('onError', [ event, this.proxy, value, oldValue ]);\n return;\n }\n\n new Promise((resolve) => {\n if (props.hastwowaybinding) {\n const newProps: any = {\n props: {\n datavalue: model || Number(value)\n }\n }\n if(this.state.props.updateon === 'blur'){\n newProps.textValue = model || Number(value)\n }\n\n this.updateState({...newProps} as S)\n\n setImmediate(()=> this.setProp(\"datavalue\", value));\n resolve(true);\n } else {\n this.updateState({\n props: {\n datavalue: model || Number(value)\n }\n } as S, () => resolve(true));\n }\n }).then(() => {\n !this.props.onFieldChange && value !== oldValue && this.invokeEventCallback('onChange', [event, this.proxy, model, oldValue]);\n if (source === 'blur') {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n });\n }\n\n onBlur(event: any, isDisplayValuePresent?: boolean) {\n const textVal = this.state.textValue || '';\n let newVal = isDisplayValuePresent ? textVal : event.target.value || textVal;\n this.validate(newVal);\n if (newVal === '' || newVal == undefined) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n },10)\n }\n if (this.state.props.updateon === 'blur' || this.state.props.updateon === 'default') {\n let oldVal = this.state.props.datavalue || '';\n if (oldVal !== newVal && this.state.props.updateon === 'blur') {\n this.updateDatavalue(newVal, event, 'blur');\n } else {\n this.invokeEventCallback('onBlur', [event, this.proxy]);\n }\n this.setState({ isInputFocused: false});\n }\n }\n\n onFocus(event: any) {\n this.invokeEventCallback('onFocus', [ event, this.proxy]);\n this.setState({ isInputFocused: true});\n }\n\n /**\n * returns the number of decimal places a number have.\n * @param value: number\n * @returns {number}\n */\n private countDecimals(value: any) {\n if (value && ((value % 1) !== 0)) {\n const decimalValue = value.toString().split('.')[1];\n return decimalValue && decimalValue.length;\n }\n return 0;\n }\n\n public validateInputEntry($event: any) {\n const props = this.state.props;\n\n // allow actions if control key is pressed or if backspace is pressed. (for Mozilla).\n if ($event.ctrlKey || includes(['Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Enter', 'Delete'], $event.key)) {\n return;\n }\n\n const validity = new RegExp(`^[\\\\d\\\\s-,.e+${this.GROUP}${this.DECIMAL}]$`, 'i');\n const inputValue = $event.target.value;\n // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).\n if (inputValue && this.countDecimals(props.step) && (this.countDecimals(inputValue) >= this.countDecimals(props.step))) {\n $event.preventDefault();\n }\n // validates if user entered an invalid character.\n if (!validity.test($event.key)) {\n $event.preventDefault();\n }\n // a decimal value can be entered only once in the input.\n if (includes(inputValue, this.DECIMAL) && $event.key === this.DECIMAL) {\n $event.preventDefault();\n }\n // 'e' can be entered only once in the input.\n if (intersection(toArray(inputValue), ['e', 'E']).length && includes('eE', $event.key)) {\n $event.preventDefault();\n }\n if ((includes(inputValue, '+') || includes(inputValue, '-')) && ($event.key === '+' || $event.key === '-')) {\n $event.preventDefault();\n }\n this.invokeEventCallback('onKeypress', [ $event, this.proxy]);\n }\n\n /**\n * returns a valid number by validating the minimum and maximum values.\n * @param {number} value\n * @returns {number}\n */\n private getValueInRange(value: number): number {\n const props = this.state.props;\n if (props.minvalue && !isNil(value) && !isNaN(props.minvalue) && value < props.minvalue) {\n this.updateState({ errorType: 'minvalue'} as S);\n return props.minvalue;\n }\n if (props.maxvalue && !isNil(value) && !isNaN(props.maxvalue) && value > props.maxvalue) {\n this.updateState({ errorType: 'maxvalue'} as S);\n return props.maxvalue;\n }\n return value;\n }\n\n /**\n * Adds validations for the number before updating the widget model. like validating min and max value for the widget.\n * @param {number} val number to be validated\n * @returns {number}\n */\n private isValidNumber(val: number): boolean {\n const props = this.state.props;\n\n //empty number widget should not show validation error when required is false\n // @ts-ignore\n if (this.state.props.required === false && val === '') {\n return true;\n }\n // id number is infinite then consider it as invalid value\n if (isNaN(val) || !isFinite(val) || (!Number.isInteger(props.step) &&\n this.countDecimals(val) > this.countDecimals(props.step))) {\n this.updateState({\n isValid: false,\n } as S);\n return false;\n }\n if (val !== this.getValueInRange(val)) {\n this.updateState({\n isValid: false,\n } as S);\n return true;\n }\n this.resetValidations();\n return true;\n }\n\n // resets all the flags related to the widget's validation.\n protected resetValidations() {\n this.updateState({\n isValid: true,\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'minvalue':\n case 'maxvalue':\n if ($new|| $old) {\n this.isValidNumber($new);\n }\n break;\n case 'datavalue':\n this.updateState({\n textValue: $new,\n } as S);\n const isDefault = this.state.isDefault;\n if (isDefault) {\n this.updateState({ isDefault: false } as S, this.props.onFieldChange && this.props.onFieldChange.bind(this, 'datavalue', $new, $old, isDefault));\n } else {\n this.props.onFieldChange && this.props.onFieldChange('datavalue', $new, $old, isDefault);\n }\n break;\n case 'displayValue': \n this.updateState({\n displayValue: $new,\n } as any)\n }\n }\n}\n"],"mappings":";;;AAAA,SAASA,QAAQ,EAAEC,YAA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AAC;IACb;EACF;AACF","ignoreList":[]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
function _defineProperty(
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
function _defineProperty(
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import React from 'react';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
function _defineProperty(
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","minHeight","minWidth","text","color","calendarDateColor","calendar","backgroundColor","calendarBgColor","borderColor","calendarHeaderBgColor","borderWidth","borderStyle","marginTop","paddingTop","paddingBottom","elevation","calendarHeader","borderBottomWidth","weekDay","padding","weekDayText","calendarWeekDayTextColor","fontWeight","fontFamily","baseFont","fontSize","day","dayWrapper","height","borderRadius","notDayOfCurrentMonth","calendarNotCurrentMonthDateColor","opacity","monthText","calendarHeaderTextColor","yearText","today","primaryColor","todayText","calendarSelectedDayBgColor","eventDay1","calendarEventDay1Color","eventDay2","calendarEventDay2Color","eventDay3","calendarEventDay3Color","selectedDay","selectedDayText","calendarSelectedDayTextColor","prevMonthBtn","calendarPrevMonthIconColor","nextMonthBtn","calendarNextMonthIconColor","prevYearBtn","calendarPrevYearIconColor","nextYearBtn","calendarNextYearIconColor","skeleton","display","justifyContent","paddingHorizontal","alignItems","headerSkeleton","flexDirection","marginBottom","transform","rotateY"],"sources":["calendar.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 { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { TextStyle } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmCalendarStyles = BaseStyles & {\n calendar: AllStyle,\n calendarHeader: AllStyle,\n day: AllStyle,\n dayWrapper: AllStyle,\n notDayOfCurrentMonth: AllStyle,\n monthText: TextStyle,\n yearText: TextStyle,\n weekDay: AllStyle,\n today: AllStyle,\n todayText: AllStyle,\n prevMonthBtn: WmIconStyles,\n nextMonthBtn: WmIconStyles,\n prevYearBtn: WmIconStyles,\n nextYearBtn: WmIconStyles,\n selectedDay: AllStyle,\n selectedDayText: AllStyle\n eventDay1: AllStyle,\n eventDay2: AllStyle,\n eventDay3: AllStyle,\n skeleton: WmSkeletonStyles;\n headerSkeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-calendar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCalendarStyles = defineStyles<WmCalendarStyles>({\n root: {\n width: '100%',\n minHeight: 456,\n minWidth: 360\n },\n text: {\n color: themeVariables.calendarDateColor\n },\n calendar : {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderWidth: 1,\n borderStyle: 'solid',\n marginTop: 0, \n paddingTop: 0,\n paddingBottom: 0,\n elevation: 6\n },\n calendarHeader : {\n backgroundColor: themeVariables.calendarHeaderBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n paddingTop: 8,\n paddingBottom: 8\n },\n weekDay: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n padding: 2,\n },\n weekDayText: {\n color: themeVariables.calendarWeekDayTextColor,\n fontWeight: '400',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n },\n day: {\n borderColor: 'transparent',\n color: themeVariables.calendarDateColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400'\n },\n dayWrapper: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: 'transparent',\n width: 38,\n height: 38,\n borderRadius: 26\n },\n notDayOfCurrentMonth: {\n color: themeVariables.calendarNotCurrentMonthDateColor,\n fontWeight: 'normal',\n opacity: 0\n },\n monthText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n yearText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n today: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.primaryColor\n },\n todayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n eventDay1 : {\n color: themeVariables.calendarEventDay1Color\n },\n eventDay2 : {\n color: themeVariables.calendarEventDay2Color\n },\n eventDay3 : {\n color: themeVariables.calendarEventDay3Color\n },\n selectedDay: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n selectedDayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor,\n color: themeVariables.calendarSelectedDayTextColor,\n fontWeight: 'bold'\n },\n prevMonthBtn: {\n root: {\n color: themeVariables.calendarPrevMonthIconColor\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n color: themeVariables.calendarNextMonthIconColor\n }\n } as WmIconStyles,\n prevYearBtn: {\n root: {\n color: themeVariables.calendarPrevYearIconColor\n }\n } as WmIconStyles,\n nextYearBtn: {\n root: {\n color: themeVariables.calendarNextYearIconColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n display:'flex', \n justifyContent: 'center',\n backgroundColor:'#fff',\n paddingHorizontal: 8,\n alignItems: 'center',\n },\n } as any as WmSkeletonStyles ,\n headerSkeleton: {\n root: {\n width: '100%',\n display:'flex', \n flexDirection:'row', \n alignItems: 'center',\n justifyContent: 'space-around',\n marginBottom: 16\n } \n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}]\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}] \n }\n } as WmIconStyles,\n monthText: {\n padding: 2\n },\n yearText: {\n padding: 2\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MA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","ignoreList":[]}
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","minHeight","minWidth","text","color","calendarDateColor","calendar","backgroundColor","calendarBgColor","borderColor","calendarHeaderBgColor","borderWidth","borderStyle","marginTop","paddingTop","paddingBottom","elevation","calendarHeader","borderBottomWidth","weekDay","padding","weekDayText","calendarWeekDayTextColor","fontWeight","fontFamily","baseFont","fontSize","day","dayWrapper","height","borderRadius","notDayOfCurrentMonth","calendarNotCurrentMonthDateColor","opacity","monthText","calendarHeaderTextColor","yearText","today","primaryColor","todayText","calendarSelectedDayBgColor","eventDay1","calendarEventDay1Color","eventDay2","calendarEventDay2Color","eventDay3","calendarEventDay3Color","selectedDay","selectedDayText","calendarSelectedDayTextColor","prevMonthBtn","calendarPrevMonthIconColor","nextMonthBtn","calendarNextMonthIconColor","prevYearBtn","calendarPrevYearIconColor","nextYearBtn","calendarNextYearIconColor","skeleton","display","justifyContent","paddingHorizontal","alignItems","headerSkeleton","flexDirection","marginBottom","transform","rotateY"],"sources":["calendar.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 { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { TextStyle } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmCalendarStyles = BaseStyles & {\n calendar: AllStyle,\n calendarHeader: AllStyle,\n day: AllStyle,\n dayWrapper: AllStyle,\n notDayOfCurrentMonth: AllStyle,\n monthText: TextStyle,\n yearText: TextStyle,\n weekDay: AllStyle,\n today: AllStyle,\n todayText: AllStyle,\n prevMonthBtn: WmIconStyles,\n nextMonthBtn: WmIconStyles,\n prevYearBtn: WmIconStyles,\n nextYearBtn: WmIconStyles,\n selectedDay: AllStyle,\n selectedDayText: AllStyle\n eventDay1: AllStyle,\n eventDay2: AllStyle,\n eventDay3: AllStyle,\n skeleton: WmSkeletonStyles;\n headerSkeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-calendar';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCalendarStyles = defineStyles<WmCalendarStyles>({\n root: {\n width: '100%',\n minHeight: 456,\n minWidth: 360\n },\n text: {\n color: themeVariables.calendarDateColor\n },\n calendar : {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderWidth: 1,\n borderStyle: 'solid',\n marginTop: 0, \n paddingTop: 0,\n paddingBottom: 0,\n elevation: 6\n },\n calendarHeader : {\n backgroundColor: themeVariables.calendarHeaderBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n paddingTop: 8,\n paddingBottom: 8\n },\n weekDay: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.calendarHeaderBgColor,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n padding: 2,\n },\n weekDayText: {\n color: themeVariables.calendarWeekDayTextColor,\n fontWeight: '400',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n },\n day: {\n borderColor: 'transparent',\n color: themeVariables.calendarDateColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400'\n },\n dayWrapper: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: 'transparent',\n width: 38,\n height: 38,\n borderRadius: 26\n },\n notDayOfCurrentMonth: {\n color: themeVariables.calendarNotCurrentMonthDateColor,\n fontWeight: 'normal',\n opacity: 0\n },\n monthText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n yearText: {\n fontWeight: '500',\n fontFamily: themeVariables.baseFont,\n color: themeVariables.calendarHeaderTextColor\n },\n today: {\n backgroundColor: themeVariables.calendarBgColor,\n borderColor: themeVariables.primaryColor\n },\n todayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n eventDay1 : {\n color: themeVariables.calendarEventDay1Color\n },\n eventDay2 : {\n color: themeVariables.calendarEventDay2Color\n },\n eventDay3 : {\n color: themeVariables.calendarEventDay3Color\n },\n selectedDay: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor\n },\n selectedDayText: {\n backgroundColor: themeVariables.calendarSelectedDayBgColor,\n color: themeVariables.calendarSelectedDayTextColor,\n fontWeight: 'bold'\n },\n prevMonthBtn: {\n root: {\n color: themeVariables.calendarPrevMonthIconColor\n }\n } as WmIconStyles,\n nextMonthBtn: {\n root: {\n color: themeVariables.calendarNextMonthIconColor\n }\n } as WmIconStyles,\n prevYearBtn: {\n root: {\n color: themeVariables.calendarPrevYearIconColor\n }\n } as WmIconStyles,\n nextYearBtn: {\n root: {\n color: themeVariables.calendarNextYearIconColor\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n display:'flex', \n justifyContent: 'center',\n backgroundColor:'#fff',\n paddingHorizontal: 8,\n alignItems: 'center',\n },\n } as any as WmSkeletonStyles ,\n headerSkeleton: {\n root: {\n width: '100%',\n display:'flex', \n flexDirection:'row', \n alignItems: 'center',\n justifyContent: 'space-around',\n marginBottom: 16\n } \n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n prevMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}]\n }\n } as any as WmIconStyles,\n nextMonthBtn: {\n root: {\n transform: [ {rotateY: '180deg'}] \n },\n } as any as WmIconStyles,\n monthText: {\n padding: 2\n },\n yearText: {\n padding: 2\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AA6BxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC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FK,KAAK,EAAER,cAAc,CAACyD;MAC1B;IACJ,CAAiB;IACjBC,WAAW,EAAE;MACTvD,IAAI,EAAE;QACFK,KAAK,EAAER,cAAc,CAAC2D;MAC1B;IACJ,CAAiB;IACjBC,WAAW,EAAE;MACTzD,IAAI,EAAE;QACFK,KAAK,EAAER,cAAc,CAAC6D;MAC1B;IACJ,CAAiB;IACjBC,QAAQ,EAAE;MACN3D,IAAI,EAAE;QACF4D,OAAO,EAAC,MAAM;QACdC,cAAc,EAAE,QAAQ;QACxBrD,eAAe,EAAC,MAAM;QACtBsD,iBAAiB,EAAE,CAAC;QACpBC,UAAU,EAAE;MAChB;IACF,CAA6B;IAC/BC,cAAc,EAAE;MACZhE,IAAI,EAAE;QACFC,KAAK,EAAE,MAAM;QACb2D,OAAO,EAAC,MAAM;QACdK,aAAa,EAAC,KAAK;QACnBF,UAAU,EAAE,QAAQ;QACpBF,cAAc,EAAE,cAAc;QAC9BK,YAAY,EAAE;MAClB;IACJ;EACJ,CAAC,CAAC;EAEFpE,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCwD,YAAY,EAAE;MACVnD,IAAI,EAAE;QACFmE,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAwB;IACxBf,YAAY,EAAE;MACVrD,IAAI,EAAE;QACFmE,SAAS,EAAE,CAAE;UAACC,OAAO,EAAE;QAAQ,CAAC;MACpC;IACJ,CAAwB;IACxBjC,SAAS,EAAE;MACPd,OAAO,EAAE;IACb,CAAC;IACDgB,QAAQ,EAAE;MACNhB,OAAO,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
function _defineProperty(
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
/****
|
@@ -140,7 +140,7 @@ export class MonthView extends Component {
|
|
140
140
|
const month = this.props.customMonth ? this.props.customMonth[((_this$props$date3 = this.props.date) === null || _this$props$date3 === void 0 ? void 0 : _this$props$date3.get('month')) || 0] : 'Jan';
|
141
141
|
const year = ((_this$props$date4 = this.props.date) === null || _this$props$date4 === void 0 ? void 0 : _this$props$date4.get('year')) || 1;
|
142
142
|
_.forEach(weekdays, element => {
|
143
|
-
dayOfWeek.push(
|
143
|
+
dayOfWeek.push(/*#__PURE__*/React.createElement(Text, {
|
144
144
|
key: element,
|
145
145
|
style: [styles.weekdays, weekdayStyle]
|
146
146
|
}, element));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Component","Text","View","FlatList","TouchableOpacity","moment","styles","_","MonthViewProps","constructor","_defineProperty","day","createElement","Fragment","date","MonthViewState","selectedDate","MonthView","props","state","calendarArray","dates","currDate","clone","startOf","i","add","renderDay","_this$props$date","_this$props$date2","warpDayStyle","dateSelectedWarpDayStyle","renderChildDay","textDayStyle","currentDayStyle","currentDayTextStyle","notDayOfCurrentMonthStyle","selectedDayTextStyle","dateSelected","isSame","isCurrent","notCurrentMonth","dateStyle","getDayStyle","testID","format","accessibilityLabel","onPress","selectDate","style","warpDay","backgroundColor","containerStyle","flexDirection","justifyContent","alignItems","color","textStyle","get","isDateEnable","yearMonthChange","unit","type","minDate","maxDate","isSameOrBefore","isSameOrAfter","render","_this$props$date3","_this$props$date4","renderPrevYearButton","renderPrevMonthButton","renderNextYearButton","renderNextMonthButton","weekdayStyle","customWeekdays","warpRowWeekdays","warpRowControlMonthYear","monthTextStyle","yearTextStyle","weekdays","data","dayOfWeek","month","customMonth","year","forEach","element","push","key","container","txtHeaderDate","keyExtractor","item","toDate","getTime","renderItem","extraData","columnWrapperStyle","numColumns","padding"],"sources":["month-view.tsx"],"sourcesContent":["/****\n * Copied code from a repo with no active maintenance.\n * https://github.com/hungdev/react-native-customize-selected-date\n * That js lib was converted to ts and fixed bugs. \n */\nimport React, { Component } from 'react';\nimport {\n Text,\n View,\n FlatList,\n TouchableOpacity,\n ViewStyle,\n TextStyle\n} from 'react-native';\nimport moment, { Moment } from 'moment';\nimport styles from './month-view.styles'\nimport _ from 'lodash';\n\nexport class MonthViewProps {\n testID?: string = null as any;\n accessibilityLabel?: string = null as any;\n date?: Moment = null as any;\n minDate? = moment('1990-01-01', 'YYYY-MM-DD');\n maxDate? = moment('2100-01-01', 'YYYY-MM-DD');\n customMonth?: string[] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n customWeekdays?: string[] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n renderPrevYearButton?: () => React.ReactNode = null as any;\n format?='YYYY-MM-DD';\n renderPrevMonthButton?: () => React.ReactNode = null as any;\n renderNextYearButton?: () => React.ReactNode = null as any;\n renderNextMonthButton?: () => React.ReactNode = null as any;\n renderChildDay? = (day: Moment) => (<></>);\n selectDate? = (day: Moment) => {}; \n //style\n getDayStyle? = (date: Moment) => ({});\n containerStyle?: ViewStyle = null as any;\n warpRowControlMonthYear?: ViewStyle = null as any;\n warpRowWeekdays?: ViewStyle = null as any;\n weekdayStyle?: ViewStyle = null as any;\n textDayStyle?: TextStyle = null as any;\n currentDayStyle?: ViewStyle = null as any;\n currentDayTextStyle?: TextStyle = null as any;\n notDayOfCurrentMonthStyle?: ViewStyle = null as any;\n warpDayStyle?: ViewStyle = null as any;\n dateSelectedWarpDayStyle?: ViewStyle = null as any;\n selectedDayTextStyle?: TextStyle = null as any;\n monthTextStyle?: TextStyle = null as any;\n yearTextStyle?: TextStyle = null as any;\n}\n\nexport class MonthViewState {\n viewMode = 'day';\n currentYear: string = null as any;\n constructor(public selectedDate: Moment = moment()) {\n\n }\n}\n\nexport class MonthView extends Component<MonthViewProps, MonthViewState> {\n\n static defaultProps = new MonthViewProps();\n\n constructor(props: MonthViewProps) {\n super(props);\n this.state = new MonthViewState(this.props.date);\n }\n\n calendarArray (date: Moment): Moment[] {\n const dates: Moment[] = [];\n const currDate = date.clone().startOf('month').startOf('week');\n for (let i = 0; i < 42; i += 1) {\n dates[i] = currDate.clone();\n currDate.add(1, 'day');\n }\n return dates;\n }\n\n renderDay(day: Moment) {\n const { warpDayStyle, dateSelectedWarpDayStyle,\n renderChildDay, textDayStyle, currentDayStyle, currentDayTextStyle, notDayOfCurrentMonthStyle, selectedDayTextStyle } = this.props;\n const dateSelected = this.props.date?.isSame(day);\n const isCurrent = moment().isSame(day, 'date');\n const notCurrentMonth = !this.props.date?.isSame(day, 'month');\n const dateStyle = ((this.props.getDayStyle ? this.props.getDayStyle(day) : null) || {}) as any;\n return (\n <TouchableOpacity \n testID={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n accessibilityLabel={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n onPress={() => this.selectDate(day)}\n style={[styles.warpDay, warpDayStyle,\n isCurrent ? currentDayStyle : {},\n dateSelected ? { backgroundColor: '#2C1F23', ...dateSelectedWarpDayStyle } : {},\n dateStyle.containerStyle]}\n >\n <View style={{flexDirection: 'column', justifyContent: 'center', alignItems: 'center'}}>\n <Text style={[styles.day, textDayStyle,\n isCurrent ? currentDayTextStyle : {},\n notCurrentMonth ? { color: '#493D40', ...notDayOfCurrentMonthStyle } : {},\n dateSelected ? { color: '#000', ...selectedDayTextStyle } : {},\n dateStyle.textStyle]}>\n {day.get('date')}\n </Text>\n {renderChildDay && renderChildDay(day)}\n </View>\n </TouchableOpacity>\n )\n }\n\n selectDate(date: Moment) {\n if (this.isDateEnable(date)) {\n this.props.selectDate && this.props.selectDate(date)\n }\n }\n\n yearMonthChange(unit: number, type: string) {\n this.selectDate((this.props.date || moment()).clone().add(unit, type as any).startOf('month'));\n }\n\n isDateEnable(date: Moment) {\n const { minDate, maxDate } = this.props;\n return minDate?.isSameOrBefore(date) && maxDate?.isSameOrAfter(date);\n }\n\n render() {\n const {\n renderPrevYearButton, renderPrevMonthButton,\n renderNextYearButton, renderNextMonthButton,\n weekdayStyle, customWeekdays, warpRowWeekdays,\n warpRowControlMonthYear, monthTextStyle, yearTextStyle\n } = this.props\n const weekdays = customWeekdays || ['Sun', 'Mon', 'Tus', 'Wes', 'Thu', 'Fri', 'Sat']\n const data = this.calendarArray(this.props.date || moment())\n const dayOfWeek: React.ReactNode[] = [];\n const month = this.props.customMonth ? this.props.customMonth[this.props.date?.get('month') || 0]: 'Jan';\n const year = this.props.date?.get('year') || 1;\n _.forEach(weekdays, element => {\n dayOfWeek.push(<Text key={element} style={[styles.weekdays, weekdayStyle]}>{element}</Text>)\n })\n\n return (\n <View style={[styles.container, this.props.containerStyle]}>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }, warpRowControlMonthYear]}>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(-1, 'year')}>\n {renderPrevYearButton ? renderPrevYearButton() : <Text>{'<<'}</Text>}\n </TouchableOpacity>*/}\n <TouchableOpacity onPress={() => this.yearMonthChange(-1, 'month')}>\n {renderPrevMonthButton ? renderPrevMonthButton() : <Text>{'<'}</Text>}\n </TouchableOpacity>\n <View style={{flexDirection: 'row'}}>\n <Text style={[styles.txtHeaderDate, monthTextStyle]} >{month + ' '}</Text>\n <Text style={[styles.txtHeaderDate, yearTextStyle]} >{year}</Text>\n </View>\n <TouchableOpacity onPress={() => this.yearMonthChange(1, 'month')}>\n {renderNextMonthButton ? renderNextMonthButton() : <Text>{'>'}</Text>}\n </TouchableOpacity>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(1, 'year')}>\n {renderNextYearButton ? renderNextYearButton() : <Text>{'>>'}</Text>}\n </TouchableOpacity>*/}\n </View>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-around' }, warpRowWeekdays]}>\n {dayOfWeek}\n </View>\n <FlatList\n data={data}\n keyExtractor={(item) => '' + item.toDate().getTime()}\n renderItem={({ item }) => this.renderDay(item)}\n extraData={this.state}\n columnWrapperStyle={{justifyContent: 'space-between'}}\n numColumns={7}\n style={{\n padding: 4\n }}\n />\n </View>\n )\n }\n}"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACEC,IAAI,EACJC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,QAGX,cAAc;AACrB,OAAOC,MAAM,MAAkB,QAAQ;AACvC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,CAAC,MAAM,QAAQ;AAEtB,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACR,IAAI;IAAAA,eAAA,6BACQ,IAAI;IAAAA,eAAA,eAClB,IAAI;IAAAA,eAAA,kBACTL,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC;IAAAK,eAAA,kBAClCL,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC;IAAAK,eAAA,sBACpB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAAAA,eAAA,yBACjF,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAAAA,eAAA,+BAC9B,IAAI;IAAAA,eAAA,iBAC3C,YAAY;IAAAA,eAAA,gCAC4B,IA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gD,KAAK,EAAE,CAAC3C,MAAM,CAACqF,aAAa,EAAEZ,aAAa;IAAE,GAAGM,IAAW,CAC7D,CAAC,eACPtF,KAAA,CAAAa,aAAA,CAACR,gBAAgB;MAAC2C,OAAO,EAAEA,CAAA,KAAM,IAAI,CAACa,eAAe,CAAC,CAAC,EAAE,OAAO;IAAE,GAC/Da,qBAAqB,GAAGA,qBAAqB,CAAC,CAAC,gBAAG1E,KAAA,CAAAa,aAAA,CAACX,IAAI,QAAE,GAAU,CACpD,CAId,CAAC,eACPF,KAAA,CAAAa,aAAA,CAACV,IAAI;MAAC+C,KAAK,EAAE,CAAC;QAAEI,aAAa,EAAE,KAAK;QAAEC,cAAc,EAAE;MAAe,CAAC,EAAEsB,eAAe;IAAE,GACtFM,SACG,CAAC,eACPnF,KAAA,CAAAa,aAAA,CAACT,QAAQ;MACP8E,IAAI,EAAEA,IAAK;MACXW,YAAY,EAAGC,IAAI,IAAK,EAAE,GAAGA,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,CAAE;MACrDC,UAAU,EAAEA,CAAC;QAAEH;MAAK,CAAC,KAAK,IAAI,CAAClE,SAAS,CAACkE,IAAI,CAAE;MAC/CI,SAAS,EAAE,IAAI,CAAC9E,KAAM;MACtB+E,kBAAkB,EAAE;QAAC5C,cAAc,EAAE;MAAe,CAAE;MACtD6C,UAAU,EAAE,CAAE;MACdlD,KAAK,EAAE;QACLmD,OAAO,EAAE;MACX;IAAE,CACH,CACG,CAAC;EAEX;AACF;AAAC1F,eAAA,CAtHYO,SAAS,kBAEE,IAAIT,cAAc,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Component","Text","View","FlatList","TouchableOpacity","moment","styles","_","MonthViewProps","constructor","_defineProperty","day","createElement","Fragment","date","MonthViewState","selectedDate","MonthView","props","state","calendarArray","dates","currDate","clone","startOf","i","add","renderDay","_this$props$date","_this$props$date2","warpDayStyle","dateSelectedWarpDayStyle","renderChildDay","textDayStyle","currentDayStyle","currentDayTextStyle","notDayOfCurrentMonthStyle","selectedDayTextStyle","dateSelected","isSame","isCurrent","notCurrentMonth","dateStyle","getDayStyle","testID","format","accessibilityLabel","onPress","selectDate","style","warpDay","backgroundColor","containerStyle","flexDirection","justifyContent","alignItems","color","textStyle","get","isDateEnable","yearMonthChange","unit","type","minDate","maxDate","isSameOrBefore","isSameOrAfter","render","_this$props$date3","_this$props$date4","renderPrevYearButton","renderPrevMonthButton","renderNextYearButton","renderNextMonthButton","weekdayStyle","customWeekdays","warpRowWeekdays","warpRowControlMonthYear","monthTextStyle","yearTextStyle","weekdays","data","dayOfWeek","month","customMonth","year","forEach","element","push","key","container","txtHeaderDate","keyExtractor","item","toDate","getTime","renderItem","extraData","columnWrapperStyle","numColumns","padding"],"sources":["month-view.tsx"],"sourcesContent":["/****\n * Copied code from a repo with no active maintenance.\n * https://github.com/hungdev/react-native-customize-selected-date\n * That js lib was converted to ts and fixed bugs. \n */\nimport React, { Component } from 'react';\nimport {\n Text,\n View,\n FlatList,\n TouchableOpacity,\n ViewStyle,\n TextStyle\n} from 'react-native';\nimport moment, { Moment } from 'moment';\nimport styles from './month-view.styles'\nimport _ from 'lodash';\n\nexport class MonthViewProps {\n testID?: string = null as any;\n accessibilityLabel?: string = null as any;\n date?: Moment = null as any;\n minDate? = moment('1990-01-01', 'YYYY-MM-DD');\n maxDate? = moment('2100-01-01', 'YYYY-MM-DD');\n customMonth?: string[] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n customWeekdays?: string[] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n renderPrevYearButton?: () => React.ReactNode = null as any;\n format?='YYYY-MM-DD';\n renderPrevMonthButton?: () => React.ReactNode = null as any;\n renderNextYearButton?: () => React.ReactNode = null as any;\n renderNextMonthButton?: () => React.ReactNode = null as any;\n renderChildDay? = (day: Moment) => (<></>);\n selectDate? = (day: Moment) => {}; \n //style\n getDayStyle? = (date: Moment) => ({});\n containerStyle?: ViewStyle = null as any;\n warpRowControlMonthYear?: ViewStyle = null as any;\n warpRowWeekdays?: ViewStyle = null as any;\n weekdayStyle?: ViewStyle = null as any;\n textDayStyle?: TextStyle = null as any;\n currentDayStyle?: ViewStyle = null as any;\n currentDayTextStyle?: TextStyle = null as any;\n notDayOfCurrentMonthStyle?: ViewStyle = null as any;\n warpDayStyle?: ViewStyle = null as any;\n dateSelectedWarpDayStyle?: ViewStyle = null as any;\n selectedDayTextStyle?: TextStyle = null as any;\n monthTextStyle?: TextStyle = null as any;\n yearTextStyle?: TextStyle = null as any;\n}\n\nexport class MonthViewState {\n viewMode = 'day';\n currentYear: string = null as any;\n constructor(public selectedDate: Moment = moment()) {\n\n }\n}\n\nexport class MonthView extends Component<MonthViewProps, MonthViewState> {\n\n static defaultProps = new MonthViewProps();\n\n constructor(props: MonthViewProps) {\n super(props);\n this.state = new MonthViewState(this.props.date);\n }\n\n calendarArray (date: Moment): Moment[] {\n const dates: Moment[] = [];\n const currDate = date.clone().startOf('month').startOf('week');\n for (let i = 0; i < 42; i += 1) {\n dates[i] = currDate.clone();\n currDate.add(1, 'day');\n }\n return dates;\n }\n\n renderDay(day: Moment) {\n const { warpDayStyle, dateSelectedWarpDayStyle,\n renderChildDay, textDayStyle, currentDayStyle, currentDayTextStyle, notDayOfCurrentMonthStyle, selectedDayTextStyle } = this.props;\n const dateSelected = this.props.date?.isSame(day);\n const isCurrent = moment().isSame(day, 'date');\n const notCurrentMonth = !this.props.date?.isSame(day, 'month');\n const dateStyle = ((this.props.getDayStyle ? this.props.getDayStyle(day) : null) || {}) as any;\n return (\n <TouchableOpacity \n testID={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n accessibilityLabel={this.props.testID + '_' + day.format('yyyy_mm_dd')}\n onPress={() => this.selectDate(day)}\n style={[styles.warpDay, warpDayStyle,\n isCurrent ? currentDayStyle : {},\n dateSelected ? { backgroundColor: '#2C1F23', ...dateSelectedWarpDayStyle } : {},\n dateStyle.containerStyle]}\n >\n <View style={{flexDirection: 'column', justifyContent: 'center', alignItems: 'center'}}>\n <Text style={[styles.day, textDayStyle,\n isCurrent ? currentDayTextStyle : {},\n notCurrentMonth ? { color: '#493D40', ...notDayOfCurrentMonthStyle } : {},\n dateSelected ? { color: '#000', ...selectedDayTextStyle } : {},\n dateStyle.textStyle]}>\n {day.get('date')}\n </Text>\n {renderChildDay && renderChildDay(day)}\n </View>\n </TouchableOpacity>\n )\n }\n\n selectDate(date: Moment) {\n if (this.isDateEnable(date)) {\n this.props.selectDate && this.props.selectDate(date)\n }\n }\n\n yearMonthChange(unit: number, type: string) {\n this.selectDate((this.props.date || moment()).clone().add(unit, type as any).startOf('month'));\n }\n\n isDateEnable(date: Moment) {\n const { minDate, maxDate } = this.props;\n return minDate?.isSameOrBefore(date) && maxDate?.isSameOrAfter(date);\n }\n\n render() {\n const {\n renderPrevYearButton, renderPrevMonthButton,\n renderNextYearButton, renderNextMonthButton,\n weekdayStyle, customWeekdays, warpRowWeekdays,\n warpRowControlMonthYear, monthTextStyle, yearTextStyle\n } = this.props\n const weekdays = customWeekdays || ['Sun', 'Mon', 'Tus', 'Wes', 'Thu', 'Fri', 'Sat']\n const data = this.calendarArray(this.props.date || moment())\n const dayOfWeek: React.ReactNode[] = [];\n const month = this.props.customMonth ? this.props.customMonth[this.props.date?.get('month') || 0]: 'Jan';\n const year = this.props.date?.get('year') || 1;\n _.forEach(weekdays, element => {\n dayOfWeek.push(<Text key={element} style={[styles.weekdays, weekdayStyle]}>{element}</Text>)\n })\n\n return (\n <View style={[styles.container, this.props.containerStyle]}>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }, warpRowControlMonthYear]}>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(-1, 'year')}>\n {renderPrevYearButton ? renderPrevYearButton() : <Text>{'<<'}</Text>}\n </TouchableOpacity>*/}\n <TouchableOpacity onPress={() => this.yearMonthChange(-1, 'month')}>\n {renderPrevMonthButton ? renderPrevMonthButton() : <Text>{'<'}</Text>}\n </TouchableOpacity>\n <View style={{flexDirection: 'row'}}>\n <Text style={[styles.txtHeaderDate, monthTextStyle]} >{month + ' '}</Text>\n <Text style={[styles.txtHeaderDate, yearTextStyle]} >{year}</Text>\n </View>\n <TouchableOpacity onPress={() => this.yearMonthChange(1, 'month')}>\n {renderNextMonthButton ? renderNextMonthButton() : <Text>{'>'}</Text>}\n </TouchableOpacity>\n {/*<TouchableOpacity onPress={() => this.yearMonthChange(1, 'year')}>\n {renderNextYearButton ? renderNextYearButton() : <Text>{'>>'}</Text>}\n </TouchableOpacity>*/}\n </View>\n <View style={[{ flexDirection: 'row', justifyContent: 'space-around' }, warpRowWeekdays]}>\n {dayOfWeek}\n </View>\n <FlatList\n data={data}\n keyExtractor={(item) => '' + item.toDate().getTime()}\n renderItem={({ item }) => this.renderDay(item)}\n extraData={this.state}\n columnWrapperStyle={{justifyContent: 'space-between'}}\n numColumns={7}\n style={{\n padding: 4\n }}\n />\n </View>\n )\n }\n}"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACEC,IAAI,EACJC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,QAGX,cAAc;AACrB,OAAOC,MAAM,MAAkB,QAAQ;AACvC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,CAAC,MAAM,QAAQ;AAEtB,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACR,IAAI;IAAAA,eAAA,6BACQ,IAAI;IAAAA,eAAA,eAClB,IAAI;IAAAA,eAAA,kBACTL,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC;IAAAK,eAAA,kBAClCL,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC;IAAAK,eAAA,sBACpB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAA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F;AAAC1F,eAAA,CAtHYO,SAAS,kBAEE,IAAIT,cAAc,CAAC,CAAC","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
2
|
-
function _defineProperty(
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
5
|
import React from 'react';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
function _defineProperty(
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
2
|
-
function _defineProperty(
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
5
|
import React from 'react';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
function _defineProperty(
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';
|
@@ -1,10 +1,10 @@
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
2
|
-
function _defineProperty(
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
5
|
import React from 'react';
|
6
6
|
import { View, TouchableOpacity, Text } from 'react-native';
|
7
|
-
import { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge } from 'lodash';
|
7
|
+
import { clone, findIndex, get, isUndefined, pull, forEach, filter, find, isEqual, merge, isArray, isString } from 'lodash';
|
8
8
|
import WmChipsProps from './chips.props';
|
9
9
|
import { DEFAULT_CLASS } from './chips.styles';
|
10
10
|
import WmSearch from '@wavemaker/app-rn-runtime/components/basic/search/search.component';
|
@@ -13,6 +13,7 @@ import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.compone
|
|
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
15
|
import WmLabel from '../../basic/label/label.component';
|
16
|
+
import { isDefined } from '@wavemaker/app-rn-runtime/core/utils';
|
16
17
|
export class WmChipsState extends BaseDatasetState {
|
17
18
|
constructor(...args) {
|
18
19
|
super(...args);
|
@@ -45,6 +46,31 @@ export default class WmChips extends BaseDatasetComponent {
|
|
45
46
|
chipsList: []
|
46
47
|
});
|
47
48
|
}
|
49
|
+
break;
|
50
|
+
case 'maxsize':
|
51
|
+
let datavalue = this.state.props.datavalue;
|
52
|
+
let dataValueItems;
|
53
|
+
if (typeof datavalue === 'string') {
|
54
|
+
dataValueItems = datavalue.split(',');
|
55
|
+
} else if (isArray(datavalue)) {
|
56
|
+
dataValueItems = datavalue;
|
57
|
+
} else {
|
58
|
+
if (isDefined(datavalue)) {
|
59
|
+
dataValueItems = [datavalue];
|
60
|
+
}
|
61
|
+
}
|
62
|
+
dataValueItems = dataValueItems.map(item => isString(item) ? item.trim() : item);
|
63
|
+
if (dataValueItems.length >= $new) {
|
64
|
+
dataValueItems = dataValueItems.slice(0, $new);
|
65
|
+
let updatedItems = this.state.dataItems.map(item => ({
|
66
|
+
...item,
|
67
|
+
selected: dataValueItems.includes(item.datafield)
|
68
|
+
}));
|
69
|
+
this.updateState({
|
70
|
+
dataItems: updatedItems
|
71
|
+
});
|
72
|
+
}
|
73
|
+
break;
|
48
74
|
}
|
49
75
|
}
|
50
76
|
reset() {
|
@@ -156,8 +182,9 @@ export default class WmChips extends BaseDatasetComponent {
|
|
156
182
|
}
|
157
183
|
this.updateState({
|
158
184
|
chipsList: newChipList
|
185
|
+
}, () => {
|
186
|
+
this.setDatavalue(newChipList);
|
159
187
|
});
|
160
|
-
this.setDatavalue(newChipList);
|
161
188
|
// @ts-ignore
|
162
189
|
isFormFieldWidget ? this.props.invokeEvent('onRemove', [null, this, item]) : this.invokeEventCallback('onRemove', [null, this, item]);
|
163
190
|
}
|
@@ -212,7 +239,7 @@ export default class WmChips extends BaseDatasetComponent {
|
|
212
239
|
}
|
213
240
|
}) : /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForAction('chip' + index + 'label'), {
|
214
241
|
style: [this.styles.chipLabel, isSelected ? this.styles.activeChipLabel : null]
|
215
|
-
}), item.displayexp || item.displayfield), !this.isDefaultView() && !this.state.props.disabled ? /*#__PURE__*/React.createElement(WmIcon, {
|
242
|
+
}), item.displayexp || item.displayfield), !this.isDefaultView() && !(this.state.props.disabled || this.state.props.readonly) ? /*#__PURE__*/React.createElement(WmIcon, {
|
216
243
|
id: this.getTestId('clearbtn'),
|
217
244
|
iconclass: 'wi wi-clear',
|
218
245
|
iconsize: 16,
|
@@ -227,6 +254,7 @@ export default class WmChips extends BaseDatasetComponent {
|
|
227
254
|
this.updateState({
|
228
255
|
chipsList: selectedItems
|
229
256
|
});
|
257
|
+
this.updateMaxSize(selectedItems.length);
|
230
258
|
}
|
231
259
|
this.isDefaultQuery = false;
|
232
260
|
}
|
@@ -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","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,S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,iBAAiB,EAAEvH,KAAK,CAACuH,iBAAkB;MAC3CC,oBAAoB,EAAExH,KAAK,CAACwH,oBAAqB;MACjDC,eAAe,EAAEzH,KAAK,CAACyH,eAAgB;MACvC/E,YAAY,EAAE1C,KAAK,CAAC0C,YAAa;MACjCQ,SAAS,EAAElD,KAAK,CAACkD,SAAU;MAC3BwE,QAAQ,EAAE,IAAI,CAACvG,OAAO,CAACwG,IAAI,CAAC,IAAI,CAAE;MAClCC,QAAQ,EAAEA,CAAA,KAAM;QAAA,IAAAC,oBAAA,EAAAC,qBAAA;QACd,IAAI,CAAC7G,cAAc,GAAG,KAAK;QAC3B,EAAA4G,oBAAA,OAAI,CAAC7H,KAAK,CAACkH,QAAQ,cAAAW,oBAAA,uBAAnBA,oBAAA,CAAqBE,iBAAiB,OAAAD,qBAAA,GAAI,IAAI,CAAC9H,KAAK,CAACkH,QAAQ,cAAAY,qBAAA,uBAAnBA,qBAAA,CAAqBC,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":[]}
|
1
|
+
{"version":3,"names":["React","View","TouchableOpacity","Text","clone","findIndex","get","isUndefined","pull","forEach","filter","find","isEqual","merge","isArray","isString","WmChipsProps","DEFAULT_CLASS","WmSearch","BaseDatasetComponent","BaseDatasetState","WmIcon","WmPicture","AccessibilityWidgetType","getAccessibilityProps","WmLabel","isDefined","WmChipsState","constructor","args","_defineProperty","WmChips","props","onComponentInit","c","searchRef","val","onPropertyChange","name","$new","$old","length","updateState","chipsList","datavalue","state","dataValueItems","split","map","item","trim","slice","updatedItems","dataItems","selected","includes","datafield","reset","_this$searchRef","query","onDataItemsUpdate","isDefaultQuery","updateDefaultQueryModel","addItem","$event","widget","_this$props","_this$props2","newChipList","allowAdd","push","queryModel","isFormFieldWidget","isDuplicate","resetSearchModel","invokeEvent","invokeEventCallback","toBoolean","setDatavalue","computeDisplayValue","displayValue","displayexp","displayfield","selectChip","chipItem","maxsize","selectedItem","d","key","dataValue","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, isArray, isString } 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';\nimport { isDefined } from '@wavemaker/app-rn-runtime/core/utils';\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 break;\n case 'maxsize':\n let datavalue = this.state.props.datavalue;\n let dataValueItems: any;\n if (typeof datavalue === 'string') {\n dataValueItems = datavalue.split(',');\n } else if (isArray(datavalue)) {\n dataValueItems = datavalue;\n } else {\n if (isDefined(datavalue)) {\n dataValueItems = [datavalue];\n }\n }\n dataValueItems = dataValueItems.map((item: any) =>\n isString(item) ? item.trim() : item\n );\n if (dataValueItems.length >= $new) {\n dataValueItems = dataValueItems.slice(0, $new);\n let updatedItems = this.state.dataItems.map((item: any) => ({\n ...item,\n selected: dataValueItems.includes(item.datafield),\n }));\n this.updateState({ dataItems: updatedItems } as WmChipsState);\n }\n break;\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 \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\n this.updateState({\n chipsList: newChipList\n } as WmChipsState,()=>{\n this.setDatavalue(newChipList);\n });\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||this.state.props.readonly) ? <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 this.updateMaxSize(selectedItems.length);\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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AC,GACJ,IACD,CACF,CAAC;EACT;AACF","ignoreList":[]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
function _defineProperty(
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
4
|
import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';
|