From 022436a29f1fce6f694beedfbd6a17e496e205a3 Mon Sep 17 00:00:00 2001
From: OneSignal
Date: Tue, 16 May 2023 19:11:54 +0000
Subject: [PATCH] Update onesignal-ngx
---
.../{ => ISSUE_TEMPLATE}/workflows/Zapier.yml | 0
.../workflows/release-drafter.yml | 0
MigrationGuide.md | 260 +++
README.md | 210 ++-
bundles/onesignal-ngx.umd.js | 1395 +++++------------
bundles/onesignal-ngx.umd.js.map | 2 +-
bundles/onesignal-ngx.umd.min.js | 16 +-
bundles/onesignal-ngx.umd.min.js.map | 2 +-
esm2015/lib/onesignal-ngx.service.js | 1085 ++++++-------
fesm2015/onesignal-ngx.js | 1079 ++++++-------
fesm2015/onesignal-ngx.js.map | 2 +-
lib/onesignal-ngx.service.d.ts | 215 ++-
onesignal-ngx.metadata.json | 2 +-
package.json | 2 +-
14 files changed, 1881 insertions(+), 2389 deletions(-)
rename .github/{ => ISSUE_TEMPLATE}/workflows/Zapier.yml (100%)
rename .github/{ => ISSUE_TEMPLATE}/workflows/release-drafter.yml (100%)
create mode 100644 MigrationGuide.md
diff --git a/.github/workflows/Zapier.yml b/.github/ISSUE_TEMPLATE/workflows/Zapier.yml
similarity index 100%
rename from .github/workflows/Zapier.yml
rename to .github/ISSUE_TEMPLATE/workflows/Zapier.yml
diff --git a/.github/workflows/release-drafter.yml b/.github/ISSUE_TEMPLATE/workflows/release-drafter.yml
similarity index 100%
rename from .github/workflows/release-drafter.yml
rename to .github/ISSUE_TEMPLATE/workflows/release-drafter.yml
diff --git a/MigrationGuide.md b/MigrationGuide.md
new file mode 100644
index 0000000..c2af148
--- /dev/null
+++ b/MigrationGuide.md
@@ -0,0 +1,260 @@
+
+# Migration Guide
+
+## Version 2
+### Intro
+In this release, we are making a significant shift from a device-centered model to a user-centered model. This means that instead of identifying devices, we now focus on identifying individual users. This update is part of a larger effort to shift towards a user-oriented omni-channel messaging system.
+
+To facilitate this change, the externalId approach for identifying users is being replaced by the login and logout methods. In addition, the SDK now makes use of namespaces such as User, Notifications, and Slidedown to better separate code.
+
+This guide will walk you through these and other important changes in the version 16 update.
+
+### Overview
+Under the new model, the concept of a "player" is being updated to include three new concepts: users, subscriptions, and aliases.
+
+### Users
+Users own subscriptions and are identified by aliases which are used to point to users using different alias schemes.
+
+### Subscriptions
+
+Subscriptions refer to the way in which a user can receive various communication methods offered by OneSignal, including push notifications, SMS, and email.
+
+### Aliases
+Aliases are identifiers that point to users and are made up of an alias label and id. Users can have multiple aliases. Consider the need to identify a user with your own application's unique identifier as well as identifiers from other integrated applications.
+
+The SDK will use `external_id` as the default alias label for the public `OneSignal.login("1234")` method.
+
+**Alias Example:**
+```
+"aliases": [
+ {
+ "label": "external_id",
+ "id": "1234"
+ },
+ {
+ "label": "my_alias",
+ "id": "5678"
+ }
+]
+```
+
+```js
+// WebSDK-specific example
+{
+ external_id: "1234",
+ my_alias: "5678"
+}
+```
+
+# Guide
+## 1. Setup Changes
+### Service Worker File
+
+From:
+```js
+importScripts("https://onesignal.com/sdks/OneSignalSDKWorker.js");
+```
+
+To:
+```js
+importScripts("https://onesignal.com/sdks/web/v16/OneSignalSDK.sw.js");
+```
+
+## 2. External User ID
+Update any usages of `OneSignal.setExternalId` to `OneSignal.login` or `OneSignal.logout`
+From:
+```js
+OneSignal.setExternalId("myId");
+```
+
+To:
+```js
+OneSignal.login("myId");
+```
+
+Use `OneSignal.logout();` instead anywhere you have `OneSignal.setExternalId("");` or are setting it to `null`.
+
+## 3. API Changes
+Update your code to use the new API. The following namespaces are on the `OneSignal` object.
+
+### User Namespace
+
+Example:
+```js
+OneSignal.User.addAlias("my_alias", "1234");
+```
+
+All user functions are synchronous.
+
+| Function Name | Description | Argument List |
+| --------------- | ---------------------------------------------- | ------------------------------------ |
+| `addAlias` | Adds a new alias for the current user. | `label: string, id: string` |
+| `addAliases` | Adds multiple aliases for the current user. | `aliases: { [key: string]: string }` |
+| `removeAlias` | Removes an alias for the current user. | `label: string` |
+| `removeAliases` | Removes multiple aliases for the current user. | `labels: string[]` |
+| `addEmail` | Adds an email address for the current user. | `email: string` |
+| `removeEmail` | Removes an email address for the current user. | `email: string` |
+| `addSms` | Adds an SMS number for the current user. | `smsNumber: string` |
+| `removeSms` | Removes an SMS number for the current user. | `smsNumber: string` |
+| `addTag` | Adds a tag for the current user. | `key: string, value: string` |
+| `addTags` | Adds multiple tags for the current user. | `tags: { [key: string]: string }` |
+| `removeTag` | Removes a tag for the current user. | `key: string` |
+| `removeTags` | Removes multiple tags for the current user. | `keys: string[]` |
+
+### Notifications Namespace
+
+Example:
+```js
+await OneSignal.Notifications.requestPermission();
+```
+
+
+| Sync/Async | Function / Property | Description | Argument List |
+| ---------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `async` | `setDefaultUrl()` | Sets the default URL for notifications. | `url` (string) |
+| `async` | `setDefaultTitle()` | Sets the default title for notifications. | `title` (string) |
+| `sync` | `isPushSupported()` | Returns true if the current browser supports web push. | |
+| `async` | `requestPermission()` | Requests push notifications permission via the native browser prompt. | |
+| `sync` | `addEventListener()` | Adds an event listener for the following events: - `click` - `willDisplay` - `dismiss` - `permissionPromptDisplay` - `permissionChange`* * argument type: bool | - `` (string) - `(arg: ) => {}` (callback) |
+| `sync` | `removeEventListener()` | Removes the event listener. | `() => {}` (the event listener you want to remove) |
+| | `permission` | A boolean representing whether or not the user has granted permission for push notifications. | |
+| | `permissionNative` | A string representing the native push permission status: 'default', 'granted', or 'denied'. | |
+
+
+### Slidedown Namespace
+
+Example:
+```js
+await OneSignal.Slidedown.promptPush();
+```
+
+| Sync/Async | Function Name | Description | Argument List |
+| ---------- | ---------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------- |
+| `async` | `promptPush` | Displays the notification permission prompt. | `options` (AutoPromptOptions) |
+| `async` | `promptPushCategories` | Displays the notification permission prompt for notification categories. | `options` (AutoPromptOptions) |
+| `async` | `promptSms` | Displays the SMS subscription prompt. | `options` (AutoPromptOptions) |
+| `async` | `promptEmail` | Displays the email subscription prompt. | `options` (AutoPromptOptions) |
+| `async` | `promptSmsAndEmail` | Displays the SMS and email subscription prompts. | `options` (AutoPromptOptions) |
+| `sync` | `addEventListener` | Adds an event listener for the `slidedownShown` event. | - `event` ("slidedownShown"), - `listener` ((wasShown: boolean) => void) |
+| `sync` | `removeEventListener` | Removes an event listener for the `slidedownShown` event. | - `event` ("slidedownShown") - `listener` ((wasShown: boolean) => void) |
+
+
+
+### Push Subscription Namespace
+
+Example:
+```js
+OneSignal.User.PushSubscription.optIn();
+```
+
+| Sync/Async | Property/Function | Description | Argument List |
+| ---------- | ----------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
+| | `id` | Gets the current user's ID. | |
+| | `token` | Gets the current user's push notification token. | |
+| | `optedIn` | Gets a boolean value indicating whether the current user is subscribed to push notifications. | |
+| `async` | `optIn()` | Subscribes the current user to push notifications. | |
+| `async` | `optOut()` | Unsubscribes the current user from push notifications. | |
+| `sync` | `addEventListener()` | Adds an event listener for the `subscriptionChange` event. | - `event` ("subscriptionChange") - `listener` ((change: SubscriptionChangeEvent) => void) |
+| `sync` | `removeEventListener()` | Removes an event listener for the `subscriptionChange` event. | - `event` ("subscriptionChange") - `listener` ((change: SubscriptionChangeEvent) => void) |
+
+### Debug Namespace
+
+Example:
+```js
+OneSignal.Debug.setLogLevel(“trace”);
+```
+
+| Function Name | Description | Argument List |
+| --------------- | ---------------------------------------------- | ------------------------------------ |
+| `setLogLevel` | Turns on logging with the given log level. | `setLogLevel: string` - `"trace"` - `"debug"` - `"info"` - `"warn"` - `"error"` |
+
+# Limitations
+
+## May 2023
+## Version 16 (beta)
+Please test thoroughly prior to production use.
+* Any User namespace calls must be invoked **after** initialization (async). Example: `OneSignal.User.addTag("tag", "2");`
+* HTTP environments are not supported.
+* AMP environments are not supported.
+* Identity verification is not functional.
+
+## January 2023
+### Version 16 (alpha)
+It is recommended this version is used **only** in development and staging envrionments.
+* Switching between users via `login()` and `logout()` is unsafe. **Please stick to single user testing.**
+* Any User namespace calls must be invoked **after** initialization (async). Example: `OneSignal.User.addTag("tag", "2");`
+* Aliases will be available in a future release,
+* HTTP environments are not supported.
+* AMP environments are not supported.
+* Identity verification is not functional.
+* Outcomes are not functional.
+
+
+# Glossary
+
+**OneSignal user**
+
+ *(noun) lowercase*
+
+ A user of the OneSignal service.
+
+**user**
+
+ *(noun) lowercase*
+
+ An end-user of an application using the OneSignal service. They may or may not have a subscription.
+
+**user ID**
+
+ *(noun) lowercase*
+
+ A OneSignal-provisioned unique identifier for Users (User.onesignal_id).
+
+
+**user external ID**
+
+ *(noun) lowercase*
+
+ A customer-provisioned unique identifier for Users (User.external_id).
+
+
+**user alias**
+
+ *(noun) lowercase*
+
+ A customer provisioned key-value pair used to uniquely identify a User.
+
+
+**subscription**
+
+ *(noun) lowercase*
+
+ An established communication channel between an App and its User, such as a push-subscribed device, email address, or SMS-subscribed phone number.
+
+
+**subscription ID**
+
+ *(noun) lowercase*
+
+ A OneSignal-provisioned unique identifier for a single subscription.
+
+
+**notification**
+
+ *(noun) lowercase*
+
+ A unidirectional outbound communication message from an App to one or more Users via their Subscriptions.
+
+
+**notification ID**
+
+ *(noun) lowercase*
+
+ A OneSignal-provisioned unique identifier for Notifications (Notification.id).
+
+
+**notification external ID**
+
+ *(noun) lowercase*
+
+ A customer-provisioned unique identifier for Notifications (Notification.external_id).
diff --git a/README.md b/README.md
index 9155ce9..d16e5a3 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,31 @@
welcome to onesignal-ngx 👋
-[![npm version](https://img.shields.io/npm/v/onesignal-ngx.svg)](https://www.npmjs.com/package/onesignal-ngx) [![npm downloads](https://img.shields.io/npm/dm/onesignal-ngx.svg)](https://www.npmjs.com/package/onesignal-ngx)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+> This is a JavaScript module that can be used to easily include [OneSignal](https://onesignal.com/) code in a website that uses Angular for its front-end codebase.
-Angular OneSignal Plugin: Make it easy to integrate OneSignal with your Angular website!
-
-This is a JavaScript module that can be used to easily include [OneSignal](https://onesignal.com/) code in a website that uses Angular for its front-end codebase.
+* 🏠 [Homepage](https://onesignal.com)
+* 🖤 [npm](https://www.npmjs.com/package/onesignal-ngx)
-OneSignal is the world's leader for Mobile Push Notifications, Web Push, and In-App Messaging. It is trusted by 1,300,000+ businesses to send 5 billion Push Notifications per day.
+OneSignal is the world's leader for Mobile Push Notifications, Web Push, and In-App Messaging. It is trusted by 2 million+ businesses to send 9 billion Push Notifications per day.
You can find more information on OneSignal [here](https://onesignal.com/).
-* 🏠 [Homepage](https://onesignal.com)
-* 🖤 [npm](https://www.npmjs.com/package/onesignal-ngx)
+> 🚧 Version 2 now in Beta!
+See our [migration guide](./MigrationGuide.md) to get started.
## Contents
- [Install](#install)
@@ -74,9 +88,32 @@ this.oneSignal.init({ appId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' }).then(() =
```
### Init Options
-You can pass other options to the `init` function. Use these options to configure personalized prompt options, auto-resubscribe, and more ([full list of initialization options](https://documentation.onesignal.com/docs/web-push-sdk#init)).
-
-#### Service Worker Params
+You can pass other options to the `init` function. Use these options to configure personalized prompt options, auto-resubscribe, and more ([full list of initialization options](https://documentation.onesignal.com/v11.0/docs/web-sdk#init)).
+
+
+ Expand to see more options
+
+ | Property Name | Type | Description |
+| ---------------------------| --------------------- | -------------------------------------------------- |
+| `appId` | `string` | The ID of your OneSignal app. |
+| `autoRegister` | `boolean` (optional) | Whether or not to automatically register the user. |
+| `autoResubscribe` | `boolean` (optional) | Whether or not to automatically resubscribe the user. |
+| `path` | `string` (optional) | The path to the OneSignal service worker file. |
+| `serviceWorkerPath` | `string` (optional) | The path to the OneSignal service worker script. |
+| `serviceWorkerUpdaterPath` | `string` (optional) | The path to the OneSignal service worker updater script. |
+| `subdomainName` | `string` (optional) | The subdomain of your OneSignal app. |
+| `allowLocalhostAsSecureOrigin` | `boolean` (optional) | Whether or not to allow localhost as a secure origin. |
+| `requiresUserPrivacyConsent`| `boolean` (optional) | Whether or not the user's consent is required. |
+| `persistNotification` | `boolean` (optional) | Whether or not notifications should persist. |
+| `notificationClickHandlerMatch`| `string` (optional) | The URL match pattern for notification clicks. |
+| `notificationClickHandlerAction`| `string` (optional)| The action to perform when a notification is clicked. |
+| `welcomeNotification` | `object` (optional) | The welcome notification configuration. |
+| `notifyButton` | `object` (optional) | The notify button configuration. |
+| `promptOptions` | `object` (optional) | Additional options for the subscription prompt. |
+| `webhooks` | `object` (optional) | The webhook configuration. |
+| `[key: string]` | `any` | Additional properties can be added as needed. |
+
+**Service Worker Params**
You can customize the location and filenames of service worker assets. You are also able to specify the specific scope that your service worker should control. You can read more [here](https://documentation.onesignal.com/docs/onesignal-service-worker-faq#sdk-parameter-reference-for-service-workers).
In this distribution, you can specify the parameters via the following:
@@ -86,6 +123,10 @@ In this distribution, you can specify the parameters via the following:
| `serviceWorkerParam` | Use to specify the scope, or the path the service worker has control of. Example: `{ scope: "/js/push/onesignal/" }` |
| `serviceWorkerPath` | The path to the service worker file. |
+
+
+---
+
**Example**:
```js
this.oneSignal.init({
@@ -109,76 +150,123 @@ Visit `https://yoursite.com/OneSignalSDKWorker.js` in the address bar to make su
If you uploaded the file but you cannot access it via your browser search bar, make sure you have told Angular about it via the `assets` param in your `angular.json` file.
---
-## OneSignal API
### Typescript
This package includes Typescript support.
```ts
class OneSignal {
- init(options: IInitObject): Promise;
- on(event: string, listener: () => void): void;
- off(event: string, listener: () => void): void;
- once(event: string, listener: () => void): void;
- isPushNotificationsEnabled(callback?: Action): Promise;
- showHttpPrompt(options?: AutoPromptOptions): Promise;
- registerForPushNotifications(options?: RegisterOptions): Promise;
- setDefaultNotificationUrl(url: string): Promise;
- setDefaultTitle(title: string): Promise;
- getTags(callback?: Action): Promise;
- sendTag(key: string, value: any, callback?: Action): Promise;
- sendTags(tags: TagsObject, callback?: Action): Promise;
- deleteTag(tag: string): Promise>;
- deleteTags(tags: Array, callback?: Action>): Promise>;
- addListenerForNotificationOpened(callback?: Action): Promise;
- setSubscription(newSubscription: boolean): Promise;
- showHttpPermissionRequest(options?: AutoPromptOptions): Promise;
- showNativePrompt(): Promise;
- showSlidedownPrompt(options?: AutoPromptOptions): Promise;
- showCategorySlidedown(options?: AutoPromptOptions): Promise;
- showSmsSlidedown(options?: AutoPromptOptions): Promise;
- showEmailSlidedown(options?: AutoPromptOptions): Promise;
- showSmsAndEmailSlidedown(options?: AutoPromptOptions): Promise;
- getNotificationPermission(onComplete?: Function): Promise;
- getUserId(callback?: Action): Promise;
- getSubscription(callback?: Action): Promise;
- setEmail(email: string, options?: SetEmailOptions): Promise;
- setSMSNumber(smsNumber: string, options?: SetSMSOptions): Promise;
- logoutEmail(): Promise;
- logoutSMS(): Promise;
- setExternalUserId(externalUserId: string | undefined | null, authHash?: string): Promise;
- removeExternalUserId(): Promise;
- getExternalUserId(): Promise;
- provideUserConsent(consent: boolean): Promise;
- getEmailId(callback?: Action): Promise;
- getSMSId(callback?: Action): Promise;
- sendOutcome(outcomeName: string, outcomeWeight?: number | undefined): Promise;
+ Slidedown: IOneSignalSlidedown;
+ Notifications: IOneSignalNotifications;
+ Session: IOneSignalSession;
+ User: IOneSignalUser;
+ Debug: IOneSignalDebug;
+ login(externalId: string, jwtToken?: string): Promise;
+ logout(): Promise;
+ init(options: IInitObject): Promise;
+ setConsentGiven(consent: boolean): Promise;
+ setConsentRequired(requiresConsent: boolean): Promise;
}
```
### OneSignal API
-See the official [OneSignal WebSDK reference](https://documentation.onesignal.com/docs/web-push-sdk) for information on all available SDK functions.
+See the official [OneSignal WebSDK reference](https://documentation.onesignal.com/v11.0/docs/web-sdk) for information on all available SDK functions.
---
## Advanced Usage
### Events and Event Listeners
Use listeners to react to OneSignal-related events:
-* `subscriptionChange`
-* `permissionPromptDisplay`
-* `notificationPermissionChange`
-* `popoverShown`
-* `customPromptClick`
-* `notificationDisplay`
-* `notificationDismiss`
+### Notifications Namespace
+| Event Name | Callback Argument Type |
+|-|-|
+|'click' | NotificationClickResult|
+|'foregroundWillDisplay'| NotificationForegroundWillDisplayEvent
+| 'dismiss'| OSNotificationDataPayload|
+|'permissionChange'| boolean|
+|'permissionPromptDisplay'| void|
+
+
+ Expand to see associated types
+
+#### `NotificationClickResult`
+| Property | Description |
+|-------------------------|---------------------------------------------|
+| `actionId` | A string representing the action ID associated with the click event |
+| `url` | A string representing the URL associated with the click event |
+
+#### `NotificationForegroundWillDisplayEvent`
+| Property | Description |
+|-------------------------|---------------------------------------------|
+| `notification` | An `OSNotification` type object |
+
+#### `OSNotification`
+| Property | Description |
+|-----------------------|----------------------------------------------------------------------------------------------------------------------|
+| `id` | Optional string representing the unique identifier of the notification. |
+| `title` | Optional string representing the title of the notification. |
+| `body` | Optional string representing the body of the notification. |
+| `data` | Optional data object associated with the notification. |
+| `url` | Optional string representing the URL to be opened when the notification is clicked. |
+| `icon` | Optional string representing the URL of the icon to be displayed with the notification. |
+| `image` | Optional string representing the URL of the image to be displayed with the notification. |
+| `tag` | Optional string representing a unique identifier for a group of notifications. |
+| `requireInteraction` | Optional boolean indicating whether the notification requires user interaction or not. |
+| `renotify` | Optional boolean indicating whether the notification should be replaced or not, if a notification with the same tag is already displayed. |
+| `actions` | Optional array of `NotificationActionButton` objects representing the action buttons associated with the notification. |
+
+#### `NotificationActionButton`
+| Property | Description |
+|-------------|-----------------------------------------------------------------------------------------------|
+| `action` | A string representing the action associated with the button. |
+| `title` | A string representing the title of the button. |
+| `icon` | Optional string representing the URL of the icon to be displayed with the button. |
+| `url` | Optional string representing the URL to be opened when the button is clicked. |
+
+#### `OSNotificationDataPayload`
+| Property | Description |
+|-------------|-----------------------------------------------------------------------------------------------|
+| `id` | A string representing the unique identifier of the notification data payload. |
+| `content` | A string representing the content of the notification data payload. |
+| `heading` | Optional string representing the heading of the notification data payload. |
+| `url` | Optional string representing the URL to be opened when the notification data payload is clicked. |
+| `data` | Optional object containing additional data associated with the notification data payload. |
+| `rr` | Optional string with value 'y' or 'n' representing whether or not the notification has [Confirmed Delivery](https://documentation.onesignal.com/docs/confirmed-deliveries). |
+| `icon` | Optional string representing the URL of the icon to be displayed with the notification data payload. |
+| `image` | Optional string representing the URL of the image to be displayed with the notification data payload. |
+| `tag` | Optional string representing a unique identifier for a group of notification data payloads. |
+| `badge` | Optional string representing the URL of the badge to be displayed with the notification data payload. |
+| `vibrate` | Optional array of numbers representing the vibration pattern of the notification data payload. |
+| `buttons` | Optional array of `NotificationButtonData` objects representing the button data associated with the notification data payload. |
+
+#### `NotificationButtonData`
+| Property | Description |
+|----------|------------------------------------------------------------------------------------------------------|
+| `url` | A string representing the URL to be opened when the button is clicked. |
+| `id` | A string representing the ID of the action. |
+| `action` | A string representing the type of the action (inherited from `NotificationAction`). |
+| `title` | A string representing the title of the action button (inherited from `NotificationAction`). |
+| `icon` | Optional string representing the URL of the icon to be displayed with the action button. |
+
+
+
+### Slidedown Namespace
+| Event Name | Callback Argument Type |
+|-|-|
+|'slidedownShown' | boolean |
+
+### Push Subscription Namespace
+| Event Name | Callback Argument Type |
+|-|-|
+|'change' | boolean |
**Example**
```js
-this.oneSignal.on('subscriptionChange', function(isSubscribed) {
- console.log("The user's subscription state is now:", isSubscribed);
+this.oneSignal.Notifications.addEventListener('click', (result) => {
+ console.log("The notification was clicked!", result);
});
```
-See the [OneSignal WebSDK Reference](https://documentation.onesignal.com/docs/web-push-sdk) for more info on the available event listeners.
+See the [OneSignal WebSDK Reference](https://documentation.onesignal.com/v11.0/docs/web-sdk) for more info on the available event listeners.
## Troubleshooting
@@ -190,7 +278,7 @@ In your `angular.json`, see if the `serviceWorker` flag is set to `true`. The fl
## 🤝 Contributing
-Contributions, issues and feature requests are welcome! Feel free to check [issues page](https://github.com/OneSignal/onesignal-ngx/issues).
+Contributions, issues and feature requests are welcome! Feel free to check [issues page](https://github.com/OneSignal/onesignal-ngx/issues).
## Show your support
@@ -208,7 +296,7 @@ Reach out to us via our [Discord server](https://discord.com/invite/EP7gf6Uz7G)!
## 📝 License
-Copyright © 2021 [OneSignal](https://github.com/OneSignal).
+Copyright © 2023 [OneSignal](https://github.com/OneSignal).
This project is [MIT](https://github.com/OneSignal/onesignal-ngx/blob/main/LICENSE) licensed.
diff --git a/bundles/onesignal-ngx.umd.js b/bundles/onesignal-ngx.umd.js
index 711e8bf..85c22f9 100644
--- a/bundles/onesignal-ngx.umd.js
+++ b/bundles/onesignal-ngx.umd.js
@@ -24,1017 +24,470 @@
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
- /*! *****************************************************************************
- Copyright (c) Microsoft Corporation.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
- ***************************************************************************** */
- /* global Reflect, Promise */
- var extendStatics = function (d, b) {
- extendStatics = Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b)
- if (Object.prototype.hasOwnProperty.call(b, p))
- d[p] = b[p]; };
- return extendStatics(d, b);
- };
- function __extends(d, b) {
- if (typeof b !== "function" && b !== null)
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ ;
+ function oneSignalLogin(externalId, jwtToken) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.login(externalId, jwtToken)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
}
- var __assign = function () {
- __assign = Object.assign || function __assign(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s)
- if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
+ function oneSignalLogout() {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- return t;
- };
- return __assign.apply(this, arguments);
- };
- function __rest(s, e) {
- var t = {};
- for (var p in s)
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
- t[p[i]] = s[p[i]];
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.logout()
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
+ }
+ function oneSignalSetConsentGiven(consent) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- return t;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.setConsentGiven(consent)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
}
- function __decorate(decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
- r = Reflect.decorate(decorators, target, key, desc);
- else
- for (var i = decorators.length - 1; i >= 0; i--)
- if (d = decorators[i])
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
+ function oneSignalSetConsentRequired(requiresConsent) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.setConsentRequired(requiresConsent)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
}
- function __param(paramIndex, decorator) {
- return function (target, key) { decorator(target, key, paramIndex); };
+ function slidedownPromptPush(options) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Slidedown.promptPush(options)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
}
- function __metadata(metadataKey, metadataValue) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
- return Reflect.metadata(metadataKey, metadataValue);
+ function slidedownPromptPushCategories(options) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Slidedown.promptPushCategories(options)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
}
- function __awaiter(thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try {
- step(generator.next(value));
+ function slidedownPromptSms(options) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- catch (e) {
- reject(e);
- } }
- function rejected(value) { try {
- step(generator["throw"](value));
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Slidedown.promptSms(options)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
+ }
+ function slidedownPromptEmail(options) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- catch (e) {
- reject(e);
- } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Slidedown.promptEmail(options)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
});
}
- function __generator(thisArg, body) {
- var _ = { label: 0, sent: function () { if (t[0] & 1)
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f)
- throw new TypeError("Generator is already executing.");
- while (_)
- try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
- return t;
- if (y = 0, t)
- op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0:
- case 1:
- t = op;
- break;
- case 4:
- _.label++;
- return { value: op[1], done: false };
- case 5:
- _.label++;
- y = op[1];
- op = [0];
- continue;
- case 7:
- op = _.ops.pop();
- _.trys.pop();
- continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
- _ = 0;
- continue;
- }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
- _.label = op[1];
- break;
- }
- if (op[0] === 6 && _.label < t[1]) {
- _.label = t[1];
- t = op;
- break;
- }
- if (t && _.label < t[2]) {
- _.label = t[2];
- _.ops.push(op);
- break;
- }
- if (t[2])
- _.ops.pop();
- _.trys.pop();
- continue;
- }
- op = body.call(thisArg, _);
- }
- catch (e) {
- op = [6, e];
- y = 0;
- }
- finally {
- f = t = 0;
- }
- if (op[0] & 5)
- throw op[1];
- return { value: op[0] ? op[1] : void 0, done: true };
- }
+ function slidedownPromptSmsAndEmail(options) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Slidedown.promptSmsAndEmail(options)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
}
- var __createBinding = Object.create ? (function (o, m, k, k2) {
- if (k2 === undefined)
- k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
- }) : (function (o, m, k, k2) {
- if (k2 === undefined)
- k2 = k;
- o[k2] = m[k];
- });
- function __exportStar(m, o) {
- for (var p in m)
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
- __createBinding(o, m, p);
+ function slidedownAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Slidedown.addEventListener(event, listener);
+ });
}
- function __values(o) {
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
- if (m)
- return m.call(o);
- if (o && typeof o.length === "number")
- return {
- next: function () {
- if (o && i >= o.length)
- o = void 0;
- return { value: o && o[i++], done: !o };
- }
- };
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+ function slidedownRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Slidedown.removeEventListener(event, listener);
+ });
}
- function __read(o, n) {
- var m = typeof Symbol === "function" && o[Symbol.iterator];
- if (!m)
- return o;
- var i = m.call(o), r, ar = [], e;
- try {
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
- ar.push(r.value);
- }
- catch (error) {
- e = { error: error };
- }
- finally {
- try {
- if (r && !r.done && (m = i["return"]))
- m.call(i);
+ function notificationsSetDefaultUrl(url) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- finally {
- if (e)
- throw e.error;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Notifications.setDefaultUrl(url)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
+ }
+ function notificationsSetDefaultTitle(title) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- }
- return ar;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Notifications.setDefaultTitle(title)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
+ }
+ function notificationsRequestPermission() {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Notifications.requestPermission()
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
}
- /** @deprecated */
- function __spread() {
- for (var ar = [], i = 0; i < arguments.length; i++)
- ar = ar.concat(__read(arguments[i]));
- return ar;
+ function notificationsAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Notifications.addEventListener(event, listener);
+ });
}
- /** @deprecated */
- function __spreadArrays() {
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
- s += arguments[i].length;
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
- r[k] = a[j];
- return r;
+ function notificationsRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Notifications.removeEventListener(event, listener);
+ });
}
- function __spreadArray(to, from, pack) {
- if (pack || arguments.length === 2)
- for (var i = 0, l = from.length, ar; i < l; i++) {
- if (ar || !(i in from)) {
- if (!ar)
- ar = Array.prototype.slice.call(from, 0, i);
- ar[i] = from[i];
- }
+ function sessionSendOutcome(outcomeName, outcomeWeight) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
+ }
+ function sessionSendUniqueOutcome(outcomeName) {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- return to.concat(ar || Array.prototype.slice.call(from));
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Session.sendUniqueOutcome(outcomeName)
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
}
- function __await(v) {
- return this instanceof __await ? (this.v = v, this) : new __await(v);
+ function userAddAlias(label, id) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.addAlias(label, id);
+ });
}
- function __asyncGenerator(thisArg, _arguments, generator) {
- if (!Symbol.asyncIterator)
- throw new TypeError("Symbol.asyncIterator is not defined.");
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
- function verb(n) { if (g[n])
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
- function resume(n, v) { try {
- step(g[n](v));
- }
- catch (e) {
- settle(q[0][3], e);
- } }
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
- function fulfill(value) { resume("next", value); }
- function reject(value) { resume("throw", value); }
- function settle(f, v) { if (f(v), q.shift(), q.length)
- resume(q[0][0], q[0][1]); }
+ function userAddAliases(aliases) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.addAliases(aliases);
+ });
}
- function __asyncDelegator(o) {
- var i, p;
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
+ function userRemoveAlias(label) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.removeAlias(label);
+ });
}
- function __asyncValues(o) {
- if (!Symbol.asyncIterator)
- throw new TypeError("Symbol.asyncIterator is not defined.");
- var m = o[Symbol.asyncIterator], i;
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
+ function userRemoveAliases(labels) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.removeAliases(labels);
+ });
}
- function __makeTemplateObject(cooked, raw) {
- if (Object.defineProperty) {
- Object.defineProperty(cooked, "raw", { value: raw });
- }
- else {
- cooked.raw = raw;
- }
- return cooked;
+ function userAddEmail(email) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.addEmail(email);
+ });
}
- ;
- var __setModuleDefault = Object.create ? (function (o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
- }) : function (o, v) {
- o["default"] = v;
- };
- function __importStar(mod) {
- if (mod && mod.__esModule)
- return mod;
- var result = {};
- if (mod != null)
- for (var k in mod)
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
- __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
+ function userRemoveEmail(email) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.removeEmail(email);
+ });
}
- function __importDefault(mod) {
- return (mod && mod.__esModule) ? mod : { default: mod };
+ function userAddSms(smsNumber) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.addSms(smsNumber);
+ });
}
- function __classPrivateFieldGet(receiver, state, kind, f) {
- if (kind === "a" && !f)
- throw new TypeError("Private accessor was defined without a getter");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+ function userRemoveSms(smsNumber) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.removeSms(smsNumber);
+ });
}
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
- if (kind === "m")
- throw new TypeError("Private method is not writable");
- if (kind === "a" && !f)
- throw new TypeError("Private accessor was defined without a setter");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
+ function userAddTag(key, value) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.addTag(key, value);
+ });
+ }
+ function userAddTags(tags) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.addTags(tags);
+ });
+ }
+ function userRemoveTag(key) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.removeTag(key);
+ });
+ }
+ function userRemoveTags(keys) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.removeTags(keys);
+ });
+ }
+ function pushSubscriptionOptIn() {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.PushSubscription.optIn()
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
+ }
+ function pushSubscriptionOptOut() {
+ return new Promise(function (resolve, reject) {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.PushSubscription.optOut()
+ .then(function (value) { return resolve(value); })
+ .catch(function (error) { return reject(error); });
+ });
+ });
+ }
+ function pushSubscriptionAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.PushSubscription.addEventListener(event, listener);
+ });
+ }
+ function pushSubscriptionRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.User.PushSubscription.removeEventListener(event, listener);
+ });
+ }
+ function debugSetLogLevel(logLevel) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.Debug.setLogLevel(logLevel);
+ });
+ }
+ var PushSubscriptionNamespace = {
+ get id() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.id; },
+ get token() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.token; },
+ get optedIn() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.optedIn; },
+ optIn: pushSubscriptionOptIn,
+ optOut: pushSubscriptionOptOut,
+ addEventListener: pushSubscriptionAddEventListener,
+ removeEventListener: pushSubscriptionRemoveEventListener,
+ };
+ var UserNamespace = {
+ addAlias: userAddAlias,
+ addAliases: userAddAliases,
+ removeAlias: userRemoveAlias,
+ removeAliases: userRemoveAliases,
+ addEmail: userAddEmail,
+ removeEmail: userRemoveEmail,
+ addSms: userAddSms,
+ removeSms: userRemoveSms,
+ addTag: userAddTag,
+ addTags: userAddTags,
+ removeTag: userRemoveTag,
+ removeTags: userRemoveTags,
+ PushSubscription: PushSubscriptionNamespace,
+ };
+ var SessionNamespace = {
+ sendOutcome: sessionSendOutcome,
+ sendUniqueOutcome: sessionSendUniqueOutcome,
+ };
+ var DebugNamespace = {
+ setLogLevel: debugSetLogLevel,
+ };
+ var SlidedownNamespace = {
+ promptPush: slidedownPromptPush,
+ promptPushCategories: slidedownPromptPushCategories,
+ promptSms: slidedownPromptSms,
+ promptEmail: slidedownPromptEmail,
+ promptSmsAndEmail: slidedownPromptSmsAndEmail,
+ addEventListener: slidedownAddEventListener,
+ removeEventListener: slidedownRemoveEventListener,
+ };
+ var NotificationsNamespace = {
+ get permissionNative() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.Notifications) === null || _b === void 0 ? void 0 : _b.permissionNative) !== null && _c !== void 0 ? _c : 'default'; },
+ get permission() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.Notifications) === null || _b === void 0 ? void 0 : _b.permission) !== null && _c !== void 0 ? _c : false; },
+ setDefaultUrl: notificationsSetDefaultUrl,
+ setDefaultTitle: notificationsSetDefaultTitle,
+ isPushSupported: isPushSupported,
+ requestPermission: notificationsRequestPermission,
+ addEventListener: notificationsAddEventListener,
+ removeEventListener: notificationsRemoveEventListener,
+ };
+ /**
+ * @PublicApi
+ */
+ function isPushSupported() {
+ return isPushNotificationsSupported();
}
-
var ONESIGNAL_SDK_ID = 'onesignal-sdk';
- var ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/OneSignalSDK.js';
- var ONESIGNAL_NOT_SETUP_ERROR = 'OneSignal is not setup correctly.';
- var MAX_TIMEOUT = 30;
+ var ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';
+ // true if the script is successfully loaded from CDN.
+ var isOneSignalInitialized = false;
+ // true if the script fails to load from CDN. A separate flag is necessary
+ // to disambiguate between a CDN load failure and a delayed call to
+ // OneSignal#init.
+ var isOneSignalScriptFailed = false;
+ if (window) {
+ window.OneSignalDeferred = window.OneSignalDeferred || [];
+ addSDKScript();
+ }
+ /**
+ * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts
+ * S T A R T
+ */
+ // Checks if the browser supports push notifications by checking if specific
+ // classes and properties on them exist
+ function isPushNotificationsSupported() {
+ return supportsVapidPush() || supportsSafariPush();
+ }
+ function isMacOSSafariInIframe() {
+ // Fallback detection for Safari on macOS in an iframe context
+ return window.top !== window && // isContextIframe
+ navigator.vendor === 'Apple Computer, Inc.' && // isSafari
+ navigator.platform === 'MacIntel'; // isMacOS
+ }
+ function supportsSafariPush() {
+ return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||
+ isMacOSSafariInIframe();
+ }
+ // Does the browser support the standard Push API
+ function supportsVapidPush() {
+ return typeof PushSubscriptionOptions !== 'undefined' &&
+ PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');
+ }
+ /* E N D */
+ function handleOnError() {
+ isOneSignalScriptFailed = true;
+ }
+ function addSDKScript() {
+ var script = document.createElement('script');
+ script.id = ONESIGNAL_SDK_ID;
+ script.defer = true;
+ script.src = ONE_SIGNAL_SCRIPT_SRC;
+ // Always resolve whether or not the script is successfully initialized.
+ // This is important for users who may block cdn.onesignal.com w/ adblock.
+ script.onerror = function () {
+ handleOnError();
+ };
+ document.head.appendChild(script);
+ }
var OneSignal = /** @class */ (function () {
function OneSignal() {
- var _this = this;
- this.isOneSignalInitialized = false;
- this.ngOneSignalFunctionQueue = [];
- /* H E L P E R S */
- this.injectScript = function () {
- var script = document.createElement('script');
- script.id = ONESIGNAL_SDK_ID;
- script.src = ONE_SIGNAL_SCRIPT_SRC;
- script.async = true;
- document.head.appendChild(script);
- };
- this.doesOneSignalExist = function () {
- if (window.OneSignal) {
- return true;
- }
- return false;
- };
- this.processQueuedOneSignalFunctions = function () {
- _this.ngOneSignalFunctionQueue.forEach(function (element) {
- var _a;
- var name = element.name, args = element.args, promiseResolver = element.promiseResolver;
- if (!!promiseResolver) {
- _this[name].apply(_this, __spread(args)).then(function (result) {
- promiseResolver(result);
- });
- }
- else {
- (_a = window.OneSignal)[name].apply(_a, __spread(args));
- }
- });
- };
- this.setupOneSignalIfMissing = function () {
- if (!_this.doesOneSignalExist()) {
- window.OneSignal = window.OneSignal || [];
- }
- };
+ this.User = UserNamespace;
+ this.Session = SessionNamespace;
+ this.Debug = DebugNamespace;
+ this.Slidedown = SlidedownNamespace;
+ this.Notifications = NotificationsNamespace;
+ this.login = oneSignalLogin;
+ this.logout = oneSignalLogout;
+ this.setConsentGiven = oneSignalSetConsentGiven;
+ this.setConsentRequired = oneSignalSetConsentRequired;
}
/* P U B L I C */
+ /**
+ * @PublicApi
+ */
OneSignal.prototype.init = function (options) {
- var _this = this;
- return new Promise(function (resolve) {
- if (_this.isOneSignalInitialized) {
- return;
- }
- _this.injectScript();
- _this.setupOneSignalIfMissing();
- window.OneSignal.push(function () {
- window.OneSignal.init(options);
- });
- var timeout = setTimeout(function () {
- console.error(ONESIGNAL_NOT_SETUP_ERROR);
- }, MAX_TIMEOUT * 1000);
- window.OneSignal.push(function () {
- clearTimeout(timeout);
- _this.isOneSignalInitialized = true;
- _this.processQueuedOneSignalFunctions();
- resolve();
- });
- });
- };
- OneSignal.prototype.on = function (event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'on',
- args: arguments,
- });
- return;
+ if (isOneSignalInitialized) {
+ return Promise.reject("OneSignal is already initialized.");
}
- window.OneSignal.push(function () {
- window.OneSignal.on(event, listener);
- });
- };
- OneSignal.prototype.off = function (event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'off',
- args: arguments,
- });
- return;
+ if (!options || !options.appId) {
+ throw new Error('You need to provide your OneSignal appId.');
}
- window.OneSignal.push(function () {
- window.OneSignal.off(event, listener);
- });
- };
- OneSignal.prototype.once = function (event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'once',
- args: arguments,
- });
- return;
+ if (!document) {
+ return Promise.reject("Document is not defined.");
}
- window.OneSignal.push(function () {
- window.OneSignal.once(event, listener);
- });
- };
- OneSignal.prototype.isPushNotificationsEnabled = function (callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'isPushNotificationsEnabled',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.isPushNotificationsEnabled(callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.showHttpPrompt = function (options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'showHttpPrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.showHttpPrompt(options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.registerForPushNotifications = function (options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'registerForPushNotifications',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.registerForPushNotifications(options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.setDefaultNotificationUrl = function (url) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'setDefaultNotificationUrl',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.setDefaultNotificationUrl(url)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.setDefaultTitle = function (title) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'setDefaultTitle',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.setDefaultTitle(title)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.getTags = function (callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'getTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.getTags(callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.sendTag = function (key, value, callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'sendTag',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.sendTag(key, value, callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.sendTags = function (tags, callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'sendTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.sendTags(tags, callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.deleteTag = function (tag) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'deleteTag',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.deleteTag(tag)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.deleteTags = function (tags, callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'deleteTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.deleteTags(tags, callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.addListenerForNotificationOpened = function (callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'addListenerForNotificationOpened',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.addListenerForNotificationOpened(callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.setSubscription = function (newSubscription) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'setSubscription',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.setSubscription(newSubscription)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.showHttpPermissionRequest = function (options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'showHttpPermissionRequest',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.showHttpPermissionRequest(options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.showNativePrompt = function () {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'showNativePrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.showNativePrompt()
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.showSlidedownPrompt = function (options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'showSlidedownPrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.showSlidedownPrompt(options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.showCategorySlidedown = function (options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'showCategorySlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.showCategorySlidedown(options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.showSmsSlidedown = function (options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'showSmsSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.showSmsSlidedown(options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.showEmailSlidedown = function (options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'showEmailSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.showEmailSlidedown(options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.showSmsAndEmailSlidedown = function (options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'showSmsAndEmailSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.showSmsAndEmailSlidedown(options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.getNotificationPermission = function (onComplete) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'getNotificationPermission',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.getNotificationPermission(onComplete)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.getUserId = function (callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'getUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.getUserId(callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.getSubscription = function (callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'getSubscription',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.getSubscription(callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.setEmail = function (email, options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'setEmail',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.setEmail(email, options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.setSMSNumber = function (smsNumber, options) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'setSMSNumber',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.setSMSNumber(smsNumber, options)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.logoutEmail = function () {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'logoutEmail',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.logoutEmail()
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.logoutSMS = function () {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'logoutSMS',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.logoutSMS()
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.setExternalUserId = function (externalUserId, authHash) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'setExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.setExternalUserId(externalUserId, authHash)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.removeExternalUserId = function () {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'removeExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.removeExternalUserId()
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.getExternalUserId = function () {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'getExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.getExternalUserId()
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.provideUserConsent = function (consent) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'provideUserConsent',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.provideUserConsent(consent)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.getEmailId = function (callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'getEmailId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.getEmailId(callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.getSMSId = function (callback) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'getSMSId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.getSMSId(callback)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
- });
- });
- };
- OneSignal.prototype.sendOutcome = function (outcomeName, outcomeWeight) {
- var _this = this;
- return new Promise(function (resolve, reject) {
- if (!_this.doesOneSignalExist()) {
- _this.ngOneSignalFunctionQueue.push({
- name: 'sendOutcome',
- args: arguments,
- promiseResolver: resolve,
+ return new Promise(function (resolve) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push(function (oneSignal) {
+ oneSignal.init(options).then(function () {
+ isOneSignalInitialized = true;
+ resolve();
});
- return;
- }
- window.OneSignal.push(function () {
- window.OneSignal.sendOutcome(outcomeName, outcomeWeight)
- .then(function (value) { return resolve(value); })
- .catch(function (error) { return reject(error); });
});
});
};
diff --git a/bundles/onesignal-ngx.umd.js.map b/bundles/onesignal-ngx.umd.js.map
index e98f419..d16b8da 100644
--- a/bundles/onesignal-ngx.umd.js.map
+++ b/bundles/onesignal-ngx.umd.js.map
@@ -1 +1 @@
-{"version":3,"file":"onesignal-ngx.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts","../../../projects/onesignal-ngx/src/public-api.ts","../../../projects/onesignal-ngx/src/onesignal-ngx.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","type Action = (item: T) => void;\ninterface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }\ninterface RegisterOptions { modalPrompt?: boolean; httpPermissionRequest?: boolean; slidedown?: boolean; autoAccept?: boolean }\ninterface SetSMSOptions { identifierAuthHash?: string; }\ninterface SetEmailOptions { identifierAuthHash?: string; emailAuthHash?: string; }\ninterface TagsObject { [key: string]: T; }\ninterface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }\ninterface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }\ninterface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/OneSignalSDK.js';\nconst ONESIGNAL_NOT_SETUP_ERROR = 'OneSignal is not setup correctly.';\nconst MAX_TIMEOUT = 30;\n\ndeclare global {\n interface Window {\n OneSignal: any;\n }\n}\n\ninterface IOneSignalFunctionCall {\n name: string;\n args: IArguments;\n promiseResolver?: Function;\n}\n\ninterface IOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignal {\n private isOneSignalInitialized = false;\n private ngOneSignalFunctionQueue: IOneSignalFunctionCall[] = [];\n\n constructor() { }\n\n /* H E L P E R S */\n\n private injectScript = () => {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n script.async = true;\n document.head.appendChild(script);\n }\n\n private doesOneSignalExist = () => {\n if (window.OneSignal) {\n return true;\n }\n return false;\n }\n\n private processQueuedOneSignalFunctions = () => {\n this.ngOneSignalFunctionQueue.forEach(element => {\n const { name, args, promiseResolver } = element;\n\n if (!!promiseResolver) {\n (this as IOneSignal)[name](...args).then((result: any) => {\n promiseResolver(result);\n });\n } else {\n window.OneSignal[name](...args);\n }\n });\n }\n\n private setupOneSignalIfMissing = () => {\n if (!this.doesOneSignalExist()) {\n window.OneSignal = window.OneSignal || [];\n }\n }\n\n /* P U B L I C */\n\n init(options: IInitObject): Promise {\n return new Promise(resolve => {\n if (this.isOneSignalInitialized) {\n return;\n }\n\n this.injectScript();\n this.setupOneSignalIfMissing();\n window.OneSignal.push(() => {\n window.OneSignal.init(options);\n });\n\n const timeout = setTimeout(() => {\n console.error(ONESIGNAL_NOT_SETUP_ERROR);\n }, MAX_TIMEOUT * 1_000);\n\n window.OneSignal.push(() => {\n clearTimeout(timeout);\n this.isOneSignalInitialized = true;\n this.processQueuedOneSignalFunctions();\n resolve();\n });\n });\n }\n\n\n on(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'on',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.on(event, listener);\n });\n }\n\n off(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'off',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.off(event, listener);\n });\n }\n\n once(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'once',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.once(event, listener);\n });\n }\n\n isPushNotificationsEnabled(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'isPushNotificationsEnabled',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.isPushNotificationsEnabled(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showHttpPrompt(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showHttpPrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showHttpPrompt(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n registerForPushNotifications(options?: RegisterOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'registerForPushNotifications',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.registerForPushNotifications(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setDefaultNotificationUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setDefaultNotificationUrl',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setDefaultNotificationUrl(url)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setDefaultTitle',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setDefaultTitle(title)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getTags(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getTags(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendTag(key: string, value: any, callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendTag',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendTag(key, value, callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendTags(tags: TagsObject, callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendTags(tags, callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n deleteTag(tag: string): Promise> {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'deleteTag',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.deleteTag(tag)\n .then((value: Promise>) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n deleteTags(tags: Array, callback?: Action>): Promise> {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'deleteTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.deleteTags(tags, callback)\n .then((value: Promise>) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n addListenerForNotificationOpened(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'addListenerForNotificationOpened',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.addListenerForNotificationOpened(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setSubscription(newSubscription: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setSubscription',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setSubscription(newSubscription)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showHttpPermissionRequest(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showHttpPermissionRequest',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showHttpPermissionRequest(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showNativePrompt(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showNativePrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showNativePrompt()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSlidedownPrompt(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSlidedownPrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSlidedownPrompt(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showCategorySlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showCategorySlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showCategorySlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSmsSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSmsSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSmsSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showEmailSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showEmailSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showEmailSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSmsAndEmailSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSmsAndEmailSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSmsAndEmailSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getNotificationPermission(onComplete?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getNotificationPermission',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getNotificationPermission(onComplete)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getUserId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getUserId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getSubscription(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getSubscription',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getSubscription(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setEmail(email: string, options?: SetEmailOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setEmail',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setEmail(email, options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setSMSNumber(smsNumber: string, options?: SetSMSOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setSMSNumber',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setSMSNumber(smsNumber, options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n logoutEmail(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'logoutEmail',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.logoutEmail()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n logoutSMS(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'logoutSMS',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.logoutSMS()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setExternalUserId(externalUserId: string | undefined | null, authHash?: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setExternalUserId(externalUserId, authHash)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n removeExternalUserId(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'removeExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.removeExternalUserId()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getExternalUserId(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getExternalUserId()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n provideUserConsent(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'provideUserConsent',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.provideUserConsent(consent)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getEmailId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getEmailId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getEmailId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getSMSId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getSMSId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getSMSId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendOutcome(outcomeName: string, outcomeWeight?: number | undefined): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendOutcome',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendOutcome(outcomeName, outcomeWeight)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n \n onesignal-ngx works!\n
\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n","/*\n * Public API Surface of onesignal-ngx\n */\n\nexport * from './lib/onesignal-ngx.service';\nexport * from './lib/onesignal-ngx.component';\nexport * from './lib/onesignal-ngx.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Injectable","Component","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtG,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;aAEc,SAAS,CAAC,CAAC,EAAE,CAAC;QAC1B,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC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C,WAAW,EAAE,aAAa,CAAC;yBACrD,IAAI,CAAC,UAAC,KAAoB,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,GAAA,CAAC;yBAC9C,KAAK,CAAC,UAAC,KAAY,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,GAAA,CAAC,CAAC;iBAC3C,CAAC,CAAC;aACJ,CAAC,CAAC;SACJ;;;;;gBAruBFA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;;;QCzCC;SAAiB;QAEjB,wCAAQ,GAAR;SACC;;;;gBAfFC,YAAS,SAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,QAAQ,EAAE,qDAIT;iBAGF;;;;;QCAD;;;;;gBANCC,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;iBACjC;;;ICVD;;;;ICAA;;;;;;;;;;;;;;"}
\ No newline at end of file
+{"version":3,"file":"onesignal-ngx.umd.js","sources":["../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts","../../../projects/onesignal-ngx/src/public-api.ts","../../../projects/onesignal-ngx/src/onesignal-ngx.ts"],"sourcesContent":["interface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }\ninterface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }\ninterface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }\ninterface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }\ntype PushSubscriptionNamespaceProperties = { id: string | null | undefined; token: string | null | undefined; optedIn: boolean; };\ntype SubscriptionChangeEvent = { previous: PushSubscriptionNamespaceProperties; current: PushSubscriptionNamespaceProperties; };\ntype NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData extends NotificationAction { url: string; };\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\ntype OSNotification = { id?: string; title?: string; body?: string; data?: any; url?: string; icon?: string; image?: string; tag?: string; requireInteraction?: boolean; renotify?: true; actions?: Array; };\ntype NotificationActionButton = { action: string; title: string; icon?: string; url?: string; }\nexport type NotificationClickResult = { actionId?: string; url?: string; }\ntype NotificationEventTypeMap = { 'click': NotificationClickResult; 'foregroundWillDisplay': NotificationForegroundWillDisplayEvent; 'dismiss': OSNotificationDataPayload; 'permissionChange': boolean; 'permissionPromptDisplay': void; };\nexport type NotificationForegroundWillDisplayEvent = { notification: OSNotification; preventDefault(): void; }\ntype OSNotificationDataPayload = { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: VibratePattern; buttons?: NotificationButtonData[]; };\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tpermissionNative: NotificationPermission;\n\tpermission: boolean;\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\trequestPermission(): Promise;\n\taddEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;\n\tremoveEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n\taddTag(key: string, value: string): void;\n\taddTags(tags: { [key: string]: string }): void;\n\tremoveTag(key: string): void;\n\tremoveTags(keys: string[]): void;\n}\ninterface IOneSignalPushSubscription {\n\tid: string | null | undefined;\n\ttoken: string | null | undefined;\n\toptedIn: boolean | undefined;\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction userAddTag(key: string, value: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addTag(key, value);\n });\n}\n\nfunction userAddTags(tags: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addTags(tags);\n });\n}\n\nfunction userRemoveTag(key: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeTag(key);\n });\n}\n\nfunction userRemoveTags(keys: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeTags(keys);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\tget id(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.id },\n\tget token(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.token },\n\tget optedIn(): boolean | undefined { return window.OneSignal?.User?.PushSubscription?.optedIn },\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\taddTag: userAddTag,\n\taddTags: userAddTags,\n\tremoveTag: userRemoveTag,\n\tremoveTags: userRemoveTags,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tget permissionNative(): NotificationPermission { return window.OneSignal?.Notifications?.permissionNative ?? 'default'; },\n\tget permission(): boolean { return window.OneSignal?.Notifications?.permission ?? false; },\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nif (window) {\n window.OneSignalDeferred = window.OneSignalDeferred || [];\n addSDKScript();\n}\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n OneSignal?: IOneSignalOneSignal;\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n \n onesignal-ngx works!\n
\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n","/*\n * Public API Surface of onesignal-ngx\n */\n\nexport * from './lib/onesignal-ngx.service';\nexport * from './lib/onesignal-ngx.component';\nexport * from './lib/onesignal-ngx.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Injectable","Component","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAO4E,CAAC;IA8F7E,SAAS,cAAc,CAAC,UAAkB,EAAE,QAAiB;QAC3D,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;;YACjC,IAAI,uBAAuB,EAAE;gBAC3B,MAAM,EAAE,CAAC;aACV;YAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,UAAC,SAA8B;gBAC5D,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC;qBAClC,IAAI,CAAC,UAAC,KAAU,IAAK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AO,EAAE,CAAC;qBACX,CAAC,CAAC;iBACJ,EAAE;aACJ,CAAC,CAAC;SACJ;;;;;gBAlCFA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;;;QC1jBC;SAAiB;QAEjB,wCAAQ,GAAR;SACC;;;;gBAfFC,YAAS,SAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,QAAQ,EAAE,qDAIT;iBAGF;;;;;QCAD;;;;;gBANCC,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;iBACjC;;;ICVD;;;;ICAA;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/bundles/onesignal-ngx.umd.min.js b/bundles/onesignal-ngx.umd.min.js
index 6d2ab7d..4cd0827 100644
--- a/bundles/onesignal-ngx.umd.min.js
+++ b/bundles/onesignal-ngx.umd.min.js
@@ -1,16 +1,2 @@
-!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("onesignal-ngx",["exports","@angular/core"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self)["onesignal-ngx"]={},n.ng.core)}(this,(function(n,e){"use strict";function i(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(i){if("default"!==i){var t=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(e,i,t.get?t:{enumerable:!0,get:function(){return n[i]}})}})),e.default=n,Object.freeze(e)}var t=i(e);
-/*! *****************************************************************************
- Copyright (c) Microsoft Corporation.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
- ***************************************************************************** */Object.create;function o(n,e){var i="function"==typeof Symbol&&n[Symbol.iterator];if(!i)return n;var t,o,r=i.call(n),u=[];try{for(;(void 0===e||e-- >0)&&!(t=r.next()).done;)u.push(t.value)}catch(n){o={error:n}}finally{try{t&&!t.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return u}function r(){for(var n=[],e=0;e\n onesignal-ngx works!\n
\n "}]}],s.ctorParameters=function(){return[]};var a=function(){};a.decorators=[{type:e.NgModule,args:[{declarations:[s],imports:[],exports:[s]}]}],n.OneSignal=u,n.OnesignalNgxComponent=s,n.OnesignalNgxModule=a,Object.defineProperty(n,"__esModule",{value:!0})}));
+!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("onesignal-ngx",["exports","@angular/core"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self)["onesignal-ngx"]={},n.ng.core)}(this,(function(n,e){"use strict";function i(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:function(){return n[i]}})}})),e.default=n,Object.freeze(e)}var o=i(e);function t(n,e){return new Promise((function(i,o){var t;g&&o(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.login(n,e).then((function(n){return i(n)})).catch((function(n){return o(n)}))}))}))}function r(){return new Promise((function(n,e){var i;g&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.logout().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))}function u(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.setConsentGiven(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}function d(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.setConsentRequired(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}var s={addAlias:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.addAlias(n,e)}))},addAliases:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addAliases(n)}))},removeAlias:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeAlias(n)}))},removeAliases:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeAliases(n)}))},addEmail:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addEmail(n)}))},removeEmail:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeEmail(n)}))},addSms:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addSms(n)}))},removeSms:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeSms(n)}))},addTag:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.addTag(n,e)}))},addTags:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addTags(n)}))},removeTag:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeTag(n)}))},removeTags:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeTags(n)}))},PushSubscription:{get id(){var n,e,i;return null===(i=null===(e=null===(n=window.OneSignal)||void 0===n?void 0:n.User)||void 0===e?void 0:e.PushSubscription)||void 0===i?void 0:i.id},get token(){var n,e,i;return null===(i=null===(e=null===(n=window.OneSignal)||void 0===n?void 0:n.User)||void 0===e?void 0:e.PushSubscription)||void 0===i?void 0:i.token},get optedIn(){var n,e,i;return null===(i=null===(e=null===(n=window.OneSignal)||void 0===n?void 0:n.User)||void 0===e?void 0:e.PushSubscription)||void 0===i?void 0:i.optedIn},optIn:function(){return new Promise((function(n,e){var i;g&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.optIn().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},optOut:function(){return new Promise((function(n,e){var i;g&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.optOut().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.removeEventListener(n,e)}))}}},a={sendOutcome:function(n,e){return new Promise((function(i,o){var t;g&&o(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Session.sendOutcome(n,e).then((function(n){return i(n)})).catch((function(n){return o(n)}))}))}))},sendUniqueOutcome:function(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Session.sendUniqueOutcome(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}},c={setLogLevel:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.Debug.setLogLevel(n)}))}},l={promptPush:function(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Slidedown.promptPush(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptPushCategories:function(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Slidedown.promptPushCategories(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptSms:function(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Slidedown.promptSms(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptEmail:function(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Slidedown.promptEmail(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptSmsAndEmail:function(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Slidedown.promptSmsAndEmail(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Slidedown.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Slidedown.removeEventListener(n,e)}))}},f={get permissionNative(){var n,e,i;return null!==(i=null===(e=null===(n=window.OneSignal)||void 0===n?void 0:n.Notifications)||void 0===e?void 0:e.permissionNative)&&void 0!==i?i:"default"},get permission(){var n,e,i;return null!==(i=null===(e=null===(n=window.OneSignal)||void 0===n?void 0:n.Notifications)||void 0===e?void 0:e.permission)&&void 0!==i&&i},setDefaultUrl:function(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Notifications.setDefaultUrl(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},setDefaultTitle:function(n){return new Promise((function(e,i){var o;g&&i(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Notifications.setDefaultTitle(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},isPushSupported:function(){return"undefined"!=typeof PushSubscriptionOptions&&PushSubscriptionOptions.prototype.hasOwnProperty("applicationServerKey")||window.safari&&void 0!==window.safari.pushNotification||window.top!==window&&"Apple Computer, Inc."===navigator.vendor&&"MacIntel"===navigator.platform},requestPermission:function(){return new Promise((function(n,e){var i;g&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.requestPermission().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.removeEventListener(n,e)}))}};var v,p="onesignal-sdk",w="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js",h=!1,g=!1;window&&(window.OneSignalDeferred=window.OneSignalDeferred||[],(v=document.createElement("script")).id=p,v.defer=!0,v.src=w,v.onerror=function(){g=!0},document.head.appendChild(v));var m=function(){function n(){this.User=s,this.Session=a,this.Debug=c,this.Slidedown=l,this.Notifications=f,this.login=t,this.logout=r,this.setConsentGiven=u,this.setConsentRequired=d}return n.prototype.init=function(n){if(h)return Promise.reject("OneSignal is already initialized.");if(!n||!n.appId)throw new Error("You need to provide your OneSignal appId.");return document?new Promise((function(e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.init(n).then((function(){h=!0,e()}))}))})):Promise.reject("Document is not defined.")},n}();m.ɵprov=o.ɵɵdefineInjectable({factory:function(){return new m},token:m,providedIn:"root"}),m.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[]};var S=function(){function n(){}return n.prototype.ngOnInit=function(){},n}();S.decorators=[{type:e.Component,args:[{selector:"onesignal-onesignal-ngx",template:"\n \n onesignal-ngx works!\n
\n "}]}],S.ctorParameters=function(){return[]};var O=function(){};O.decorators=[{type:e.NgModule,args:[{declarations:[S],imports:[],exports:[S]}]}],n.OneSignal=m,n.OnesignalNgxComponent=S,n.OnesignalNgxModule=O,Object.defineProperty(n,"__esModule",{value:!0})}));
//# sourceMappingURL=onesignal-ngx.umd.min.js.map
\ No newline at end of file
diff --git a/bundles/onesignal-ngx.umd.min.js.map b/bundles/onesignal-ngx.umd.min.js.map
index 5dff66c..9e75040 100644
--- a/bundles/onesignal-ngx.umd.min.js.map
+++ b/bundles/onesignal-ngx.umd.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts"],"names":["Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","__spread","arguments","length","concat","OneSignal","_this","this","isOneSignalInitialized","ngOneSignalFunctionQueue","injectScript","script","document","createElement","id","src","async","head","appendChild","doesOneSignalExist","window","processQueuedOneSignalFunctions","forEach","element","name","args","promiseResolver","apply","then","result","_a","setupOneSignalIfMissing","prototype","init","options","Promise","resolve","timeout","setTimeout","console","MAX_TIMEOUT","clearTimeout","on","event","listener","off","once","isPushNotificationsEnabled","callback","reject","catch","showHttpPrompt","registerForPushNotifications","setDefaultNotificationUrl","url","setDefaultTitle","title","getTags","sendTag","key","sendTags","tags","deleteTag","tag","deleteTags","addListenerForNotificationOpened","setSubscription","newSubscription","showHttpPermissionRequest","showNativePrompt","showSlidedownPrompt","showCategorySlidedown","showSmsSlidedown","showEmailSlidedown","showSmsAndEmailSlidedown","getNotificationPermission","onComplete","getUserId","getSubscription","setEmail","email","setSMSNumber","smsNumber","logoutEmail","logoutSMS","setExternalUserId","externalUserId","authHash","removeExternalUserId","getExternalUserId","provideUserConsent","consent","getEmailId","getSMSId","sendOutcome","outcomeName","outcomeWeight","Injectable","providedIn","OnesignalNgxComponent","ngOnInit","Component","selector","template","NgModule","declarations","imports","exports"],"mappings":";;;;;;;;;;;;;;oFA2G6BA,OAAOC,gBAwBpBC,EAAOC,EAAGC,GACtB,IAAIC,EAAsB,mBAAXC,QAAyBH,EAAEG,OAAOC,UACjD,IA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BX,KAAK,CACjC0B,KAAM,cACNC,KAAMvB,UACNwB,gBAAiBU,4HA1tB1B6D,EAAAA,WAAUxE,KAAA,CAAC,CACVyE,WAAY,kECxCZ,SAAAC,YAEAA,EAAAnE,UAAAoE,SAAA,sCAdDC,EAAAA,UAAS5E,KAAA,CAAC,CACT6E,SAAU,0BACVC,SAAU,sGCOZ,iCANCC,EAAAA,SAAQ/E,KAAA,CAAC,CACRgF,aAAc,CAACN,GACfO,QAAS,GAETC,QAAS,CAACR","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","type Action = (item: T) => void;\ninterface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }\ninterface RegisterOptions { modalPrompt?: boolean; httpPermissionRequest?: boolean; slidedown?: boolean; autoAccept?: boolean }\ninterface SetSMSOptions { identifierAuthHash?: string; }\ninterface SetEmailOptions { identifierAuthHash?: string; emailAuthHash?: string; }\ninterface TagsObject { [key: string]: T; }\ninterface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }\ninterface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }\ninterface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/OneSignalSDK.js';\nconst ONESIGNAL_NOT_SETUP_ERROR = 'OneSignal is not setup correctly.';\nconst MAX_TIMEOUT = 30;\n\ndeclare global {\n interface Window {\n OneSignal: any;\n }\n}\n\ninterface IOneSignalFunctionCall {\n name: string;\n args: IArguments;\n promiseResolver?: Function;\n}\n\ninterface IOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignal {\n private isOneSignalInitialized = false;\n private ngOneSignalFunctionQueue: IOneSignalFunctionCall[] = [];\n\n constructor() { }\n\n /* H E L P E R S */\n\n private injectScript = () => {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n script.async = true;\n document.head.appendChild(script);\n }\n\n private doesOneSignalExist = () => {\n if (window.OneSignal) {\n return true;\n }\n return false;\n }\n\n private processQueuedOneSignalFunctions = () => {\n this.ngOneSignalFunctionQueue.forEach(element => {\n const { name, args, promiseResolver } = element;\n\n if (!!promiseResolver) {\n (this as IOneSignal)[name](...args).then((result: any) => {\n promiseResolver(result);\n });\n } else {\n window.OneSignal[name](...args);\n }\n });\n }\n\n private setupOneSignalIfMissing = () => {\n if (!this.doesOneSignalExist()) {\n window.OneSignal = window.OneSignal || [];\n }\n }\n\n /* P U B L I C */\n\n init(options: IInitObject): Promise {\n return new Promise(resolve => {\n if (this.isOneSignalInitialized) {\n return;\n }\n\n this.injectScript();\n this.setupOneSignalIfMissing();\n window.OneSignal.push(() => {\n window.OneSignal.init(options);\n });\n\n const timeout = setTimeout(() => {\n console.error(ONESIGNAL_NOT_SETUP_ERROR);\n }, MAX_TIMEOUT * 1_000);\n\n window.OneSignal.push(() => {\n clearTimeout(timeout);\n this.isOneSignalInitialized = true;\n this.processQueuedOneSignalFunctions();\n resolve();\n });\n });\n }\n\n\n on(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'on',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.on(event, listener);\n });\n }\n\n off(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'off',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.off(event, listener);\n });\n }\n\n once(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'once',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.once(event, listener);\n });\n }\n\n isPushNotificationsEnabled(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'isPushNotificationsEnabled',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.isPushNotificationsEnabled(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showHttpPrompt(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showHttpPrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showHttpPrompt(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n registerForPushNotifications(options?: RegisterOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'registerForPushNotifications',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.registerForPushNotifications(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setDefaultNotificationUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setDefaultNotificationUrl',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setDefaultNotificationUrl(url)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setDefaultTitle',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setDefaultTitle(title)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getTags(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getTags(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendTag(key: string, value: any, callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendTag',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendTag(key, value, callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendTags(tags: TagsObject, callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendTags(tags, callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n deleteTag(tag: string): Promise> {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'deleteTag',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.deleteTag(tag)\n .then((value: Promise>) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n deleteTags(tags: Array, callback?: Action>): Promise> {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'deleteTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.deleteTags(tags, callback)\n .then((value: Promise>) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n addListenerForNotificationOpened(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'addListenerForNotificationOpened',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.addListenerForNotificationOpened(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setSubscription(newSubscription: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setSubscription',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setSubscription(newSubscription)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showHttpPermissionRequest(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showHttpPermissionRequest',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showHttpPermissionRequest(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showNativePrompt(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showNativePrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showNativePrompt()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSlidedownPrompt(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSlidedownPrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSlidedownPrompt(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showCategorySlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showCategorySlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showCategorySlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSmsSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSmsSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSmsSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showEmailSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showEmailSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showEmailSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSmsAndEmailSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSmsAndEmailSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSmsAndEmailSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getNotificationPermission(onComplete?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getNotificationPermission',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getNotificationPermission(onComplete)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getUserId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getUserId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getSubscription(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getSubscription',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getSubscription(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setEmail(email: string, options?: SetEmailOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setEmail',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setEmail(email, options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setSMSNumber(smsNumber: string, options?: SetSMSOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setSMSNumber',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setSMSNumber(smsNumber, options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n logoutEmail(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'logoutEmail',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.logoutEmail()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n logoutSMS(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'logoutSMS',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.logoutSMS()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setExternalUserId(externalUserId: string | undefined | null, authHash?: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setExternalUserId(externalUserId, authHash)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n removeExternalUserId(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'removeExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.removeExternalUserId()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getExternalUserId(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getExternalUserId()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n provideUserConsent(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'provideUserConsent',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.provideUserConsent(consent)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getEmailId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getEmailId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getEmailId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getSMSId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getSMSId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getSMSId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendOutcome(outcomeName: string, outcomeWeight?: number | undefined): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendOutcome',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendOutcome(outcomeName, outcomeWeight)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n \n onesignal-ngx works!\n
\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n"]}
\ No newline at end of file
+{"version":3,"sources":["../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts"],"names":["oneSignalLogin","externalId","jwtToken","Promise","resolve","reject","isOneSignalScriptFailed","_a","window","OneSignalDeferred","push","oneSignal","login","then","value","catch","error","oneSignalLogout","logout","oneSignalSetConsentGiven","consent","setConsentGiven","oneSignalSetConsentRequired","requiresConsent","setConsentRequired","UserNamespace","addAlias","label","id","User","addAliases","aliases","removeAlias","removeAliases","labels","addEmail","email","removeEmail","addSms","smsNumber","removeSms","addTag","key","addTags","tags","removeTag","removeTags","keys","PushSubscription","_b","_c","OneSignal","token","optedIn","optIn","optOut","addEventListener","event","listener","removeEventListener","SessionNamespace","sendOutcome","outcomeName","outcomeWeight","Session","sendUniqueOutcome","DebugNamespace","setLogLevel","logLevel","Debug","SlidedownNamespace","promptPush","options","Slidedown","promptPushCategories","promptSms","promptEmail","promptSmsAndEmail","NotificationsNamespace","permissionNative","Notifications","permission","setDefaultUrl","url","setDefaultTitle","title","isPushSupported","PushSubscriptionOptions","prototype","hasOwnProperty","safari","pushNotification","top","navigator","vendor","platform","requestPermission","script","ONESIGNAL_SDK_ID","ONE_SIGNAL_SCRIPT_SRC","isOneSignalInitialized","document","createElement","defer","src","onerror","head","appendChild","this","init","appId","Error","Injectable","args","providedIn","OnesignalNgxComponent","ngOnInit","Component","selector","template","NgModule","declarations","imports","exports"],"mappings":"umBAqGA,SAASA,EAAeC,EAAoBC,GAC1C,OAAO,IAAIC,SAAQ,SAACC,EAASC,SACvBC,GACFD,IAGsB,QAAxBE,EAAAC,OAAOC,yBAAiB,IAAAF,GAAAA,EAAEG,MAAK,SAACC,GAC9BA,EAAUC,MAAMX,EAAYC,GACzBW,MAAK,SAACC,GAAe,OAAAV,EAAQU,MAC7BC,OAAM,SAACC,GAAiB,OAAAX,EAAOW,YAKxC,SAASC,IACP,OA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,GAAAA,EAAEG,MAAK,SAACC,GAC9BA,EAAUkG,KAAKrC,GAAS3D,MAAK,WAC3BuF,GAAyB,EACzBhG,aAPGD,QAAQE,OAAO,iJAvB3B2G,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,kECzjBZ,SAAAC,YAEAA,EAAA3B,UAAA4B,SAAA,sCAdDC,EAAAA,UAASJ,KAAA,CAAC,CACTK,SAAU,0BACVC,SAAU,sGCOZ,iCANCC,EAAAA,SAAQP,KAAA,CAAC,CACRQ,aAAc,CAACN,GACfO,QAAS,GAETC,QAAS,CAACR","sourcesContent":["interface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }\ninterface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }\ninterface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }\ninterface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }\ntype PushSubscriptionNamespaceProperties = { id: string | null | undefined; token: string | null | undefined; optedIn: boolean; };\ntype SubscriptionChangeEvent = { previous: PushSubscriptionNamespaceProperties; current: PushSubscriptionNamespaceProperties; };\ntype NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData extends NotificationAction { url: string; };\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\ntype OSNotification = { id?: string; title?: string; body?: string; data?: any; url?: string; icon?: string; image?: string; tag?: string; requireInteraction?: boolean; renotify?: true; actions?: Array; };\ntype NotificationActionButton = { action: string; title: string; icon?: string; url?: string; }\nexport type NotificationClickResult = { actionId?: string; url?: string; }\ntype NotificationEventTypeMap = { 'click': NotificationClickResult; 'foregroundWillDisplay': NotificationForegroundWillDisplayEvent; 'dismiss': OSNotificationDataPayload; 'permissionChange': boolean; 'permissionPromptDisplay': void; };\nexport type NotificationForegroundWillDisplayEvent = { notification: OSNotification; preventDefault(): void; }\ntype OSNotificationDataPayload = { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: VibratePattern; buttons?: NotificationButtonData[]; };\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tpermissionNative: NotificationPermission;\n\tpermission: boolean;\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\trequestPermission(): Promise;\n\taddEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;\n\tremoveEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n\taddTag(key: string, value: string): void;\n\taddTags(tags: { [key: string]: string }): void;\n\tremoveTag(key: string): void;\n\tremoveTags(keys: string[]): void;\n}\ninterface IOneSignalPushSubscription {\n\tid: string | null | undefined;\n\ttoken: string | null | undefined;\n\toptedIn: boolean | undefined;\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction userAddTag(key: string, value: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addTag(key, value);\n });\n}\n\nfunction userAddTags(tags: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addTags(tags);\n });\n}\n\nfunction userRemoveTag(key: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeTag(key);\n });\n}\n\nfunction userRemoveTags(keys: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeTags(keys);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\tget id(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.id },\n\tget token(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.token },\n\tget optedIn(): boolean | undefined { return window.OneSignal?.User?.PushSubscription?.optedIn },\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\taddTag: userAddTag,\n\taddTags: userAddTags,\n\tremoveTag: userRemoveTag,\n\tremoveTags: userRemoveTags,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tget permissionNative(): NotificationPermission { return window.OneSignal?.Notifications?.permissionNative ?? 'default'; },\n\tget permission(): boolean { return window.OneSignal?.Notifications?.permission ?? false; },\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nif (window) {\n window.OneSignalDeferred = window.OneSignalDeferred || [];\n addSDKScript();\n}\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n OneSignal?: IOneSignalOneSignal;\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n \n onesignal-ngx works!\n
\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n"]}
\ No newline at end of file
diff --git a/esm2015/lib/onesignal-ngx.service.js b/esm2015/lib/onesignal-ngx.service.js
index 0d02236..ee0b444 100644
--- a/esm2015/lib/onesignal-ngx.service.js
+++ b/esm2015/lib/onesignal-ngx.service.js
@@ -1,662 +1,469 @@
-import { Injectable } from '@angular/core';
-import * as i0 from "@angular/core";
-const ONESIGNAL_SDK_ID = 'onesignal-sdk';
-const ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/OneSignalSDK.js';
-const ONESIGNAL_NOT_SETUP_ERROR = 'OneSignal is not setup correctly.';
-const MAX_TIMEOUT = 30;
-export class OneSignal {
- constructor() {
- this.isOneSignalInitialized = false;
- this.ngOneSignalFunctionQueue = [];
- /* H E L P E R S */
- this.injectScript = () => {
- const script = document.createElement('script');
- script.id = ONESIGNAL_SDK_ID;
- script.src = ONE_SIGNAL_SCRIPT_SRC;
- script.async = true;
- document.head.appendChild(script);
- };
- this.doesOneSignalExist = () => {
- if (window.OneSignal) {
- return true;
- }
- return false;
- };
- this.processQueuedOneSignalFunctions = () => {
- this.ngOneSignalFunctionQueue.forEach(element => {
- const { name, args, promiseResolver } = element;
- if (!!promiseResolver) {
- this[name](...args).then((result) => {
- promiseResolver(result);
- });
- }
- else {
- window.OneSignal[name](...args);
- }
- });
- };
- this.setupOneSignalIfMissing = () => {
- if (!this.doesOneSignalExist()) {
- window.OneSignal = window.OneSignal || [];
- }
- };
- }
- /* P U B L I C */
- init(options) {
- return new Promise(resolve => {
- if (this.isOneSignalInitialized) {
- return;
- }
- this.injectScript();
- this.setupOneSignalIfMissing();
- window.OneSignal.push(() => {
- window.OneSignal.init(options);
- });
- const timeout = setTimeout(() => {
- console.error(ONESIGNAL_NOT_SETUP_ERROR);
- }, MAX_TIMEOUT * 1000);
- window.OneSignal.push(() => {
- clearTimeout(timeout);
- this.isOneSignalInitialized = true;
- this.processQueuedOneSignalFunctions();
- resolve();
- });
- });
- }
- on(event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'on',
- args: arguments,
- });
- return;
+;
+function oneSignalLogin(externalId, jwtToken) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- window.OneSignal.push(() => {
- window.OneSignal.on(event, listener);
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.login(externalId, jwtToken)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- off(event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'off',
- args: arguments,
- });
- return;
+ });
+}
+function oneSignalLogout() {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- window.OneSignal.push(() => {
- window.OneSignal.off(event, listener);
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.logout()
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- once(event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'once',
- args: arguments,
- });
- return;
+ });
+}
+function oneSignalSetConsentGiven(consent) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- window.OneSignal.push(() => {
- window.OneSignal.once(event, listener);
- });
- }
- isPushNotificationsEnabled(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'isPushNotificationsEnabled',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.isPushNotificationsEnabled(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showHttpPrompt(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showHttpPrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showHttpPrompt(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- registerForPushNotifications(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'registerForPushNotifications',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.registerForPushNotifications(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- setDefaultNotificationUrl(url) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setDefaultNotificationUrl',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setDefaultNotificationUrl(url)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- setDefaultTitle(title) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setDefaultTitle',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setDefaultTitle(title)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- getTags(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getTags(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- sendTag(key, value, callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'sendTag',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.sendTag(key, value, callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- sendTags(tags, callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'sendTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.sendTags(tags, callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- deleteTag(tag) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'deleteTag',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.deleteTag(tag)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- deleteTags(tags, callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'deleteTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.deleteTags(tags, callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- addListenerForNotificationOpened(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'addListenerForNotificationOpened',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.addListenerForNotificationOpened(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- setSubscription(newSubscription) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setSubscription',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setSubscription(newSubscription)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showHttpPermissionRequest(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showHttpPermissionRequest',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showHttpPermissionRequest(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showNativePrompt() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showNativePrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showNativePrompt()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showSlidedownPrompt(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showSlidedownPrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showSlidedownPrompt(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showCategorySlidedown(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showCategorySlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showCategorySlidedown(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showSmsSlidedown(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showSmsSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showSmsSlidedown(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.setConsentGiven(consent)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- showEmailSlidedown(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showEmailSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showEmailSlidedown(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showSmsAndEmailSlidedown(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showSmsAndEmailSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showSmsAndEmailSlidedown(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- getNotificationPermission(onComplete) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getNotificationPermission',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getNotificationPermission(onComplete)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function oneSignalSetConsentRequired(requiresConsent) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.setConsentRequired(requiresConsent)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getUserId(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getUserId(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptPush(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptPush(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getSubscription(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getSubscription',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getSubscription(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptPushCategories(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptPushCategories(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- setEmail(email, options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setEmail',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setEmail(email, options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptSms(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptSms(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- setSMSNumber(smsNumber, options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setSMSNumber',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setSMSNumber(smsNumber, options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptEmail(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptEmail(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- logoutEmail() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'logoutEmail',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.logoutEmail()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptSmsAndEmail(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptSmsAndEmail(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- logoutSMS() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'logoutSMS',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.logoutSMS()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.addEventListener(event, listener);
+ });
+}
+function slidedownRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.removeEventListener(event, listener);
+ });
+}
+function notificationsSetDefaultUrl(url) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.setDefaultUrl(url)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- setExternalUserId(externalUserId, authHash) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setExternalUserId(externalUserId, authHash)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function notificationsSetDefaultTitle(title) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.setDefaultTitle(title)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- removeExternalUserId() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'removeExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.removeExternalUserId()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function notificationsRequestPermission() {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.requestPermission()
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getExternalUserId() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getExternalUserId()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function notificationsAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.addEventListener(event, listener);
+ });
+}
+function notificationsRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.removeEventListener(event, listener);
+ });
+}
+function sessionSendOutcome(outcomeName, outcomeWeight) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- provideUserConsent(consent) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'provideUserConsent',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.provideUserConsent(consent)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function sessionSendUniqueOutcome(outcomeName) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Session.sendUniqueOutcome(outcomeName)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getEmailId(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getEmailId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getEmailId(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function userAddAlias(label, id) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addAlias(label, id);
+ });
+}
+function userAddAliases(aliases) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addAliases(aliases);
+ });
+}
+function userRemoveAlias(label) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeAlias(label);
+ });
+}
+function userRemoveAliases(labels) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeAliases(labels);
+ });
+}
+function userAddEmail(email) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addEmail(email);
+ });
+}
+function userRemoveEmail(email) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeEmail(email);
+ });
+}
+function userAddSms(smsNumber) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addSms(smsNumber);
+ });
+}
+function userRemoveSms(smsNumber) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeSms(smsNumber);
+ });
+}
+function userAddTag(key, value) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addTag(key, value);
+ });
+}
+function userAddTags(tags) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addTags(tags);
+ });
+}
+function userRemoveTag(key) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeTag(key);
+ });
+}
+function userRemoveTags(keys) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeTags(keys);
+ });
+}
+function pushSubscriptionOptIn() {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.PushSubscription.optIn()
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getSMSId(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getSMSId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getSMSId(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function pushSubscriptionOptOut() {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.PushSubscription.optOut()
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
+ });
+}
+function pushSubscriptionAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.PushSubscription.addEventListener(event, listener);
+ });
+}
+function pushSubscriptionRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.PushSubscription.removeEventListener(event, listener);
+ });
+}
+function debugSetLogLevel(logLevel) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Debug.setLogLevel(logLevel);
+ });
+}
+const PushSubscriptionNamespace = {
+ get id() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.id; },
+ get token() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.token; },
+ get optedIn() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.optedIn; },
+ optIn: pushSubscriptionOptIn,
+ optOut: pushSubscriptionOptOut,
+ addEventListener: pushSubscriptionAddEventListener,
+ removeEventListener: pushSubscriptionRemoveEventListener,
+};
+const UserNamespace = {
+ addAlias: userAddAlias,
+ addAliases: userAddAliases,
+ removeAlias: userRemoveAlias,
+ removeAliases: userRemoveAliases,
+ addEmail: userAddEmail,
+ removeEmail: userRemoveEmail,
+ addSms: userAddSms,
+ removeSms: userRemoveSms,
+ addTag: userAddTag,
+ addTags: userAddTags,
+ removeTag: userRemoveTag,
+ removeTags: userRemoveTags,
+ PushSubscription: PushSubscriptionNamespace,
+};
+const SessionNamespace = {
+ sendOutcome: sessionSendOutcome,
+ sendUniqueOutcome: sessionSendUniqueOutcome,
+};
+const DebugNamespace = {
+ setLogLevel: debugSetLogLevel,
+};
+const SlidedownNamespace = {
+ promptPush: slidedownPromptPush,
+ promptPushCategories: slidedownPromptPushCategories,
+ promptSms: slidedownPromptSms,
+ promptEmail: slidedownPromptEmail,
+ promptSmsAndEmail: slidedownPromptSmsAndEmail,
+ addEventListener: slidedownAddEventListener,
+ removeEventListener: slidedownRemoveEventListener,
+};
+const NotificationsNamespace = {
+ get permissionNative() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.Notifications) === null || _b === void 0 ? void 0 : _b.permissionNative) !== null && _c !== void 0 ? _c : 'default'; },
+ get permission() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.Notifications) === null || _b === void 0 ? void 0 : _b.permission) !== null && _c !== void 0 ? _c : false; },
+ setDefaultUrl: notificationsSetDefaultUrl,
+ setDefaultTitle: notificationsSetDefaultTitle,
+ isPushSupported,
+ requestPermission: notificationsRequestPermission,
+ addEventListener: notificationsAddEventListener,
+ removeEventListener: notificationsRemoveEventListener,
+};
+/**
+ * @PublicApi
+ */
+function isPushSupported() {
+ return isPushNotificationsSupported();
+}
+import { Injectable } from '@angular/core';
+import * as i0 from "@angular/core";
+const ONESIGNAL_SDK_ID = 'onesignal-sdk';
+const ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';
+// true if the script is successfully loaded from CDN.
+let isOneSignalInitialized = false;
+// true if the script fails to load from CDN. A separate flag is necessary
+// to disambiguate between a CDN load failure and a delayed call to
+// OneSignal#init.
+let isOneSignalScriptFailed = false;
+if (window) {
+ window.OneSignalDeferred = window.OneSignalDeferred || [];
+ addSDKScript();
+}
+/**
+ * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts
+ * S T A R T
+ */
+// Checks if the browser supports push notifications by checking if specific
+// classes and properties on them exist
+function isPushNotificationsSupported() {
+ return supportsVapidPush() || supportsSafariPush();
+}
+function isMacOSSafariInIframe() {
+ // Fallback detection for Safari on macOS in an iframe context
+ return window.top !== window && // isContextIframe
+ navigator.vendor === 'Apple Computer, Inc.' && // isSafari
+ navigator.platform === 'MacIntel'; // isMacOS
+}
+function supportsSafariPush() {
+ return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||
+ isMacOSSafariInIframe();
+}
+// Does the browser support the standard Push API
+function supportsVapidPush() {
+ return typeof PushSubscriptionOptions !== 'undefined' &&
+ PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');
+}
+/* E N D */
+function handleOnError() {
+ isOneSignalScriptFailed = true;
+}
+function addSDKScript() {
+ const script = document.createElement('script');
+ script.id = ONESIGNAL_SDK_ID;
+ script.defer = true;
+ script.src = ONE_SIGNAL_SCRIPT_SRC;
+ // Always resolve whether or not the script is successfully initialized.
+ // This is important for users who may block cdn.onesignal.com w/ adblock.
+ script.onerror = () => {
+ handleOnError();
+ };
+ document.head.appendChild(script);
+}
+export class OneSignal {
+ constructor() {
+ this.User = UserNamespace;
+ this.Session = SessionNamespace;
+ this.Debug = DebugNamespace;
+ this.Slidedown = SlidedownNamespace;
+ this.Notifications = NotificationsNamespace;
+ this.login = oneSignalLogin;
+ this.logout = oneSignalLogout;
+ this.setConsentGiven = oneSignalSetConsentGiven;
+ this.setConsentRequired = oneSignalSetConsentRequired;
}
- sendOutcome(outcomeName, outcomeWeight) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'sendOutcome',
- args: arguments,
- promiseResolver: resolve,
+ /* P U B L I C */
+ /**
+ * @PublicApi
+ */
+ init(options) {
+ if (isOneSignalInitialized) {
+ return Promise.reject(`OneSignal is already initialized.`);
+ }
+ if (!options || !options.appId) {
+ throw new Error('You need to provide your OneSignal appId.');
+ }
+ if (!document) {
+ return Promise.reject(`Document is not defined.`);
+ }
+ return new Promise((resolve) => {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.init(options).then(() => {
+ isOneSignalInitialized = true;
+ resolve();
});
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.sendOutcome(outcomeName, outcomeWeight)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
});
});
}
@@ -668,4 +475,4 @@ OneSignal.decorators = [
},] }
];
OneSignal.ctorParameters = () => [];
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25lc2lnbmFsLW5neC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvb25lc2lnbmFsLW5neC9zcmMvbGliL29uZXNpZ25hbC1uZ3guc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErQkEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFDM0MsTUFBTSxnQkFBZ0IsR0FBRyxlQUFlLENBQUM7QUFDekMsTUFBTSxxQkFBcUIsR0FBRyxnREFBZ0QsQ0FBQztBQUMvRSxNQUFNLHlCQUF5QixHQUFHLG1DQUFtQyxDQUFDO0FBQ3RFLE1BQU0sV0FBVyxHQUFHLEVBQUUsQ0FBQztBQXFCdkIsTUFBTSxPQUFPLFNBQVM7SUFJcEI7UUFIUSwyQkFBc0IsR0FBRyxLQUFLLENBQUM7UUFDL0IsNkJBQXdCLEdBQTZCLEVBQUUsQ0FBQztRQUloRSxtQkFBbUI7UUFFWCxpQkFBWSxHQUFHLEdBQUcsRUFBRTtZQUMxQixNQUFNLE1BQU0sR0FBRyxRQUFRLENBQUMsYUFBYSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBQ2hELE1BQU0sQ0FBQyxFQUFFLEdBQUcsZ0JBQWdCLENBQUM7WUFDN0IsTUFBTSxDQUFDLEdBQUcsR0FBRyxxQkFBcUIsQ0FBQztZQUNuQyxNQUFNLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQztZQUNwQixRQUFRLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUNwQyxDQUFDLENBQUE7UUFFTyx1QkFBa0IsR0FBR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9KTtcbiAgfVxuXG4gIHNob3dOYXRpdmVQcm9tcHQoKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgIGlmICghdGhpcy5kb2VzT25lU2lnbmFsRXhpc3QoKSkge1xuICAgICAgICB0aGlzLm5nT25lU2lnbmFsRnVuY3Rpb25RdWV1ZS5wdXNoKHtcbiAgICAgICAgICBuYW1lOiAnc2hvd05hdGl2ZVByb21wdCcsXG4gICAgICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5zaG93TmF0aXZlUHJvbXB0KClcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiByZWplY3QoZXJyb3IpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgc2hvd1NsaWRlZG93blByb21wdChvcHRpb25zPzogQXV0b1Byb21wdE9wdGlvbnMpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgaWYgKCF0aGlzLmRvZXNPbmVTaWduYWxFeGlzdCgpKSB7XG4gICAgICAgIHRoaXMubmdPbmVTaWduYWxGdW5jdGlvblF1ZXVlLnB1c2goe1xuICAgICAgICAgIG5hbWU6ICdzaG93U2xpZGVkb3duUHJvbXB0JyxcbiAgICAgICAgICBhcmdzOiBhcmd1bWVudHMsXG4gICAgICAgICAgcHJvbWlzZVJlc29sdmVyOiBy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gICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5zaG93RW1haWxTbGlkZWRvd24ob3B0aW9ucylcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiByZWplY3QoZXJyb3IpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgc2hvd1Ntc0FuZEVtYWlsU2xpZGVkb3duKG9wdGlvbnM/OiBBdXRvUHJvbXB0T3B0aW9ucyk6IFByb21pc2U8dm9pZD4ge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICBpZiAoIXRoaXMuZG9lc09uZVNpZ25hbEV4aXN0KCkpIHtcbiAgICAgICAgdGhpcy5uZ09uZVNpZ25hbEZ1bmN0aW9uUXVldWUucHVzaCh7XG4gICAgICAgICAgbmFtZTogJ3Nob3dTbXNBbmRFbWFpbFNsaWRlZG93bicsXG4gICAgICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5zaG93U21zQW5kRW1haWxTbGlkZWRvd24ob3B0aW9ucylcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICA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IG51bGwgfCB1bmRlZmluZWQ+KSA9PiByZXNvbHZlKHZhbHVlKSlcbiAgICAgICAgICAuY2F0Y2goKGVycm9yOiBFcnJvcikgPT4gcmVqZWN0KGVycm9yKSk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIHNlbmRPdXRjb21lKG91dGNvbWVOYW1lOiBzdHJpbmcsIG91dGNvbWVXZWlnaHQ/OiBudW1iZXIgfCB1bmRlZmluZWQpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgaWYgKCF0aGlzLmRvZXNPbmVTaWduYWxFeGlzdCgpKSB7XG4gICAgICAgIHRoaXMubmdPbmVTaWduYWxGdW5jdGlvblF1ZXVlLnB1c2goe1xuICAgICAgICAgIG5hbWU6ICdzZW5kT3V0Y29tZScsXG4gICAgICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5zZW5kT3V0Y29tZShvdXRjb21lTmFtZSwgb3V0Y29tZVdlaWdodClcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiByZWplY3QoZXJyb3IpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG59XG4iXX0=
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25lc2lnbmFsLW5neC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vL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nb3V0ID0gb25lU2lnbmFsTG9nb3V0O1xuXHRzZXRDb25zZW50R2l2ZW4gPSBvbmVTaWduYWxTZXRDb25zZW50R2l2ZW47XG5cdHNldENvbnNlbnRSZXF1aXJlZCA9IG9uZVNpZ25hbFNldENvbnNlbnRSZXF1aXJlZDtcbn1cbiJdfQ==
\ No newline at end of file
diff --git a/fesm2015/onesignal-ngx.js b/fesm2015/onesignal-ngx.js
index d3ec479..83c353a 100644
--- a/fesm2015/onesignal-ngx.js
+++ b/fesm2015/onesignal-ngx.js
@@ -1,663 +1,470 @@
import * as i0 from '@angular/core';
import { Injectable, Component, NgModule } from '@angular/core';
-const ONESIGNAL_SDK_ID = 'onesignal-sdk';
-const ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/OneSignalSDK.js';
-const ONESIGNAL_NOT_SETUP_ERROR = 'OneSignal is not setup correctly.';
-const MAX_TIMEOUT = 30;
-class OneSignal {
- constructor() {
- this.isOneSignalInitialized = false;
- this.ngOneSignalFunctionQueue = [];
- /* H E L P E R S */
- this.injectScript = () => {
- const script = document.createElement('script');
- script.id = ONESIGNAL_SDK_ID;
- script.src = ONE_SIGNAL_SCRIPT_SRC;
- script.async = true;
- document.head.appendChild(script);
- };
- this.doesOneSignalExist = () => {
- if (window.OneSignal) {
- return true;
- }
- return false;
- };
- this.processQueuedOneSignalFunctions = () => {
- this.ngOneSignalFunctionQueue.forEach(element => {
- const { name, args, promiseResolver } = element;
- if (!!promiseResolver) {
- this[name](...args).then((result) => {
- promiseResolver(result);
- });
- }
- else {
- window.OneSignal[name](...args);
- }
- });
- };
- this.setupOneSignalIfMissing = () => {
- if (!this.doesOneSignalExist()) {
- window.OneSignal = window.OneSignal || [];
- }
- };
- }
- /* P U B L I C */
- init(options) {
- return new Promise(resolve => {
- if (this.isOneSignalInitialized) {
- return;
- }
- this.injectScript();
- this.setupOneSignalIfMissing();
- window.OneSignal.push(() => {
- window.OneSignal.init(options);
- });
- const timeout = setTimeout(() => {
- console.error(ONESIGNAL_NOT_SETUP_ERROR);
- }, MAX_TIMEOUT * 1000);
- window.OneSignal.push(() => {
- clearTimeout(timeout);
- this.isOneSignalInitialized = true;
- this.processQueuedOneSignalFunctions();
- resolve();
- });
- });
- }
- on(event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'on',
- args: arguments,
- });
- return;
+;
+function oneSignalLogin(externalId, jwtToken) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- window.OneSignal.push(() => {
- window.OneSignal.on(event, listener);
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.login(externalId, jwtToken)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- off(event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'off',
- args: arguments,
- });
- return;
+ });
+}
+function oneSignalLogout() {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- window.OneSignal.push(() => {
- window.OneSignal.off(event, listener);
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.logout()
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- once(event, listener) {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'once',
- args: arguments,
- });
- return;
+ });
+}
+function oneSignalSetConsentGiven(consent) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
}
- window.OneSignal.push(() => {
- window.OneSignal.once(event, listener);
- });
- }
- isPushNotificationsEnabled(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'isPushNotificationsEnabled',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.isPushNotificationsEnabled(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showHttpPrompt(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showHttpPrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showHttpPrompt(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- registerForPushNotifications(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'registerForPushNotifications',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.registerForPushNotifications(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- setDefaultNotificationUrl(url) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setDefaultNotificationUrl',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setDefaultNotificationUrl(url)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- setDefaultTitle(title) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setDefaultTitle',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setDefaultTitle(title)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- getTags(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getTags(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- sendTag(key, value, callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'sendTag',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.sendTag(key, value, callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- sendTags(tags, callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'sendTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.sendTags(tags, callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.setConsentGiven(consent)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- deleteTag(tag) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'deleteTag',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.deleteTag(tag)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- deleteTags(tags, callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'deleteTags',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.deleteTags(tags, callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- addListenerForNotificationOpened(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'addListenerForNotificationOpened',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.addListenerForNotificationOpened(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- setSubscription(newSubscription) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setSubscription',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setSubscription(newSubscription)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showHttpPermissionRequest(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showHttpPermissionRequest',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showHttpPermissionRequest(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showNativePrompt() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showNativePrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showNativePrompt()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showSlidedownPrompt(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showSlidedownPrompt',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showSlidedownPrompt(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showCategorySlidedown(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showCategorySlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showCategorySlidedown(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showSmsSlidedown(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showSmsSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showSmsSlidedown(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showEmailSlidedown(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showEmailSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showEmailSlidedown(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- showSmsAndEmailSlidedown(options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'showSmsAndEmailSlidedown',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.showSmsAndEmailSlidedown(options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
- });
- }
- getNotificationPermission(onComplete) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getNotificationPermission',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getNotificationPermission(onComplete)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function oneSignalSetConsentRequired(requiresConsent) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.setConsentRequired(requiresConsent)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getUserId(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getUserId(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptPush(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptPush(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getSubscription(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getSubscription',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getSubscription(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptPushCategories(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptPushCategories(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- setEmail(email, options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setEmail',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setEmail(email, options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptSms(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptSms(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- setSMSNumber(smsNumber, options) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setSMSNumber',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setSMSNumber(smsNumber, options)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptEmail(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptEmail(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- logoutEmail() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'logoutEmail',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.logoutEmail()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownPromptSmsAndEmail(options) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.promptSmsAndEmail(options)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- logoutSMS() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'logoutSMS',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.logoutSMS()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function slidedownAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.addEventListener(event, listener);
+ });
+}
+function slidedownRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Slidedown.removeEventListener(event, listener);
+ });
+}
+function notificationsSetDefaultUrl(url) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.setDefaultUrl(url)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- setExternalUserId(externalUserId, authHash) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'setExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.setExternalUserId(externalUserId, authHash)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function notificationsSetDefaultTitle(title) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.setDefaultTitle(title)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- removeExternalUserId() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'removeExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.removeExternalUserId()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function notificationsRequestPermission() {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.requestPermission()
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getExternalUserId() {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getExternalUserId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getExternalUserId()
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function notificationsAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.addEventListener(event, listener);
+ });
+}
+function notificationsRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Notifications.removeEventListener(event, listener);
+ });
+}
+function sessionSendOutcome(outcomeName, outcomeWeight) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- provideUserConsent(consent) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'provideUserConsent',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.provideUserConsent(consent)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function sessionSendUniqueOutcome(outcomeName) {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Session.sendUniqueOutcome(outcomeName)
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getEmailId(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getEmailId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getEmailId(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function userAddAlias(label, id) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addAlias(label, id);
+ });
+}
+function userAddAliases(aliases) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addAliases(aliases);
+ });
+}
+function userRemoveAlias(label) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeAlias(label);
+ });
+}
+function userRemoveAliases(labels) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeAliases(labels);
+ });
+}
+function userAddEmail(email) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addEmail(email);
+ });
+}
+function userRemoveEmail(email) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeEmail(email);
+ });
+}
+function userAddSms(smsNumber) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addSms(smsNumber);
+ });
+}
+function userRemoveSms(smsNumber) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeSms(smsNumber);
+ });
+}
+function userAddTag(key, value) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addTag(key, value);
+ });
+}
+function userAddTags(tags) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.addTags(tags);
+ });
+}
+function userRemoveTag(key) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeTag(key);
+ });
+}
+function userRemoveTags(keys) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.removeTags(keys);
+ });
+}
+function pushSubscriptionOptIn() {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.PushSubscription.optIn()
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
- }
- getSMSId(callback) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'getSMSId',
- args: arguments,
- promiseResolver: resolve,
- });
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.getSMSId(callback)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
- });
+ });
+}
+function pushSubscriptionOptOut() {
+ return new Promise((resolve, reject) => {
+ var _a;
+ if (isOneSignalScriptFailed) {
+ reject();
+ }
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.PushSubscription.optOut()
+ .then((value) => resolve(value))
+ .catch((error) => reject(error));
});
+ });
+}
+function pushSubscriptionAddEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.PushSubscription.addEventListener(event, listener);
+ });
+}
+function pushSubscriptionRemoveEventListener(event, listener) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.User.PushSubscription.removeEventListener(event, listener);
+ });
+}
+function debugSetLogLevel(logLevel) {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.Debug.setLogLevel(logLevel);
+ });
+}
+const PushSubscriptionNamespace = {
+ get id() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.id; },
+ get token() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.token; },
+ get optedIn() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.optedIn; },
+ optIn: pushSubscriptionOptIn,
+ optOut: pushSubscriptionOptOut,
+ addEventListener: pushSubscriptionAddEventListener,
+ removeEventListener: pushSubscriptionRemoveEventListener,
+};
+const UserNamespace = {
+ addAlias: userAddAlias,
+ addAliases: userAddAliases,
+ removeAlias: userRemoveAlias,
+ removeAliases: userRemoveAliases,
+ addEmail: userAddEmail,
+ removeEmail: userRemoveEmail,
+ addSms: userAddSms,
+ removeSms: userRemoveSms,
+ addTag: userAddTag,
+ addTags: userAddTags,
+ removeTag: userRemoveTag,
+ removeTags: userRemoveTags,
+ PushSubscription: PushSubscriptionNamespace,
+};
+const SessionNamespace = {
+ sendOutcome: sessionSendOutcome,
+ sendUniqueOutcome: sessionSendUniqueOutcome,
+};
+const DebugNamespace = {
+ setLogLevel: debugSetLogLevel,
+};
+const SlidedownNamespace = {
+ promptPush: slidedownPromptPush,
+ promptPushCategories: slidedownPromptPushCategories,
+ promptSms: slidedownPromptSms,
+ promptEmail: slidedownPromptEmail,
+ promptSmsAndEmail: slidedownPromptSmsAndEmail,
+ addEventListener: slidedownAddEventListener,
+ removeEventListener: slidedownRemoveEventListener,
+};
+const NotificationsNamespace = {
+ get permissionNative() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.Notifications) === null || _b === void 0 ? void 0 : _b.permissionNative) !== null && _c !== void 0 ? _c : 'default'; },
+ get permission() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.Notifications) === null || _b === void 0 ? void 0 : _b.permission) !== null && _c !== void 0 ? _c : false; },
+ setDefaultUrl: notificationsSetDefaultUrl,
+ setDefaultTitle: notificationsSetDefaultTitle,
+ isPushSupported,
+ requestPermission: notificationsRequestPermission,
+ addEventListener: notificationsAddEventListener,
+ removeEventListener: notificationsRemoveEventListener,
+};
+/**
+ * @PublicApi
+ */
+function isPushSupported() {
+ return isPushNotificationsSupported();
+}
+const ONESIGNAL_SDK_ID = 'onesignal-sdk';
+const ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';
+// true if the script is successfully loaded from CDN.
+let isOneSignalInitialized = false;
+// true if the script fails to load from CDN. A separate flag is necessary
+// to disambiguate between a CDN load failure and a delayed call to
+// OneSignal#init.
+let isOneSignalScriptFailed = false;
+if (window) {
+ window.OneSignalDeferred = window.OneSignalDeferred || [];
+ addSDKScript();
+}
+/**
+ * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts
+ * S T A R T
+ */
+// Checks if the browser supports push notifications by checking if specific
+// classes and properties on them exist
+function isPushNotificationsSupported() {
+ return supportsVapidPush() || supportsSafariPush();
+}
+function isMacOSSafariInIframe() {
+ // Fallback detection for Safari on macOS in an iframe context
+ return window.top !== window && // isContextIframe
+ navigator.vendor === 'Apple Computer, Inc.' && // isSafari
+ navigator.platform === 'MacIntel'; // isMacOS
+}
+function supportsSafariPush() {
+ return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||
+ isMacOSSafariInIframe();
+}
+// Does the browser support the standard Push API
+function supportsVapidPush() {
+ return typeof PushSubscriptionOptions !== 'undefined' &&
+ PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');
+}
+/* E N D */
+function handleOnError() {
+ isOneSignalScriptFailed = true;
+}
+function addSDKScript() {
+ const script = document.createElement('script');
+ script.id = ONESIGNAL_SDK_ID;
+ script.defer = true;
+ script.src = ONE_SIGNAL_SCRIPT_SRC;
+ // Always resolve whether or not the script is successfully initialized.
+ // This is important for users who may block cdn.onesignal.com w/ adblock.
+ script.onerror = () => {
+ handleOnError();
+ };
+ document.head.appendChild(script);
+}
+class OneSignal {
+ constructor() {
+ this.User = UserNamespace;
+ this.Session = SessionNamespace;
+ this.Debug = DebugNamespace;
+ this.Slidedown = SlidedownNamespace;
+ this.Notifications = NotificationsNamespace;
+ this.login = oneSignalLogin;
+ this.logout = oneSignalLogout;
+ this.setConsentGiven = oneSignalSetConsentGiven;
+ this.setConsentRequired = oneSignalSetConsentRequired;
}
- sendOutcome(outcomeName, outcomeWeight) {
- return new Promise((resolve, reject) => {
- if (!this.doesOneSignalExist()) {
- this.ngOneSignalFunctionQueue.push({
- name: 'sendOutcome',
- args: arguments,
- promiseResolver: resolve,
+ /* P U B L I C */
+ /**
+ * @PublicApi
+ */
+ init(options) {
+ if (isOneSignalInitialized) {
+ return Promise.reject(`OneSignal is already initialized.`);
+ }
+ if (!options || !options.appId) {
+ throw new Error('You need to provide your OneSignal appId.');
+ }
+ if (!document) {
+ return Promise.reject(`Document is not defined.`);
+ }
+ return new Promise((resolve) => {
+ var _a;
+ (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((oneSignal) => {
+ oneSignal.init(options).then(() => {
+ isOneSignalInitialized = true;
+ resolve();
});
- return;
- }
- window.OneSignal.push(() => {
- window.OneSignal.sendOutcome(outcomeName, outcomeWeight)
- .then((value) => resolve(value))
- .catch((error) => reject(error));
});
});
}
diff --git a/fesm2015/onesignal-ngx.js.map b/fesm2015/onesignal-ngx.js.map
index 1da3856..b70c047 100644
--- a/fesm2015/onesignal-ngx.js.map
+++ b/fesm2015/onesignal-ngx.js.map
@@ -1 +1 @@
-{"version":3,"file":"onesignal-ngx.js","sources":["../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts","../../../projects/onesignal-ngx/src/public-api.ts","../../../projects/onesignal-ngx/src/onesignal-ngx.ts"],"sourcesContent":["type Action = (item: T) => void;\ninterface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }\ninterface RegisterOptions { modalPrompt?: boolean; httpPermissionRequest?: boolean; slidedown?: boolean; autoAccept?: boolean }\ninterface SetSMSOptions { identifierAuthHash?: string; }\ninterface SetEmailOptions { identifierAuthHash?: string; emailAuthHash?: string; }\ninterface TagsObject { [key: string]: T; }\ninterface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }\ninterface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }\ninterface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/OneSignalSDK.js';\nconst ONESIGNAL_NOT_SETUP_ERROR = 'OneSignal is not setup correctly.';\nconst MAX_TIMEOUT = 30;\n\ndeclare global {\n interface Window {\n OneSignal: any;\n }\n}\n\ninterface IOneSignalFunctionCall {\n name: string;\n args: IArguments;\n promiseResolver?: Function;\n}\n\ninterface IOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignal {\n private isOneSignalInitialized = false;\n private ngOneSignalFunctionQueue: IOneSignalFunctionCall[] = [];\n\n constructor() { }\n\n /* H E L P E R S */\n\n private injectScript = () => {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n script.async = true;\n document.head.appendChild(script);\n }\n\n private doesOneSignalExist = () => {\n if (window.OneSignal) {\n return true;\n }\n return false;\n }\n\n private processQueuedOneSignalFunctions = () => {\n this.ngOneSignalFunctionQueue.forEach(element => {\n const { name, args, promiseResolver } = element;\n\n if (!!promiseResolver) {\n (this as IOneSignal)[name](...args).then((result: any) => {\n promiseResolver(result);\n });\n } else {\n window.OneSignal[name](...args);\n }\n });\n }\n\n private setupOneSignalIfMissing = () => {\n if (!this.doesOneSignalExist()) {\n window.OneSignal = window.OneSignal || [];\n }\n }\n\n /* P U B L I C */\n\n init(options: IInitObject): Promise {\n return new Promise(resolve => {\n if (this.isOneSignalInitialized) {\n return;\n }\n\n this.injectScript();\n this.setupOneSignalIfMissing();\n window.OneSignal.push(() => {\n window.OneSignal.init(options);\n });\n\n const timeout = setTimeout(() => {\n console.error(ONESIGNAL_NOT_SETUP_ERROR);\n }, MAX_TIMEOUT * 1_000);\n\n window.OneSignal.push(() => {\n clearTimeout(timeout);\n this.isOneSignalInitialized = true;\n this.processQueuedOneSignalFunctions();\n resolve();\n });\n });\n }\n\n\n on(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'on',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.on(event, listener);\n });\n }\n\n off(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'off',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.off(event, listener);\n });\n }\n\n once(event: string, listener: (eventData?: any) => void): void {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'once',\n args: arguments,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.once(event, listener);\n });\n }\n\n isPushNotificationsEnabled(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'isPushNotificationsEnabled',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.isPushNotificationsEnabled(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showHttpPrompt(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showHttpPrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showHttpPrompt(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n registerForPushNotifications(options?: RegisterOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'registerForPushNotifications',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.registerForPushNotifications(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setDefaultNotificationUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setDefaultNotificationUrl',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setDefaultNotificationUrl(url)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setDefaultTitle',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setDefaultTitle(title)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getTags(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getTags(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendTag(key: string, value: any, callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendTag',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendTag(key, value, callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendTags(tags: TagsObject, callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendTags(tags, callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n deleteTag(tag: string): Promise> {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'deleteTag',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.deleteTag(tag)\n .then((value: Promise>) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n deleteTags(tags: Array, callback?: Action>): Promise> {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'deleteTags',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.deleteTags(tags, callback)\n .then((value: Promise>) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n addListenerForNotificationOpened(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'addListenerForNotificationOpened',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.addListenerForNotificationOpened(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setSubscription(newSubscription: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setSubscription',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setSubscription(newSubscription)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showHttpPermissionRequest(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showHttpPermissionRequest',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showHttpPermissionRequest(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showNativePrompt(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showNativePrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showNativePrompt()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSlidedownPrompt(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSlidedownPrompt',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSlidedownPrompt(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showCategorySlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showCategorySlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showCategorySlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSmsSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSmsSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSmsSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showEmailSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showEmailSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showEmailSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n showSmsAndEmailSlidedown(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'showSmsAndEmailSlidedown',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.showSmsAndEmailSlidedown(options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getNotificationPermission(onComplete?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getNotificationPermission',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getNotificationPermission(onComplete)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getUserId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getUserId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getSubscription(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getSubscription',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getSubscription(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setEmail(email: string, options?: SetEmailOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setEmail',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setEmail(email, options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setSMSNumber(smsNumber: string, options?: SetSMSOptions): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setSMSNumber',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setSMSNumber(smsNumber, options)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n logoutEmail(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'logoutEmail',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.logoutEmail()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n logoutSMS(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'logoutSMS',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.logoutSMS()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n setExternalUserId(externalUserId: string | undefined | null, authHash?: string): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'setExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.setExternalUserId(externalUserId, authHash)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n removeExternalUserId(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'removeExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.removeExternalUserId()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getExternalUserId(): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getExternalUserId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getExternalUserId()\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n provideUserConsent(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'provideUserConsent',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.provideUserConsent(consent)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getEmailId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getEmailId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getEmailId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n getSMSId(callback?: Action): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'getSMSId',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.getSMSId(callback)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n\n sendOutcome(outcomeName: string, outcomeWeight?: number | undefined): Promise {\n return new Promise((resolve, reject) => {\n if (!this.doesOneSignalExist()) {\n this.ngOneSignalFunctionQueue.push({\n name: 'sendOutcome',\n args: arguments,\n promiseResolver: resolve,\n });\n return;\n }\n\n window.OneSignal.push(() => {\n window.OneSignal.sendOutcome(outcomeName, outcomeWeight)\n .then((value: Promise) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n \n onesignal-ngx works!\n
\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n","/*\n * Public API Surface of onesignal-ngx\n */\n\nexport * from './lib/onesignal-ngx.service';\nexport * from './lib/onesignal-ngx.component';\nexport * from './lib/onesignal-ngx.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAgCA,MAAM,gBAAgB,GAAG,eAAe,CAAC;AACzC,MAAM,qBAAqB,GAAG,gDAAgD,CAAC;AAC/E,MAAM,yBAAyB,GAAG,mCAAmC,CAAC;AACtE,MAAM,WAAW,GAAG,EAAE,CAAC;MAqBV,SAAS;IAIpB;QAHQ,2BAAsB,GAAG,KAAK,CAAC;QAC/B,6BAAwB,GAA6B,EAAE,CAAC;;QAMxD,iBAAY,GAAG;YACrB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,MAAM,CAAC,EAAE,GAAG,gBAAgB,CAAC;YAC7B,MAAM,CAAC,GAAG,GAAG,qBAAqB,CAAC;YACnC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,C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;QACjE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;YACjC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;gBAC9B,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC;oBACjC,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,SAAS;oBACf,eAAe,EAAE,OAAO;iBACzB,CAAC,CAAC;gBACH,OAAO;aACR;YAED,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;gBACpB,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,aAAa,CAAC;qBACrD,IAAI,CAAC,CAAC,KAAoB,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;qBAC9C,KAAK,CAAC,CAAC,KAAY,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;aAC3C,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;;;;YAruBF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;;MC3CY,qBAAqB;IAEhC,iBAAiB;IAEjB,QAAQ;KACP;;;YAfF,SAAS,SAAC;gBACT,QAAQ,EAAE,yBAAyB;gBACnC,QAAQ,EAAE;;;;GAIT;aAGF;;;;MCAY,kBAAkB;;;YAN9B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;gBACrC,OAAO,EAAE,EACR;gBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;aACjC;;;ACVD;;;;ACAA;;;;;;"}
\ No newline at end of file
+{"version":3,"file":"onesignal-ngx.js","sources":["../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts","../../../projects/onesignal-ngx/src/public-api.ts","../../../projects/onesignal-ngx/src/onesignal-ngx.ts"],"sourcesContent":["interface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }\ninterface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }\ninterface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }\ninterface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }\ntype PushSubscriptionNamespaceProperties = { id: string | null | undefined; token: string | null | undefined; optedIn: boolean; };\ntype SubscriptionChangeEvent = { previous: PushSubscriptionNamespaceProperties; current: PushSubscriptionNamespaceProperties; };\ntype NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData extends NotificationAction { url: string; };\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\ntype OSNotification = { id?: string; title?: string; body?: string; data?: any; url?: string; icon?: string; image?: string; tag?: string; requireInteraction?: boolean; renotify?: true; actions?: Array; };\ntype NotificationActionButton = { action: string; title: string; icon?: string; url?: string; }\nexport type NotificationClickResult = { actionId?: string; url?: string; }\ntype NotificationEventTypeMap = { 'click': NotificationClickResult; 'foregroundWillDisplay': NotificationForegroundWillDisplayEvent; 'dismiss': OSNotificationDataPayload; 'permissionChange': boolean; 'permissionPromptDisplay': void; };\nexport type NotificationForegroundWillDisplayEvent = { notification: OSNotification; preventDefault(): void; }\ntype OSNotificationDataPayload = { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: VibratePattern; buttons?: NotificationButtonData[]; };\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tpermissionNative: NotificationPermission;\n\tpermission: boolean;\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\trequestPermission(): Promise;\n\taddEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;\n\tremoveEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n\taddTag(key: string, value: string): void;\n\taddTags(tags: { [key: string]: string }): void;\n\tremoveTag(key: string): void;\n\tremoveTags(keys: string[]): void;\n}\ninterface IOneSignalPushSubscription {\n\tid: string | null | undefined;\n\ttoken: string | null | undefined;\n\toptedIn: boolean | undefined;\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction userAddTag(key: string, value: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addTag(key, value);\n });\n}\n\nfunction userAddTags(tags: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addTags(tags);\n });\n}\n\nfunction userRemoveTag(key: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeTag(key);\n });\n}\n\nfunction userRemoveTags(keys: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeTags(keys);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\tget id(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.id },\n\tget token(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.token },\n\tget optedIn(): boolean | undefined { return window.OneSignal?.User?.PushSubscription?.optedIn },\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\taddTag: userAddTag,\n\taddTags: userAddTags,\n\tremoveTag: userRemoveTag,\n\tremoveTags: userRemoveTags,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tget permissionNative(): NotificationPermission { return window.OneSignal?.Notifications?.permissionNative ?? 'default'; },\n\tget permission(): boolean { return window.OneSignal?.Notifications?.permission ?? false; },\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nif (window) {\n window.OneSignalDeferred = window.OneSignalDeferred || [];\n addSDKScript();\n}\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n OneSignal?: IOneSignalOneSignal;\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n \n onesignal-ngx works!\n
\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n","/*\n * Public API Surface of onesignal-ngx\n */\n\nexport * from './lib/onesignal-ngx.service';\nexport * from './lib/onesignal-ngx.component';\nexport * from './lib/onesignal-ngx.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAO4E,CAAC;AA8F7E,SAAS,cAAc,CAAC,UAAkB,EAAE,QAAiB;IAC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B,QAAQ;KACP;;;YAfF,SAAS,SAAC;gBACT,QAAQ,EAAE,yBAAyB;gBACnC,QAAQ,EAAE;;;;GAIT;aAGF;;;;MCAY,kBAAkB;;;YAN9B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;gBACrC,OAAO,EAAE,EACR;gBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;aACjC;;;ACVD;;;;ACAA;;;;;;"}
\ No newline at end of file
diff --git a/lib/onesignal-ngx.service.d.ts b/lib/onesignal-ngx.service.d.ts
index 9de622f..0436317 100644
--- a/lib/onesignal-ngx.service.d.ts
+++ b/lib/onesignal-ngx.service.d.ts
@@ -1,25 +1,8 @@
-declare type Action = (item: T) => void;
interface AutoPromptOptions {
force?: boolean;
forceSlidedownOverNative?: boolean;
slidedownPromptOptions?: IOneSignalAutoPromptOptions;
}
-interface RegisterOptions {
- modalPrompt?: boolean;
- httpPermissionRequest?: boolean;
- slidedown?: boolean;
- autoAccept?: boolean;
-}
-interface SetSMSOptions {
- identifierAuthHash?: string;
-}
-interface SetEmailOptions {
- identifierAuthHash?: string;
- emailAuthHash?: string;
-}
-interface TagsObject {
- [key: string]: T;
-}
interface IOneSignalAutoPromptOptions {
force?: boolean;
forceSlidedownOverNative?: boolean;
@@ -39,6 +22,69 @@ interface IOneSignalTagCategory {
label: string;
checked?: boolean;
}
+declare type PushSubscriptionNamespaceProperties = {
+ id: string | null | undefined;
+ token: string | null | undefined;
+ optedIn: boolean;
+};
+declare type SubscriptionChangeEvent = {
+ previous: PushSubscriptionNamespaceProperties;
+ current: PushSubscriptionNamespaceProperties;
+};
+declare type NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';
+interface NotificationButtonData extends NotificationAction {
+ url: string;
+}
+declare type SlidedownEventName = 'slidedownShown';
+declare type OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;
+declare type OSNotification = {
+ id?: string;
+ title?: string;
+ body?: string;
+ data?: any;
+ url?: string;
+ icon?: string;
+ image?: string;
+ tag?: string;
+ requireInteraction?: boolean;
+ renotify?: true;
+ actions?: Array;
+};
+declare type NotificationActionButton = {
+ action: string;
+ title: string;
+ icon?: string;
+ url?: string;
+};
+export declare type NotificationClickResult = {
+ actionId?: string;
+ url?: string;
+};
+declare type NotificationEventTypeMap = {
+ 'click': NotificationClickResult;
+ 'foregroundWillDisplay': NotificationForegroundWillDisplayEvent;
+ 'dismiss': OSNotificationDataPayload;
+ 'permissionChange': boolean;
+ 'permissionPromptDisplay': void;
+};
+export declare type NotificationForegroundWillDisplayEvent = {
+ notification: OSNotification;
+ preventDefault(): void;
+};
+declare type OSNotificationDataPayload = {
+ id: string;
+ content: string;
+ heading?: string;
+ url?: string;
+ data?: object;
+ rr?: string;
+ icon?: string;
+ image?: string;
+ tag?: string;
+ badge?: string;
+ vibrate?: VibratePattern;
+ buttons?: NotificationButtonData[];
+};
interface IInitObject {
appId: string;
subdomainName?: string;
@@ -61,58 +107,103 @@ interface IInitObject {
allowLocalhostAsSecureOrigin?: boolean;
[key: string]: any;
}
+interface IOneSignalOneSignal {
+ Slidedown: IOneSignalSlidedown;
+ Notifications: IOneSignalNotifications;
+ Session: IOneSignalSession;
+ User: IOneSignalUser;
+ Debug: IOneSignalDebug;
+ login(externalId: string, jwtToken?: string): Promise;
+ logout(): Promise;
+ init(options: IInitObject): Promise;
+ setConsentGiven(consent: boolean): Promise;
+ setConsentRequired(requiresConsent: boolean): Promise