react-klasha
Version:
This is an reactJS library for implementing klasha payment gateway
64 lines (59 loc) • 2.35 kB
JavaScript
import { Build, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
import { b as getIonMode, c as config, a as isPlatform } from './ionic-global.js';
const appCss = "html.plt-mobile ion-app{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}html.plt-mobile ion-app [contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}";
const App = class extends HTMLElement {
constructor() {
super();
this.__registerHost();
}
componentDidLoad() {
if (Build.isBrowser) {
rIC(async () => {
const isHybrid = isPlatform(window, 'hybrid');
if (!config.getBoolean('_testing')) {
import('./tap-click.js').then(module => module.startTapClick(config));
}
if (config.getBoolean('statusTap', isHybrid)) {
import('./status-tap.js').then(module => module.startStatusTap());
}
if (config.getBoolean('inputShims', needInputShims())) {
import('./input-shims.js').then(module => module.startInputShims(config));
}
const hardwareBackButtonModule = await import('./hardware-back-button.js');
if (config.getBoolean('hardwareBackButton', isHybrid)) {
hardwareBackButtonModule.startHardwareBackButton();
}
else {
hardwareBackButtonModule.blockHardwareBackButton();
}
if (typeof window !== 'undefined') {
import('./keyboard.js').then(module => module.startKeyboardAssist(window));
}
import('./focus-visible.js').then(module => module.startFocusVisible());
});
}
}
render() {
const mode = getIonMode(this);
return (h(Host, { class: {
[mode]: true,
'ion-page': true,
'force-statusbar-padding': config.getBoolean('_forceStatusbarPadding'),
} }));
}
get el() { return this; }
static get style() { return appCss; }
};
const needInputShims = () => {
return isPlatform(window, 'ios') && isPlatform(window, 'mobile');
};
const rIC = (callback) => {
if ('requestIdleCallback' in window) {
window.requestIdleCallback(callback);
}
else {
setTimeout(callback, 32);
}
};
const IonApp = /*@__PURE__*/proxyCustomElement(App, [0,"ion-app"]);
export { IonApp };