@wavemaker/rn-codegen 11.9.2-rc.193 → 11.9.3-1.5914
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rn-codegen/package.json +1 -1
- rn-codegen/src/templates/app.template +1 -1
- rn-codegen/src/templates/package.web.json +54 -55
- rn-codegen/src/templates/project/app.json +20 -2
- rn-codegen/src/templates/project/package-lock.json +12221 -17439
- rn-codegen/src/templates/project/package.json +55 -56
- rn-codegen/src/templates/project/scripts/post-build.js +0 -17
- rn-codegen/src/templates/project/wavepulse/rn2css.json +1 -0
- rn-codegen/src/templates/project/wavepulse/wavepulse.agent.js +98 -79
- rn-codegen/src/theme/components/advanced/webview.styledef.js +10 -2
- rn-codegen/src/theme/components/advanced/webview.styledef.js.map +1 -1
- rn-codegen/src/theme/variables.js +1 -1
- rn-codegen/src/theme/variables.js.map +1 -1
- rn-codegen/src/transpile/property/property-parser.js +8 -2
- rn-codegen/src/transpile/property/property-parser.js.map +1 -1
- rn-codegen/src/transpile/transpile.js +4 -4
- rn-codegen/src/transpile/transpile.js.map +1 -1
|
@@ -9,71 +9,69 @@
|
|
|
9
9
|
"postinstall": "node ./scripts/post-build.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/app-rn-runtime": "11.9.
|
|
13
|
-
"@wavemaker/variables": "11.9.
|
|
14
|
-
"@wavemaker/rn-codegen": "11.9.
|
|
12
|
+
"@wavemaker/app-rn-runtime": "11.9.3-1.5914",
|
|
13
|
+
"@wavemaker/variables": "11.9.3-1.5914",
|
|
14
|
+
"@wavemaker/rn-codegen": "11.9.3-1.5914",
|
|
15
15
|
"@wavemaker/wavepulse-agent": "1.0.11",
|
|
16
|
-
"
|
|
17
|
-
"expo": "
|
|
18
|
-
"expo-
|
|
19
|
-
"@expo/
|
|
20
|
-
"
|
|
21
|
-
"expo-
|
|
22
|
-
"expo-
|
|
23
|
-
"expo-
|
|
24
|
-
"expo-
|
|
25
|
-
"expo-
|
|
26
|
-
"expo-
|
|
27
|
-
"expo-
|
|
28
|
-
"expo-
|
|
29
|
-
"expo-
|
|
30
|
-
"expo-
|
|
31
|
-
"expo-
|
|
32
|
-
"expo-
|
|
33
|
-
"expo-
|
|
34
|
-
"expo-
|
|
35
|
-
"expo-
|
|
36
|
-
"expo-modules-core": "1.11.13",
|
|
16
|
+
"expo": "52.0.17",
|
|
17
|
+
"expo-build-properties": "0.13.1",
|
|
18
|
+
"@expo/vector-icons": "14.0.2",
|
|
19
|
+
"@expo/metro-runtime": "4.0.0",
|
|
20
|
+
"expo-font": "13.0.1",
|
|
21
|
+
"expo-file-system": "18.0.4",
|
|
22
|
+
"expo-camera": "16.0.9",
|
|
23
|
+
"expo-av": "15.0.1",
|
|
24
|
+
"expo-web-browser": "14.0.1",
|
|
25
|
+
"expo-device": "7.0.1",
|
|
26
|
+
"expo-network": "7.0.3",
|
|
27
|
+
"expo-location": "18.0.3",
|
|
28
|
+
"expo-localization": "16.0.0",
|
|
29
|
+
"expo-contacts": "14.0.2",
|
|
30
|
+
"expo-calendar": "14.0.4",
|
|
31
|
+
"expo-splash-screen": "0.29.16",
|
|
32
|
+
"expo-document-picker": "13.0.1",
|
|
33
|
+
"expo-constants": "17.0.3",
|
|
34
|
+
"expo-modules-core": "2.1.1",
|
|
35
|
+
"expo-video": "2.0.2",
|
|
37
36
|
"@react-native/assets": "1.0.0",
|
|
38
37
|
"hermes-engine": "0.11.0",
|
|
39
|
-
"imask": "7.6.
|
|
40
|
-
"
|
|
41
|
-
"react
|
|
42
|
-
"react-
|
|
43
|
-
"react-native
|
|
44
|
-
"
|
|
45
|
-
"@react-native
|
|
46
|
-
"@react-native-
|
|
47
|
-
"react-native-
|
|
48
|
-
"react-native-
|
|
49
|
-
"react-native-
|
|
50
|
-
"react-native-
|
|
51
|
-
"
|
|
52
|
-
"@react-native-community/
|
|
53
|
-
"react-native-
|
|
54
|
-
"
|
|
55
|
-
"react-native-
|
|
56
|
-
"react-native-svg": "
|
|
57
|
-
"react-native-ssl-public-key-pinning": "1.2.
|
|
38
|
+
"imask": "7.6.1",
|
|
39
|
+
"punycode": "2.3.1",
|
|
40
|
+
"react": "18.3.1",
|
|
41
|
+
"react-dom": "18.3.1",
|
|
42
|
+
"react-native": "0.76.3",
|
|
43
|
+
"react-native-web": "0.19.13",
|
|
44
|
+
"@react-native/assets-registry": "0.76.3",
|
|
45
|
+
"@react-native-async-storage/async-storage": "1.23.1",
|
|
46
|
+
"@react-native-community/netinfo": "11.4.1",
|
|
47
|
+
"react-native-gesture-handler": "2.20.2",
|
|
48
|
+
"react-native-reanimated": "3.16.1",
|
|
49
|
+
"react-native-bundle-splitter": "3.0.1",
|
|
50
|
+
"react-native-safe-area-context": "4.12.0",
|
|
51
|
+
"@react-native-community/datetimepicker": "8.2.0",
|
|
52
|
+
"@react-native-community/slider": "4.5.5",
|
|
53
|
+
"react-native-circular-progress": "1.4.1",
|
|
54
|
+
"@react-native-masked-view/masked-view": "0.3.2",
|
|
55
|
+
"react-native-svg": "15.8.0",
|
|
56
|
+
"react-native-ssl-public-key-pinning": "1.2.4",
|
|
58
57
|
"@wavemaker/react-native-ssl-publickey": "1.0.2",
|
|
59
|
-
"victory-native": "
|
|
58
|
+
"victory-native": "37.3.2",
|
|
60
59
|
"@react-navigation/native": "6.1.7",
|
|
61
|
-
"react-native-pager-view": "6.
|
|
62
|
-
"react-native-webview": "13.
|
|
63
|
-
"react-native-vector-icons": "10.0
|
|
60
|
+
"react-native-pager-view": "6.5.1",
|
|
61
|
+
"react-native-webview": "13.12.5",
|
|
62
|
+
"react-native-vector-icons": "10.2.0",
|
|
64
63
|
"@react-navigation/drawer": "6.6.3",
|
|
65
|
-
"react-native-screens": "
|
|
66
|
-
"react-native-svg-transformer": "1.
|
|
67
|
-
"lottie-react-native": "
|
|
68
|
-
"react-lottie-player": "2.
|
|
64
|
+
"react-native-screens": "4.1.0",
|
|
65
|
+
"react-native-svg-transformer": "1.5.0",
|
|
66
|
+
"lottie-react-native": "7.1.0",
|
|
67
|
+
"react-lottie-player": "2.1.0",
|
|
69
68
|
"react-native-mime-types": "2.5.0",
|
|
70
|
-
"expo-linear-gradient": "
|
|
69
|
+
"expo-linear-gradient": "14.0.1",
|
|
71
70
|
"setimmediate": "1.0.5",
|
|
72
71
|
"react-native-restart": "0.0.27",
|
|
73
|
-
"@
|
|
74
|
-
"@babel/
|
|
75
|
-
"@babel/
|
|
76
|
-
"@babel/plugin-syntax-jsx": "7.21.4"
|
|
72
|
+
"@babel/core": "7.25.2",
|
|
73
|
+
"@babel/standalone": "7.26.3",
|
|
74
|
+
"@babel/plugin-syntax-jsx": "7.25.9"
|
|
77
75
|
},
|
|
78
76
|
"devDependencies": {
|
|
79
77
|
"metro-minify-terser": "0.80.10",
|
|
@@ -87,6 +85,7 @@
|
|
|
87
85
|
"babel-plugin-transform-remove-console": "6.9.4",
|
|
88
86
|
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
|
89
87
|
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
|
|
88
|
+
"@react-native-community/cli": "16.0.0",
|
|
90
89
|
"@types/babel__standalone": "7.1.7"
|
|
91
90
|
},
|
|
92
91
|
"private": true
|
|
@@ -13,22 +13,6 @@ async function readAndReplaceFileContent(path, writeFn) {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
async function patchCarousel() {
|
|
17
|
-
const path = `${__dirname}/../node_modules/react-native-snap-carousel/src`;
|
|
18
|
-
const updateViewPropTypes = (content) => {
|
|
19
|
-
if (content.indexOf('deprecated-react-native-prop-types') < 0) {
|
|
20
|
-
return content.replace(/,\s*ViewPropTypes/, '')
|
|
21
|
-
.replace('\'react-native\';', '\'react-native\';\nimport {ViewPropTypes} from \'deprecated-react-native-prop-types\';');
|
|
22
|
-
}
|
|
23
|
-
return content;
|
|
24
|
-
};
|
|
25
|
-
await readAndReplaceFileContent(`${path}/carousel/Carousel.js`, updateViewPropTypes);
|
|
26
|
-
await readAndReplaceFileContent(`${path}/pagination/Pagination.js`, updateViewPropTypes);
|
|
27
|
-
await readAndReplaceFileContent(`${path}/pagination/PaginationDot.js`, updateViewPropTypes);
|
|
28
|
-
await readAndReplaceFileContent(`${path}/parallaximage/ParallaxImage.js`, updateViewPropTypes);
|
|
29
|
-
console.log('Patched react-native-snap-carousel');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
16
|
async function patchFlatList(){
|
|
33
17
|
const path = `${__dirname}/../node_modules/react-native/Libraries/Lists/FlatList.js`;
|
|
34
18
|
const updateProps = (content) => {
|
|
@@ -42,7 +26,6 @@ async function patchFlatList(){
|
|
|
42
26
|
}
|
|
43
27
|
|
|
44
28
|
function patch() {
|
|
45
|
-
patchCarousel();
|
|
46
29
|
patchFlatList()
|
|
47
30
|
}
|
|
48
31
|
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"app-carousel.dotSkeleton": ".app-carousel-dot-skeleton",
|
|
17
17
|
"app-login.root": ".app-login",
|
|
18
18
|
"app-webview.root": ".app-webview",
|
|
19
|
+
"app-webview.webview": ".app-webview-content",
|
|
19
20
|
"app-network-info-toaster.root": ".app-network-info-toaster",
|
|
20
21
|
"app-network-info-toaster.text": ".app-network-info-toaster-text",
|
|
21
22
|
"app-network-info-toaster.action": ".app-network-info-toaster-action",
|
|
@@ -3,6 +3,7 @@ import { Agent, WebSocketChannel } from '@wavemaker/wavepulse-agent/index';
|
|
|
3
3
|
import { EVENTS, CALLS } from './constants';
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import RN2CSS from './rn2css.json';
|
|
6
|
+
import { Platform } from 'react-native';
|
|
6
7
|
|
|
7
8
|
const MAX_WAITING_TIME_FOR_CONNECTION = 30 * 1000;
|
|
8
9
|
let wavePulseAgent = new (class WavePulseAgent extends Agent {
|
|
@@ -53,13 +54,22 @@ let wavePulseAgent = new (class WavePulseAgent extends Agent {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
})();
|
|
57
|
+
const _console = console;
|
|
58
|
+
let tryWith = (fn) => {
|
|
59
|
+
return function() {
|
|
60
|
+
try {
|
|
61
|
+
return fn && fn.apply(undefined, arguments);
|
|
62
|
+
} catch(e) {
|
|
63
|
+
_console.defaultError(e);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
56
67
|
let currentPage = null;
|
|
57
68
|
let currentWidgets = {};
|
|
58
69
|
let handler = null;
|
|
59
70
|
function wrapConsole() {
|
|
60
|
-
const _console = console;
|
|
61
71
|
const prepareLogFn = (logType, original) => {
|
|
62
|
-
return function () {
|
|
72
|
+
return tryWith(function () {
|
|
63
73
|
let args = [...arguments];
|
|
64
74
|
if (logType === 'error' && arguments[0].stack) {
|
|
65
75
|
args.splice(0, 1, arguments[0].stack.toString());
|
|
@@ -70,7 +80,7 @@ function wrapConsole() {
|
|
|
70
80
|
message: Array.from(args)
|
|
71
81
|
}]);
|
|
72
82
|
original.call(_console, ...arguments);
|
|
73
|
-
};
|
|
83
|
+
});
|
|
74
84
|
};
|
|
75
85
|
_console.defaultLog = console.log;
|
|
76
86
|
_console.log = prepareLogFn('log', _console.defaultLog);
|
|
@@ -84,7 +94,7 @@ function wrapConsole() {
|
|
|
84
94
|
_console.info = prepareLogFn('info', _console.defaultInfo);
|
|
85
95
|
}
|
|
86
96
|
function listenPageEvents() {
|
|
87
|
-
handler.subscribe('pageReady', (p) => {
|
|
97
|
+
handler.subscribe('pageReady', tryWith((p) => {
|
|
88
98
|
currentPage = p;
|
|
89
99
|
wavePulseAgent && wavePulseAgent.notify(EVENTS.TIMELINE.EVENT, 'event', [{
|
|
90
100
|
name: 'PAGE_READY',
|
|
@@ -94,8 +104,8 @@ function listenPageEvents() {
|
|
|
94
104
|
startTime: handler.appConfig.diagnostics.pageStartTime,
|
|
95
105
|
endTime: handler.appConfig.diagnostics.pageReadyTime
|
|
96
106
|
}]);
|
|
97
|
-
});
|
|
98
|
-
handler.subscribe('pageAttached', (p) => {
|
|
107
|
+
}));
|
|
108
|
+
handler.subscribe('pageAttached', tryWith((p) => {
|
|
99
109
|
currentPage = p;
|
|
100
110
|
wavePulseAgent && wavePulseAgent.notify(EVENTS.TIMELINE.EVENT, 'event', [{
|
|
101
111
|
name: 'PAGE_READY',
|
|
@@ -105,19 +115,19 @@ function listenPageEvents() {
|
|
|
105
115
|
startTime: handler.appConfig.diagnostics.pageStartTime,
|
|
106
116
|
endTime: handler.appConfig.diagnostics.pageReadyTime
|
|
107
117
|
}]);
|
|
108
|
-
});
|
|
109
|
-
handler.subscribe('pageDestroyed', (p) => {
|
|
118
|
+
}));
|
|
119
|
+
handler.subscribe('pageDestroyed', tryWith((p) => {
|
|
110
120
|
currentPage = null;
|
|
111
|
-
});
|
|
121
|
+
}));
|
|
112
122
|
}
|
|
113
123
|
function listenVariableEvents() {
|
|
114
|
-
handler.subscribe('beforeInvoke', (v) => {
|
|
124
|
+
handler.subscribe('beforeInvoke', tryWith((v) => {
|
|
115
125
|
wavePulseAgent && wavePulseAgent.notify(EVENTS.VARIABLE.BEFORE_INVOKE, 'event', []);
|
|
116
126
|
v.__diagnostics = v.__diagnostics || {};
|
|
117
127
|
v.__diagnostics.invocationStartTime = Date.now();
|
|
118
128
|
v.__diagnostics.processed = false;
|
|
119
|
-
});
|
|
120
|
-
handler.subscribe('afterInvoke', (v) => {
|
|
129
|
+
}));
|
|
130
|
+
handler.subscribe('afterInvoke', tryWith((v) => {
|
|
121
131
|
wavePulseAgent && wavePulseAgent.notify(EVENTS.VARIABLE.AFTER_INVOKE, 'event', []);
|
|
122
132
|
if (v.__diagnostics.processed) {
|
|
123
133
|
return;
|
|
@@ -133,57 +143,66 @@ function listenVariableEvents() {
|
|
|
133
143
|
startTime: v.__diagnostics.invocationStartTime,
|
|
134
144
|
endTime: v.__diagnostics.invocationEndTime
|
|
135
145
|
}]);
|
|
136
|
-
});
|
|
146
|
+
}));
|
|
137
147
|
}
|
|
138
148
|
function listenServiceCalls() {
|
|
139
149
|
const _axios = global['axios'] || axios;
|
|
140
|
-
_axios.interceptors.request.use(function (config) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
150
|
+
_axios.interceptors.request.use(tryWith(function (config) {
|
|
151
|
+
try {
|
|
152
|
+
config.__startTime = Date.now();
|
|
153
|
+
// Do something before request is sent
|
|
154
|
+
wavePulseAgent && wavePulseAgent.notify(EVENTS.SERVICE.BEFORE_CALL, 'event', [config]);
|
|
155
|
+
} finally {
|
|
156
|
+
return config;
|
|
157
|
+
}
|
|
158
|
+
}), tryWith(function (error) {
|
|
146
159
|
// Do something with request error
|
|
147
160
|
return Promise.reject(error);
|
|
148
|
-
});
|
|
161
|
+
}));
|
|
149
162
|
// Add a response interceptor
|
|
150
|
-
_axios.interceptors.response.use(function (response) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
_axios.interceptors.response.use(tryWith(function (response) {
|
|
164
|
+
try {
|
|
165
|
+
// Any status code that lie within the range of 2xx cause this function to trigger
|
|
166
|
+
// Do something with response data
|
|
167
|
+
response.config.__endTime = Date.now();
|
|
168
|
+
wavePulseAgent && wavePulseAgent.notify(EVENTS.SERVICE.AFTER_CALL, 'event', [response.config, response]);
|
|
169
|
+
if (!response.config.__wmVariable) {
|
|
170
|
+
const config = response.config;
|
|
171
|
+
wavePulseAgent && wavePulseAgent.notify(EVENTS.TIMELINE.EVENT, 'event', [{
|
|
172
|
+
name: 'NETWORK_REQUEST',
|
|
173
|
+
data: {
|
|
174
|
+
url: config.url,
|
|
175
|
+
method: config.method
|
|
176
|
+
},
|
|
177
|
+
startTime: config.__startTime,
|
|
178
|
+
endTime: config.__endTime
|
|
179
|
+
}]);
|
|
180
|
+
}
|
|
181
|
+
} finally {
|
|
182
|
+
return response;
|
|
166
183
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
}), tryWith(function (error) {
|
|
185
|
+
try {
|
|
186
|
+
// Any status codes that falls outside the range of 2xx cause this function to trigger
|
|
187
|
+
// Do something with response error
|
|
188
|
+
error.config.__endTime = Date.now();
|
|
189
|
+
wavePulseAgent && wavePulseAgent.notify(EVENTS.SERVICE.AFTER_CALL, 'event', [error.config, error]);
|
|
190
|
+
if (!error.config.__wmVariable) {
|
|
191
|
+
const config = error.config;
|
|
192
|
+
wavePulseAgent && wavePulseAgent.notify(EVENTS.TIMELINE.EVENT, 'event', [{
|
|
193
|
+
name: 'NETWORK_REQUEST',
|
|
194
|
+
data: {
|
|
195
|
+
url: config.url,
|
|
196
|
+
method: config.method
|
|
197
|
+
},
|
|
198
|
+
startTime: config.__startTime,
|
|
199
|
+
endTime: config.__endTime
|
|
200
|
+
}]);
|
|
201
|
+
}
|
|
202
|
+
} finally{
|
|
203
|
+
return Promise.reject(error);
|
|
184
204
|
}
|
|
185
|
-
|
|
186
|
-
});
|
|
205
|
+
}));
|
|
187
206
|
}
|
|
188
207
|
function buildComponentTree(componentNode) {
|
|
189
208
|
if (!componentNode.instance.props.cname) {
|
|
@@ -198,7 +217,8 @@ function buildComponentTree(componentNode) {
|
|
|
198
217
|
};
|
|
199
218
|
}
|
|
200
219
|
function getComponentTree() {
|
|
201
|
-
|
|
220
|
+
currentPage = handler.activePage;
|
|
221
|
+
const pageIns = currentPage && Object.values(currentPage.Widgets)
|
|
202
222
|
.map((w) => w.componentNode)
|
|
203
223
|
.find((w) => { var _a, _b; return ((_b = (_a = w === null || w === void 0 ? void 0 : w.instance) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.cname) === 'WmPage'; });
|
|
204
224
|
currentWidgets = {};
|
|
@@ -209,11 +229,11 @@ function getComponentById(id) {
|
|
|
209
229
|
}
|
|
210
230
|
function bindCalls() {
|
|
211
231
|
let lastHighLightedWidgetId = '';
|
|
212
|
-
wavePulseAgent.onInvoke(CALLS.WIDGET.GET, (args) => {
|
|
232
|
+
wavePulseAgent.onInvoke(CALLS.WIDGET.GET, tryWith((args) => {
|
|
213
233
|
const name = args[0].name;
|
|
214
234
|
return Promise.resolve(currentPage === null || currentPage === void 0 ? void 0 : currentPage.Widgets[name]);
|
|
215
|
-
});
|
|
216
|
-
wavePulseAgent.onInvoke(CALLS.WIDGET.HIGHLIGHT, (args) => {
|
|
235
|
+
}));
|
|
236
|
+
wavePulseAgent.onInvoke(CALLS.WIDGET.HIGHLIGHT, tryWith((args) => {
|
|
217
237
|
const lw = getComponentById(lastHighLightedWidgetId);
|
|
218
238
|
lw === null || lw === void 0 ? void 0 : lw.setState({
|
|
219
239
|
highlight: false
|
|
@@ -225,8 +245,8 @@ function bindCalls() {
|
|
|
225
245
|
});
|
|
226
246
|
lastHighLightedWidgetId = widgetIdToHighlight;
|
|
227
247
|
return Promise.resolve('');
|
|
228
|
-
});
|
|
229
|
-
wavePulseAgent.onInvoke(CALLS.WIDGET.GET_PROPERTIES_N_STYLES, (args) => {
|
|
248
|
+
}));
|
|
249
|
+
wavePulseAgent.onInvoke(CALLS.WIDGET.GET_PROPERTIES_N_STYLES, tryWith((args) => {
|
|
230
250
|
const widgetId = args[0];
|
|
231
251
|
const w = getComponentById(widgetId);
|
|
232
252
|
const ins = w.componentNode.instance;
|
|
@@ -268,8 +288,8 @@ function bindCalls() {
|
|
|
268
288
|
})
|
|
269
289
|
});
|
|
270
290
|
return Promise.resolve({ styles, properties });
|
|
271
|
-
});
|
|
272
|
-
wavePulseAgent.onInvoke(CALLS.HANDSHAKE.WISH, (args) => {
|
|
291
|
+
}));
|
|
292
|
+
wavePulseAgent.onInvoke(CALLS.HANDSHAKE.WISH, tryWith((args) => {
|
|
273
293
|
setTimeout(() => {
|
|
274
294
|
wavePulseAgent.isConnected = true;
|
|
275
295
|
wavePulseAgent.isClosed = false;
|
|
@@ -277,8 +297,8 @@ function bindCalls() {
|
|
|
277
297
|
wavePulseAgent.processBuffer();
|
|
278
298
|
}, 2000);
|
|
279
299
|
return Promise.resolve('Hello');
|
|
280
|
-
});
|
|
281
|
-
wavePulseAgent.onInvoke(CALLS.EXPRESSION.EVAL, (args) => {
|
|
300
|
+
}));
|
|
301
|
+
wavePulseAgent.onInvoke(CALLS.EXPRESSION.EVAL, tryWith((args) => {
|
|
282
302
|
const expr = args[0].expr;
|
|
283
303
|
if (expr) {
|
|
284
304
|
return new Promise((resolve, reject) => {
|
|
@@ -293,11 +313,11 @@ function bindCalls() {
|
|
|
293
313
|
});
|
|
294
314
|
}
|
|
295
315
|
return Promise.resolve();
|
|
296
|
-
});
|
|
297
|
-
wavePulseAgent.onInvoke(CALLS.UI.REFRESH, () => {
|
|
316
|
+
}));
|
|
317
|
+
wavePulseAgent.onInvoke(CALLS.UI.REFRESH, tryWith(() => {
|
|
298
318
|
return Promise.resolve(currentPage === null || currentPage === void 0 ? void 0 : currentPage.refresh());
|
|
299
|
-
});
|
|
300
|
-
wavePulseAgent.onInvoke(CALLS.APP.INFO, () => {
|
|
319
|
+
}));
|
|
320
|
+
wavePulseAgent.onInvoke(CALLS.APP.INFO, tryWith(() => {
|
|
301
321
|
const appConfig = handler.appConfig;
|
|
302
322
|
const App = handler;
|
|
303
323
|
return Promise.resolve({
|
|
@@ -315,20 +335,19 @@ function bindCalls() {
|
|
|
315
335
|
securityEnabled: appConfig.appProperties.securityEnabled,
|
|
316
336
|
serverPath: appConfig.url
|
|
317
337
|
});
|
|
318
|
-
});
|
|
319
|
-
wavePulseAgent.onInvoke(CALLS.STORAGE.GET_ALL, () => {
|
|
338
|
+
}));
|
|
339
|
+
wavePulseAgent.onInvoke(CALLS.STORAGE.GET_ALL, tryWith(() => {
|
|
320
340
|
const App = handler;
|
|
321
341
|
return App.getDependency('StorageService').getAll();
|
|
322
|
-
});
|
|
323
|
-
wavePulseAgent.onInvoke(CALLS.PLATFORM.INFO, () => {
|
|
324
|
-
const { Platform } = require('react-native');
|
|
342
|
+
}));
|
|
343
|
+
wavePulseAgent.onInvoke(CALLS.PLATFORM.INFO, tryWith(() => {
|
|
325
344
|
return Promise.resolve({
|
|
326
345
|
os: Platform.OS,
|
|
327
346
|
version: (Platform.Version || '') + '',
|
|
328
347
|
device: ''
|
|
329
348
|
});
|
|
330
|
-
});
|
|
331
|
-
wavePulseAgent.onInvoke(CALLS.WIDGET.TREE, (args) => {
|
|
349
|
+
}));
|
|
350
|
+
wavePulseAgent.onInvoke(CALLS.WIDGET.TREE, tryWith((args) => {
|
|
332
351
|
let result = null;
|
|
333
352
|
try {
|
|
334
353
|
result = getComponentTree();
|
|
@@ -337,7 +356,7 @@ function bindCalls() {
|
|
|
337
356
|
console.error(e.stack.toString());
|
|
338
357
|
}
|
|
339
358
|
return Promise.resolve(result);
|
|
340
|
-
});
|
|
359
|
+
}));
|
|
341
360
|
}
|
|
342
361
|
wrapConsole();
|
|
343
362
|
listenServiceCalls();
|
|
@@ -347,13 +366,13 @@ export const createWavePulseAgent = (args) => {
|
|
|
347
366
|
wavePulseAgent = args.agent;
|
|
348
367
|
}
|
|
349
368
|
else {
|
|
350
|
-
handler.subscribe('appReady', (p) => {
|
|
369
|
+
handler.subscribe('appReady', tryWith((p) => {
|
|
351
370
|
wavePulseAgent && wavePulseAgent.notify(EVENTS.TIMELINE.EVENT, 'event', [{
|
|
352
371
|
name: 'APP_STARTUP',
|
|
353
372
|
startTime: handler.appConfig.diagnostics.appStartTime,
|
|
354
373
|
endTime: handler.appConfig.diagnostics.appReadyTime
|
|
355
374
|
}]);
|
|
356
|
-
});
|
|
375
|
+
}));
|
|
357
376
|
}
|
|
358
377
|
listenPageEvents();
|
|
359
378
|
listenVariableEvents();
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
|
-
getStyleDefs: () => ([
|
|
4
|
+
getStyleDefs: () => ([
|
|
5
|
+
{
|
|
5
6
|
className: '.app-webview',
|
|
6
7
|
rnStyleSelector: 'app-webview.root',
|
|
7
8
|
studioStyleSelector: '',
|
|
8
9
|
style: {}
|
|
9
|
-
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
className: '.app-webview-content',
|
|
13
|
+
rnStyleSelector: 'app-webview.webview',
|
|
14
|
+
studioStyleSelector: '',
|
|
15
|
+
style: {}
|
|
16
|
+
},
|
|
17
|
+
])
|
|
10
18
|
};
|
|
11
19
|
//# sourceMappingURL=webview.styledef.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webview.styledef.js","sourceRoot":"","sources":["../../../../../src/theme/components/advanced/webview.styledef.ts"],"names":[],"mappings":";;AAEA,kBAAe;IACX,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"webview.styledef.js","sourceRoot":"","sources":["../../../../../src/theme/components/advanced/webview.styledef.ts"],"names":[],"mappings":";;AAEA,kBAAe;IACX,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC;QACjB;YACI,SAAS,EAAE,cAAc;YACzB,eAAe,EAAE,kBAAkB;YACnC,mBAAmB,EAAE,EAAE;YACvB,KAAK,EAAE,EAAE;SACZ;QACD;YACI,SAAS,EAAE,sBAAsB;YACjC,eAAe,EAAE,qBAAqB;YACtC,mBAAmB,EAAE,EAAE;YACvB,KAAK,EAAE,EAAE;SACZ;KACJ,CAAC;CACa,CAAC"}
|
|
@@ -349,7 +349,7 @@ variables.set('datepickerBgColor', new ColorProp('@defaultColorF'));
|
|
|
349
349
|
variables.set('wizardBackgroundColor', new ColorProp('@widgetBgColor'));
|
|
350
350
|
variables.set('wizardStepActiveColor', new ColorProp('@primaryColor', '--md-ref-palette-secondary90'));
|
|
351
351
|
variables.set('wizardStepDoneColor', new ColorProp('@successColor', '--md-ref-palette-secondary90'));
|
|
352
|
-
variables.set('wizardStepIconColor', new ColorProp('@
|
|
352
|
+
variables.set('wizardStepIconColor', new ColorProp('@defaultColorF', '--md-ref-palette-neutral10'));
|
|
353
353
|
variables.set('wizardStepColor', new ColorProp('@defaultColor9', '--md-ref-palette-neutral-variant30'));
|
|
354
354
|
variables.set('wizardActiveStepColor', new ColorProp('@defaultColorF', '--md-ref-palette-neutral10'));
|
|
355
355
|
variables.set('wizardDoneStepColor', new ColorProp('@defaultColorF', '--md-ref-palette-neutral-variant30'));
|