react-native-unit-components
Version:
Unit React Native components
105 lines (73 loc) • 2.65 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.HTML_PLACEHOLDER = void 0;
var _reactNative = require("react-native");
var _bodyScript = require("../scripts/html/bodyScript");
const HTML_PLACEHOLDER = exports.HTML_PLACEHOLDER = {
SCRIPT_UNIT: '<SCRIPT_UNIT>',
BODY: '<BODY_HTML_CODE>',
SCRIPT_FROM_NATIVE: '<SCRIPT_FROM_NATIVE>',
WINDOW_PARAMS: '<WINDOW_PARAMS>',
FONT_FACES: '<FONT_FACES>'
};
const htmlText = `
<!DOCTYPE html>
<html lang="en">
<head lang="en">
<title>Unit Web SDK Demo</title>
<script>
window.UnitMobileSDK = true
window.UnitStore = {}
window.UnitSessionStore = {}
window.UnitMobileSDKConfig = {
os: "${_reactNative.Platform.OS}",
walletName: "${_reactNative.Platform.OS === 'ios' ? 'Apple' : 'Google'}",
}
${HTML_PLACEHOLDER.WINDOW_PARAMS}
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<style type="text/css">
${HTML_PLACEHOLDER.FONT_FACES}
body {
margin: 0;
}
</style>
</head>
<body>
${HTML_PLACEHOLDER.BODY}
<script>
${_bodyScript.POST_MESSAGE_TO_SDK}
${_bodyScript.POST_PAGE_HEIGHT}
${_bodyScript.LISTENERS.isPageLoaded}
${_bodyScript.LISTENERS.onLoad}
${_bodyScript.LISTENERS.unitRequestDownload}
${_bodyScript.LISTENERS.requestRendering}
${_bodyScript.LISTENERS.requestOpenLink}
${_bodyScript.LISTENERS.requestCloseFlow}
${_bodyScript.LISTENERS.cardActivated}
${_bodyScript.LISTENERS.cardStatusChange}
${_bodyScript.LISTENERS.unitCounterpartyDeleted}
${_bodyScript.LISTENERS.unitRequestExternalSdk}
${_bodyScript.LISTENERS.unitOpenPlaid}
${_bodyScript.LISTENERS.unitAccountChanged}
${_bodyScript.LISTENERS.unitActivityFiltersChanged}
${_bodyScript.LISTENERS.unitMultiFactorAuthFinished}
${_bodyScript.LISTENERS.unitUnauthorizedToken}
${_bodyScript.DISPATCH_RENDERING_EVENT}
${_bodyScript.DISPATCH_EVENT_TO_CONTINUE}
${_bodyScript.DISPATCH_OPEN_ACTIONS_MENU}
${_bodyScript.DISPATCH_REQUEST_HIDE_SENSITIVE_DATA}
${_bodyScript.DISPATCH_REQUEST_SHOW_SENSITIVE_DATA}
${_bodyScript.DISPATCH_REQUEST_CARD_ACTION}
${_bodyScript.DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT}
${_bodyScript.DISPATCH_REQUEST_ACCOUNT_ACTION}
${_bodyScript.SET_ITEM_IN_WINDOW_UNIT_STORE}
${HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE}
</script>
</body>
</html>
`;
var _default = exports.default = htmlText;
//# sourceMappingURL=html.js.map
;