@react-native-karte/in-app-messaging
Version:
KARTE SDK In-app messaging for React Native.
58 lines (48 loc) • 1.75 kB
JavaScript
//
// Copyright 2020 PLAID, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { NativeModules } from 'react-native';
const nativeModule = NativeModules.RNKRTInAppMessagingModule;
/** アプリ内メッセージの管理を行うクラスです。 */
export class InAppMessaging {
constructor() {}
/**
* アプリ内メッセージの表示有無を返します。
*
* @remarks
* アプリ内メッセージが表示中の場合は true を返し、表示されていない場合は false を返します。
*/
static get isPresenting() {
return nativeModule.isPresenting();
}
/** 現在表示中の全てのアプリ内メッセージを非表示にします。 */
static dismiss() {
nativeModule.dismiss();
}
/**
* アプリ内メッセージの表示を抑制します。
*
* @remarks
* なお既に表示されているアプリ内メッセージは、メソッドの呼び出しと同時に非表示となります。
*/
static suppress() {
nativeModule.suppress();
}
/** アプリ内メッセージの表示抑制状態を解除します。 */
static unsuppress() {
nativeModule.unsuppress();
}
}
//# sourceMappingURL=index.js.map