@wavemaker/rn-codegen 11.4.0-next.25501 → 11.4.0-next.25701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rn-codegen/command.js +12 -5
- rn-codegen/command.js.map +1 -1
- rn-codegen/index.js +1 -1
- rn-codegen/index.js.map +1 -1
- rn-codegen/package.json +7 -2
- rn-codegen/src/app.generator.js +114 -16
- rn-codegen/src/app.generator.js.map +1 -1
- rn-codegen/src/profiles/expo-preview.profile.js +1 -1
- rn-codegen/src/profiles/expo-preview.profile.js.map +1 -1
- rn-codegen/src/project.service.js +22 -6
- rn-codegen/src/project.service.js.map +1 -1
- rn-codegen/src/templates/app.template +68 -12
- rn-codegen/src/templates/app.theme.template +20 -4
- rn-codegen/src/templates/bootstrap.template +10 -3
- rn-codegen/src/templates/build-info/info.html +64 -0
- rn-codegen/src/templates/component/component.template +11 -2
- rn-codegen/src/templates/entity-provider.template +21 -0
- rn-codegen/src/templates/package.web.json +82 -1
- rn-codegen/src/templates/pages-config.template +0 -8
- rn-codegen/src/templates/project/app.json +2 -0
- rn-codegen/src/templates/project/esbuild/esbuild.script.js +42 -1
- rn-codegen/src/templates/project/esbuild/index.html +4 -0
- rn-codegen/src/templates/project/metro.config.js +26 -20
- rn-codegen/src/templates/project/package-lock.json +23258 -0
- rn-codegen/src/templates/project/package.json +64 -52
- rn-codegen/src/templates/resource.resolver.template +2 -2
- rn-codegen/src/templates/theme/wmproject.properties.template +1 -1
- rn-codegen/src/templates/theme-asset.resolver.template +10 -0
- rn-codegen/src/templates/theme.index.html +132 -0
- rn-codegen/src/templates/variables.template +58 -9
- rn-codegen/src/theme/components/basic/audio.styledef.js +18 -0
- rn-codegen/src/theme/components/basic/audio.styledef.js.map +1 -0
- rn-codegen/src/theme/components/basic/custom.styledef.js +18 -0
- rn-codegen/src/theme/components/basic/custom.styledef.js.map +1 -0
- rn-codegen/src/theme/components/basic/lottie.styledef.js +18 -0
- rn-codegen/src/theme/components/basic/lottie.styledef.js.map +1 -0
- rn-codegen/src/theme/components/basic/video.styledef.js +18 -0
- rn-codegen/src/theme/components/basic/video.styledef.js.map +1 -0
- rn-codegen/src/theme/components/container/tabs/tabheader.styledef.js +16 -0
- rn-codegen/src/theme/components/container/tabs/tabheader.styledef.js.map +1 -1
- rn-codegen/src/theme/components/container/wizard.styledef.js +7 -0
- rn-codegen/src/theme/components/container/wizard.styledef.js.map +1 -1
- rn-codegen/src/theme/components/input/radioset.styledef.js +5 -0
- rn-codegen/src/theme/components/input/radioset.styledef.js.map +1 -1
- rn-codegen/src/theme/components/input/select.styledef.js +5 -0
- rn-codegen/src/theme/components/input/select.styledef.js.map +1 -1
- rn-codegen/src/theme/components/input/slider.styledef.js +16 -0
- rn-codegen/src/theme/components/input/slider.styledef.js.map +1 -1
- rn-codegen/src/theme/components/input/toggle.styledef.js +8 -1
- rn-codegen/src/theme/components/input/toggle.styledef.js.map +1 -1
- rn-codegen/src/theme/components/style-definition.provider.js +9 -1
- rn-codegen/src/theme/components/style-definition.provider.js.map +1 -1
- rn-codegen/src/theme/theme.service.js +40 -1
- rn-codegen/src/theme/theme.service.js.map +1 -1
- rn-codegen/src/theme/variables.js +10 -1
- rn-codegen/src/theme/variables.js.map +1 -1
- rn-codegen/src/transpile/bind.ex.transformer.js +3 -1
- rn-codegen/src/transpile/bind.ex.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/basic/audio.transformer.js +13 -0
- rn-codegen/src/transpile/components/basic/audio.transformer.js.map +1 -0
- rn-codegen/src/transpile/components/basic/custom.transformer.js +22 -0
- rn-codegen/src/transpile/components/basic/custom.transformer.js.map +1 -0
- rn-codegen/src/transpile/components/basic/lottie.transformer.js +13 -0
- rn-codegen/src/transpile/components/basic/lottie.transformer.js.map +1 -0
- rn-codegen/src/transpile/components/basic/picture.transformer.js +1 -4
- rn-codegen/src/transpile/components/basic/picture.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/basic/search.transformer.js +0 -2
- rn-codegen/src/transpile/components/basic/search.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/basic/spinner.transformer.js +0 -3
- rn-codegen/src/transpile/components/basic/spinner.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/basic/video.transformer.js +13 -0
- rn-codegen/src/transpile/components/basic/video.transformer.js.map +1 -0
- rn-codegen/src/transpile/components/data/form/form-action.transformer.js +13 -1
- rn-codegen/src/transpile/components/data/form/form-action.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/data/form/form-field.transformer.js +8 -1
- rn-codegen/src/transpile/components/data/form/form-field.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/data/list.transformer.js +1 -1
- rn-codegen/src/transpile/components/data/list.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/data/liveform.transformer.js +147 -0
- rn-codegen/src/transpile/components/data/liveform.transformer.js.map +1 -0
- rn-codegen/src/transpile/components/navigation/appnavbar.transformer.js +0 -4
- rn-codegen/src/transpile/components/navigation/appnavbar.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/navigation/menu.transformer.js +3 -1
- rn-codegen/src/transpile/components/navigation/menu.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/navigation/navbar.transformer.js +3 -1
- rn-codegen/src/transpile/components/navigation/navbar.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/navigation/navitem.transformer.js +3 -1
- rn-codegen/src/transpile/components/navigation/navitem.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/page/partial-container.transformer.js +2 -1
- rn-codegen/src/transpile/components/page/partial-container.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/page/tabbar.transformer.js +1 -0
- rn-codegen/src/transpile/components/page/tabbar.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/prefab/prefab.transformer.js +3 -2
- rn-codegen/src/transpile/components/prefab/prefab.transformer.js.map +1 -1
- rn-codegen/src/transpile/components/transform-register.js +10 -0
- rn-codegen/src/transpile/components/transform-register.js.map +1 -1
- rn-codegen/src/transpile/components/utils.js +3 -14
- rn-codegen/src/transpile/components/utils.js.map +1 -1
- rn-codegen/src/transpile/property/property-parser.js +13 -0
- rn-codegen/src/transpile/property/property-parser.js.map +1 -1
- rn-codegen/src/transpile/style/background-image.parser.js +20 -0
- rn-codegen/src/transpile/style/background-image.parser.js.map +1 -0
- rn-codegen/src/transpile/style.transformer.js +9 -13
- rn-codegen/src/transpile/style.transformer.js.map +1 -1
- rn-codegen/src/transpile/transpile.js +35 -7
- rn-codegen/src/transpile/transpile.js.map +1 -1
- rn-codegen/src/utils.js +39 -9
- rn-codegen/src/utils.js.map +1 -1
- rn-codegen/src/variables/variable.transformer.js +46 -7
- rn-codegen/src/variables/variable.transformer.js.map +1 -1
- rn-codegen/src/transpile/style/background/background-image.parser.js +0 -24
- rn-codegen/src/transpile/style/background/background-image.parser.js.map +0 -1
- rn-codegen/src/transpile/style/background/background-position.parser.js +0 -57
- rn-codegen/src/transpile/style/background/background-position.parser.js.map +0 -1
- rn-codegen/src/transpile/style/background/background-size.parser.js +0 -33
- rn-codegen/src/transpile/style/background/background-size.parser.js.map +0 -1
- rn-codegen/src/transpile/style/background/background.parser.js +0 -44
- rn-codegen/src/transpile/style/background/background.parser.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.service.js","sourceRoot":"","sources":["../../src/project.service.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wDAA0B;AAE1B,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"project.service.js","sourceRoot":"","sources":["../../src/project.service.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wDAA0B;AAE1B,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,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AC,CAAC;SAClD;KACJ;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAA"}
|
|
@@ -2,6 +2,7 @@ import 'react-native-gesture-handler';
|
|
|
2
2
|
|
|
3
3
|
import * as POLLYFILL from './polyfills';
|
|
4
4
|
import React, { useState, useCallback, useEffect } from 'react';
|
|
5
|
+
import "setimmediate";
|
|
5
6
|
|
|
6
7
|
import { View, ImageBackground } from 'react-native';
|
|
7
8
|
import axios from 'axios';
|
|
@@ -12,6 +13,9 @@ import { createIconSet } from '@expo/vector-icons';
|
|
|
12
13
|
import * as Localization from 'expo-localization';
|
|
13
14
|
import BaseApp from '@wavemaker/app-rn-runtime/runtime/App';
|
|
14
15
|
import { WmMemo } from '@wavemaker/app-rn-runtime/runtime/memo.component';
|
|
16
|
+
{{#if sslPinning}}
|
|
17
|
+
import { initializeSslPinning, isSslPinningAvailable } from 'react-native-ssl-public-key-pinning';
|
|
18
|
+
{{/if}}
|
|
15
19
|
|
|
16
20
|
import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
|
|
17
21
|
import NetworkService from '@wavemaker/app-rn-runtime/core/network.service';
|
|
@@ -20,8 +24,9 @@ import { ThemeEvent } from '@wavemaker/app-rn-runtime/styles/theme';
|
|
|
20
24
|
import themeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
|
|
21
25
|
import SecurityService from '@wavemaker/app-rn-runtime/runtime/services/app-security.service';
|
|
22
26
|
import AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';
|
|
27
|
+
import WM from '@wavemaker/app-rn-runtime/runtime/platform.api';
|
|
23
28
|
|
|
24
|
-
import { setAppTheme } from './app.theme';
|
|
29
|
+
import { getThemes, getSelectedTheme, hasAppTheme, setAppTheme, resolveThemeAsset } from './app.theme';
|
|
25
30
|
import styles from './app.style';
|
|
26
31
|
import fontConfig from './font.config';
|
|
27
32
|
import LocaleResolver from './src/resolve/locale.resolver';
|
|
@@ -32,6 +37,7 @@ import bootstrap, { appConfig } from './bootstrap';
|
|
|
32
37
|
import CommonPartial from './src/partials/Common/Common.component';
|
|
33
38
|
import { initialize as initializeDeviceOperations } from './src/device-operation-loader';
|
|
34
39
|
import Lottie from 'lottie-react-native';
|
|
40
|
+
import RNRestart from 'react-native-restart';
|
|
35
41
|
import * as SplashScreen from 'expo-splash-screen';
|
|
36
42
|
|
|
37
43
|
let _reloadApp = null;
|
|
@@ -42,6 +48,7 @@ class App extends BaseApp {
|
|
|
42
48
|
this.reload = () => {
|
|
43
49
|
_reloadApp();
|
|
44
50
|
};
|
|
51
|
+
WM.App = this;
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
getSecurityInfo() {
|
|
@@ -62,6 +69,12 @@ class App extends BaseApp {
|
|
|
62
69
|
{{/if}}
|
|
63
70
|
.then(data => {
|
|
64
71
|
this.serviceDefinitions = data?.serviceDefs || {};
|
|
72
|
+
Object.keys(this.serviceDefinitions).forEach((key) => {
|
|
73
|
+
var sv = this.serviceDefinitions[key]['wmServiceOperationInfo'];
|
|
74
|
+
if (sv) {
|
|
75
|
+
sv.proxySettings.mobile = sv.proxySettings.web;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
65
78
|
return this.serviceDefinitions;
|
|
66
79
|
});
|
|
67
80
|
}
|
|
@@ -98,21 +111,40 @@ class App extends BaseApp {
|
|
|
98
111
|
}));
|
|
99
112
|
}
|
|
100
113
|
|
|
114
|
+
set activeTheme(themeName) {
|
|
115
|
+
this.setTheme(themeName);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
get activeTheme() {
|
|
119
|
+
return getSelectedTheme();
|
|
120
|
+
}
|
|
121
|
+
|
|
101
122
|
setTheme(name) {
|
|
102
123
|
StorageService.setItem('activeTheme', name);
|
|
103
|
-
setAppTheme(name);
|
|
124
|
+
setAppTheme(name).then(() => this.refresh());
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
getTheme() {
|
|
128
|
+
return StorageService.getItem('activeTheme')
|
|
129
|
+
.then(name => {
|
|
130
|
+
return hasAppTheme(name)
|
|
131
|
+
.then((flag) => flag ? name : this.appConfig.appProperties.activeTheme);
|
|
132
|
+
});
|
|
104
133
|
}
|
|
105
134
|
|
|
106
135
|
loadTheme() {
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
.then((theme) => setAppTheme(theme))
|
|
136
|
+
return this.getTheme()
|
|
137
|
+
.then((theme) => setAppTheme(theme))
|
|
110
138
|
}
|
|
111
139
|
|
|
112
140
|
get appLocale() {
|
|
113
141
|
return this.appConfig.appLocale.messages;
|
|
114
142
|
}
|
|
115
143
|
|
|
144
|
+
get themes() {
|
|
145
|
+
return getThemes();
|
|
146
|
+
}
|
|
147
|
+
|
|
116
148
|
bootstrap() {
|
|
117
149
|
const data = getAppVariables(this);
|
|
118
150
|
this.appConfig.theme = this.appConfig.theme.$new('app-styles', styles);
|
|
@@ -136,6 +168,10 @@ class App extends BaseApp {
|
|
|
136
168
|
return LocaleResolver.resolve(url);
|
|
137
169
|
}
|
|
138
170
|
|
|
171
|
+
handleUrl(url) {
|
|
172
|
+
return resolveThemeAsset(url);
|
|
173
|
+
}
|
|
174
|
+
|
|
139
175
|
getDefaultLocale() {
|
|
140
176
|
const appProperties = this.appConfig.appProperties;
|
|
141
177
|
return Promise.resolve().then(() => {
|
|
@@ -154,7 +190,10 @@ class App extends BaseApp {
|
|
|
154
190
|
.then(() => newLocale || AppI18nService.getSelectedLocale())
|
|
155
191
|
.then((newLocale) => newLocale || this.getDefaultLocale())
|
|
156
192
|
.then((newLocale) => {
|
|
157
|
-
AppI18nService.setSelectedLocale(newLocale);
|
|
193
|
+
const needsRestart = AppI18nService.setSelectedLocale(newLocale);
|
|
194
|
+
if(needsRestart){
|
|
195
|
+
RNRestart.Restart();
|
|
196
|
+
}
|
|
158
197
|
this.appConfig.selectedLocale = newLocale;
|
|
159
198
|
{{#if profile.useLocalMetadata}}
|
|
160
199
|
return this.handleLocaleUrl(`i18n/${newLocale}.json`)
|
|
@@ -169,6 +208,16 @@ class App extends BaseApp {
|
|
|
169
208
|
});
|
|
170
209
|
}
|
|
171
210
|
|
|
211
|
+
|
|
212
|
+
{{#if sslPinning}}
|
|
213
|
+
initSSLPininng() {
|
|
214
|
+
if (isSslPinningAvailable()) {
|
|
215
|
+
return initializeSslPinning({{{stringify sslPinning}}}).then(() => true);
|
|
216
|
+
}
|
|
217
|
+
return Promise.resolve(false);
|
|
218
|
+
}
|
|
219
|
+
{{/if}}
|
|
220
|
+
|
|
172
221
|
componentDidMount() {
|
|
173
222
|
{{#if animatedSplash}}
|
|
174
223
|
SplashScreen.hideAsync().then(() => {});{{/if}}
|
|
@@ -176,13 +225,20 @@ class App extends BaseApp {
|
|
|
176
225
|
NetworkService.start(this.appConfig)
|
|
177
226
|
{{#if profile.useLocalMetadata}}
|
|
178
227
|
{{else}}
|
|
179
|
-
.then(() =>
|
|
228
|
+
.then(() => {
|
|
229
|
+
NetworkService.connect(true);
|
|
230
|
+
})
|
|
180
231
|
{{/if}}
|
|
181
232
|
.then(() => {console.log('NetworkService started')})
|
|
182
233
|
.then(() => this.loadWmProperties())
|
|
183
234
|
.then(() => {console.log('WmProperties loaded')})
|
|
235
|
+
{{#if sslPinning}}
|
|
236
|
+
.then(() => this.initSSLPininng())
|
|
237
|
+
.then((flag) => {flag && console.log('SSL Pinning loaded')})
|
|
238
|
+
{{/if}}
|
|
184
239
|
.then(() => this.loadTheme())
|
|
185
240
|
.then(() => {console.log('Theme loaded')})
|
|
241
|
+
.then(() => AppI18nService.init())
|
|
186
242
|
.then(() => this.changeLocale())
|
|
187
243
|
.then(() => {console.log('Locale files loaded')})
|
|
188
244
|
.then(() => this.getSecurityInfo())
|
|
@@ -211,11 +267,11 @@ class App extends BaseApp {
|
|
|
211
267
|
}
|
|
212
268
|
|
|
213
269
|
render() {
|
|
214
|
-
return
|
|
215
|
-
<View style=\{{flex: 1}}>
|
|
216
|
-
{ super.renderApp(this.getCommonPartial())}
|
|
270
|
+
return (
|
|
271
|
+
<View dir={AppI18nService.isRTLLocale(this.appConfig.selectedLocale)?'rtl':null} style=\{{flex: 1, backgroundColor: themeVariables.INSTANCE.pageContentBgColor}}>
|
|
272
|
+
{ this.isStarted ? super.renderApp(this.getCommonPartial()) : null}
|
|
217
273
|
</View>
|
|
218
|
-
)
|
|
274
|
+
);
|
|
219
275
|
}
|
|
220
276
|
}
|
|
221
277
|
|
|
@@ -235,7 +291,7 @@ const AnimatedSplash = (props) => {
|
|
|
235
291
|
return (appConfig.splash.src.includes("splash-bg")?
|
|
236
292
|
<ImageBackground source={ResourceResolver.resolve(appConfig.splash.src, appConfig.url)}
|
|
237
293
|
resizeMode="cover"
|
|
238
|
-
style=\{{
|
|
294
|
+
style=\{{ justifyContent: "center", width: '100%', height: '100%' }}>
|
|
239
295
|
<Lottie
|
|
240
296
|
source={ResourceResolver.resolve(appConfig.splash.animationSrc, appConfig.url)}
|
|
241
297
|
autoPlay={true}
|
|
@@ -8,27 +8,43 @@ const themes = {
|
|
|
8
8
|
"{{this}}": {
|
|
9
9
|
android: {
|
|
10
10
|
style: () => require('./theme/{{this}}/android/style.js').default,
|
|
11
|
-
variables: () => require('./theme/{{this}}/android/variables.js').default
|
|
11
|
+
variables: () => require('./theme/{{this}}/android/variables.js').default,
|
|
12
|
+
getAsset: () => require('./theme/{{this}}/android/asset.resolver.js').default.resolve
|
|
12
13
|
},
|
|
13
14
|
ios: {
|
|
14
15
|
style: () => require('./theme/{{this}}/ios/style.js').default,
|
|
15
|
-
variables: () => require('./theme/{{this}}/ios/variables.js').default
|
|
16
|
+
variables: () => require('./theme/{{this}}/ios/variables.js').default,
|
|
17
|
+
getAsset: () => require('./theme/{{this}}/ios/asset.resolver.js').default.resolve
|
|
16
18
|
}
|
|
17
19
|
},
|
|
18
20
|
{{/each}}
|
|
19
21
|
};
|
|
22
|
+
|
|
23
|
+
let selectedTheme = null;
|
|
24
|
+
let selectedThemeName = null;
|
|
25
|
+
let getAsset = null;
|
|
20
26
|
const appTheme = BASE_THEME.$new('app-theme', {});
|
|
21
27
|
export const setAppTheme = (themeName) => {
|
|
22
28
|
return Promise.resolve().then(() => {
|
|
23
|
-
|
|
29
|
+
selectedTheme = (themes[themeName]||{})[isIos() ? 'ios': 'android'];
|
|
24
30
|
if (selectedTheme) {
|
|
31
|
+
selectedThemeName = themeName;
|
|
25
32
|
Object.assign(themeVariables.INSTANCE, selectedTheme.variables());
|
|
33
|
+
getAsset = selectedTheme.getAsset();
|
|
26
34
|
if (fontConfig.baseFont) {
|
|
27
35
|
themeVariables.baseFont = fontConfig.baseFont;
|
|
28
36
|
}
|
|
29
|
-
BASE_THEME.reset();
|
|
30
37
|
appTheme.reset(selectedTheme.style());
|
|
38
|
+
BASE_THEME.reset();
|
|
31
39
|
}
|
|
32
40
|
});
|
|
33
41
|
};
|
|
42
|
+
export const hasAppTheme = (themeName) => {
|
|
43
|
+
return Promise.resolve()
|
|
44
|
+
.then(() => !!(themes[themeName]||{})[isIos() ? 'ios': 'android']);
|
|
45
|
+
};
|
|
46
|
+
setAppTheme(Object.keys(themes)[0]);
|
|
47
|
+
export const getThemes = () => Object.keys(themes);
|
|
48
|
+
export const getSelectedTheme = () => selectedThemeName;
|
|
49
|
+
export const resolveThemeAsset = (path) => (getAsset && getAsset(path));
|
|
34
50
|
export default appTheme;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { LogBox } from 'react-native';
|
|
2
2
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
3
|
+
import Logger from '@wavemaker/app-rn-runtime/core/logger';
|
|
3
4
|
import StorageService from '@wavemaker/app-rn-runtime/core/storage.service';
|
|
4
5
|
import WM from '@wavemaker/app-rn-runtime/runtime/platform.api';
|
|
6
|
+
import AppI18nService from '@wavemaker/app-rn-runtime/runtime/services/app-i18n.service';
|
|
5
7
|
import appTheme from './app.theme';
|
|
6
8
|
import PageConfig from './src/pages/pages-config';
|
|
7
9
|
import PartialConfig from './src/partials/partial-config';
|
|
@@ -20,7 +22,12 @@ export const appConfig = {
|
|
|
20
22
|
appLocale: {}
|
|
21
23
|
};
|
|
22
24
|
|
|
25
|
+
{{#if profile.generateWeb}}
|
|
26
|
+
appConfig.url = location.href.split('/rn-bundle')[0];
|
|
27
|
+
{{/if}}
|
|
28
|
+
|
|
23
29
|
injector.set('APP_CONFIG', appConfig);
|
|
30
|
+
injector.I18nService.set(AppI18nService);
|
|
24
31
|
|
|
25
32
|
global.wm = WM;
|
|
26
33
|
{{#if enableLogs}}
|
|
@@ -31,21 +38,21 @@ axios.defaults.withCredentials = true;
|
|
|
31
38
|
StorageService.target = config.id;
|
|
32
39
|
|
|
33
40
|
const bootstrap = () => {
|
|
41
|
+
Logger.init();
|
|
34
42
|
injector.set('AppConfig', appConfig);
|
|
35
43
|
appConfig.appId = config.id;
|
|
36
44
|
appConfig.pages = PageConfig;
|
|
37
45
|
appConfig.partials = PartialConfig;
|
|
38
46
|
{{#if profile.generateWeb}}
|
|
39
|
-
appConfig.url = location.href.split('/rn-bundle')[0];
|
|
40
47
|
{{#ifEquals loader 'skeleton' this}}
|
|
41
48
|
{{else}}
|
|
42
|
-
return axios.get(ResourceResolver.resolve("resources/files/"+config.loader+".json",
|
|
49
|
+
return axios.get(ResourceResolver.resolve("resources/files/"+config.loader+".json", appConfig.url)).then((response)=>{
|
|
43
50
|
appConfig.spinner.json = response.data;
|
|
44
51
|
appConfig.refresh();
|
|
45
52
|
});
|
|
46
53
|
{{/ifEquals}}
|
|
47
54
|
{{else}}
|
|
48
|
-
appConfig.spinner.json = ResourceResolver.resolve("resources/files/"+config.loader+".json", appConfig.
|
|
55
|
+
appConfig.spinner.json = ResourceResolver.resolve("resources/files/"+config.loader+".json", appConfig.url);
|
|
49
56
|
appConfig.refresh();
|
|
50
57
|
{{/if}}
|
|
51
58
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
|
|
3
|
+
<head>
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
|
+
<title>WaveMaker Preview</title>
|
|
6
|
+
<style>
|
|
7
|
+
.show {
|
|
8
|
+
opacity: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.hide {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
</head>
|
|
16
|
+
|
|
17
|
+
<body style="height: 100vh; display: flex; padding: 16px;
|
|
18
|
+
justify-content: center; flex-direction: column;
|
|
19
|
+
font-family:Arial, Helvetica, sans-serif;
|
|
20
|
+
background-color: #111; color: #f4f4f4;line-height: 24px;overflow: hidden;">
|
|
21
|
+
<div>
|
|
22
|
+
<b style="color: #82d3e0;">1.</b> Studio web preview is disabled. To enable, visit Project Settings.<br>
|
|
23
|
+
<b style="color: #82d3e0;">2.</b> Otherwise, execute the following command in your local terminal.
|
|
24
|
+
<br>
|
|
25
|
+
</div>
|
|
26
|
+
<div>
|
|
27
|
+
<div style="position: relative;background-color: #ccc;color: #333; padding: 24px 16px 16px 16px;
|
|
28
|
+
border-radius: 8px; font-family:monospace, 'Courier New', Courier;overflow: auto;margin: 8px 0;">
|
|
29
|
+
<div style="position: absolute;top: 0; right: 0; background: #666; padding: 2px 8px; color: #82d3e0;" onclick="copy()">Copy</div>
|
|
30
|
+
<div id="command-info" style="word-break: break-word;"></div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<b style="color: #82d3e0;">3.</b> Then, open <a style="color: #82d3e0;" href="http://localhost:19009" target="_blank">http://localhost:19009</a> in a web browser.
|
|
35
|
+
<br><span><br><br><br><i style="color: #eee;">To know more, <a
|
|
36
|
+
href="https://docs.wavemaker.com/learn/react-native/generate-web-preview-locally" target="_blank"
|
|
37
|
+
style="color: #82d3e0;">please visit this link</a>.</i></span>
|
|
38
|
+
<span style="display:none">Modified at : {{modified_date}}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div id="message" style="position: fixed; top: 0; right: 0;
|
|
41
|
+
background: #eee; color: #666; padding: 16px; left: 0;
|
|
42
|
+
margin: 4pt; border-radius: 4pt;transition: opacity linear 1s;" class="hide">
|
|
43
|
+
Copied !!!
|
|
44
|
+
</div>
|
|
45
|
+
<script>
|
|
46
|
+
var div = document.getElementById('command-info');
|
|
47
|
+
|
|
48
|
+
function copy() {
|
|
49
|
+
// Copy the text inside the text field
|
|
50
|
+
navigator.clipboard.writeText(div.innerText);
|
|
51
|
+
document.getElementById('message').classList.remove('hide');
|
|
52
|
+
}
|
|
53
|
+
var xhr = new XMLHttpRequest();
|
|
54
|
+
xhr.onreadystatechange = function() {
|
|
55
|
+
if (xhr.readyState == XMLHttpRequest.DONE) {
|
|
56
|
+
div.innerText = `wm-reactnative run web-preview "${location.href.split('/rn-bundle')[0]}#${xhr.responseText.split(';')[0]}"`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
xhr.open('GET', '/studio/services/auth/token', true);
|
|
60
|
+
xhr.send(null);
|
|
61
|
+
</script>
|
|
62
|
+
</body>
|
|
63
|
+
|
|
64
|
+
</html>
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { ScrollView } from 'react-native';
|
|
4
4
|
|
|
5
|
+
import { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';
|
|
5
6
|
import Base{{typeLabel}} from '@wavemaker/app-rn-runtime/runtime/base-{{lType}}.component';
|
|
6
7
|
import { useWatcher } from '@wavemaker/app-rn-runtime/runtime/watcher';
|
|
7
8
|
import { WmMemo } from '@wavemaker/app-rn-runtime/runtime/memo.component';
|
|
@@ -82,6 +83,8 @@ export default class {{name}}{{typeLabel}} extends Base{{typeLabel}} {
|
|
|
82
83
|
this.startUpActions = [{{#each startUpActions}}'{{this}}',{{/each}}];
|
|
83
84
|
this.autoUpdateVariables = [{{#each autoUpdateVariables}}'{{this}}',{{/each}}];
|
|
84
85
|
}
|
|
86
|
+
|
|
87
|
+
provideAsset = (path) => this.handleUrl(path);
|
|
85
88
|
|
|
86
89
|
componentDidMount() {
|
|
87
90
|
{{#ifEquals lType 'prefab' this}}
|
|
@@ -105,7 +108,9 @@ export default class {{name}}{{typeLabel}} extends Base{{typeLabel}} {
|
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
handleUrl(url) {
|
|
108
|
-
return
|
|
111
|
+
return this.App.handleUrl(url) ||
|
|
112
|
+
ResourceResolver.resolve(url, this.resourceBaseUrl) ||
|
|
113
|
+
super.handleUrl(url);
|
|
109
114
|
}
|
|
110
115
|
|
|
111
116
|
{{#ifEquals lType 'page' this}}
|
|
@@ -119,6 +124,10 @@ export default class {{name}}{{typeLabel}} extends Base{{typeLabel}} {
|
|
|
119
124
|
renderPartial() {
|
|
120
125
|
{{/ifEquals}}
|
|
121
126
|
const fragment = this.proxy;
|
|
122
|
-
return (<FragmentContext.Provider value={this.proxy}>
|
|
127
|
+
return (<FragmentContext.Provider value={this.proxy}>
|
|
128
|
+
<AssetProvider value={this.provideAsset}>
|
|
129
|
+
{{{markup}}}
|
|
130
|
+
</AssetProvider>
|
|
131
|
+
</FragmentContext.Provider>);
|
|
123
132
|
}
|
|
124
133
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{{#each liveSources}}
|
|
2
|
+
import {{this}}Json from './{{this}}.json';
|
|
3
|
+
{{/each}}
|
|
4
|
+
|
|
5
|
+
const metadata = {
|
|
6
|
+
{{#each liveSources}}
|
|
7
|
+
{{this}}: {{this}}Json,
|
|
8
|
+
{{/each}}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const getEntityPropertyMap = (liveSource, entityName) => {
|
|
12
|
+
return metadata[liveSource] &&
|
|
13
|
+
metadata[liveSource][entityName] &&
|
|
14
|
+
metadata[liveSource][entityName].propertiesMap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const getEntityRelatedTables = (liveSource, entityName) => {
|
|
18
|
+
return metadata[liveSource] &&
|
|
19
|
+
metadata[liveSource][entityName] &&
|
|
20
|
+
metadata[liveSource][entityName].relatedTables;
|
|
21
|
+
}
|
|
@@ -1,9 +1,90 @@
|
|
|
1
1
|
{
|
|
2
|
+
"main": "node_modules/expo/AppEntry.js",
|
|
2
3
|
"scripts": {
|
|
4
|
+
"start": "expo start",
|
|
5
|
+
"android": "expo start --android",
|
|
6
|
+
"ios": "expo start --ios",
|
|
7
|
+
"web": "expo start --web",
|
|
8
|
+
"eject": "expo eject",
|
|
3
9
|
"postinstall": "echo \"\""
|
|
4
10
|
},
|
|
5
11
|
"dependencies": {
|
|
12
|
+
"@unimodules/react-native-adapter": "6.3.9",
|
|
13
|
+
"@wavemaker/app-rn-runtime": "11.4.0-next.25701",
|
|
14
|
+
"@wavemaker/variables": "11.4.0-next.25701",
|
|
15
|
+
"axios": "^1.4.0",
|
|
16
|
+
"css-mediaquery": "^0.1.2",
|
|
17
|
+
"deprecated-react-native-prop-types": "~4.1.0",
|
|
18
|
+
"expo": "49.0.7",
|
|
19
|
+
"@expo/vector-icons": "13.0.0",
|
|
20
|
+
"expo-font": "11.4.0",
|
|
21
|
+
"expo-file-system": "15.4.3",
|
|
22
|
+
"expo-camera": "13.4.2",
|
|
23
|
+
"expo-av": "13.4.1",
|
|
24
|
+
"expo-barcode-scanner": "12.5.3",
|
|
25
|
+
"expo-web-browser": "12.3.2",
|
|
26
|
+
"expo-device": "5.4.0",
|
|
27
|
+
"expo-network": "5.4.0",
|
|
28
|
+
"expo-location": "16.1.0",
|
|
29
|
+
"expo-localization": "14.3.0",
|
|
30
|
+
"expo-contacts": "12.2.0",
|
|
31
|
+
"expo-calendar": "11.3.0",
|
|
32
|
+
"expo-splash-screen": "0.20.5",
|
|
33
|
+
"expo-document-picker": "11.5.4",
|
|
34
|
+
"expo-constants": "14.4.2",
|
|
35
|
+
"@react-native/assets": "1.0.0",
|
|
36
|
+
"hermes-engine": "0.11.0",
|
|
37
|
+
"react": "18.2.0",
|
|
38
|
+
"react-dom": "18.2.0",
|
|
39
|
+
"react-native": "0.72.4",
|
|
40
|
+
"react-native-web": "0.18.12",
|
|
41
|
+
"@react-native-async-storage/async-storage": "1.18.2",
|
|
42
|
+
"@react-native-community/netinfo": "9.3.10",
|
|
43
|
+
"react-native-gesture-handler": "2.12.1",
|
|
6
44
|
"react-native-reanimated": "^1.13.2",
|
|
45
|
+
"react-native-bundle-splitter": "2.2.3",
|
|
46
|
+
"react-native-safe-area-context": "4.6.3",
|
|
47
|
+
"@react-native-community/datetimepicker": "7.2.0",
|
|
48
|
+
"@react-native-community/slider": "4.4.2",
|
|
49
|
+
"react-native-circular-progress": "1.3.9",
|
|
50
|
+
"@react-native-masked-view/masked-view": "0.2.9",
|
|
51
|
+
"react-native-snap-carousel": "3.9.1",
|
|
52
|
+
"react-native-svg": "13.4.0",
|
|
53
|
+
"react-native-ssl-public-key-pinning": "1.1.1",
|
|
54
|
+
"victory-native": "36.6.11",
|
|
55
|
+
"@react-navigation/native": "6.1.7",
|
|
56
|
+
"react-native-pager-view": "6.2.0",
|
|
57
|
+
"react-native-webview": "13.2.2",
|
|
58
|
+
"react-native-vector-icons": "10.0.0",
|
|
59
|
+
"@react-navigation/drawer": "6.6.3",
|
|
60
|
+
"react-native-screens": "3.22.0",
|
|
61
|
+
"react-native-svg-transformer": "1.0.0",
|
|
62
|
+
"lottie-react-native": "5.1.6",
|
|
63
|
+
"react-lottie-player": "1.5.4",
|
|
64
|
+
"expo-linear-gradient": "12.3.0",
|
|
65
|
+
"setimmediate": "1.0.5",
|
|
66
|
+
"react-native-restart": "0.0.27",
|
|
67
|
+
"@expo/webpack-config": "18.0.1",
|
|
68
|
+
"@babel/core": "7.20.2",
|
|
7
69
|
"victory": "^36.5.3"
|
|
8
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"webpack-dev-middleware": "6.1.1",
|
|
73
|
+
"react-devtools-core": "4.28.0",
|
|
74
|
+
"@babel/cli": "7.14.5",
|
|
75
|
+
"esbuild": "0.15.15",
|
|
76
|
+
"esbuild-plugin-resolve": "1.0.3",
|
|
77
|
+
"fs-extra": "10.0.0",
|
|
78
|
+
"expo-modules-autolinking": "1.5.0",
|
|
79
|
+
"babel-plugin-transform-remove-console": "6.9.4",
|
|
80
|
+
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
|
81
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
|
|
82
|
+
"@babel/plugin-syntax-jsx": "7.21.4"
|
|
83
|
+
},
|
|
84
|
+
"resolutions": {
|
|
85
|
+
"react-error-overlay": "6.0.9",
|
|
86
|
+
"react-native-svg": "^1.13.2",
|
|
87
|
+
"react-native-reanimated": "3.3.0"
|
|
88
|
+
},
|
|
89
|
+
"private": true
|
|
9
90
|
}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
{{#if lazyload}}
|
|
2
|
-
import { register } from 'react-native-bundle-splitter';
|
|
3
|
-
{{else}}
|
|
4
1
|
{{#each pageConfigs}}
|
|
5
2
|
import {{name}}Component from "./{{name}}/{{name}}.component";
|
|
6
3
|
{{/each}}
|
|
7
|
-
{{/if}}
|
|
8
4
|
|
|
9
5
|
const components = {
|
|
10
6
|
{{#each pageConfigs}}
|
|
11
7
|
'{{name}}': {
|
|
12
|
-
{{#if ../lazyload}}
|
|
13
|
-
type: register({ loader: () => import('./{{name}}/{{name}}.component') }),
|
|
14
|
-
{{else}}
|
|
15
8
|
type: {{name}}Component,
|
|
16
|
-
{{/if}}
|
|
17
9
|
name: '{{name}}Component'
|
|
18
10
|
},
|
|
19
11
|
{{/each}}
|
|
@@ -26,11 +26,13 @@
|
|
|
26
26
|
"supportsTablet": true
|
|
27
27
|
},
|
|
28
28
|
"android": {
|
|
29
|
+
"softwareKeyboardLayoutMode": "pan",
|
|
29
30
|
"adaptiveIcon": {
|
|
30
31
|
"foregroundImage": "./assets/adaptive-icon.png"
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
"web": {
|
|
35
|
+
"bundler": "metro",
|
|
34
36
|
"favicon": "./assets/favicon.png"
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -51,6 +51,46 @@ class EsBuilder {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
async patchReactNativeAssets() {
|
|
55
|
+
const path = `${__dirname}/../node_modules/@react-native/assets-registry/`
|
|
56
|
+
fs.removeSync(path+'registry.js');
|
|
57
|
+
const registry_content = `
|
|
58
|
+
'use strict';
|
|
59
|
+
|
|
60
|
+
export type PackagerAsset = {
|
|
61
|
+
__packager_asset: boolean,
|
|
62
|
+
fileSystemLocation: string,
|
|
63
|
+
httpServerLocation: string,
|
|
64
|
+
width?: number,
|
|
65
|
+
height?: number,
|
|
66
|
+
scales: Array<number>,
|
|
67
|
+
hash: string,
|
|
68
|
+
name: string,
|
|
69
|
+
type: string,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const assets: Array<PackagerAsset> = [];
|
|
73
|
+
|
|
74
|
+
export function registerAsset(asset: PackagerAsset): number {
|
|
75
|
+
// push returns new array length, so the first asset will
|
|
76
|
+
// get id 1 (not 0) to make the value truthy
|
|
77
|
+
return assets.push(asset);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function getAssetByID(assetId: number): PackagerAsset {
|
|
81
|
+
return assets[assetId - 1];
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
fs.writeFileSync(path+'registry.ts', registry_content);
|
|
85
|
+
const content = fs.readFileSync(path+'path-support.js', 'utf-8');
|
|
86
|
+
fs.removeSync(path+'path-support.js')
|
|
87
|
+
fs.writeFileSync(path+'path-support.ts', content);
|
|
88
|
+
await readAndReplaceFileContent(path+'path-support.ts', (content)=>{
|
|
89
|
+
return content.replace(`import type {PackagerAsset} from './registry.js';`,`import type {PackagerAsset} from './registry.ts';`)
|
|
90
|
+
.replace(` | $TEMPORARY$string<'raw'> `, '');
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
54
94
|
async patchReactNativeWeb() {
|
|
55
95
|
const path = `${__dirname}/../node_modules/react-native-web/dist/cjs/exports/render/index.js`;
|
|
56
96
|
await readAndReplaceFileContent(path, (content) => {
|
|
@@ -125,6 +165,7 @@ class EsBuilder {
|
|
|
125
165
|
.then(() => this.patchPackageLib(['@koale/useworker', 'victory']))
|
|
126
166
|
.then(() => this.patchWithDevTools('expo/build/launch/withDevTools.js'))
|
|
127
167
|
.then(() => this.patchReactNativeWeb())
|
|
168
|
+
.then(() => this.patchReactNativeAssets())
|
|
128
169
|
.then(() => {
|
|
129
170
|
console.log('*********** LIBRARIES ARE BUILT FOR ESBUILD **************');
|
|
130
171
|
}, (e) => {
|
|
@@ -144,7 +185,7 @@ class EsBuilder {
|
|
|
144
185
|
tsconfig: './esbuild/jsconfig.json',
|
|
145
186
|
define: {'process.env.NODE_ENV': '"development"', '__DEV__': false, global:'window'},
|
|
146
187
|
resolveExtensions: ['.web.tsx','.web.ts','.web.jsx','.web.js','.tsx','.ts','.jsx','.js',],
|
|
147
|
-
loader: {".png": "file", ".ttf": "file", ".js": "jsx", ".gif": "file", ".svg": "file" },
|
|
188
|
+
loader: {".png": "file", ".jpeg": "file", ".ttf": "file", ".js": "jsx", ".gif": "file", ".svg": "file" },
|
|
148
189
|
minify: false,
|
|
149
190
|
sourcemap: true,
|
|
150
191
|
plugins: [babel({
|