@wavemaker/app-rn-runtime 12.0.0-next.141209 → 12.0.0-next.1417124
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +9 -2
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
- app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +1 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +1 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +2 -0
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +6 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js +7 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +8 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +3 -1
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -0
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +16 -2
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js +8 -0
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +14 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +43 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +17 -3
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +24 -1
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +12 -7
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +6 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +11 -3
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +24 -0
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +13 -3
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +15 -0
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +5 -2
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +1 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +3 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +3 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +4 -19
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +43 -12
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/core/AppConfig.js.map +1 -1
- app-rn-runtime/core/base.component.js +31 -5
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +9 -7
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/storage.service.js +15 -0
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/wm-component-tree.js +58 -0
- app-rn-runtime/core/wm-component-tree.js.map +1 -0
- app-rn-runtime/package.json +13 -6
- app-rn-runtime/runtime/App.js +21 -2
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +1 -0
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +18 -0
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +38 -2
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +3 -0
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +4 -4
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +5 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +1 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/http.service.js +5 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +14 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -94,6 +94,7 @@ export const AppNavigator = props => {
|
|
94
94
|
landingPage: appConfig.landingPage
|
95
95
|
});
|
96
96
|
const leftNav = /*#__PURE__*/React.createElement(AppDrawerNavigator, {
|
97
|
+
drawerWidth: props.app.appConfig.leftNavWidth,
|
97
98
|
type: props.drawerAnimation === 'slide-over' ? 'front' : 'slide',
|
98
99
|
hide: props.hideDrawer,
|
99
100
|
content: () => props.drawerContent && props.drawerContent() || /*#__PURE__*/React.createElement(View, null),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Platform","View","NavigationContainer","DefaultTheme","isWebPreviewMode","injector","AppDrawerNavigator","AppStackNavigator","isEmpty","keys","last","ThemeVariables","getNavigationState","pageName","params","routes","name","state","index","getStateFromPath","path","options","hash","window","location","substring","startsWith","paramstr","split","forEach","p","k","v","getPathFromState","pagesRoute","pageRoute","href","map","join","setTimeout","_window$history$state","id","history","replaceState","AppNavigator","props","_appConfig$pages","appConfig","get","pages","linking","prefixes","appId","config","screens","undefined","navigationTheme","colors","background","INSTANCE","pageContentBgColor","stack","createElement","landingPage","leftNav","type","drawerAnimation","hide","hideDrawer","content","drawerContent","rootComponent","initialState","OS","landingPageParams","theme"],"sources":["App.navigator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Platform, View } from 'react-native';\nimport { NavigationContainer, DefaultTheme } from '@react-navigation/native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppDrawerNavigator from './navigator/drawer.navigator';\nimport AppStackNavigator from './navigator/stack.navigator';\nimport { isEmpty, keys, last } from 'lodash';\nimport ThemeVariables from '../styles/theme.variables';\n\ndeclare const window: any;\n\nexport interface AppNavigatorProps {\n drawerContent: () => ReactNode;\n drawerAnimation: string;\n hideDrawer: boolean;\n landingPage?: string;\n landingPageParams?: any;\n app: any;\n}\n\nconst getNavigationState = (pageName: string, params: any) => {\n return {\n routes: [{\n name: 'pages',\n state: {\n index: 0,\n routes: [{\n name: pageName,\n params: params\n }]\n }\n }]\n };\n};\n\nconst getStateFromPath = (path: string, options?: any) => {\n let hash: string = window.location.hash;\n hash = hash.substring(1);\n if (hash && hash.startsWith('/')) {\n hash = hash.substring(1);\n }\n if (!hash) {\n return;\n }\n let [pageName, paramstr] = hash.split('?');\n let params = {} as any;\n if (paramstr) {\n paramstr.split('&').forEach((p) => {\n const [k, v] = p.split('=');\n params[k] = v;\n });\n }\n return getNavigationState(pageName, params);\n};\n\nconst getPathFromState = (state: any, options: any) => {\n const pagesRoute = state?.routes[0];\n const pageRoute: any = last(pagesRoute?.state.routes);\n let path = '';\n if (pageRoute) {\n path = window.location.href.split('#')[0] + '#/'+ pageRoute.name;\n if (!isEmpty(pageRoute.params)) {\n path += '?' + keys(pageRoute.params).map((k) => {\n return `${k}=${pageRoute.params[k]}`\n }).join('&');\n }\n }\n setTimeout(() => { \n const id = window.history.state?.id;\n window.history.replaceState({id}, null, path);\n });\n return path;\n};\n\nexport const AppNavigator = (props: AppNavigatorProps) => {\n const appConfig = injector.get<AppConfig>('APP_CONFIG');\n const pages = {};\n const linking = {\n prefixes: [`${appConfig.appId}://`],\n config: {\n screens: {\n \"pages\": {\n path: \"pages\",\n screens: pages\n }\n }\n },\n getStateFromPath: isWebPreviewMode() ? getStateFromPath : undefined,\n getPathFromState: isWebPreviewMode()? getPathFromState: undefined\n } as any;\n\n const navigationTheme = {\n ...DefaultTheme,\n colors: {\n ...DefaultTheme.colors,\n background: ThemeVariables.INSTANCE.pageContentBgColor\n },\n };\n \n appConfig.pages?.forEach((p) => {\n //@ts-ignore\n pages[p.name] = p.name;\n });\n const stack = (<AppStackNavigator\n pages={appConfig.pages || []}\n landingPage={appConfig.landingPage}></AppStackNavigator>);\n const leftNav = (<AppDrawerNavigator\n type={props.drawerAnimation === 'slide-over' ? 'front' : 'slide'}\n hide={props.hideDrawer}\n content={() => (props.drawerContent && props.drawerContent()) || (<View/>)}\n rootComponent={stack}/>);\n const initialState = props.landingPage && Platform.OS !== 'web' ? \n getNavigationState(props.landingPage, props.landingPageParams)\n : undefined;\n return (<NavigationContainer initialState={initialState} linking={linking} theme={navigationTheme}>{leftNav}</NavigationContainer>);\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,0BAA0B;AAC5E,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAOC,QAAQ,MAAM,yCAAyC;AAC9D,OAAOC,kBAAkB,MAAM,8BAA8B;AAC7D,OAAOC,iBAAiB,MAAM,6BAA6B;AAC3D,SAASC,OAAO,EAAEC,IAAI,EAAEC,IAAI,QAAQ,QAAQ;AAC5C,OAAOC,cAAc,MAAM,2BAA2B;AAatD,MAAMC,kBAAkB,GAAGA,CAACC,QAAgB,EAAEC,MAAW,KAAK;EAC5D,OAAO;IACLC,MAAM,EAAE,CAAC;MACPC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;QACLC,KAAK,EAAE,CAAC;QACRH,MAAM,EAAE,CAAC;UACPC,IAAI,EAAEH,QAAQ;UACdC,MAAM,EAAEA;QACV,CAAC;MACH;IACF,CAAC;EACH,CAAC;AACH,CAA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;MACN,GAAGtD,YAAY,CAACsD,MAAM;MACtBC,UAAU,EAAE/C,cAAc,CAACgD,QAAQ,CAACC;IACtC;EACF,CAAC;EAED,CAAAd,gBAAA,GAAAC,SAAS,CAACE,KAAK,cAAAH,gBAAA,eAAfA,gBAAA,CAAiBjB,OAAO,CAAEC,CAAC,IAAK;IAC9B;IACAmB,KAAK,CAACnB,CAAC,CAACd,IAAI,CAAC,GAAGc,CAAC,CAACd,IAAI;EACxB,CAAC,CAAC;EACF,MAAM6C,KAAK,gBAAI9D,KAAA,CAAA+D,aAAA,CAACvD,iBAAiB;IAC/B0C,KAAK,EAAEF,SAAS,CAACE,KAAK,IAAI,EAAG;IAC7Bc,WAAW,EAAEhB,SAAS,CAACgB;EAAY,CAAoB,CAAE;EAC3D,MAAMC,OAAO,gBAAIjE,KAAA,CAAA+D,aAAA,CAACxD,kBAAkB;IAChC2D,
|
1
|
+
{"version":3,"names":["React","Platform","View","NavigationContainer","DefaultTheme","isWebPreviewMode","injector","AppDrawerNavigator","AppStackNavigator","isEmpty","keys","last","ThemeVariables","getNavigationState","pageName","params","routes","name","state","index","getStateFromPath","path","options","hash","window","location","substring","startsWith","paramstr","split","forEach","p","k","v","getPathFromState","pagesRoute","pageRoute","href","map","join","setTimeout","_window$history$state","id","history","replaceState","AppNavigator","props","_appConfig$pages","appConfig","get","pages","linking","prefixes","appId","config","screens","undefined","navigationTheme","colors","background","INSTANCE","pageContentBgColor","stack","createElement","landingPage","leftNav","drawerWidth","app","leftNavWidth","type","drawerAnimation","hide","hideDrawer","content","drawerContent","rootComponent","initialState","OS","landingPageParams","theme"],"sources":["App.navigator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Platform, View } from 'react-native';\nimport { NavigationContainer, DefaultTheme } from '@react-navigation/native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppDrawerNavigator from './navigator/drawer.navigator';\nimport AppStackNavigator from './navigator/stack.navigator';\nimport { isEmpty, keys, last } from 'lodash';\nimport ThemeVariables from '../styles/theme.variables';\n\ndeclare const window: any;\n\nexport interface AppNavigatorProps {\n drawerContent: () => ReactNode;\n drawerAnimation: string;\n hideDrawer: boolean;\n landingPage?: string;\n landingPageParams?: any;\n app: any;\n}\n\nconst getNavigationState = (pageName: string, params: any) => {\n return {\n routes: [{\n name: 'pages',\n state: {\n index: 0,\n routes: [{\n name: pageName,\n params: params\n }]\n }\n }]\n };\n};\n\nconst getStateFromPath = (path: string, options?: any) => {\n let hash: string = window.location.hash;\n hash = hash.substring(1);\n if (hash && hash.startsWith('/')) {\n hash = hash.substring(1);\n }\n if (!hash) {\n return;\n }\n let [pageName, paramstr] = hash.split('?');\n let params = {} as any;\n if (paramstr) {\n paramstr.split('&').forEach((p) => {\n const [k, v] = p.split('=');\n params[k] = v;\n });\n }\n return getNavigationState(pageName, params);\n};\n\nconst getPathFromState = (state: any, options: any) => {\n const pagesRoute = state?.routes[0];\n const pageRoute: any = last(pagesRoute?.state.routes);\n let path = '';\n if (pageRoute) {\n path = window.location.href.split('#')[0] + '#/'+ pageRoute.name;\n if (!isEmpty(pageRoute.params)) {\n path += '?' + keys(pageRoute.params).map((k) => {\n return `${k}=${pageRoute.params[k]}`\n }).join('&');\n }\n }\n setTimeout(() => { \n const id = window.history.state?.id;\n window.history.replaceState({id}, null, path);\n });\n return path;\n};\n\nexport const AppNavigator = (props: AppNavigatorProps) => {\n const appConfig = injector.get<AppConfig>('APP_CONFIG');\n const pages = {};\n const linking = {\n prefixes: [`${appConfig.appId}://`],\n config: {\n screens: {\n \"pages\": {\n path: \"pages\",\n screens: pages\n }\n }\n },\n getStateFromPath: isWebPreviewMode() ? getStateFromPath : undefined,\n getPathFromState: isWebPreviewMode()? getPathFromState: undefined\n } as any;\n\n const navigationTheme = {\n ...DefaultTheme,\n colors: {\n ...DefaultTheme.colors,\n background: ThemeVariables.INSTANCE.pageContentBgColor\n },\n };\n \n appConfig.pages?.forEach((p) => {\n //@ts-ignore\n pages[p.name] = p.name;\n });\n const stack = (<AppStackNavigator\n pages={appConfig.pages || []}\n landingPage={appConfig.landingPage}></AppStackNavigator>);\n const leftNav = (<AppDrawerNavigator\n drawerWidth={props.app.appConfig.leftNavWidth}\n type={props.drawerAnimation === 'slide-over' ? 'front' : 'slide'}\n hide={props.hideDrawer}\n content={() => (props.drawerContent && props.drawerContent()) || (<View/>)}\n rootComponent={stack}/>);\n const initialState = props.landingPage && Platform.OS !== 'web' ? \n getNavigationState(props.landingPage, props.landingPageParams)\n : undefined;\n return (<NavigationContainer initialState={initialState} linking={linking} theme={navigationTheme}>{leftNav}</NavigationContainer>);\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,0BAA0B;AAC5E,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAOC,QAAQ,MAAM,yCAAyC;AAC9D,OAAOC,kBAAkB,MAAM,8BAA8B;AAC7D,OAAOC,iBAAiB,MAAM,6BAA6B;AAC3D,SAASC,OAAO,EAAEC,IAAI,EAAEC,IAAI,QAAQ,QAAQ;AAC5C,OAAOC,cAAc,MAAM,2BAA2B;AAatD,MAAMC,kBAAkB,GAAGA,CAACC,QAAgB,EAAEC,MAAW,KAAK;EAC5D,OAAO;IACLC,MAAM,EAAE,CAAC;MACPC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;QACLC,KAAK,EAAE,CAAC;QACRH,MAAM,EAAE,CAAC;UACPC,IAAI,EAAEH,QAAQ;UACdC,MAAM,EAAEA;QACV,CAAC;MACH;IACF,CAAC;EACH,CAAC;AACH,CAAC;AAED,MAAMK,gBAAgB,GAAGA,CAACC,IAAY,EAAEC,OAAa,KAAK;EACxD,IAAIC,IAAY,GAAGC,MAAM,CAACC,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emaker/app-rn-runtime/core/toast.service';
|
|
17
17
|
import spinnerService from '@wavemaker/app-rn-runtime/runtime/services/app-spinner.service';
|
18
18
|
import AppI18nService from './services/app-i18n.service';
|
19
19
|
import WmFormAction from '@wavemaker/app-rn-runtime/components/data/form/form-action/form-action.component';
|
20
|
+
import WmLeftPanel from '@wavemaker/app-rn-runtime/components/page/left-panel/left-panel.component';
|
20
21
|
export class SkeletonAnimationProps extends BaseProps {
|
21
22
|
constructor(...args) {
|
22
23
|
super(...args);
|
@@ -174,6 +175,10 @@ export default class BaseFragment extends BaseComponent {
|
|
174
175
|
if (w instanceof BaseFragment && w !== this) {
|
175
176
|
this.fragments[id] = w;
|
176
177
|
}
|
178
|
+
if (w instanceof WmLeftPanel) {
|
179
|
+
var _w$_INSTANCE$styles;
|
180
|
+
this.appConfig.leftNavWidth = (_w$_INSTANCE$styles = w._INSTANCE.styles) === null || _w$_INSTANCE$styles === void 0 || (_w$_INSTANCE$styles = _w$_INSTANCE$styles.root) === null || _w$_INSTANCE$styles === void 0 ? void 0 : _w$_INSTANCE$styles.width;
|
181
|
+
}
|
177
182
|
}
|
178
183
|
onComponentDestroy(w) {
|
179
184
|
const id = w.props.id || w.props.name;
|
@@ -277,6 +282,7 @@ export default class BaseFragment extends BaseComponent {
|
|
277
282
|
}
|
278
283
|
this.cleanup.push(...variables.map(v => {
|
279
284
|
return v.subscribe(VariableEvents.BEFORE_INVOKE, () => {
|
285
|
+
this.App.notify(VariableEvents.BEFORE_INVOKE, v);
|
280
286
|
spinnerService.show({
|
281
287
|
message: get(v, 'config.spinnerMessage'),
|
282
288
|
spinner: this.App.appConfig.spinner
|
@@ -285,6 +291,7 @@ export default class BaseFragment extends BaseComponent {
|
|
285
291
|
}));
|
286
292
|
this.cleanup.push(...variables.map(v => {
|
287
293
|
return v.subscribe(VariableEvents.AFTER_INVOKE, () => {
|
294
|
+
this.App.notify(VariableEvents.AFTER_INVOKE, v);
|
288
295
|
spinnerService.hide();
|
289
296
|
});
|
290
297
|
}));
|
@@ -296,6 +303,17 @@ export default class BaseFragment extends BaseComponent {
|
|
296
303
|
}).map(v => {
|
297
304
|
return v.subscribe(VariableEvents.AFTER_INVOKE, () => this.App.refresh());
|
298
305
|
}));
|
306
|
+
Object.values({
|
307
|
+
...this.fragmentVariables,
|
308
|
+
...this.fragmentActions
|
309
|
+
}).map(v => {
|
310
|
+
v.subscribe(VariableEvents.BEFORE_INVOKE, () => {
|
311
|
+
this.App.notify(VariableEvents.BEFORE_INVOKE, v);
|
312
|
+
});
|
313
|
+
v.subscribe(VariableEvents.AFTER_INVOKE, () => {
|
314
|
+
this.App.notify(VariableEvents.AFTER_INVOKE, v);
|
315
|
+
});
|
316
|
+
});
|
299
317
|
this.initVariableSpinner();
|
300
318
|
this.cleanUpVariablesandActions.push(...Object.values({
|
301
319
|
...this.fragmentVariables,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","get","filter","isNil","TestIdPrefixProvider","TextIdPrefixConsumer","injector","toBoolean","toNumber","isFullPathUrl","BaseComponent","BaseProps","ParentContext","BASE_THEME","ThemeProvider","VariableEvents","default","_viewPort","EVENTS","viewportEvents","WmFormField","WmForm","ToastConsumer","spinnerService","AppI18nService","WmFormAction","SkeletonAnimationProps","constructor","args","_defineProperty","FragmentProps","BaseFragment","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","_this$theme","theme","destroy","baseUrl","url","resourceBaseUrl","onDestroy","onContentReady","onReady","refresh","onComponentChange","w","onComponentInit","id","name","formWidgets","formFields","formActions","Widgets","buttonArray","parentFormRef","pid","forEach","ff","formKey","registerFormFields","registerFormActions","formfield","formRef","fragments","onComponentDestroy","formfields","handleUrl","startsWith","getDateFormat","fmt","dateFormat","replace","getTimeFormat","timeFormat","getDateTimeFormat","dateTimeFormat","getCurrencySymbol","currencyCode","getStyle","classes","inlineStyles","trim","length","mergeStyle","getFormFieldStyles","formField","type","_formField$classname","suffix","classname","split","map","s","join","resetAppLocale","appLocale","messages","values","f","eval","fn","failOnError","call","e","val","componentWillUnmount","componentDidMount","memoize","key","o","_memoize","initVariableSpinner","variables","v","actions","concat","BEFORE_INVOKE","show","message","spinner","AFTER_INVOKE","hide","onFragmentReady","cleanUpVariablesandActions","fragmentVariables","fragmentActions","startUpActions","a","invoke","Promise","all","startUpVariables","catch","error","console","then","startUpVariablesLoaded","showContent","onAttach","_this$targetWidget","watcher","isActive","unmute","refreshdataonattach","componentWillAttach","onDetach","_this$targetWidget2","mute","componentWillDetach","forceUpdate","generateTestIdPrefix","testId","getTestId","reduce","i","charCodeAt","render","autoUpdateVariables","value","_this$Variables$value","invokeOnParamChange","isVisible","Consumer","parent","_this$parent","setParent","_showSkeleton","state","showskeleton","Provider","testIdPrefix","toastService","toaster","renderWidget"],"sources":["base-fragment.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } 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 { TestIdPrefixProvider, TextIdPrefixConsumer } from '@wavemaker/app-rn-runtime/core/testid.provider';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { toBoolean, toNumber, isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseComponent, BaseComponentState, BaseStyles, BaseProps, LifecycleListener, ParentContext } 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';\nimport WmFormAction from '@wavemaker/app-rn-runtime/components/data/form/form-action/form-action.component';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\nimport { WmSkeletonStyles } from '../components/basic/skeleton/skeleton.styles';\n\nexport class SkeletonAnimationProps extends BaseProps {\n skeletonanimationresource = \"\";\n skeletonanimationspeed = 1;\n}\n\nexport class FragmentProps extends SkeletonAnimationProps {}\n\nexport interface FragmentState<T extends FragmentProps> extends BaseComponentState<T> {}\n\nexport type FragmentStyles = BaseStyles & {\n skeleton?: WmSkeletonStyles\n};\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 protected 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 let formWidgets: any, formFields: any, formActions: any;\n\n if (w instanceof WmForm) {\n if (!this.Widgets[id]) {\n this.Widgets[id] = w;\n }\n if (w.props.id) {\n const name: any = w.props.name;\n formWidgets = this.Widgets[name].formWidgets;\n formFields = this.Widgets[name].formFields;\n formActions = this.Widgets[name].buttonArray;\n this.Widgets[name].formFields = [];\n this.Widgets[name].buttonArray = [];\n this.Widgets[name].formWidgets = {};\n } else {\n formWidgets = this.Widgets[id].formWidgets;\n formFields = this.Widgets[id].formFields;\n formActions = this.Widgets[id].buttonArray;\n }\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 w.registerFormActions(formActions);\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 if (!this.Widgets[w.props.formRef].formWidgets) {\n this.Widgets[w.props.formRef].formWidgets = {}\n }\n this.Widgets[w.props.formRef].formWidgets[w.props.name] = w;\n return;\n }\n if (w instanceof WmFormAction) {\n if (!this.Widgets[w.props.formKey]) {\n this.Widgets[w.props.formKey] = {};\n }\n if (!this.Widgets[w.props.formKey].buttonArray) {\n this.Widgets[w.props.formKey].buttonArray = [];\n }\n this.Widgets[w.props.formKey].buttonArray.push(w);\n return;\n }\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 (isFullPathUrl(url)) {\n return url;\n }\n return this.appConfig.url + (url.startsWith('/') ? '' : '/') + 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 getFormFieldStyles(formField: any, type: string){\n let suffix = ''\n switch(type){\n case 'label' :\n suffix = '_formLabel'\n break\n case 'commonField' :\n suffix = '-input'\n break\n default :\n ''\n }\n return formField?.classname?.trim()?.split(' ')?.map((s:string) => s.trim() + suffix).join(' ');\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 false;\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((error) => {\n // catch errors and show content\n console.error(error);\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 generateTestIdPrefix() {\n const testId = this.getTestId();\n return testId && (testId.split('')\n .reduce((a, v, i) => a + (v.charCodeAt(0) * (i + 1)), 0) + '');\n }\n\n render() {\n if (this.startUpVariablesLoaded) {\n this.autoUpdateVariables\n .forEach(value => this.Variables[value]?.invokeOnParamChange());\n }\n return this.isVisible() ? (\n <ParentContext.Consumer>\n {(parent) => {\n this.setParent(parent);\n this._showSkeleton = this.state.props.showskeleton !== false \n && (this.parent?._showSkeleton || this.state.props.showskeleton === true);\n let theme = this.theme;\n return (\n <ParentContext.Provider value={this}>\n <ThemeProvider value={theme}>\n <TextIdPrefixConsumer>\n {(testIdPrefix) => {\n this.testIdPrefix = testIdPrefix || '';\n return (\n <TestIdPrefixProvider value={this.generateTestIdPrefix() || ''}>\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return this.renderWidget(this.props);\n }}\n </ToastConsumer>\n </TestIdPrefixProvider>);\n }}\n </TextIdPrefixConsumer>\n </ThemeProvider>\n </ParentContext.Provider>);\n }}\n </ParentContext.Consumer>) : null;\n }\n\n\n}\n\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAc,cAAc;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,KAAK,QAAQ,Q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B,CAAC,CAAC;MAAA,EAAC;IACnE;IACA,OAAO,IAAI,CAACC,SAAS,CAAC,CAAC,gBACvBjM,KAAA,CAAAmC,aAAA,CAACtB,aAAa,CAACqL,QAAQ,QACnBC,MAAM,IAAK;MAAA,IAAAC,YAAA;MACb,IAAI,CAACC,SAAS,CAACF,MAAM,CAAC;MACtB,IAAI,CAACG,aAAa,GAAG,IAAI,CAACC,KAAK,CAACtK,KAAK,CAACuK,YAAY,KAAK,KAAK,KACxD,EAAAJ,YAAA,OAAI,CAACD,MAAM,cAAAC,YAAA,uBAAXA,YAAA,CAAaE,aAAa,KAAI,IAAI,CAACC,KAAK,CAACtK,KAAK,CAACuK,YAAY,KAAK,IAAI,CAAC;MACzE,IAAIrI,KAAK,GAAG,IAAI,CAACA,KAAK;MACtB,oBACFnE,KAAA,CAAAmC,aAAA,CAACtB,aAAa,CAAC4L,QAAQ;QAACX,KAAK,EAAE;MAAK,gBAClC9L,KAAA,CAAAmC,aAAA,CAACpB,aAAa;QAAC+K,KAAK,EAAE3H;MAAM,gBAC1BnE,KAAA,CAAAmC,aAAA,CAAC7B,oBAAoB,QACfoM,YAAY,IAAK;QACjB,IAAI,CAACA,YAAY,GAAGA,YAAY,IAAI,EAAE;QACtC,oBACA1M,KAAA,CAAAmC,aAAA,CAAC9B,oBAAoB;UAACyL,KAAK,EAAE,IAAI,CAACR,oBAAoB,CAAC,CAAC,IAAI;QAAG,gBAC7DtL,KAAA,CAAAmC,aAAA,CAACZ,aAAa,QACZoL,YAA0B,IAAK;UAC/B,IAAI,CAACC,OAAO,GAAGD,YAAY;UAC3B,OAAO,IAAI,CAACE,YAAY,CAAC,IAAI,CAAC5K,KAAK,CAAC;QACtC,CACa,CACO,CAAC;MACzB,CACkB,CACT,CACO,CAAC;IACzB,CACwB,CAAC,GAAI,IAAI;EACnC;AAGJ","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Text","get","filter","isNil","TestIdPrefixProvider","TextIdPrefixConsumer","injector","toBoolean","toNumber","isFullPathUrl","BaseComponent","BaseProps","ParentContext","BASE_THEME","ThemeProvider","VariableEvents","default","_viewPort","EVENTS","viewportEvents","WmFormField","WmForm","ToastConsumer","spinnerService","AppI18nService","WmFormAction","WmLeftPanel","SkeletonAnimationProps","constructor","args","_defineProperty","FragmentProps","BaseFragment","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","_this$theme","theme","destroy","baseUrl","url","resourceBaseUrl","onDestroy","onContentReady","onReady","refresh","onComponentChange","w","onComponentInit","id","name","formWidgets","formFields","formActions","Widgets","buttonArray","parentFormRef","pid","forEach","ff","formKey","registerFormFields","registerFormActions","formfield","formRef","fragments","_w$_INSTANCE$styles","leftNavWidth","_INSTANCE","styles","root","onComponentDestroy","formfields","handleUrl","startsWith","getDateFormat","fmt","dateFormat","replace","getTimeFormat","timeFormat","getDateTimeFormat","dateTimeFormat","getCurrencySymbol","currencyCode","getStyle","classes","inlineStyles","trim","length","mergeStyle","getFormFieldStyles","formField","type","_formField$classname","suffix","classname","split","map","s","join","resetAppLocale","appLocale","messages","values","f","eval","fn","failOnError","call","e","val","componentWillUnmount","componentDidMount","memoize","key","o","_memoize","initVariableSpinner","variables","v","actions","concat","BEFORE_INVOKE","notify","show","message","spinner","AFTER_INVOKE","hide","onFragmentReady","fragmentVariables","fragmentActions","cleanUpVariablesandActions","startUpActions","a","invoke","Promise","all","startUpVariables","catch","error","console","then","startUpVariablesLoaded","showContent","onAttach","_this$targetWidget","watcher","isActive","unmute","refreshdataonattach","componentWillAttach","onDetach","_this$targetWidget2","mute","componentWillDetach","forceUpdate","generateTestIdPrefix","testId","getTestId","reduce","i","charCodeAt","render","autoUpdateVariables","value","_this$Variables$value","invokeOnParamChange","isVisible","Consumer","parent","_this$parent","setParent","_showSkeleton","state","showskeleton","Provider","testIdPrefix","toastService","toaster","renderWidget"],"sources":["base-fragment.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } 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 { TestIdPrefixProvider, TextIdPrefixConsumer } from '@wavemaker/app-rn-runtime/core/testid.provider';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { toBoolean, toNumber, isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseComponent, BaseComponentState, BaseStyles, BaseProps, LifecycleListener, ParentContext } 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';\nimport WmFormAction from '@wavemaker/app-rn-runtime/components/data/form/form-action/form-action.component';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport WmLeftPanel from '@wavemaker/app-rn-runtime/components/page/left-panel/left-panel.component';\n\nexport class SkeletonAnimationProps extends BaseProps {\n skeletonanimationresource = \"\";\n skeletonanimationspeed = 1;\n}\n\nexport class FragmentProps extends SkeletonAnimationProps {}\n\nexport interface FragmentState<T extends FragmentProps> extends BaseComponentState<T> {}\n\nexport type FragmentStyles = BaseStyles & {\n skeleton?: WmSkeletonStyles\n};\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 protected 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 let formWidgets: any, formFields: any, formActions: any;\n\n if (w instanceof WmForm) {\n if (!this.Widgets[id]) {\n this.Widgets[id] = w;\n }\n if (w.props.id) {\n const name: any = w.props.name;\n formWidgets = this.Widgets[name].formWidgets;\n formFields = this.Widgets[name].formFields;\n formActions = this.Widgets[name].buttonArray;\n this.Widgets[name].formFields = [];\n this.Widgets[name].buttonArray = [];\n this.Widgets[name].formWidgets = {};\n } else {\n formWidgets = this.Widgets[id].formWidgets;\n formFields = this.Widgets[id].formFields;\n formActions = this.Widgets[id].buttonArray;\n }\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 w.registerFormActions(formActions);\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 if (!this.Widgets[w.props.formRef].formWidgets) {\n this.Widgets[w.props.formRef].formWidgets = {}\n }\n this.Widgets[w.props.formRef].formWidgets[w.props.name] = w;\n return;\n }\n if (w instanceof WmFormAction) {\n if (!this.Widgets[w.props.formKey]) {\n this.Widgets[w.props.formKey] = {};\n }\n if (!this.Widgets[w.props.formKey].buttonArray) {\n this.Widgets[w.props.formKey].buttonArray = [];\n }\n this.Widgets[w.props.formKey].buttonArray.push(w);\n return;\n }\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 if (w instanceof WmLeftPanel) {\n this.appConfig.leftNavWidth = w._INSTANCE.styles?.root?.width;\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 (isFullPathUrl(url)) {\n return url;\n }\n return this.appConfig.url + (url.startsWith('/') ? '' : '/') + 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 getFormFieldStyles(formField: any, type: string){\n let suffix = ''\n switch(type){\n case 'label' :\n suffix = '_formLabel'\n break\n case 'commonField' :\n suffix = '-input'\n break\n default :\n ''\n }\n return formField?.classname?.trim()?.split(' ')?.map((s:string) => s.trim() + suffix).join(' ');\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 false;\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 this.App.notify(VariableEvents.BEFORE_INVOKE, v);\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 this.App.notify(VariableEvents.AFTER_INVOKE, v);\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 (Object.values({...this.fragmentVariables, ...this.fragmentActions} as BaseVariable<any>))\n .map(v => {\n (v as BaseVariable<any>).subscribe(VariableEvents.BEFORE_INVOKE, () => {\n this.App.notify(VariableEvents.BEFORE_INVOKE, v);\n });\n (v as BaseVariable<any>).subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.App.notify(VariableEvents.AFTER_INVOKE, v);\n });\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((error) => {\n // catch errors and show content\n console.error(error);\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 generateTestIdPrefix() {\n const testId = this.getTestId();\n return testId && (testId.split('')\n .reduce((a, v, i) => a + (v.charCodeAt(0) * (i + 1)), 0) + '');\n }\n\n render() {\n if (this.startUpVariablesLoaded) {\n this.autoUpdateVariables\n .forEach(value => this.Variables[value]?.invokeOnParamChange());\n }\n return this.isVisible() ? (\n <ParentContext.Consumer>\n {(parent) => {\n this.setParent(parent);\n this._showSkeleton = this.state.props.showskeleton !== false \n && (this.parent?._showSkeleton || this.state.props.showskeleton === true);\n let theme = this.theme;\n return (\n <ParentContext.Provider value={this}>\n <ThemeProvider value={theme}>\n <TextIdPrefixConsumer>\n {(testIdPrefix) => {\n this.testIdPrefix = testIdPrefix || '';\n return (\n <TestIdPrefixProvider value={this.generateTestIdPrefix() || ''}>\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return this.renderWidget(this.props);\n }}\n </ToastConsumer>\n </TestIdPrefixProvider>);\n }}\n </TextIdPrefixConsumer>\n </ThemeProvider>\n </ParentContext.Provider>);\n }}\n </ParentContext.Consumer>) : null;\n }\n\n\n}\n\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAc,cAAc;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,KAAK,QAAQ,QAAQ;AAI3C,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,gDAAgD;AAC3G,OAAOC,QAAQ,MAAM,yCAAyC;AAC9D,SAASC,SAAS,E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AAA,CAAaE,aAAa,KAAI,IAAI,CAACC,KAAK,CAAC5K,KAAK,CAAC6K,YAAY,KAAK,IAAI,CAAC;MACzE,IAAI3I,KAAK,GAAG,IAAI,CAACA,KAAK;MACtB,oBACFpE,KAAA,CAAAoC,aAAA,CAACvB,aAAa,CAACmM,QAAQ;QAACX,KAAK,EAAE;MAAK,gBAClCrM,KAAA,CAAAoC,aAAA,CAACrB,aAAa;QAACsL,KAAK,EAAEjI;MAAM,gBAC1BpE,KAAA,CAAAoC,aAAA,CAAC9B,oBAAoB,QACf2M,YAAY,IAAK;QACjB,IAAI,CAACA,YAAY,GAAGA,YAAY,IAAI,EAAE;QACtC,oBACAjN,KAAA,CAAAoC,aAAA,CAAC/B,oBAAoB;UAACgM,KAAK,EAAE,IAAI,CAACR,oBAAoB,CAAC,CAAC,IAAI;QAAG,gBAC7D7L,KAAA,CAAAoC,aAAA,CAACb,aAAa,QACZ2L,YAA0B,IAAK;UAC/B,IAAI,CAACC,OAAO,GAAGD,YAAY;UAC3B,OAAO,IAAI,CAACE,YAAY,CAAC,IAAI,CAAClL,KAAK,CAAC;QACtC,CACa,CACO,CAAC;MACzB,CACkB,CACT,CACO,CAAC;IACzB,CACwB,CAAC,GAAI,IAAI;EACnC;AAGJ","ignoreList":[]}
|
@@ -36,6 +36,9 @@ export default class BasePage extends BaseFragment {
|
|
36
36
|
AppSecurityService.redirectToLogin(this.toHashURL());
|
37
37
|
}
|
38
38
|
});
|
39
|
+
if (this.App.appConfig.diagnostics.pageStartTime < 0) {
|
40
|
+
this.App.appConfig.diagnostics.pageStartTime = Date.now();
|
41
|
+
}
|
39
42
|
}
|
40
43
|
onComponentInit(w) {
|
41
44
|
super.onComponentInit(w);
|
@@ -73,11 +76,15 @@ export default class BasePage extends BaseFragment {
|
|
73
76
|
onAttach() {
|
74
77
|
super.onAttach();
|
75
78
|
this.setDrawerContent();
|
79
|
+
this.App.appConfig.diagnostics.pageReadyTime = Date.now();
|
80
|
+
this.App.notify('pageAttached', this);
|
76
81
|
}
|
77
82
|
onFragmentReady() {
|
78
83
|
return super.onFragmentReady().then(() => {
|
79
84
|
this.onContentReady();
|
80
85
|
this.App.triggerPageReady(this.pageName, this.proxy);
|
86
|
+
this.App.appConfig.diagnostics.pageReadyTime = Date.now();
|
87
|
+
this.App.notify('pageReady', this);
|
81
88
|
AppSpinnerService.hide();
|
82
89
|
this.cleanup.push(this.props.navigation.addListener('focus', () => {
|
83
90
|
if (this.appConfig.currentPage !== this) {
|
@@ -90,11 +97,30 @@ export default class BasePage extends BaseFragment {
|
|
90
97
|
}
|
91
98
|
componentWillUnmount() {
|
92
99
|
super.componentWillUnmount();
|
100
|
+
this.App.notify('pageDestroyed', this);
|
101
|
+
}
|
102
|
+
async canNavigate(currentPage, nextPage) {
|
103
|
+
let navigate = true;
|
104
|
+
navigate = await this.onBeforePageLeave(currentPage, nextPage);
|
105
|
+
if (navigate !== false) {
|
106
|
+
navigate = await this.App.onBeforePageLeave(currentPage, nextPage);
|
107
|
+
}
|
108
|
+
if (navigate !== false) navigate = true;
|
109
|
+
return navigate;
|
110
|
+
}
|
111
|
+
async onBeforePageLeave(currentPage, nextPage) {
|
112
|
+
//method can be override by the user from studio;
|
113
|
+
return true;
|
93
114
|
}
|
94
|
-
goToPage(pageName, params, clearCahe = false) {
|
115
|
+
async goToPage(pageName, params, clearCahe = false) {
|
116
|
+
const isNavigable = await this.canNavigate(this.pageName, pageName);
|
117
|
+
if (!isNavigable) {
|
118
|
+
return Promise.resolve();
|
119
|
+
}
|
95
120
|
const navigation = this.props.navigation;
|
96
121
|
const _params = clone(params);
|
97
122
|
_params && delete _params['pageName'];
|
123
|
+
this.App.appConfig.diagnostics.pageStartTime = Date.now();
|
98
124
|
if (pageName !== this.pageName || !isEqual(_params || null, this.pageParams || null)) {
|
99
125
|
if (pageName === this.pageName) {
|
100
126
|
navigation.push(pageName, _params);
|
@@ -127,8 +153,18 @@ export default class BasePage extends BaseFragment {
|
|
127
153
|
const paramStr = Object.keys(this.pageParams || []).map(k => k && `${k}=${this.pageParams[k]}`).join('&');
|
128
154
|
return hash + (paramStr ? `?${paramStr}` : '');
|
129
155
|
}
|
130
|
-
goBack() {
|
156
|
+
async goBack() {
|
157
|
+
var _navigation$getState;
|
131
158
|
const navigation = this.props.navigation;
|
159
|
+
const routes = (_navigation$getState = navigation.getState()) === null || _navigation$getState === void 0 ? void 0 : _navigation$getState.routes;
|
160
|
+
let isNavigable = true;
|
161
|
+
if (navigation.canGoBack()) {
|
162
|
+
isNavigable = await this.canNavigate(this.pageName, routes[routes.length - 2].name);
|
163
|
+
}
|
164
|
+
if (!isNavigable) {
|
165
|
+
return Promise.resolve();
|
166
|
+
}
|
167
|
+
this.App.appConfig.diagnostics.pageStartTime = Date.now();
|
132
168
|
if (navigation.canGoBack()) {
|
133
169
|
navigation.goBack();
|
134
170
|
} else if (window && window.history) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["clone","isEqual","React","CommonActions","SplashScreen","WmPage","NavigationServiceProvider","AppSecurityService","AppSpinnerService","BaseFragment","Watcher","BasePage","constructor","props","_this$appConfig$drawe","_defineProperty","setTimeout","hideAsync","pageName","route","name","pageParams","params","appConfig","currentPage","drawer","setContent","serviceDefinitions","App","watcher","ROOT","create","canUserAccessPage","then","flag","cache","redirectToLogin","toHashURL","onComponentInit","w","targetWidget","refreshdataonattach","toggleDrawer","navigation","setDrawerContent","content","drawerContent","drawerType","hasDrawer","proxy","_this$appConfig$drawe2","_this$appConfig$drawe4","_this$appConfig$drawe3","createElement","value","setAnimation","onAttach","onFragmentReady","onContentReady","triggerPageReady","hide","cleanup","push","addListener","refresh","componentWillUnmount","goToPage","clearCahe","_params","dispatch","reset","index","routes","navigate","onDetach","destroyMe","closeDrawer","Promise","resolve","navigateToLandingPage","hash","paramStr","Object","keys","map","k","join","goBack","canGoBack","window","history","back","openUrl","url","startsWith","substring","splits","split","length","p","forEach","openBrowser","isActiveTabbarItem","label","link","links","possibleLinks","find","l","includes","renderWidget","renderPage"],"sources":["base-page.component.tsx"],"sourcesContent":["import { clone, isEqual } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { CommonActions } from '@react-navigation/native';\nimport * as SplashScreen from 'expo-splash-screen';\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPage from '@wavemaker/app-rn-runtime/components/page/page.component';\nimport NavigationService, { NavigationServiceProvider } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport AppSecurityService from './services/app-security.service';\nimport AppSpinnerService from './services/app-spinner.service';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { Watcher } from './watcher';\n\ndeclare const window: any;\n\nexport interface PageProps extends FragmentProps {\n route: any;\n navigation: any;\n destroyMe: Function;\n}\n\nexport interface PageState extends FragmentState<PageProps> {}\n\nexport default abstract class BasePage extends BaseFragment<PageProps, PageState> implements NavigationService {\n private pageName = null as unknown as string;\n private pageParams: any = {};\n private hasDrawer = false;\n private hasTabbar = false;\n private drawerContent = null as React.ReactNode;\n private drawerType = '';\n\n constructor(props: PageProps) {\n super(props);\n setTimeout(() => {\n SplashScreen.hideAsync();\n }, 300);\n this.pageName = props.route.name;\n this.pageParams = props.route.params;\n this.appConfig.currentPage = this;\n this.appConfig.drawer?.setContent(null);\n this.serviceDefinitions = this.App.serviceDefinitions;\n this.watcher = Watcher.ROOT.create();\n AppSecurityService.canUserAccessPage(this.pageName)\n .then(flag => {\n if (!flag) {\n this.cache = false;\n AppSecurityService.redirectToLogin(this.toHashURL());\n }\n });\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPage) {\n this.targetWidget = w;\n const props = w.props as any;\n this.cache = !(props.cache === false);\n this.refreshdataonattach = !(props.refreshdataonattach === false);\n }\n }\n\n toggleDrawer() {\n (this.props as PageProps).navigation.toggleDrawer();\n }\n\n setDrawerContent(content = this.drawerContent, drawerType = this.drawerType) {\n if (!content) {\n return;\n }\n this.drawerContent = content;\n this.drawerType = drawerType;\n this.hasDrawer = true;\n setTimeout(() => {\n if (this.appConfig.currentPage === this \n || this.appConfig.currentPage.proxy === this) {\n this.appConfig.drawer?.setContent(null);\n setTimeout(() => {\n this.appConfig.drawer?.setContent((\n <NavigationServiceProvider value={this}>\n {content}\n </NavigationServiceProvider>));\n }, 500);\n this.appConfig.drawer?.setAnimation(drawerType);\n }\n }, 10);\n }\n\n onAttach() {\n super.onAttach();\n this.setDrawerContent();\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n this.App.triggerPageReady(this.pageName, this.proxy as BasePage);\n AppSpinnerService.hide();\n this.cleanup.push((this.props as PageProps).navigation.addListener('focus', () => {\n if (this.appConfig.currentPage !== this) {\n this.appConfig.currentPage = this;\n this.onAttach();\n this.appConfig.refresh();\n }\n }));\n });\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n }\n\n goToPage(pageName: string, params: any, clearCahe = false) {\n const navigation = (this.props as PageProps).navigation;\n const _params = clone(params);\n _params && delete _params['pageName'];\n if (pageName !== this.pageName || !isEqual(_params || null, this.pageParams || null)) {\n if (pageName === this.pageName) {\n navigation.push(pageName, _params);\n } else if (clearCahe) {\n navigation.dispatch(CommonActions.reset({\n index: 0,\n routes: [\n { name: pageName, params: params }\n ]}));\n } else {\n navigation.navigate(pageName, _params);\n }\n if (this.cache) {\n this.onDetach();\n } else {\n this.props.destroyMe();\n }\n } else {\n (this.props as PageProps).navigation.closeDrawer();\n }\n return Promise.resolve();\n }\n\n public navigateToLandingPage() {\n AppSecurityService.navigateToLandingPage();\n }\n\n public toHashURL() {\n const hash = `#/${this.pageName}`;\n const paramStr = Object.keys(this.pageParams || [])\n .map(k => k && `${k}=${this.pageParams[k]}`)\n .join('&');\n return hash + (paramStr ? `?${paramStr}` : '');\n }\n\n goBack() {\n const navigation = (this.props as PageProps).navigation;\n if (navigation.canGoBack()) {\n navigation.goBack();\n } else if (window && window.history) {\n window.history.back();\n }\n return Promise.resolve();\n }\n\n openUrl(url: string, params = {} as any) {\n if (url) {\n if (url.startsWith('#')) {\n url = url.substring(1);\n url = url.startsWith('/') ? url.substring(1) : url;\n const splits = url.split('?');\n const pageName = splits[0];\n let params = {} as any;\n if (splits.length > 1) {\n splits[1].split('&')\n .map(p => p.split('='))\n .forEach(p => params[p[0]] = p[1]);\n }\n return this.goToPage(pageName, params);\n } else {\n this.App.openBrowser(url, params);\n }\n }\n return Promise.resolve();\n }\n\n isActiveTabbarItem({label, link, links}: {label: string, link: string, links: string[]}) {\n const pageName = this.pageName;\n const possibleLinks = [pageName, '#' + pageName, '#/' + pageName];\n return links && links.find(l => possibleLinks.includes(l));\n }\n\n abstract renderPage(): ReactNode;\n\n renderWidget(props: PageProps) {\n return this.renderPage();\n }\n}\n"],"mappings":";;;AAAA,SAASA,KAAK,EAAEC,OAAO,QAAQ,QAAQ;AACvC,OAAOC,KAAK,MAAqB,OAAO;AACxC,SAASC,aAAa,QAAQ,0BAA0B;AACxD,OAAO,KAAKC,YAAY,MAAM,oBAAoB;AAGlD,OAAOC,MAAM,MAAM,0DAA0D;AAC7E,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,OAAOC,kBAAkB,MAAM,iCAAiC;AAChE,OAAOC,iBAAiB,MAAM,gCAAgC;AAC9D,OAAOC,YAAY,MAAwC,2BAA2B;AACtF,SAASC,OAAO,QAAQ,WAAW;AAYnC,eAAe,MAAeC,QAAQ,SAASF,YAAY,CAAoD;EAQ3GG,WAAWA,CAACC,KAAgB,EAAE;IAAA,IAAAC,qBAAA;IAC5B,KAAK,CAACD,KAAK,CAAC;IAACE,eAAA,mBARI,IAAI;IAAAA,eAAA,qBACG,CAAC,CAAC;IAAAA,eAAA,oBACR,KAAK;IAAAA,eAAA,oBACL,KAAK;IAAAA,eAAA,wBACD,IAAI;IAAAA,eAAA,qBACP,EAAE;IAIrBC,UAAU,CAAC,MAAM;MACfZ,YAAY,CAACa,SAAS,CAAC,CAAC;IAC1B,CAA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AAK,IAAIA,KAAK,CAACE,IAAI,CAACC,CAAC,IAAIF,aAAa,CAACG,QAAQ,CAACD,CAAC,CAAC,CAAC;EAC5D;EAIAE,YAAYA,CAACjG,KAAgB,EAAE;IAC7B,OAAO,IAAI,CAACkG,UAAU,CAAC,CAAC;EAC1B;AACJ","ignoreList":[]}
|
1
|
+
{"version":3,"names":["clone","isEqual","React","CommonActions","SplashScreen","WmPage","NavigationServiceProvider","AppSecurityService","AppSpinnerService","BaseFragment","Watcher","BasePage","constructor","props","_this$appConfig$drawe","_defineProperty","setTimeout","hideAsync","pageName","route","name","pageParams","params","appConfig","currentPage","drawer","setContent","serviceDefinitions","App","watcher","ROOT","create","canUserAccessPage","then","flag","cache","redirectToLogin","toHashURL","diagnostics","pageStartTime","Date","now","onComponentInit","w","targetWidget","refreshdataonattach","toggleDrawer","navigation","setDrawerContent","content","drawerContent","drawerType","hasDrawer","proxy","_this$appConfig$drawe2","_this$appConfig$drawe4","_this$appConfig$drawe3","createElement","value","setAnimation","onAttach","pageReadyTime","notify","onFragmentReady","onContentReady","triggerPageReady","hide","cleanup","push","addListener","refresh","componentWillUnmount","canNavigate","nextPage","navigate","onBeforePageLeave","goToPage","clearCahe","isNavigable","Promise","resolve","_params","dispatch","reset","index","routes","onDetach","destroyMe","closeDrawer","navigateToLandingPage","hash","paramStr","Object","keys","map","k","join","goBack","_navigation$getState","getState","canGoBack","length","window","history","back","openUrl","url","startsWith","substring","splits","split","p","forEach","openBrowser","isActiveTabbarItem","label","link","links","possibleLinks","find","l","includes","renderWidget","renderPage"],"sources":["base-page.component.tsx"],"sourcesContent":["import { clone, isEqual } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { CommonActions } from '@react-navigation/native';\nimport * as SplashScreen from 'expo-splash-screen';\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPage from '@wavemaker/app-rn-runtime/components/page/page.component';\nimport NavigationService, { NavigationServiceProvider } from '@wavemaker/app-rn-runtime/core/navigation.service';\n\nimport AppSecurityService from './services/app-security.service';\nimport AppSpinnerService from './services/app-spinner.service';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { Watcher } from './watcher';\n\ndeclare const window: any;\n\nexport interface PageProps extends FragmentProps {\n route: any;\n navigation: any;\n destroyMe: Function;\n}\n\nexport interface PageState extends FragmentState<PageProps> {}\n\nexport default abstract class BasePage extends BaseFragment<PageProps, PageState> implements NavigationService {\n private pageName = null as unknown as string;\n private pageParams: any = {};\n private hasDrawer = false;\n private hasTabbar = false;\n private drawerContent = null as React.ReactNode;\n private drawerType = '';\n\n constructor(props: PageProps) {\n super(props);\n setTimeout(() => {\n SplashScreen.hideAsync();\n }, 300);\n this.pageName = props.route.name;\n this.pageParams = props.route.params;\n this.appConfig.currentPage = this;\n this.appConfig.drawer?.setContent(null);\n this.serviceDefinitions = this.App.serviceDefinitions;\n this.watcher = Watcher.ROOT.create();\n AppSecurityService.canUserAccessPage(this.pageName)\n .then(flag => {\n if (!flag) {\n this.cache = false;\n AppSecurityService.redirectToLogin(this.toHashURL());\n }\n });\n if (this.App.appConfig.diagnostics.pageStartTime < 0) {\n this.App.appConfig.diagnostics.pageStartTime = Date.now();\n }\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPage) {\n this.targetWidget = w;\n const props = w.props as any;\n this.cache = !(props.cache === false);\n this.refreshdataonattach = !(props.refreshdataonattach === false);\n }\n }\n\n toggleDrawer() {\n (this.props as PageProps).navigation.toggleDrawer();\n }\n\n setDrawerContent(content = this.drawerContent, drawerType = this.drawerType) {\n if (!content) {\n return;\n }\n this.drawerContent = content;\n this.drawerType = drawerType;\n this.hasDrawer = true;\n setTimeout(() => {\n if (this.appConfig.currentPage === this \n || this.appConfig.currentPage.proxy === this) {\n this.appConfig.drawer?.setContent(null);\n setTimeout(() => {\n this.appConfig.drawer?.setContent((\n <NavigationServiceProvider value={this}>\n {content}\n </NavigationServiceProvider>));\n }, 500);\n this.appConfig.drawer?.setAnimation(drawerType);\n }\n }, 10);\n }\n\n onAttach() {\n super.onAttach();\n this.setDrawerContent();\n this.App.appConfig.diagnostics.pageReadyTime = Date.now();\n this.App.notify('pageAttached', this);\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n this.App.triggerPageReady(this.pageName, this.proxy as BasePage);\n this.App.appConfig.diagnostics.pageReadyTime = Date.now(); \n this.App.notify('pageReady', this);\n AppSpinnerService.hide();\n this.cleanup.push((this.props as PageProps).navigation.addListener('focus', () => {\n if (this.appConfig.currentPage !== this) {\n this.appConfig.currentPage = this;\n this.onAttach();\n this.appConfig.refresh();\n }\n }));\n });\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.App.notify('pageDestroyed', this);\n }\n\n async canNavigate (currentPage: string, nextPage: string) {\n let navigate = true;\n navigate = await this.onBeforePageLeave(currentPage, nextPage);\n if(navigate !== false){\n navigate = await this.App.onBeforePageLeave(currentPage, nextPage);\n }\n\n if(navigate !== false) navigate = true;\n\n return navigate; \n }\n\n async onBeforePageLeave(currentPage: string, nextPage: string) {\n //method can be override by the user from studio;\n return true;\n }\n\n async goToPage(pageName: string, params: any, clearCahe = false) {\n const isNavigable = await this.canNavigate(this.pageName, pageName)\n if(!isNavigable){\n return Promise.resolve();\n }\n\n const navigation = (this.props as PageProps).navigation;\n const _params = clone(params);\n _params && delete _params['pageName'];\n this.App.appConfig.diagnostics.pageStartTime = Date.now();\n if (pageName !== this.pageName || !isEqual(_params || null, this.pageParams || null)) {\n if (pageName === this.pageName) {\n navigation.push(pageName, _params);\n } else if (clearCahe) {\n navigation.dispatch(CommonActions.reset({\n index: 0,\n routes: [\n { name: pageName, params: params }\n ]}));\n } else {\n navigation.navigate(pageName, _params);\n }\n if (this.cache) {\n this.onDetach();\n } else {\n this.props.destroyMe();\n }\n } else {\n (this.props as PageProps).navigation.closeDrawer();\n }\n return Promise.resolve();\n }\n\n public navigateToLandingPage() {\n AppSecurityService.navigateToLandingPage();\n }\n\n public toHashURL() {\n const hash = `#/${this.pageName}`;\n const paramStr = Object.keys(this.pageParams || [])\n .map(k => k && `${k}=${this.pageParams[k]}`)\n .join('&');\n return hash + (paramStr ? `?${paramStr}` : '');\n }\n\n async goBack() {\n const navigation = (this.props as PageProps).navigation;\n const routes = navigation.getState()?.routes;\n let isNavigable = true;\n\n if(navigation.canGoBack()){\n isNavigable = await this.canNavigate(this.pageName, routes[routes.length - 2].name)\n }\n if(!isNavigable){\n return Promise.resolve();\n }\n\n this.App.appConfig.diagnostics.pageStartTime = Date.now();\n if (navigation.canGoBack()) {\n navigation.goBack();\n } else if (window && window.history) {\n window.history.back();\n }\n return Promise.resolve();\n }\n\n openUrl(url: string, params = {} as any) {\n if (url) {\n if (url.startsWith('#')) {\n url = url.substring(1);\n url = url.startsWith('/') ? url.substring(1) : url;\n const splits = url.split('?');\n const pageName = splits[0];\n let params = {} as any;\n if (splits.length > 1) {\n splits[1].split('&')\n .map(p => p.split('='))\n .forEach(p => params[p[0]] = p[1]);\n }\n return this.goToPage(pageName, params);\n } else {\n this.App.openBrowser(url, params);\n }\n }\n return Promise.resolve();\n }\n\n isActiveTabbarItem({label, link, links}: {label: string, link: string, links: string[]}) {\n const pageName = this.pageName;\n const possibleLinks = [pageName, '#' + pageName, '#/' + pageName];\n return links && links.find(l => possibleLinks.includes(l));\n }\n\n abstract renderPage(): ReactNode;\n\n renderWidget(props: PageProps) {\n return this.renderPage();\n }\n}\n"],"mappings":";;;AAAA,SAASA,KAAK,EAAEC,OAAO,QAAQ,QAAQ;AACvC,OAAOC,KAAK,MAAqB,OAAO;AACxC,SAASC,aAAa,QAAQ,0BAA0B;AACxD,OAAO,KAAKC,YAAY,MAAM,oBAAoB;AAGlD,OAAOC,MAAM,MAAM,0DAA0D;AAC7E,SAA4BC,yBAAyB,QAAQ,mDAAmD;AAEhH,OAAOC,kBAAkB,MAAM,iCAAiC;AAChE,OAAOC,iBAAiB,MAAM,gCAA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C5D;EAIAE,YAAYA,CAAC7G,KAAgB,EAAE;IAC7B,OAAO,IAAI,CAAC8G,UAAU,CAAC,CAAC;EAC1B;AACJ","ignoreList":[]}
|
@@ -20,6 +20,9 @@ export default class BasePartial extends BaseFragment {
|
|
20
20
|
this.watcher = props.parentWatcher.create();
|
21
21
|
}
|
22
22
|
onFragmentReady() {
|
23
|
+
if (this.props.invokeVariables === false) {
|
24
|
+
return Promise.resolve();
|
25
|
+
}
|
23
26
|
return super.onFragmentReady().then(() => {
|
24
27
|
this.onContentReady();
|
25
28
|
this.invokeEventCallback('onLoad', [this]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["WmPartial","BaseFragment","BasePartial","constructor","props","_defineProperty","isPartOfPrefab","prefab","App","appConfig","app","Actions","Object","assign","Variables","serviceDefinitions","Prefab","baseUrl","watcher","parentWatcher","create","onFragmentReady","then","onContentReady","invokeEventCallback","prefabname","_this$Prefab","onComponentInit","w","targetWidget","onComponentDestroy","parent","Widgets","componentDidUpdate","prevProps","prevState","snapshot","pageParams","partialParams","fragmentVariables","renderWidget","renderPartial"],"sources":["base-partial.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmPartial from '@wavemaker/app-rn-runtime/components/page/partial/partial.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { ReactNode } from 'react';\nimport BasePrefab from './base-prefab.component';\nimport { Watcher } from './watcher';\nimport { View } from 'react-native';\nimport WmLottie from '../components/basic/lottie/lottie.component';\n\nexport interface PartialProps extends FragmentProps {\n serviceDefinitions: any;\n prefab: any;\n parent: any;\n onLoad?: Function;\n parentWatcher: Watcher;\n}\n\nexport interface PartialState extends FragmentState<PartialProps> {}\n\nexport default abstract class BasePartial extends BaseFragment<PartialProps, PartialState> {\n private partialParams: any = {};\n Prefab: BasePrefab = null as any;\n\n constructor(props: PartialProps) {\n super(props);\n const isPartOfPrefab = !!this.props.prefab;\n this.App = this.appConfig.app;\n this.Actions = Object.assign({}, isPartOfPrefab ? {} : this.App.Actions);\n this.Variables = Object.assign({}, isPartOfPrefab ? {} : this.App.Variables);\n this.serviceDefinitions = this.props.serviceDefinitions;\n if (isPartOfPrefab) {\n this.Prefab = this.props.prefab;\n this.baseUrl =this.Prefab.baseUrl;\n }\n this.watcher = props.parentWatcher.create();\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n this.invokeEventCallback('onLoad', [this]);\n });\n }\n\n get prefabname() {\n return this.Prefab?.props.prefabname;\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPartial) {\n this.targetWidget = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>): void {\n super.onComponentDestroy(w);\n const parent: any = this.props.parent;\n if (parent) {\n delete (parent as any).Widgets;\n delete (parent as any).Variables;\n }\n }\n\n componentDidUpdate(prevProps: Readonly<PartialProps>, prevState: Readonly<PartialState>, snapshot?: any): void {\n super.componentDidUpdate(prevProps, prevState, snapshot);\n const parent: any = this.props.parent;\n if (parent) {\n parent.pageParams = (this as any).pageParams;\n parent.partialParams = (this as any).pageParams;\n parent.Widgets = this.Widgets;\n parent.Variables = this.fragmentVariables;\n }\n }\n \n abstract renderPartial(): ReactNode;\n\n renderWidget(props: PartialProps) {\n return this.renderPartial();\n }\n}\n"],"mappings":";;;AAEA,OAAOA,SAAS,MAAM,qEAAqE;AAC3F,OAAOC,YAAY,MAAwC,2BAA2B;
|
1
|
+
{"version":3,"names":["WmPartial","BaseFragment","BasePartial","constructor","props","_defineProperty","isPartOfPrefab","prefab","App","appConfig","app","Actions","Object","assign","Variables","serviceDefinitions","Prefab","baseUrl","watcher","parentWatcher","create","onFragmentReady","invokeVariables","Promise","resolve","then","onContentReady","invokeEventCallback","prefabname","_this$Prefab","onComponentInit","w","targetWidget","onComponentDestroy","parent","Widgets","componentDidUpdate","prevProps","prevState","snapshot","pageParams","partialParams","fragmentVariables","renderWidget","renderPartial"],"sources":["base-partial.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmPartial from '@wavemaker/app-rn-runtime/components/page/partial/partial.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { ReactNode } from 'react';\nimport BasePrefab from './base-prefab.component';\nimport { Watcher } from './watcher';\nimport { View } from 'react-native';\nimport WmLottie from '../components/basic/lottie/lottie.component';\n\nexport interface PartialProps extends FragmentProps {\n serviceDefinitions: any;\n prefab: any;\n parent: any;\n onLoad?: Function;\n parentWatcher: Watcher;\n invokeVariables: boolean;\n}\n\nexport interface PartialState extends FragmentState<PartialProps> {}\n\nexport default abstract class BasePartial extends BaseFragment<PartialProps, PartialState> {\n private partialParams: any = {};\n Prefab: BasePrefab = null as any;\n\n constructor(props: PartialProps) {\n super(props);\n const isPartOfPrefab = !!this.props.prefab;\n this.App = this.appConfig.app;\n this.Actions = Object.assign({}, isPartOfPrefab ? {} : this.App.Actions);\n this.Variables = Object.assign({}, isPartOfPrefab ? {} : this.App.Variables);\n this.serviceDefinitions = this.props.serviceDefinitions;\n if (isPartOfPrefab) {\n this.Prefab = this.props.prefab;\n this.baseUrl =this.Prefab.baseUrl;\n }\n this.watcher = props.parentWatcher.create();\n }\n\n onFragmentReady() {\n if(this.props.invokeVariables === false) {\n return Promise.resolve();\n }\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n this.invokeEventCallback('onLoad', [this]);\n });\n }\n\n get prefabname() {\n return this.Prefab?.props.prefabname;\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPartial) {\n this.targetWidget = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>): void {\n super.onComponentDestroy(w);\n const parent: any = this.props.parent;\n if (parent) {\n delete (parent as any).Widgets;\n delete (parent as any).Variables;\n }\n }\n\n componentDidUpdate(prevProps: Readonly<PartialProps>, prevState: Readonly<PartialState>, snapshot?: any): void {\n super.componentDidUpdate(prevProps, prevState, snapshot);\n const parent: any = this.props.parent;\n if (parent) {\n parent.pageParams = (this as any).pageParams;\n parent.partialParams = (this as any).pageParams;\n parent.Widgets = this.Widgets;\n parent.Variables = this.fragmentVariables;\n }\n }\n \n abstract renderPartial(): ReactNode;\n\n renderWidget(props: PartialProps) {\n return this.renderPartial();\n }\n}\n"],"mappings":";;;AAEA,OAAOA,SAAS,MAAM,qEAAqE;AAC3F,OAAOC,YAAY,MAAwC,2BAA2B;AAkBtF,eAAe,MAAeC,WAAW,SAASD,YAAY,CAA6B;EAIvFE,WAAWA,CAACC,KAAmB,EAAE;IAC7B,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,wBAJY,CAAC,CAAC;IAAAA,eAAA,iBACV,IAAI;IAIrB,MAAMC,cAAc,GAAG,CAAC,CAAC,IAAI,CAACF,KAAK,CAACG,MAAM;IAC1C,IAAI,CAACC,GAAG,GAAG,IAAI,CAACC,SAAS,CAACC,GAAG;IAC7B,IAAI,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEP,cAAc,GAAG,CAAC,CAAC,GAAG,IAAI,CAACE,GAAG,CAACG,OAAO,CAAC;IACxE,IAAI,CAACG,SAAS,GAAGF,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEP,cAAc,GAAG,CAAC,CAAC,GAAG,IAAI,CAACE,GAAG,CAACM,SAAS,CAAC;IAC5E,IAAI,CAACC,kBAAkB,GAAG,IAAI,CAACX,KAAK,CAACW,kBAAkB;IACvD,IAAIT,cAAc,EAAE;MAClB,IAAI,CAACU,MAAM,GAAG,IAAI,CAACZ,KAAK,CAACG,MAAM;MAC/B,IAAI,CAACU,OAAO,GAAE,IAAI,CAACD,MAAM,CAACC,OAAO;IACnC;IACA,IAAI,CAACC,OAAO,GAAGd,KAAK,CAACe,aAAa,CAACC,MAAM,CAAC,CAAC;EAC/C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AAM,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO;MAC7BD,MAAM,CAACpB,SAAS,GAAG,IAAI,CAAC4B,iBAAiB;IAC3C;EACF;EAIAC,YAAYA,CAACvC,KAAmB,EAAE;IAChC,OAAO,IAAI,CAACwC,aAAa,CAAC,CAAC;EAC7B;AACJ","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { createDrawerNavigator } from '@react-navigation/drawer';
|
2
|
+
import { createDrawerNavigator, getDrawerStatusFromState } from '@react-navigation/drawer';
|
3
3
|
import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
|
4
4
|
const Drawer = createDrawerNavigator();
|
5
5
|
class AppDrawerNavigator extends React.Component {
|
@@ -11,15 +11,24 @@ class AppDrawerNavigator extends React.Component {
|
|
11
11
|
initialRouteName: "pages",
|
12
12
|
drawerContent: this.props.content,
|
13
13
|
useLegacyImplementation: false,
|
14
|
-
screenOptions: {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
screenOptions: ({
|
15
|
+
navigation
|
16
|
+
}) => {
|
17
|
+
const widthStyle = this.props.drawerWidth && getDrawerStatusFromState(navigation.getState()) === 'open' ? {
|
18
|
+
width: this.props.drawerWidth,
|
19
|
+
maxWidth: null
|
20
|
+
} : {};
|
21
|
+
return {
|
22
|
+
drawerType: this.props.type,
|
23
|
+
headerShown: false,
|
24
|
+
gestureHandlerProps: {
|
25
|
+
enabled: !this.props.hide
|
26
|
+
},
|
27
|
+
drawerStyle: {
|
28
|
+
backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor,
|
29
|
+
...widthStyle
|
30
|
+
}
|
31
|
+
};
|
23
32
|
}
|
24
33
|
}, /*#__PURE__*/React.createElement(Drawer.Screen, {
|
25
34
|
name: "pages"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","createDrawerNavigator","ThemeVariables","Drawer","AppDrawerNavigator","Component","constructor","props","render","createElement","Navigator","initialRouteName","drawerContent","content","useLegacyImplementation","screenOptions","drawerType","type","headerShown","gestureHandlerProps","enabled","hide","drawerStyle","backgroundColor","INSTANCE","pageContentBgColor","Screen","name","_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 useLegacyImplementation={false}\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;
|
1
|
+
{"version":3,"names":["React","createDrawerNavigator","getDrawerStatusFromState","ThemeVariables","Drawer","AppDrawerNavigator","Component","constructor","props","render","createElement","Navigator","initialRouteName","drawerContent","content","useLegacyImplementation","screenOptions","navigation","widthStyle","drawerWidth","getState","width","maxWidth","drawerType","type","headerShown","gestureHandlerProps","enabled","hide","drawerStyle","backgroundColor","INSTANCE","pageContentBgColor","Screen","name","_props","rootComponent"],"sources":["drawer.navigator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { createDrawerNavigator, getDrawerStatusFromState } 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 drawerWidth: any;\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 useLegacyImplementation={false}\n screenOptions={({navigation})=> {\n const widthStyle = (this.props.drawerWidth && getDrawerStatusFromState(navigation.getState()) === 'open' ? {width: this.props.drawerWidth, maxWidth: null} : {})\n return {\n drawerType: this.props.type,\n headerShown: false,\n gestureHandlerProps: { enabled: !this.props.hide },\n drawerStyle: { backgroundColor: ThemeVariables.INSTANCE.pageContentBgColor, ...widthStyle}}\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,EAAEC,wBAAwB,QAAQ,0BAA0B;AAC1F,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,MAAMC,MAAM,GAAGH,qBAAqB,CAAC,CAAC;AAUtC,MAAMI,kBAAkB,SAASL,KAAK,CAACM,SAAS,CAAoC;EAElFC,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,CAAC;EACd;EAEAC,MAAMA,CAAA,EAAE;IACN,oBAAQT,KAAA,CAAAU,aAAA,CAACN,MAAM,CAACO,SAAS;MACvBC,gBAAgB,EAAC,OAAO;MACxBC,aAAa,EAAE,IAAI,CAACL,KAAK,CAACM,OAAQ;MAClCC,uBAAuB,EAAE,KAAM;MAC/BC,aAAa,EAAEA,CAAC;QAACC;MAAU,CAAC,KAAI;QAC9B,MAAMC,UAAU,GAAI,IAAI,CAACV,KAAK,CAACW,WAAW,IAAIjB,wBAAwB,CAACe,UAAU,CAACG,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAM,GAAG;UAACC,KAAK,EAAE,IAAI,CAACb,KAAK,CAACW,WAAW;UAAEG,QAAQ,EAAE;QAAI,CAAC,GAAG,CAAC,CAAE;QAChK,OAAO;UACLC,UAAU,EAAE,IAAI,CAACf,KAAK,CAACgB,IAAI;UAC3BC,WAAW,EAAE,KAAK;UAClBC,mBAAmB,EAAE;YAAEC,OAAO,EAAE,CAAC,IAAI,CAACnB,KAAK,CAACoB;UAAK,CAAC;UAClDC,WAAW,EAAE;YAAEC,eAAe,EAAG3B,cAAc,CAAC4B,QAAQ,CAACC,kBAAkB;YAAE,GAAGd;UAAU;QAAC,CAAC;MAChG;IAAE,gBACFlB,KAAA,CAAAU,aAAA,CAACN,MAAM,CAAC6B,MAAM;MAACC,IAAI,EAAC;IAAO,GACvBC,MAAM,IAAK,IAAI,CAAC3B,KAAK,CAAC4B,aACX,CACC,CAAC;EACrB;AACF;AAEA,eAAe/B,kBAAkB","ignoreList":[]}
|
@@ -38,10 +38,6 @@ class AppModalService {
|
|
38
38
|
showLastModal() {
|
39
39
|
this.modalOptions = this.modalsOpened.length ? this.modalsOpened[this.modalsOpened.length - 1] : {};
|
40
40
|
this.refresh();
|
41
|
-
// widgets in dialog are not accessible. Hence adding setTimeout
|
42
|
-
setTimeout(() => {
|
43
|
-
this.modalOptions.onOpen && this.modalOptions.onOpen();
|
44
|
-
}, 500);
|
45
41
|
this.setBackButtonPress();
|
46
42
|
}
|
47
43
|
refresh() {
|
@@ -53,6 +49,10 @@ class AppModalService {
|
|
53
49
|
options.elevationIndex = parseInt(this.getAppConfig().app.toastsOpened + this.modalsOpened.length + 1);
|
54
50
|
this.modalsOpened.push(options);
|
55
51
|
this.showLastModal();
|
52
|
+
// widgets in dialog are not accessible. Hence adding setTimeout
|
53
|
+
setTimeout(() => {
|
54
|
+
this.modalOptions.onOpen && this.modalOptions.onOpen();
|
55
|
+
}, 500);
|
56
56
|
}
|
57
57
|
}
|
58
58
|
hideModal(options) {
|