@wavemaker/app-rn-runtime 11.4.0-next.26251 → 11.4.0-next.28151
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/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +1 -1
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +5 -5
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +1 -1
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +25 -0
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.props.js +16 -0
- app-rn-runtime/components/basic/custom/custom.props.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.styles.js +18 -0
- app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -0
- app-rn-runtime/components/basic/icon/icon.component.js +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +1 -1
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +137 -0
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js +14 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js +11 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -0
- app-rn-runtime/components/basic/message/message.component.js +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +37 -26
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +4 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +10 -10
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +56 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -0
- app-rn-runtime/components/basic/video/video.props.js +22 -0
- app-rn-runtime/components/basic/video/video.props.js.map +1 -0
- app-rn-runtime/components/basic/video/video.styles.js +11 -0
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
- app-rn-runtime/components/container/accordion/accordion.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +1 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +1 -1
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +12 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +2 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +68 -67
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +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.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +1 -1
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +0 -6
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -30
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +1 -4
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +3 -0
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +0 -9
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +0 -40
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +1 -1
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +1 -1
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +19 -22
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +7 -7
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +1 -10
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +0 -10
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
- app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page.component.js +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +1 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/core/asset.provider.js +5 -0
- app-rn-runtime/core/asset.provider.js.map +1 -0
- app-rn-runtime/core/base.component.js +113 -41
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +1 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +105 -0
- app-rn-runtime/gestures/swipe.animation.js.map +1 -0
- app-rn-runtime/package.json +4 -3
- app-rn-runtime/runtime/App.js +11 -2
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +6 -4
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +5 -1
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
- app-rn-runtime/styles/background.component.js +259 -0
- app-rn-runtime/styles/background.component.js.map +1 -0
- app-rn-runtime/styles/style-prop.validator.js +38 -8
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/style-props.js +93 -0
- app-rn-runtime/styles/style-props.js.map +1 -0
- app-rn-runtime/styles/theme.js +6 -37
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/variables/http.service.js +3 -12
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +13 -7
- app-rn-runtime/variables/service-variable.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","get","filter","isNil","injector","toBoolean","toNumber","BaseComponent","BaseProps","BASE_THEME","ThemeProvider","VariableEvents","default","_viewPort","EVENTS","viewportEvents","WmFormField","WmForm","ToastConsumer","spinnerService","AppI18nService","FragmentProps","BaseFragment","constructor","props","defaultProps","createElement","text","title","okButtonText","cancelButtonText","onOk","onCancel","onClose","App","appConfig","app","formatters","Actions","Object","assign","Variables","cleanup","push","subscribe","ORIENTATION_CHANGE","$new","$old","isDetached","targetWidget","invokeEventCallback","proxy","screenWidth","width","screenHeight","height","SIZE_CHANGE","theme","destroy","baseUrl","url","resourceBaseUrl","onDestroy","onContentReady","onReady","refresh","onComponentChange","w","onComponentInit","id","name","Widgets","formWidgets","formFields","parentFormRef","pid","forEach","ff","formKey","registerFormFields","formfield","formRef","fragments","onComponentDestroy","formfields","handleUrl","startsWith","getDateFormat","fmt","dateFormat","replace","getTimeFormat","timeFormat","getDateTimeFormat","dateTimeFormat","getCurrencySymbol","currencyCode","getStyle","classes","inlineStyles","trim","length","mergeStyle","resetAppLocale","appLocale","messages","values","f","eval","fn","failOnError","call","e","val","componentWillUnmount","componentDidMount","memoize","key","o","_memoize","initVariableSpinner","variables","v","actions","concat","map","BEFORE_INVOKE","show","message","spinner","AFTER_INVOKE","hide","onFragmentReady","cleanUpVariablesandActions","fragmentVariables","fragmentActions","startUpActions","a","invoke","Promise","all","startUpVariables","s","catch","then","startUpVariablesLoaded","showContent","onAttach","watcher","isActive","unmute","refreshdataonattach","componentWillAttach","onDetach","mute","componentWillDetach","forceUpdate","render","autoUpdateVariables","value","invokeOnParamChange","toastService","toaster","renderWidget"],"sources":["base-fragment.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { get, filter, isNil } from 'lodash';\n\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { Formatter } from '@wavemaker/app-rn-runtime/core/formatters';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { toBoolean, toNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseComponent, BaseComponentState, BaseStyles, BaseProps, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BASE_THEME, { Theme, ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseVariable, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport { default as _viewPort, EVENTS as viewportEvents } from '@wavemaker/app-rn-runtime/core/viewport';\nimport App from './App';\nimport WmFormField from '@wavemaker/app-rn-runtime/components/data/form/form-field/form-field.component';\nimport WmForm from '@wavemaker/app-rn-runtime/components/data/form/form.component';\nimport { ToastConsumer, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport spinnerService from '@wavemaker/app-rn-runtime/runtime/services/app-spinner.service';\n\nimport AppI18nService from './services/app-i18n.service';\nimport { Watcher } from './watcher';\n\nexport class FragmentProps extends BaseProps {\n\n}\n\nexport interface FragmentState<T extends FragmentProps> extends BaseComponentState<T> {}\n\nexport type FragmentStyles = BaseStyles & {};\nexport default abstract class BaseFragment<P extends FragmentProps, S extends FragmentState<P>> extends BaseComponent<P, S, FragmentStyles> implements LifecycleListener {\n public App: App;\n public onReady: Function = () => {};\n public baseUrl = '';\n public resourceBaseUrl = '';\n public targetWidget = null as unknown as BaseComponent<any, any, any>;\n public Widgets: any = {};\n public Variables: any = {};\n public theme: Theme = BASE_THEME;\n public appLocale: any = {};\n private startUpVariables: string[] = [];\n private startUpVariablesLoaded = false;\n private startUpActions: string[] = [];\n private autoUpdateVariables: string[] = [];\n private cleanUpVariablesandActions: BaseVariable<any>[] = [];\n public fragmentVariables: any = {};\n public fragmentActions: any = {};\n public Actions: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n public cache = false;\n public refreshdataonattach= true;\n public isReactNativeApp = true;\n public fragments: any = {};\n public isDetached = false;\n public _memoize = {} as any;\n public toaster: any;\n public formatters: Map<string, Formatter>;\n public serviceDefinitions = {} as any;\n public Viewport = _viewPort;\n public loadingMessage = React.createElement(Text, [] as any, ['loading...']);\n public showContent = false;\n public notification = {\n text: '',\n title: '',\n okButtonText: '',\n cancelButtonText: '',\n onOk: () => {},\n onCancel: () => {},\n onClose: () => {}\n };\n public watcher: Watcher = null as any;\n constructor(props: P, defaultProps?: P) {\n super(props, null as any, defaultProps);\n this.App = this.appConfig.app;\n this.formatters = this.App.formatters;\n this.Actions = Object.assign({}, this.App.Actions);\n this.Variables = Object.assign({}, this.App.Variables);\n this.cleanup.push(_viewPort.subscribe(viewportEvents.ORIENTATION_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onOrientationchange', [null, this.proxy,\n {screenWidth: _viewPort.width,\n screenHeight: _viewPort.height}]);\n }));\n this.cleanup.push(_viewPort.subscribe(viewportEvents.SIZE_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onResize', [null, this.proxy,\n {screenWidth: $new.width,\n screenHeight: $new.height}]);\n }));\n this.cleanup.push(() => this.theme?.destroy());\n this.baseUrl = this.appConfig.url;\n this.resourceBaseUrl = this.appConfig.url;\n this.cleanup.push(() => this.onDestroy());\n }\n\n onContentReady() {\n this.onReady();\n this.appConfig.refresh();\n this.targetWidget && this.targetWidget.invokeEventCallback('onLoad', [null, this.proxy]);\n this.onContentReady = () => {};\n }\n\n onComponentChange(w: BaseComponent<any, any, any>) {\n this.refresh();\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n\n if (w instanceof WmForm) {\n if (!this.Widgets[id]) {\n this.Widgets[id] = w;\n }\n const formWidgets = this.Widgets[id].formWidgets;\n const formFields = this.Widgets[id].formFields;\n this.Widgets[id] = w;\n if (w.parentFormRef) {\n let pid = w.parentFormRef.props.id || w.parentFormRef.props.name;\n formFields.forEach((ff: any) => {\n const formKey = ff.props.formKey || ff.props.name;\n this.Widgets[pid].formFields.push(ff);\n this.Widgets[pid].formWidgets[formKey] = formWidgets[ff.props.name];\n });\n }\n w.registerFormFields(formFields, formWidgets);\n return;\n }\n if (w.props.formfield) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {formFields: [], formWidgets: {}};\n } else if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets[w.props.name] = w;\n return;\n }\n if (w instanceof WmFormField) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {};\n }\n if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets = this.Widgets[w.props.formRef].formWidgets || {};\n this.Widgets[w.props.formRef].formFields.push(w);\n return;\n }\n this.Widgets[id] = w;\n if (w instanceof BaseFragment && w !== this) {\n this.fragments[id] = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n delete this.Widgets[id];\n if (w instanceof BaseFragment) {\n delete this.fragments[id];\n }\n if (w instanceof WmForm) {\n w.formWidgets = {};\n w.formFields = [];\n w.formfields = {};\n }\n }\n\n handleUrl(url: string) {\n if (!url.startsWith('http') && !url.startsWith('file:')) {\n return this.appConfig.url + (url.startsWith('/') ? '' : '/') + url;\n }\n return url;\n }\n\n getDateFormat(fmt?: string) {\n // getting formats from appLocale when app locale is loaded locally.\n return (fmt || AppI18nService.dateFormat || get(this.appConfig, 'appLocale.formats.date')).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getTimeFormat(fmt?: string) {\n return fmt || AppI18nService.timeFormat || get(this.appConfig, 'appLocale.formats.time');\n }\n\n getDateTimeFormat(fmt?: string) {\n return (fmt || AppI18nService.dateTimeFormat || (get(this.appConfig, 'appLocale.formats.date') + ' ' + get(this.appConfig, 'appLocale.formats.time'))).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getCurrencySymbol(fmt?: string) {\n return (fmt || AppI18nService.currencyCode || 'USD');\n }\n\n getStyle(classes: string, inlineStyles:any = {}) {\n if (classes && classes.trim().length > 0) {\n return this.theme.mergeStyle({}, this.theme.getStyle(classes), inlineStyles);\n }\n return inlineStyles;\n }\n\n resetAppLocale() {\n this.appLocale = this.appConfig.appLocale.messages;\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n eval(fn: Function, failOnError = false) {\n try {\n return fn.call(this);\n } catch (e) {\n if (failOnError) {\n throw e;\n } else {\n return null;\n }\n }\n }\n\n toBoolean(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toBoolean(val);\n }\n\n toNumber(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toNumber(val);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.targetWidget && this.targetWidget.invokeEventCallback('onDestroy', [null, this.proxy]);\n }\n\n componentDidMount(): void {\n this.resetAppLocale();\n super.componentDidMount();\n }\n\n memoize(key: string, o: any) {\n if (!this._memoize[key]) {\n this._memoize[key] = o;\n }\n return this._memoize[key];\n }\n\n initVariableSpinner() {\n let variables = filter(this.Variables, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n const actions = filter(this.Actions, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n variables = variables.concat(actions);\n if (!variables.length) {\n return;\n }\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.BEFORE_INVOKE, () => {\n spinnerService.show({\n message: get(v, 'config.spinnerMessage'),\n spinner: this.App.appConfig.spinner\n });\n }))\n }));\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => {\n spinnerService.hide();\n }));\n }));\n }\n\n onFragmentReady() {\n this.cleanup.push(...Object.values({...this.Variables, ...this.Actions}).map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => this.App.refresh()));\n }));\n this.initVariableSpinner();\n this.cleanUpVariablesandActions.push(...Object.values({...this.fragmentVariables, ...this.fragmentActions} as BaseVariable<any>));\n this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());\n return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()))\n .catch(() => {\n // catch errors and show content\n })\n .then(() => {\n this.startUpVariablesLoaded = true;\n this.showContent = true;\n this.appConfig.refresh();\n });\n }\n\n onAttach() {\n this.isDetached = false;\n this.watcher.isActive = true;\n this.resetAppLocale();\n Object.values(this.fragments).forEach((f: any) => f.onAttach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.unmute && v.unmute());\n this.targetWidget?.invokeEventCallback('onAttach', [null, this.proxy]);\n if (this.refreshdataonattach) {\n Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()));\n }\n Object.values(this.Widgets).forEach((w: any) => { \n w.componentWillAttach && w.componentWillAttach();\n });\n }\n\n onDetach() {\n this.isDetached = true;\n this.watcher.isActive = false;\n Object.values(this.fragments).forEach((f: any) => f.onDetach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.mute && v.mute());\n this.targetWidget?.invokeEventCallback('onDetach', [null, this.proxy]);\n Object.values(this.Widgets).forEach((w: any) => { \n w.componentWillDetach && w.componentWillDetach();\n });\n }\n\n onDestroy() {\n this.cleanUpVariablesandActions.forEach((v: any) => v.destroy());\n this.watcher.destroy();\n }\n\n refresh() {\n (injector.get('AppConfig') as AppConfig).refresh();\n }\n\n forceUpdate() {\n super.forceUpdate();\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).forceUpdate());\n }\n\n render() {\n this.autoUpdateVariables.forEach(value => this.Variables[value]?.invokeOnParamChange());\n return (<ThemeProvider value={this.theme}>\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return this.renderWidget(this.props);\n }}\n </ToastConsumer>\n\n </ThemeProvider>);\n }\n}\n\n\n"],"mappings":";;;AA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ACpD;EAEA2F,WAAW,GAAG;IACZ,KAAK,CAACA,WAAW,EAAE;IACnBrH,MAAM,CAACmE,MAAM,CAAC,IAAI,CAACxB,SAAS,CAAC,CAACN,OAAO,CAAE+B,CAAM,IAAMA,CAAC,CAA4BiD,WAAW,EAAE,CAAC;EAChG;EAEAC,MAAM,GAAG;IACP,IAAI,CAACC,mBAAmB,CAAClF,OAAO,CAACmF,KAAK;MAAA;MAAA,gCAAI,IAAI,CAACtH,SAAS,CAACsH,KAAK,CAAC,0DAArB,sBAAuBC,mBAAmB,EAAE;IAAA,EAAC;IACvF,oBAAQ,oBAAC,aAAa;MAAC,KAAK,EAAE,IAAI,CAACvG;IAAM,gBACvC,oBAAC,aAAa,QACRwG,YAA0B,IAAK;MAC/B,IAAI,CAACC,OAAO,GAAGD,YAAY;MAC3B,OAAO,IAAI,CAACE,YAAY,CAAC,IAAI,CAAC3I,KAAK,CAAC;IACtC,CAAC,CACa,CAEJ;EAClB;AACJ"}
|
|
1
|
+
{"version":3,"names":["React","Text","get","filter","isNil","injector","toBoolean","toNumber","BaseComponent","BaseProps","BASE_THEME","ThemeProvider","VariableEvents","default","_viewPort","EVENTS","viewportEvents","WmFormField","WmForm","ToastConsumer","spinnerService","AppI18nService","FragmentProps","BaseFragment","constructor","props","defaultProps","createElement","text","title","okButtonText","cancelButtonText","onOk","onCancel","onClose","App","appConfig","app","formatters","Actions","Object","assign","Variables","cleanup","push","subscribe","ORIENTATION_CHANGE","$new","$old","isDetached","targetWidget","invokeEventCallback","proxy","screenWidth","width","screenHeight","height","SIZE_CHANGE","theme","destroy","baseUrl","url","resourceBaseUrl","onDestroy","onContentReady","onReady","refresh","onComponentChange","w","onComponentInit","id","name","Widgets","formWidgets","formFields","parentFormRef","pid","forEach","ff","formKey","registerFormFields","formfield","formRef","fragments","onComponentDestroy","formfields","handleUrl","startsWith","getDateFormat","fmt","dateFormat","replace","getTimeFormat","timeFormat","getDateTimeFormat","dateTimeFormat","getCurrencySymbol","currencyCode","getStyle","classes","inlineStyles","trim","length","mergeStyle","resetAppLocale","appLocale","messages","values","f","eval","fn","failOnError","call","e","val","componentWillUnmount","componentDidMount","memoize","key","o","_memoize","initVariableSpinner","variables","v","actions","concat","map","BEFORE_INVOKE","show","message","spinner","AFTER_INVOKE","hide","onFragmentReady","cleanUpVariablesandActions","fragmentVariables","fragmentActions","startUpActions","a","invoke","Promise","all","startUpVariables","s","catch","then","startUpVariablesLoaded","showContent","onAttach","watcher","isActive","unmute","refreshdataonattach","componentWillAttach","onDetach","mute","componentWillDetach","forceUpdate","render","autoUpdateVariables","value","invokeOnParamChange","toastService","toaster","renderWidget"],"sources":["base-fragment.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { get, filter, isNil } from 'lodash';\n\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { Formatter } from '@wavemaker/app-rn-runtime/core/formatters';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { toBoolean, toNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseComponent, BaseComponentState, BaseStyles, BaseProps, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BASE_THEME, { Theme, ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseVariable, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport { default as _viewPort, EVENTS as viewportEvents } from '@wavemaker/app-rn-runtime/core/viewport';\nimport App from './App';\nimport WmFormField from '@wavemaker/app-rn-runtime/components/data/form/form-field/form-field.component';\nimport WmForm from '@wavemaker/app-rn-runtime/components/data/form/form.component';\nimport { ToastConsumer, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport spinnerService from '@wavemaker/app-rn-runtime/runtime/services/app-spinner.service';\n\nimport AppI18nService from './services/app-i18n.service';\nimport { Watcher } from './watcher';\n\nexport class FragmentProps extends BaseProps {\n\n}\n\nexport interface FragmentState<T extends FragmentProps> extends BaseComponentState<T> {}\n\nexport type FragmentStyles = BaseStyles & {};\nexport default abstract class BaseFragment<P extends FragmentProps, S extends FragmentState<P>> extends BaseComponent<P, S, FragmentStyles> implements LifecycleListener {\n public App: App;\n public onReady: Function = () => {};\n public baseUrl = '';\n public resourceBaseUrl = '';\n public targetWidget = null as unknown as BaseComponent<any, any, any>;\n public Widgets: any = {};\n public Variables: any = {};\n public theme: Theme = BASE_THEME;\n public appLocale: any = {};\n private startUpVariables: string[] = [];\n private startUpVariablesLoaded = false;\n private startUpActions: string[] = [];\n private autoUpdateVariables: string[] = [];\n private cleanUpVariablesandActions: BaseVariable<any>[] = [];\n public fragmentVariables: any = {};\n public fragmentActions: any = {};\n public Actions: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n public cache = false;\n public refreshdataonattach= true;\n public isReactNativeApp = true;\n public fragments: any = {};\n public isDetached = false;\n public _memoize = {} as any;\n public toaster: any;\n public formatters: Map<string, Formatter>;\n public serviceDefinitions = {} as any;\n public Viewport = _viewPort;\n public loadingMessage = React.createElement(Text, [] as any, ['loading...']);\n public showContent = false;\n public notification = {\n text: '',\n title: '',\n okButtonText: '',\n cancelButtonText: '',\n onOk: () => {},\n onCancel: () => {},\n onClose: () => {}\n };\n public watcher: Watcher = null as any;\n constructor(props: P, defaultProps?: P) {\n super(props, null as any, defaultProps);\n this.App = this.appConfig.app;\n this.formatters = this.App.formatters;\n this.Actions = Object.assign({}, this.App.Actions);\n this.Variables = Object.assign({}, this.App.Variables);\n this.cleanup.push(_viewPort.subscribe(viewportEvents.ORIENTATION_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onOrientationchange', [null, this.proxy,\n {screenWidth: _viewPort.width,\n screenHeight: _viewPort.height}]);\n }));\n this.cleanup.push(_viewPort.subscribe(viewportEvents.SIZE_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onResize', [null, this.proxy,\n {screenWidth: $new.width,\n screenHeight: $new.height}]);\n }));\n this.cleanup.push(() => this.theme?.destroy());\n this.baseUrl = this.appConfig.url;\n this.resourceBaseUrl = this.appConfig.url;\n this.cleanup.push(() => this.onDestroy());\n }\n\n onContentReady() {\n this.onReady();\n this.appConfig.refresh();\n this.targetWidget && this.targetWidget.invokeEventCallback('onLoad', [null, this.proxy]);\n this.onContentReady = () => {};\n }\n\n onComponentChange(w: BaseComponent<any, any, any>) {\n this.refresh();\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n\n if (w instanceof WmForm) {\n if (!this.Widgets[id]) {\n this.Widgets[id] = w;\n }\n const formWidgets = this.Widgets[id].formWidgets;\n const formFields = this.Widgets[id].formFields;\n this.Widgets[id] = w;\n if (w.parentFormRef) {\n let pid = w.parentFormRef.props.id || w.parentFormRef.props.name;\n formFields.forEach((ff: any) => {\n const formKey = ff.props.formKey || ff.props.name;\n this.Widgets[pid].formFields.push(ff);\n this.Widgets[pid].formWidgets[formKey] = formWidgets[ff.props.name];\n });\n }\n w.registerFormFields(formFields, formWidgets);\n return;\n }\n if (w.props.formfield) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {formFields: [], formWidgets: {}};\n } else if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets[w.props.name] = w;\n return;\n }\n if (w instanceof WmFormField) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {};\n }\n if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets = this.Widgets[w.props.formRef].formWidgets || {};\n this.Widgets[w.props.formRef].formFields.push(w);\n return;\n }\n this.Widgets[id] = w;\n if (w instanceof BaseFragment && w !== this) {\n this.fragments[id] = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n delete this.Widgets[id];\n if (w instanceof BaseFragment) {\n delete this.fragments[id];\n }\n if (w instanceof WmForm) {\n w.formWidgets = {};\n w.formFields = [];\n w.formfields = {};\n }\n }\n\n handleUrl(url: string) {\n if (!url.startsWith('http') && !url.startsWith('file:')) {\n return this.appConfig.url + (url.startsWith('/') ? '' : '/') + url;\n }\n return url;\n }\n\n getDateFormat(fmt?: string) {\n // getting formats from appLocale when app locale is loaded locally.\n return (fmt || AppI18nService.dateFormat || get(this.appConfig, 'appLocale.formats.date')).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getTimeFormat(fmt?: string) {\n return fmt || AppI18nService.timeFormat || get(this.appConfig, 'appLocale.formats.time');\n }\n\n getDateTimeFormat(fmt?: string) {\n return (fmt || AppI18nService.dateTimeFormat || (get(this.appConfig, 'appLocale.formats.date') + ' ' + get(this.appConfig, 'appLocale.formats.time'))).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getCurrencySymbol(fmt?: string) {\n return (fmt || AppI18nService.currencyCode || 'USD');\n }\n\n getStyle(classes: string, inlineStyles:any = {}) {\n if (classes && classes.trim().length > 0) {\n return this.theme.mergeStyle({}, this.theme.getStyle(classes), inlineStyles);\n }\n return inlineStyles;\n }\n\n resetAppLocale() {\n this.appLocale = this.appConfig.appLocale.messages;\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n eval(fn: Function, failOnError = false) {\n try {\n return fn.call(this);\n } catch (e) {\n if (failOnError) {\n throw e;\n } else {\n return null;\n }\n }\n }\n\n toBoolean(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toBoolean(val);\n }\n\n toNumber(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toNumber(val);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.targetWidget && this.targetWidget.invokeEventCallback('onDestroy', [null, this.proxy]);\n }\n\n componentDidMount(): void {\n this.resetAppLocale();\n super.componentDidMount();\n }\n\n memoize(key: string, o: any) {\n if (!this._memoize[key]) {\n this._memoize[key] = o;\n }\n return this._memoize[key];\n }\n\n initVariableSpinner() {\n let variables = filter(this.Variables, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n const actions = filter(this.Actions, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n variables = variables.concat(actions);\n if (!variables.length) {\n return;\n }\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.BEFORE_INVOKE, () => {\n spinnerService.show({\n message: get(v, 'config.spinnerMessage'),\n spinner: this.App.appConfig.spinner\n });\n }))\n }));\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => {\n spinnerService.hide();\n }));\n }));\n }\n\n onFragmentReady() {\n this.cleanup.push(...Object.values({...this.Variables, ...this.Actions}).map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => this.App.refresh()));\n }));\n this.initVariableSpinner();\n this.cleanUpVariablesandActions.push(...Object.values({...this.fragmentVariables, ...this.fragmentActions} as BaseVariable<any>));\n this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());\n return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()))\n .catch(() => {\n // catch errors and show content\n })\n .then(() => {\n this.startUpVariablesLoaded = true;\n this.showContent = true;\n this.appConfig.refresh();\n });\n }\n\n onAttach() {\n this.isDetached = false;\n this.watcher.isActive = true;\n this.resetAppLocale();\n Object.values(this.fragments).forEach((f: any) => f.onAttach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.unmute && v.unmute());\n this.targetWidget?.invokeEventCallback('onAttach', [null, this.proxy]);\n if (this.refreshdataonattach) {\n Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()));\n }\n Object.values(this.Widgets).forEach((w: any) => { \n w.componentWillAttach && w.componentWillAttach();\n });\n }\n\n onDetach() {\n this.isDetached = true;\n this.watcher.isActive = false;\n Object.values(this.fragments).forEach((f: any) => f.onDetach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.mute && v.mute());\n this.targetWidget?.invokeEventCallback('onDetach', [null, this.proxy]);\n Object.values(this.Widgets).forEach((w: any) => { \n w.componentWillDetach && w.componentWillDetach();\n });\n }\n\n onDestroy() {\n this.cleanUpVariablesandActions.forEach((v: any) => v.destroy());\n this.watcher.destroy();\n }\n\n refresh() {\n (injector.get('AppConfig') as AppConfig).refresh();\n }\n\n forceUpdate() {\n super.forceUpdate();\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).forceUpdate());\n }\n\n render() {\n if (this.startUpVariablesLoaded) {\n this.autoUpdateVariables\n .forEach(value => this.Variables[value]?.invokeOnParamChange());\n }\n return (<ThemeProvider value={this.theme}>\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return this.renderWidget(this.props);\n }}\n </ToastConsumer>\n\n </ThemeProvider>);\n }\n}\n\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,GAAG,EAAEC,MAAM,EAAEC,KAAK,QAAQ,QAAQ;AAI3C,OAAOC,QAAQ,MAAM,yCAAyC;AAC9D,SAASC,SAAS,EAAEC,QAAQ,QAAQ,sCAAsC;AAC1E,SAASC,aAAa,EAAkCC,SAAS,QAA2B,+CAA+C;AAC3I,OAAOC,UAAU,IAAWC,aAAa,QAAQ,wCAAwC;AACzF,SAAuBC,cAAc,QAAQ,mDAAmD;AAChG,SAASC,OAAO,IAAIC,SAAS,EAAEC,MAAM,IAAIC,cAAc,QAAQ,yCAAyC;AAExG,OAAOC,WAAW,MAAM,gFAAgF;AACxG,OAAOC,MAAM,MAAM,+DAA+D;AAClF,SAASC,aAAa,QAAsB,8CAA8C;AAC1F,OAAOC,cAAc,MAAM,gEAAgE;AAE3F,OAAOC,cAAc,MAA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ACE,YAAY,CAAC,IAAI,CAAC3I,KAAK,CAAC;IACtC,CAAC,CACa,CAEJ;EAClB;AACJ"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
3
|
+
import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
|
|
3
4
|
const Drawer = createDrawerNavigator();
|
|
4
5
|
class AppDrawerNavigator extends React.Component {
|
|
5
6
|
constructor(props) {
|
|
@@ -14,6 +15,9 @@ class AppDrawerNavigator extends React.Component {
|
|
|
14
15
|
headerShown: false,
|
|
15
16
|
gestureHandlerProps: {
|
|
16
17
|
enabled: !this.props.hide
|
|
18
|
+
},
|
|
19
|
+
drawerStyle: {
|
|
20
|
+
backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
23
|
}, /*#__PURE__*/React.createElement(Drawer.Screen, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createDrawerNavigator","Drawer","AppDrawerNavigator","Component","constructor","props","render","content","drawerType","type","headerShown","gestureHandlerProps","enabled","hide","_props","rootComponent"],"sources":["drawer.navigator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { createDrawerNavigator } from '@react-navigation/drawer';\nconst Drawer = createDrawerNavigator();\n\ninterface AppDrawerNavigatorProps {\n content: (props: any) => ReactNode;\n hide: boolean,\n type: any;\n rootComponent: React.ReactNode;\n}\n\nclass AppDrawerNavigator extends React.Component<AppDrawerNavigatorProps, any, any> {\n\n constructor(props: AppDrawerNavigatorProps) {\n super(props);\n }\n\n render(){\n return (<Drawer.Navigator\n initialRouteName=\"pages\"\n drawerContent={this.props.content}\n screenOptions={{\n drawerType: this.props.type,\n headerShown: false,\n gestureHandlerProps: { enabled: !this.props.hide },\n }}>\n <Drawer.Screen name=\"pages\">\n {(_props) => this.props.rootComponent}\n </Drawer.Screen>\n </Drawer.Navigator>);\n }\n}\n\nexport default AppDrawerNavigator;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,MAAMC,MAAM,
|
|
1
|
+
{"version":3,"names":["React","createDrawerNavigator","ThemeVariables","Drawer","AppDrawerNavigator","Component","constructor","props","render","content","drawerType","type","headerShown","gestureHandlerProps","enabled","hide","drawerStyle","backgroundColor","INSTANCE","pageContentBgColor","_props","rootComponent"],"sources":["drawer.navigator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { createDrawerNavigator } from '@react-navigation/drawer';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nconst Drawer = createDrawerNavigator();\n\ninterface AppDrawerNavigatorProps {\n content: (props: any) => ReactNode;\n hide: boolean,\n type: any;\n rootComponent: React.ReactNode;\n}\n\nclass AppDrawerNavigator extends React.Component<AppDrawerNavigatorProps, any, any> {\n\n constructor(props: AppDrawerNavigatorProps) {\n super(props);\n }\n\n render(){\n return (<Drawer.Navigator\n initialRouteName=\"pages\"\n drawerContent={this.props.content}\n screenOptions={{\n drawerType: this.props.type,\n headerShown: false,\n gestureHandlerProps: { enabled: !this.props.hide },\n drawerStyle: { backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor }\n }}>\n <Drawer.Screen name=\"pages\">\n {(_props) => this.props.rootComponent}\n </Drawer.Screen>\n </Drawer.Navigator>);\n }\n}\n\nexport default AppDrawerNavigator;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,MAAMC,MAAM,GAAGF,qBAAqB,EAAE;AAStC,MAAMG,kBAAkB,SAASJ,KAAK,CAACK,SAAS,CAAoC;EAElFC,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,CAAC;EACd;EAEAC,MAAM,GAAE;IACN,oBAAQ,oBAAC,MAAM,CAAC,SAAS;MACvB,gBAAgB,EAAC,OAAO;MACxB,aAAa,EAAE,IAAI,CAACD,KAAK,CAACE,OAAQ;MAClC,aAAa,EAAE;QACXC,UAAU,EAAE,IAAI,CAACH,KAAK,CAACI,IAAI;QAC3BC,WAAW,EAAE,KAAK;QAClBC,mBAAmB,EAAE;UAAEC,OAAO,EAAE,CAAC,IAAI,CAACP,KAAK,CAACQ;QAAK,CAAC;QAClDC,WAAW,EAAE;UAAEC,eAAe,EAAGf,cAAc,CAACgB,QAAQ,CAACC;QAAmB;MAChF;IAAE,gBACF,oBAAC,MAAM,CAAC,MAAM;MAAC,IAAI,EAAC;IAAO,GACvBC,MAAM,IAAK,IAAI,CAACb,KAAK,CAACc,aAAa,CACvB,CACC;EACrB;AACF;AAEA,eAAejB,kBAAkB"}
|
|
@@ -4,6 +4,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { View } from 'react-native';
|
|
6
6
|
import { createStackNavigator } from '@react-navigation/stack';
|
|
7
|
+
import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
|
|
7
8
|
const Stack = createStackNavigator();
|
|
8
9
|
const pages = {};
|
|
9
10
|
class Screen extends React.Component {
|
|
@@ -67,7 +68,10 @@ const AppStackNavigator = props => {
|
|
|
67
68
|
return getPageId(p.name, params);
|
|
68
69
|
},
|
|
69
70
|
options: {
|
|
70
|
-
headerShown: false
|
|
71
|
+
headerShown: false,
|
|
72
|
+
cardStyle: {
|
|
73
|
+
backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor
|
|
74
|
+
}
|
|
71
75
|
}
|
|
72
76
|
});
|
|
73
77
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","createStackNavigator","Stack","pages","Screen","Component","constructor","props","state","renew","page","createPage","navigation","cleanUp","push","addListener","setState","createElement","route","name","component","destroyMe","setTimeout","componentWillUnmount","forEach","fn","render","getPageId","pageName","pageParams","pageParamsStr","Object","keys","sort","map","k","join","AppStackNavigator","landingPage","p","params","headerShown"],"sources":["stack.navigator.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { createStackNavigator } from '@react-navigation/stack';\n\nconst Stack = createStackNavigator();\n\ninterface AppStackNavigatorProps {\n pages: any[];\n landingPage: string; \n}\n\nconst pages = {} as any;\n\nclass Screen extends React.Component {\n\n private cleanUp = [] as Function[];\n\n constructor(props: any) {\n super(props);\n this.state = {\n renew: false,\n page: this.createPage()\n };\n const navigation = (this.props as any).navigation as any;\n this.cleanUp.push(navigation.addListener('focus', () => {\n const state = (this.state as any);\n if (state.renew) {\n state.page = this.createPage();\n this.setState(() => ({\n renew: false,\n page: state.page\n }));\n }\n }));\n }\n\n private createPage() {\n const props = this.props as any;\n return React.createElement(pages[props.route.name].component, {...props, destroyMe: () => {\n setTimeout(() => {\n this.setState(() => ({renew: true, page: null}));\n }, 100);\n }});\n }\n\n componentWillUnmount() {\n this.cleanUp.forEach(fn => fn && fn());\n }\n\n render() {\n return (this.state as any).page || (<View/>);\n }\n}\n\nconst getPageId = (pageName: string, pageParams: any) => {\n const pageParamsStr = pageParams ? Object.keys(pageParams)\n .sort()\n .map((k: string) => `${k}=${pageParams[k]}`)\n .join('&') : '';\n return `${pageName}?${pageParamsStr}`;\n}\n\nconst AppStackNavigator = (props: AppStackNavigatorProps) => {\n return (<Stack.Navigator initialRouteName={props.landingPage}>\n {props.pages.map(p => {\n pages[p.name] = p;\n return (\n <Stack.Screen key={p.name}\n name={p.name}\n component={Screen}\n getId={({params}) => getPageId(p.name, params)}\n options={{\n headerShown: false\n }}\n />);\n })}\n </Stack.Navigator>);\n};\n\nexport default AppStackNavigator;"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,oBAAoB,QAAQ,yBAAyB;
|
|
1
|
+
{"version":3,"names":["React","View","createStackNavigator","ThemeVariables","Stack","pages","Screen","Component","constructor","props","state","renew","page","createPage","navigation","cleanUp","push","addListener","setState","createElement","route","name","component","destroyMe","setTimeout","componentWillUnmount","forEach","fn","render","getPageId","pageName","pageParams","pageParamsStr","Object","keys","sort","map","k","join","AppStackNavigator","landingPage","p","params","headerShown","cardStyle","backgroundColor","INSTANCE","pageContentBgColor"],"sources":["stack.navigator.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { createStackNavigator } from '@react-navigation/stack';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nconst Stack = createStackNavigator();\n\ninterface AppStackNavigatorProps {\n pages: any[];\n landingPage: string; \n}\n\nconst pages = {} as any;\n\nclass Screen extends React.Component {\n\n private cleanUp = [] as Function[];\n\n constructor(props: any) {\n super(props);\n this.state = {\n renew: false,\n page: this.createPage()\n };\n const navigation = (this.props as any).navigation as any;\n this.cleanUp.push(navigation.addListener('focus', () => {\n const state = (this.state as any);\n if (state.renew) {\n state.page = this.createPage();\n this.setState(() => ({\n renew: false,\n page: state.page\n }));\n }\n }));\n }\n\n private createPage() {\n const props = this.props as any;\n return React.createElement(pages[props.route.name].component, {...props, destroyMe: () => {\n setTimeout(() => {\n this.setState(() => ({renew: true, page: null}));\n }, 100);\n }});\n }\n\n componentWillUnmount() {\n this.cleanUp.forEach(fn => fn && fn());\n }\n\n render() {\n return (this.state as any).page || (<View/>);\n }\n}\n\nconst getPageId = (pageName: string, pageParams: any) => {\n const pageParamsStr = pageParams ? Object.keys(pageParams)\n .sort()\n .map((k: string) => `${k}=${pageParams[k]}`)\n .join('&') : '';\n return `${pageName}?${pageParamsStr}`;\n}\n\nconst AppStackNavigator = (props: AppStackNavigatorProps) => {\n return (<Stack.Navigator initialRouteName={props.landingPage}>\n {props.pages.map(p => {\n pages[p.name] = p;\n return (\n <Stack.Screen key={p.name}\n name={p.name}\n component={Screen}\n getId={({params}) => getPageId(p.name, params)}\n options={{\n headerShown: false,\n cardStyle: {\n backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor\n }\n }}\n />);\n })}\n </Stack.Navigator>);\n};\n\nexport default AppStackNavigator;"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,OAAOC,cAAc,MAAM,kDAAkD;AAE7E,MAAMC,KAAK,GAAGF,oBAAoB,EAAE;AAOpC,MAAMG,KAAK,GAAG,CAAC,CAAQ;AAEvB,MAAMC,MAAM,SAASN,KAAK,CAACO,SAAS,CAAC;EAInCC,WAAW,CAACC,KAAU,EAAE;IACtB,KAAK,CAACA,KAAK,CAAC;IAAC,iCAHG,EAAE;IAIlB,IAAI,CAACC,KAAK,GAAG;MACXC,KAAK,EAAE,KAAK;MACZC,IAAI,EAAE,IAAI,CAACC,UAAU;IACvB,CAAC;IACD,MAAMC,UAAU,GAAI,IAAI,CAACL,KAAK,CAASK,UAAiB;IACxD,IAAI,CAACC,OAAO,CAACC,IAAI,CAACF,UAAU,CAACG,WAAW,CAAC,OAAO,EAAE,MAAM;MACtD,MAAMP,KAAK,GAAI,IAAI,CAACA,KAAa;MACjC,IAAIA,KAAK,CAACC,KAAK,EAAE;QACfD,KAAK,CAACE,IAAI,GAAG,IAAI,CAACC,UAAU,EAAE;QAC9B,IAAI,CAACK,QAAQ,CAAC,OAAO;UACnBP,KAAK,EAAE,KAAK;UACZC,IAAI,EAAEF,KAAK,CAACE;QACd,CAAC,CAAC,CAAC;MACL;IACF,CAAC,CAAC,CAAC;EACL;EAEQC,UAAU,GAAG;IACnB,MAAMJ,KAAK,GAAG,IAAI,CAACA,KAAY;IAC/B,oBAAOT,KAAK,CAACmB,aAAa,CAACd,KAAK,CAACI,KAAK,CAACW,KAAK,CAACC,IAAI,CAAC,CAACC,SAAS,EAAE;MAAC,GAAGb,KAAK;MAAEc,SAAS,EAAE,MAAM;QACxFC,UAAU,CAAC,MAAM;UACf,I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C,OAAO,EAAE;QACPC,WAAW,EAAE,KAAK;QAClBC,SAAS,EAAE;UACTC,eAAe,EAAE1C,cAAc,CAAC2C,QAAQ,CAACC;QAC3C;MACF;IAAE,EACF;EACJ,CAAC,CAAC,CACY;AACpB,CAAC;AAED,eAAeR,iBAAiB"}
|
|
@@ -15,12 +15,16 @@ export class AppSpinnerService {
|
|
|
15
15
|
_defineProperty(this, "count", 0);
|
|
16
16
|
_defineProperty(this, "image", '');
|
|
17
17
|
_defineProperty(this, "skeleton", false);
|
|
18
|
+
_defineProperty(this, "defaultDisplayOptions", {});
|
|
18
19
|
}
|
|
19
20
|
setImage(path) {
|
|
20
21
|
this.image = path;
|
|
21
22
|
}
|
|
23
|
+
setDefaultOptions(options) {
|
|
24
|
+
this.defaultDisplayOptions = options;
|
|
25
|
+
}
|
|
22
26
|
show() {
|
|
23
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
27
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.defaultDisplayOptions;
|
|
24
28
|
this.skeleton = options.spinner.loader == 'skeleton';
|
|
25
29
|
if (this.count === 0 && !this.destroy) {
|
|
26
30
|
setTimeout(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","appDisplayManagerService","WmSpinner","ThemeVariables","AppSpinnerService","constructor","displayManager","setImage","path","image","
|
|
1
|
+
{"version":3,"names":["React","View","appDisplayManagerService","WmSpinner","ThemeVariables","AppSpinnerService","constructor","displayManager","setImage","path","image","setDefaultOptions","options","defaultDisplayOptions","show","skeleton","spinner","loader","count","destroy","setTimeout","content","styles","appSpinnerContainer","message","delay","hide","call","justifyContent","alignItems","width","height","backgroundColor","INSTANCE","primaryContrastColor","opacity","spinnerService"],"sources":["app-spinner.service.tsx"],"sourcesContent":["import React from 'react';\n\nimport { View, ViewStyle } from 'react-native';\n\nimport { SpinnerService, DisplayOptions } from '@wavemaker/app-rn-runtime/core/spinner.service';\nimport { DisplayManager } from '@wavemaker/app-rn-runtime/core/display.manager';\nimport appDisplayManagerService from '@wavemaker/app-rn-runtime/runtime/services/app-display-manager.service';\nimport WmSpinner from '@wavemaker/app-rn-runtime/components/basic/spinner/spinner.component';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport class AppSpinnerService implements SpinnerService {\n public displayOptions = {} as DisplayOptions;\n public destroy: any;\n public delay = 0;\n private count = 0;\n private image: string = '';\n public skeleton: boolean = false;\n private defaultDisplayOptions: DisplayOptions = {} as any;\n constructor(private displayManager: DisplayManager) {}\n\n setImage(path: string) {\n this.image = path;\n }\n\n setDefaultOptions(options: DisplayOptions) {\n this.defaultDisplayOptions = options;\n }\n\n show(options: DisplayOptions = this.defaultDisplayOptions) {\n this.skeleton = options.spinner.loader == 'skeleton';\n if (this.count === 0 && !this.destroy) { \n setTimeout(() => {\n const content = (<>\n {!this.skeleton? \n <View style={styles.appSpinnerContainer}>\n <WmSpinner\n caption={options.message || ''}\n classname=\"global-spinner\"\n lottie={options.spinner}></WmSpinner>\n </View> : null}\n </>);\n this.destroy = this.displayManager.show({ content: content });\n }, this.delay);\n }\n this.count++;\n }\n\n hide() {\n this.skeleton = false;\n if (this.count > 0) {\n this.count--;\n } else {\n this.count = 0;\n }\n if (this.count === 0) {\n setTimeout(() => {\n if (!this.count && this.destroy) {\n this.destroy.call(this.displayManager);\n this.destroy = null;\n }\n }, 300);\n }\n }\n}\n\nconst styles = {\n appSpinnerContainer:{ \n justifyContent: 'center', \n alignItems: 'center', \n width:'100%', \n height:'100%', \n backgroundColor: ThemeVariables.INSTANCE.primaryContrastColor, \n opacity: 0.8 \n } as ViewStyle\n}\n\nconst spinnerService = new AppSpinnerService(appDisplayManagerService);\nexport default spinnerService;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,IAAI,QAAmB,cAAc;AAI9C,OAAOC,wBAAwB,MAAM,wEAAwE;AAC7G,OAAOC,SAAS,MAAM,s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,CAACG,KAAK,GAAG,CAAC,EAAE;MAClB,IAAI,CAACA,KAAK,EAAE;IACd,CAAC,MAAM;MACL,IAAI,CAACA,KAAK,GAAG,CAAC;IAChB;IACA,IAAI,IAAI,CAACA,KAAK,KAAK,CAAC,EAAE;MACpBE,UAAU,CAAC,MAAM;QACf,IAAI,CAAC,IAAI,CAACF,KAAK,IAAI,IAAI,CAACC,OAAO,EAAE;UAC/B,IAAI,CAACA,OAAO,CAACQ,IAAI,CAAC,IAAI,CAACpB,cAAc,CAAC;UACtC,IAAI,CAACY,OAAO,GAAG,IAAI;QACrB;MACF,CAAC,EAAE,GAAG,CAAC;IACT;EACF;AACF;AAEA,MAAMG,MAAM,GAAG;EACbC,mBAAmB,EAAC;IAClBK,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAC,MAAM;IACZC,MAAM,EAAC,MAAM;IACbC,eAAe,EAAE5B,cAAc,CAAC6B,QAAQ,CAACC,oBAAoB;IAC7DC,OAAO,EAAE;EACX;AACF,CAAC;AAED,MAAMC,cAAc,GAAG,IAAI/B,iBAAiB,CAACH,wBAAwB,CAAC;AACtE,eAAekC,cAAc"}
|
|
@@ -23,7 +23,7 @@ class AppToastService {
|
|
|
23
23
|
let timeout;
|
|
24
24
|
this.refreshCount++;
|
|
25
25
|
if (i < 0) {
|
|
26
|
-
options.elevationIndex =
|
|
26
|
+
options.elevationIndex = this.toastsOpened.length + this.getAppConfig().app.modalsOpened + 1;
|
|
27
27
|
this.toastsOpened.push(options);
|
|
28
28
|
// hide the toast when toaster is clicked
|
|
29
29
|
if (options.hideOnClick) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["injector","AppToastService","getAppConfig","appConfig","get","refresh","refreshCount","showToast","options","i","toastsOpened","findIndex","o","name","timeout","elevationIndex","
|
|
1
|
+
{"version":3,"names":["injector","AppToastService","getAppConfig","appConfig","get","refresh","refreshCount","showToast","options","i","toastsOpened","findIndex","o","name","timeout","elevationIndex","length","app","modalsOpened","push","hideOnClick","cb","onClick","hideToast","clearTimeout","duration","setTimeout","splice","onClose","appToastService"],"sources":["app-toast.service.tsx"],"sourcesContent":["import injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { ToastOptions, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\n\nclass AppToastService implements ToastService {\n\n public toastsOpened = [] as ToastOptions[];\n public appConfig: any;\n public refreshCount = 0;\n\n private getAppConfig() {\n if (!this.appConfig) {\n this.appConfig = injector.get<AppConfig>('APP_CONFIG');\n }\n return this.appConfig;\n }\n \n refresh() {\n this.refreshCount++;\n this.appConfig.refresh();\n }\n\n public showToast(options: ToastOptions) {\n const i = this.toastsOpened.findIndex(o => o.name === options.name);\n let timeout: any;\n this.refreshCount++;\n if (i < 0) {\n options.elevationIndex = this.toastsOpened.length + this.getAppConfig().app.modalsOpened + 1;\n this.toastsOpened.push(options);\n // hide the toast when toaster is clicked\n if (options.hideOnClick) {\n let cb = options.onClick;\n options.onClick = () => {\n cb && cb();\n this.hideToast(options);\n clearTimeout(timeout);\n }\n }\n if (options.duration) {\n timeout = setTimeout(() => {\n this.hideToast(options);\n }, options.duration);\n }\n }\n this.refresh();\n }\n\n public hideToast(options?: ToastOptions) {\n const i = options ? this.toastsOpened.findIndex(o => o.name === options.name) : (this.toastsOpened.length - 1);\n if (i >= 0) {\n const o = this.toastsOpened.splice(i, 1)[0];\n this.refresh();\n options?.onClose && options.onClose();\n }\n }\n}\n\nconst appToastService = new AppToastService();\n\nexport default appToastService;\n"],"mappings":";;;AAAA,OAAOA,QAAQ,MAAM,yCAAyC;AAI9D,MAAMC,eAAe,CAAyB;EAAA;IAAA,sCAEpB,EAAE;IAAA;IAAA,sCAEF,CAAC;EAAA;EAEfC,YAAY,GAAG;IACrB,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE;MACnB,IAAI,CAACA,SAAS,GAAGH,QAAQ,C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AAI,CAACH,YAAY,CAACM,MAAM,GAAG,CAAE;IAC9G,IAAIP,CAAC,IAAI,CAAC,EAAE;MACR,MAAMG,CAAC,GAAG,IAAI,CAACF,YAAY,CAACiB,MAAM,CAAClB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;MAC3C,IAAI,CAACJ,OAAO,EAAE;MACd,CAAAG,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEoB,OAAO,KAAIpB,OAAO,CAACoB,OAAO,EAAE;IACzC;EACJ;AACJ;AAEA,MAAMC,eAAe,GAAG,IAAI5B,eAAe,EAAE;AAE7C,eAAe4B,eAAe"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { LinearGradient as ExpoLinearGradient } from 'expo-linear-gradient';
|
|
6
|
+
import { Image, StyleSheet, View } from 'react-native';
|
|
7
|
+
import { isEmpty, isNil, isNumber, isString } from 'lodash-es';
|
|
8
|
+
import imageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';
|
|
9
|
+
import { AssetConsumer } from '@wavemaker/app-rn-runtime/core/asset.provider';
|
|
10
|
+
const IMAGE_URL_REGEX = /url\(['|"]?(.+)['|"]?\)$/gi;
|
|
11
|
+
const LINEAT_GRADIENT_REGEX = /linear-gradient\((.+)\)$/gi;
|
|
12
|
+
const BACKGROUND_POSITION_REGEX = /([0-9%]+)[a-z]*\s*([0-9%]+)[a-z]*/g;
|
|
13
|
+
const BACKGROUND_SIZE_REGEX = /([0-9%]+)[a-z]*\s*([0-9%]+)[a-z]*/g;
|
|
14
|
+
export class LinearGradient extends React.Component {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
this.state = this.parse();
|
|
18
|
+
}
|
|
19
|
+
parse() {
|
|
20
|
+
let val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.value;
|
|
21
|
+
let state = {};
|
|
22
|
+
const splits = val.split(',').map(v => v.trim());
|
|
23
|
+
let angle = 0;
|
|
24
|
+
const locations = [];
|
|
25
|
+
if (splits[0].endsWith('deg')) {
|
|
26
|
+
angle = parseInt(splits[0].split('deg')[0]) % 360;
|
|
27
|
+
angle = angle < 0 ? 360 + angle : angle;
|
|
28
|
+
splits.shift();
|
|
29
|
+
}
|
|
30
|
+
angle += 90;
|
|
31
|
+
const delta = Math.round(Math.tan(angle * Math.PI / 180) * 100) / 100;
|
|
32
|
+
if (Math.abs(delta) > 1) {
|
|
33
|
+
state = {
|
|
34
|
+
end: {
|
|
35
|
+
x: -0.5 / delta + 0.5,
|
|
36
|
+
y: 0
|
|
37
|
+
},
|
|
38
|
+
start: {
|
|
39
|
+
x: 0.5 / delta + 0.5,
|
|
40
|
+
y: 1
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
} else {
|
|
44
|
+
state = {
|
|
45
|
+
start: {
|
|
46
|
+
x: 0,
|
|
47
|
+
y: -0.5 * delta + 0.5
|
|
48
|
+
},
|
|
49
|
+
end: {
|
|
50
|
+
x: 1,
|
|
51
|
+
y: 0.5 * delta + 0.5
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (angle >= 270 && angle <= 450) {
|
|
56
|
+
state = {
|
|
57
|
+
start: state.end,
|
|
58
|
+
end: state.start
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
state.colors = [];
|
|
62
|
+
state.locations = [];
|
|
63
|
+
splits.map(s => {
|
|
64
|
+
var _s$matchAll$next;
|
|
65
|
+
const p = (_s$matchAll$next = s.matchAll(/\s*([0-9]+)%/g).next()) === null || _s$matchAll$next === void 0 ? void 0 : _s$matchAll$next.value;
|
|
66
|
+
if (p) {
|
|
67
|
+
state.locations.push(parseInt(p[1]) / 100);
|
|
68
|
+
state.colors.push(s.replace(p[0], ''));
|
|
69
|
+
} else {
|
|
70
|
+
state.locations.push(null);
|
|
71
|
+
state.colors.push(s);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return state;
|
|
75
|
+
}
|
|
76
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
77
|
+
if (prevProps.value !== this.props.value) {
|
|
78
|
+
this.setState(this.parse());
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
var _this$props$size, _this$props$style;
|
|
83
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
84
|
+
style: [{
|
|
85
|
+
borderWidth: 0,
|
|
86
|
+
overflow: 'hidden'
|
|
87
|
+
}, StyleSheet.absoluteFill, this.props.style]
|
|
88
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
89
|
+
style: [StyleSheet.absoluteFill, this.props.middle ? {
|
|
90
|
+
flexDirection: 'row',
|
|
91
|
+
justifyContent: 'center',
|
|
92
|
+
alignItems: 'center'
|
|
93
|
+
} : null]
|
|
94
|
+
}, /*#__PURE__*/React.createElement(ExpoLinearGradient, {
|
|
95
|
+
colors: this.state.colors,
|
|
96
|
+
locations: this.state.locations,
|
|
97
|
+
start: this.state.start,
|
|
98
|
+
end: this.state.end,
|
|
99
|
+
style: [(_this$props$size = this.props.size) !== null && _this$props$size !== void 0 && _this$props$size.width ? this.props.size : StyleSheet.absoluteFill, this.props.position, {
|
|
100
|
+
position: 'absolute',
|
|
101
|
+
borderRadius: (_this$props$style = this.props.style) === null || _this$props$style === void 0 ? void 0 : _this$props$style.borderRadius
|
|
102
|
+
}]
|
|
103
|
+
})), this.props.children);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export class BackgroundComponent extends React.Component {
|
|
107
|
+
constructor(props) {
|
|
108
|
+
super(props);
|
|
109
|
+
_defineProperty(this, "loadAsset", null);
|
|
110
|
+
this.state = {};
|
|
111
|
+
}
|
|
112
|
+
caluculateSize(imageSrc) {
|
|
113
|
+
if (isNumber(imageSrc)) {
|
|
114
|
+
const {
|
|
115
|
+
width,
|
|
116
|
+
height
|
|
117
|
+
} = Image.resolveAssetSource(imageSrc);
|
|
118
|
+
this.setState({
|
|
119
|
+
naturalImageWidth: width,
|
|
120
|
+
naturalImageHeight: height
|
|
121
|
+
});
|
|
122
|
+
} else if (!isNil(imageSrc)) {
|
|
123
|
+
imageSizeEstimator.getSize(imageSrc.uri, (width, height) => {
|
|
124
|
+
this.setState({
|
|
125
|
+
naturalImageWidth: width,
|
|
126
|
+
naturalImageHeight: height
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
getPositionAndSize() {
|
|
132
|
+
var _this$props$size2, _this$getGradient, _this$getGradient$val;
|
|
133
|
+
const result = {};
|
|
134
|
+
if (this.props.resizeMode) {
|
|
135
|
+
result.resizeMode = this.props.resizeMode;
|
|
136
|
+
return result;
|
|
137
|
+
} else if (this.props.position === 'center') {
|
|
138
|
+
result.resizeMode = 'center';
|
|
139
|
+
} else if (this.props.size === 'contain' || this.props.size === 'cover') {
|
|
140
|
+
result.resizeMode = this.props.size;
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
143
|
+
const size = (_this$props$size2 = this.props.size) === null || _this$props$size2 === void 0 ? void 0 : _this$props$size2.matchAll(BACKGROUND_SIZE_REGEX).next().value;
|
|
144
|
+
result.size = {};
|
|
145
|
+
if (size) {
|
|
146
|
+
result.size.width = size[1].endsWith('%') ? size[1] : parseInt(size[1]);
|
|
147
|
+
result.size.height = size[2].endsWith('%') ? size[2] : parseInt(size[2]);
|
|
148
|
+
}
|
|
149
|
+
if (!result.resizeMode && this.props.position) {
|
|
150
|
+
result.position = {};
|
|
151
|
+
const position = this.props.position.matchAll(BACKGROUND_POSITION_REGEX).next().value;
|
|
152
|
+
result.position.top = position[1].endsWith('%') ? position[1] : parseInt(position[1]);
|
|
153
|
+
result.position.left = position[2].endsWith('%') ? position[2] : parseInt(position[2]);
|
|
154
|
+
}
|
|
155
|
+
if (!((_this$getGradient = this.getGradient()) !== null && _this$getGradient !== void 0 && (_this$getGradient$val = _this$getGradient.value) !== null && _this$getGradient$val !== void 0 && _this$getGradient$val.length)) {
|
|
156
|
+
if (this.props.repeat === 'no-repeat') {
|
|
157
|
+
result.size.width = result.size.width || this.state.naturalImageWidth;
|
|
158
|
+
result.size.height = result.size.height || this.state.naturalImageHeight;
|
|
159
|
+
} else if (this.props.repeat === 'repeat-x') {
|
|
160
|
+
result.resizeMode = 'repeat';
|
|
161
|
+
result.size.width = result.size.width || '100%';
|
|
162
|
+
result.size.height = result.size.height || this.state.naturalImageHeight;
|
|
163
|
+
} else if (this.props.repeat === 'repeat-y') {
|
|
164
|
+
result.resizeMode = 'repeat';
|
|
165
|
+
result.size.width = result.size.width || this.state.naturalImageWidth;
|
|
166
|
+
result.size.height = result.size.height || '100%';
|
|
167
|
+
} else {
|
|
168
|
+
result.resizeMode = 'repeat';
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
renderLinearGradient(data) {
|
|
174
|
+
const psresult = this.getPositionAndSize();
|
|
175
|
+
return /*#__PURE__*/React.createElement(LinearGradient, {
|
|
176
|
+
value: data || '',
|
|
177
|
+
style: this.props.style,
|
|
178
|
+
size: psresult.size,
|
|
179
|
+
position: psresult.position,
|
|
180
|
+
middle: psresult.resizeMode === 'center'
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
184
|
+
if (prevProps.image !== this.props.image) {
|
|
185
|
+
this.setImage();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
componentDidMount() {
|
|
189
|
+
setTimeout(() => this.setImage(), 100);
|
|
190
|
+
}
|
|
191
|
+
setImage() {
|
|
192
|
+
var _this$props$image, _source;
|
|
193
|
+
let source = (_this$props$image = this.props.image) === null || _this$props$image === void 0 ? void 0 : _this$props$image.trim();
|
|
194
|
+
if ((_source = source) !== null && _source !== void 0 && _source.startsWith('url')) {
|
|
195
|
+
var _this$props$image2;
|
|
196
|
+
source = (_this$props$image2 = this.props.image) === null || _this$props$image2 === void 0 ? void 0 : _this$props$image2.matchAll(IMAGE_URL_REGEX).next().value[1];
|
|
197
|
+
}
|
|
198
|
+
if (this.loadAsset) {
|
|
199
|
+
source = this.loadAsset(source);
|
|
200
|
+
}
|
|
201
|
+
if (isString(source) && (source.startsWith('data:') || source.startsWith('http') || source.startsWith('file:'))) {
|
|
202
|
+
source = {
|
|
203
|
+
uri: source
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
this.caluculateSize(source);
|
|
207
|
+
this.setState({
|
|
208
|
+
imageSrc: source
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
getGradient() {
|
|
212
|
+
var _this$props$image3;
|
|
213
|
+
return (_this$props$image3 = this.props.image) === null || _this$props$image3 === void 0 ? void 0 : _this$props$image3.trim().matchAll(LINEAT_GRADIENT_REGEX).next();
|
|
214
|
+
}
|
|
215
|
+
renderImage() {
|
|
216
|
+
const psresult = this.getPositionAndSize();
|
|
217
|
+
return /*#__PURE__*/React.createElement(AssetConsumer, null, loadAsset => {
|
|
218
|
+
this.loadAsset = loadAsset;
|
|
219
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
220
|
+
style: [{
|
|
221
|
+
borderWidth: 0,
|
|
222
|
+
overflow: 'hidden'
|
|
223
|
+
}, StyleSheet.absoluteFill, this.props.style]
|
|
224
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
225
|
+
style: [StyleSheet.absoluteFill, this.props.position === 'center' ? {
|
|
226
|
+
flexDirection: 'row',
|
|
227
|
+
justifyContent: 'center',
|
|
228
|
+
alignItems: 'center'
|
|
229
|
+
} : null]
|
|
230
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
231
|
+
style: [{
|
|
232
|
+
position: 'absolute',
|
|
233
|
+
overflow: 'hidden'
|
|
234
|
+
}, psresult.position, isEmpty(psresult.size) ? StyleSheet.absoluteFill : psresult.size]
|
|
235
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
236
|
+
source: this.state.imageSrc,
|
|
237
|
+
resizeMode: psresult.resizeMode || 'cover',
|
|
238
|
+
style: [{
|
|
239
|
+
width: '100%',
|
|
240
|
+
height: '100%'
|
|
241
|
+
}, isEmpty(psresult.size) ? {
|
|
242
|
+
minWidth: this.state.naturalImageWidth,
|
|
243
|
+
minHeight: this.state.naturalImageHeight
|
|
244
|
+
} : null]
|
|
245
|
+
}))));
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
render() {
|
|
249
|
+
var _gradientData$value;
|
|
250
|
+
const gradientData = this.getGradient();
|
|
251
|
+
if (gradientData !== null && gradientData !== void 0 && (_gradientData$value = gradientData.value) !== null && _gradientData$value !== void 0 && _gradientData$value.length) {
|
|
252
|
+
return this.renderLinearGradient(gradientData.value[1]);
|
|
253
|
+
} else if (this.props.image) {
|
|
254
|
+
return this.renderImage();
|
|
255
|
+
}
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
//# sourceMappingURL=background.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","LinearGradient","ExpoLinearGradient","Image","StyleSheet","View","isEmpty","isNil","isNumber","isString","imageSizeEstimator","AssetConsumer","IMAGE_URL_REGEX","LINEAT_GRADIENT_REGEX","BACKGROUND_POSITION_REGEX","BACKGROUND_SIZE_REGEX","Component","constructor","props","state","parse","val","value","splits","split","map","v","trim","angle","locations","endsWith","parseInt","shift","delta","Math","round","tan","PI","abs","end","x","y","start","colors","s","p","matchAll","next","push","replace","componentDidUpdate","prevProps","prevState","snapshot","setState","render","borderWidth","overflow","absoluteFill","style","middle","flexDirection","justifyContent","alignItems","size","width","position","borderRadius","children","BackgroundComponent","caluculateSize","imageSrc","height","resolveAssetSource","naturalImageWidth","naturalImageHeight","getSize","uri","getPositionAndSize","result","resizeMode","top","left","getGradient","length","repeat","renderLinearGradient","data","psresult","image","setImage","componentDidMount","setTimeout","source","startsWith","loadAsset","renderImage","minWidth","minHeight","gradientData"],"sources":["background.component.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LinearGradient as ExpoLinearGradient, LinearGradientPoint } from 'expo-linear-gradient';\nimport { Image, StyleSheet, View, ViewStyle } from 'react-native';\nimport { isEmpty, isNil, isNumber, isString } from 'lodash-es';\nimport imageSizeEstimator from '@wavemaker/app-rn-runtime/core/imageSizeEstimator';\nimport { AssetConsumer } from '@wavemaker/app-rn-runtime/core/asset.provider';\n\nexport interface LinearGradientProps {\n value: string;\n children: any;\n style?: ViewStyle;\n size?: ViewStyle;\n position?: ViewStyle;\n middle?: boolean;\n}\n\nexport interface LinearGradientState {\n colors: string[];\n locations: number[];\n start: LinearGradientPoint;\n end: LinearGradientPoint;\n}\n\nconst IMAGE_URL_REGEX = /url\\(['|\"]?(.+)['|\"]?\\)$/gi;\nconst LINEAT_GRADIENT_REGEX = /linear-gradient\\((.+)\\)$/gi;\nconst BACKGROUND_POSITION_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\nconst BACKGROUND_SIZE_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\n\nexport class LinearGradient extends React.Component<LinearGradientProps, LinearGradientState> {\n\n constructor(props: LinearGradientProps) {\n super(props);\n this.state = this.parse();\n }\n\n parse(val = this.props.value) {\n let state = {} as LinearGradientState;\n const splits = val.split(',').map(v => v.trim());\n let angle = 0;\n const locations: LinearGradientPoint[] = [];\n if (splits[0].endsWith('deg')) {\n angle = (parseInt(splits[0].split('deg')[0]))%360;\n angle = angle < 0 ? (360 + angle) : angle;\n splits.shift();\n }\n angle += 90;\n const delta = Math.round(Math.tan((angle * Math.PI) / 180) * 100)/100;\n if (Math.abs(delta) > 1) {\n state = {\n end: {\n x: -0.5 / delta + 0.5,\n y: 0\n },\n start: {\n x: 0.5 / delta + 0.5,\n y: 1\n }\n } as LinearGradientState;\n } else {\n state = {\n start: {\n x: 0,\n y: -0.5 * delta + 0.5\n },\n end: {\n x: 1,\n y: 0.5 * delta + 0.5\n }\n } as LinearGradientState;\n }\n if (angle >= 270 && angle <= 450) {\n state = {\n start : state.end,\n end: state.start\n } as LinearGradientState;\n }\n state.colors = [];\n state.locations = [];\n splits.map(s => {\n const p = s.matchAll(/\\s*([0-9]+)%/g).next()?.value;\n if (p) {\n state.locations.push(parseInt(p[1]) / 100);\n state.colors.push(s.replace(p[0], ''));\n } else {\n state.locations.push(null as any);\n state.colors.push(s);\n }\n });\n return state;\n }\n\n componentDidUpdate(prevProps: Readonly<LinearGradientProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (prevProps.value !== this.props.value) {\n this.setState(this.parse());\n }\n }\n \n\n public render() {\n return (\n <View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, this.props.middle ? {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n } : null]}>\n <ExpoLinearGradient\n colors={this.state.colors}\n locations={this.state.locations}\n start={this.state.start}\n end={this.state.end}\n style={[\n this.props.size?.width ? this.props.size : StyleSheet.absoluteFill,\n this.props.position,\n {position: 'absolute', borderRadius: this.props.style?.borderRadius}\n ]}\n />\n </View>\n {this.props.children}\n </View>\n );\n }\n}\n\nexport interface BackgroundProps {\n image?: string;\n position?: string;\n children?: any;\n resizeMode?: string;\n repeat?: string;\n style?: ViewStyle;\n size: string;\n}\n\nexport interface BackgroundState {\n imageSrc: any;\n naturalImageWidth: number,\n naturalImageHeight: number\n}\n\nexport class BackgroundComponent extends React.Component<BackgroundProps, BackgroundState> {\n\n private loadAsset: (path: string) => number | string = null as any;\n\n constructor(props: BackgroundProps) {\n super(props);\n this.state = {} as BackgroundState;\n }\n\n public caluculateSize(imageSrc: any) {\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n } else if (!isNil(imageSrc)) {\n imageSizeEstimator.getSize(imageSrc.uri, (width: number, height: number) => {\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n });\n }\n }\n\n public getPositionAndSize() {\n const result: {\n resizeMode? : string,\n position?: {\n top?: string | number,\n left?: string | number,\n },\n size?: {\n width?: string | number,\n height? : string | number\n }\n } = {} as any;\n if (this.props.resizeMode) {\n result.resizeMode = this.props.resizeMode;\n return result;\n } else if (this.props.position === 'center') {\n result.resizeMode = 'center';\n } else if (this.props.size === 'contain' || this.props.size === 'cover') {\n result.resizeMode = this.props.size;\n return result;\n }\n const size = this.props.size?.matchAll(BACKGROUND_SIZE_REGEX).next().value;\n result.size = {};\n if (size) {\n result.size.width = size[1].endsWith('%') ? size[1] : parseInt(size[1]);\n result.size.height = size[2].endsWith('%') ? size[2] : parseInt(size[2]);\n }\n if (!result.resizeMode && this.props.position) {\n result.position = {};\n const position = this.props.position.matchAll(BACKGROUND_POSITION_REGEX).next().value;\n result.position.top = position[1].endsWith('%') ? position[1] : parseInt(position[1]);\n result.position.left = position[2].endsWith('%') ? position[2] : parseInt(position[2]);\n }\n if (!this.getGradient()?.value?.length) {\n if (this.props.repeat === 'no-repeat') {\n result.size.width = result.size.width || this.state.naturalImageWidth; \n result.size.height = result.size.height || this.state.naturalImageHeight; \n } else if (this.props.repeat === 'repeat-x') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || '100%'; \n result.size.height = result.size.height || this.state.naturalImageHeight; \n } else if (this.props.repeat === 'repeat-y') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || this.state.naturalImageWidth; \n result.size.height = result.size.height || '100%'; \n } else {\n result.resizeMode = 'repeat';\n }\n }\n return result;\n }\n\n public renderLinearGradient(data: string) {\n const psresult = this.getPositionAndSize();\n return (\n <LinearGradient\n value={data || ''}\n style={this.props.style}\n size={psresult.size}\n position={psresult.position}\n middle={psresult.resizeMode === 'center'}>\n </LinearGradient>\n );\n }\n\n componentDidUpdate(prevProps: Readonly<BackgroundProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (prevProps.image !== this.props.image) {\n this.setImage();\n }\n }\n\n componentDidMount(): void {\n setTimeout(() => this.setImage(), 100);\n }\n\n setImage() {\n let source = this.props.image?.trim() as any;\n if (source?.startsWith('url')) {\n source = this.props.image?.matchAll(IMAGE_URL_REGEX).next().value[1];\n }\n if (this.loadAsset) {\n source = this.loadAsset(source);\n }\n if (isString(source) && (\n source.startsWith('data:') ||\n source.startsWith('http') || \n source.startsWith('file:'))) {\n source = {\n uri: source\n };\n }\n this.caluculateSize(source);\n this.setState({\n imageSrc: source\n } as BackgroundState);\n }\n\n public getGradient() {\n return this.props.image?.trim().matchAll(LINEAT_GRADIENT_REGEX).next();\n }\n\n public renderImage() {\n const psresult = this.getPositionAndSize();\n return (\n <AssetConsumer>\n {(loadAsset) => {\n this.loadAsset = loadAsset;\n return (<View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, this.props.position === 'center' ? {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n } : null]}>\n <View style={[\n { position: 'absolute', overflow: 'hidden' },\n psresult.position,\n isEmpty(psresult.size) ? StyleSheet.absoluteFill : psresult.size\n ]}>\n <Image\n source={this.state.imageSrc}\n resizeMode={psresult.resizeMode as any || 'cover'}\n style={[\n { \n width: '100%',\n height: '100%'\n }, \n isEmpty(psresult.size) ? {\n minWidth: this.state.naturalImageWidth,\n minHeight: this.state.naturalImageHeight\n } : null\n ]}/>\n </View>\n </View>\n </View>);\n }}\n </AssetConsumer>\n );\n }\n\n public render() {\n const gradientData = this.getGradient();\n if (gradientData?.value?.length) {\n return this.renderLinearGradient(gradientData.value[1]);\n } else if (this.props.image) {\n return this.renderImage();\n }\n return null;\n }\n}\n\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,kBAAkB,QAA6B,sBAAsB;AAChG,SAASC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACjE,SAASC,OAAO,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AAC9D,OAAOC,kBAAkB,MAAM,mDAAmD;AAClF,SAASC,aAAa,QAAQ,+CAA+C;AAkB7E,MAAMC,eAAe,GAAG,4BAA4B;AACpD,MAAMC,qBAAqB,GAAG,4BAA4B;AAC1D,MAAMC,yBAAyB,GAAG,oCAAoC;AACtE,MAAMC,qBAAqB,GAAG,oCAAoC;AAElE,OAAO,MAAMd,cAAc,SAASD,KAAK,CAACgB,SAAS,CAA2C;EAE1FC,WAAW,CAACC,KAA0B,EAAE;IACpC,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,KAAK,GAAG,IAAI,CAACC,KAAK,EAAE;EAC7B;EAEAA,KAAK,GAAyB;IAAA,IAAxBC,GAAG,uEAAG,IAAI,CAACH,KAAK,CAACI,KAAK;IACxB,IAAIH,KAAK,GAAG,CAAC,CAAwB;IACrC,MAAMI,MAAM,GAAGF,GAAG,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACC,IAAI,EAAE,CAAC;IAChD,IAAIC,KAAK,GAAG,CAAC;IACb,MAAMC,SAAgC,GAAG,EAAE;IAC3C,IAAIN,MAAM,CAAC,CAAC,CAAC,CAACO,QAAQ,CAAC,KAAK,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