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..cfd6582
--- /dev/null
+++ b/MigrationGuide.md
@@ -0,0 +1,244 @@
+
+# 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 | Property/Function | 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. | |
+| | `permission` | Returns true if your site has permission to display notifications. | |
+| | `permissionNative` | Returns browser's native notification permission status; `"default"`(end-user has not accept or decided yet), `"granted"`, or `"denied"`. | |
+| `sync` | `addEventListener()` | Adds an event listener for the following events:
- `click`
- `foregroundWillDisplay`
- `dismiss`
- `permissionPromptDisplay`
- `permissionChange`*
* argument type: bool | - `
- `(arg:
- `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 `change` event. | - `event` ("change")
- `listener` ((change: SubscriptionChangeEvent) => void) |
+| `sync` | `removeEventListener()` | Removes an event listener for the `change` event. | - `event` ("change")
- `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
+* HTTP environments are no longer supported.
+* AMP environments are not supported.
+* Identity verification not available yet, coming soon.
+
+# 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..c56d82c 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)
+> Upgrading from Version 1?
+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. |
+
\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..99fdc3a 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,IAAKF,EAAG,OAAOF,EACf,IAAmBK,EAAYC,EAA3BC,EAAIL,EAAEM,KAAKR,GAAOS,EAAK,GAC3B,IACI,WAAc,IAANR,GAAgBA,KAAM,MAAQI,EAAIE,EAAEG,QAAQC,MAAMF,EAAGG,KAAKP,EAAEQ,OAExE,MAAOC,GAASR,EAAI,CAAEQ,MAAOA,WAEzB,IACQT,IAAMA,EAAEM,OAAST,EAAIK,EAAU,SAAIL,EAAEM,KAAKD,WAExC,GAAID,EAAG,MAAMA,EAAEQ,OAE7B,OAAOL,WAIKM,IACZ,IAAK,IAAIN,EAAK,GAAIF,EAAI,EAAGA,EAAIS,UAAUC,OAAQV,IAC3CE,EAAKA,EAAGS,OAAOnB,EAAOiB,UAAUT,KACpC,OAAOE,EAyDcZ,OAAOC,OCjLhC,iBA4BE,SAAAqB,IAAA,IAAAC,EAAAC,KAHQA,KAAAC,wBAAyB,EACzBD,KAAAE,yBAAqD,GAMrDF,KAAAG,aAAe,WACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,GAlCc,gBAmCrBH,EAAOI,IAlCmB,iDAmC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C,EAAKa,qBASVC,OAAOf,UAAUP,MAAK,WACpBsB,OAAOf,UAAUwF,SAAS7C,GACvBpB,MAAK,SAAC7B,GAA8C,OAAAqC,EAAQrC,MAC5DmD,OAAM,SAAClD,GAAiB,OAAAiD,EAAOjD,SAXlCM,EAAKG,yBAAyBX,KAAK,CACjC0B,KAAM,WACNC,KAAMvB,UACNwB,gBAAiBU,QAazB/B,EAAA2B,UAAA8D,YAAA,SAAYC,EAAqBC,GAAjC,IAAA1F,EAAAC,KACE,OAAO,IAAI4B,SAAQ,SAACC,EAASa,GACtB3C,EAAKa,qBASVC,OAAOf,UAAUP,MAAK,WACpBsB,OAAOf,UAAUyF,YAAYC,EAAaC,GACvCpE,MAAK,SAAC7B,GAAyB,OAAAqC,EAAQrC,MACvCmD,OAAM,SAAClD,GAAiB,OAAAiD,EAAOjD,SAXlCM,EAAKG,yBAAyBX,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\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":"umBA4MA,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,OAAO,IAAId,SAAQ,SAACC,EAASC,SACvBC,GACFD,IAGsB,QAAxBE,EAAAC,OAAOC,yBAAiB,IAAAF,GAAAA,EAAEG,MAAK,SAACC,GAC9BA,EAAUO,SACPL,MAAK,SAACC,GAAe,OAAAV,EAAQU,MAC7BC,OAAM,SAACC,GAAiB,OAAAX,EAAOW,YAKxC,SAASG,EAAyBC,GAChC,OAAO,IAAIjB,SAAQ,SAACC,EAASC,SACvBC,GACFD,IAGsB,QAAxBE,EAAAC,OAAOC,yBAAiB,IAAAF,GAAAA,EAAEG,MAAK,SAACC,GAC9BA,EAAUU,gBAAgBD,GACvBP,MAAK,SAACC,GAAe,OAAAV,EAAQU,MAC7BC,OAAM,SAACC,GAAiB,OAAAX,EAAOW,YAKxC,SAASM,EAA4BC,GACnC,OAAO,IAAIpB,SAAQ,SAACC,EAASC,SACvBC,GACFD,IAGsB,QAAxBE,EAAAC,OAAOC,yBAAiB,IAAAF,GAAAA,EAAEG,MAAK,SAACC,GAC9BA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IAuCjDwF,EAASI,SAASC,cAAc,WAC/B1E,GAAKsE,EACZD,EAAOM,OAAQ,EACfN,EAAOO,IAAML,EAIbF,EAAOQ,QAAU,WAXjBnG,GAA0B,GAe1B+F,SAASK,KAAKC,YAAYV,qBAwB1B,SAAA9C,IA8BDyD,KAAA/E,KAAOJ,EACPmF,KAAA5C,QAAUJ,EACVgD,KAAAvC,MAAQH,EACR0C,KAAAnC,UAAYH,EACZsC,KAAA5B,cAAgBF,EAChB8B,KAAAhG,MAAQZ,EACR4G,KAAA1F,OAASD,EACT2F,KAAAvF,gBAAkBF,EAClByF,KAAApF,mBAAqBF,SA/BpB6B,EAAAqC,UAAAqB,KAAA,SAAKrC,GACH,GAAI4B,EACF,OAAOjG,QAAQE,OAAO,qCAGxB,IAAKmE,IAAYA,EAAQsC,MACvB,MAAM,IAAIC,MAAM,6CAGlB,OAAKV,SAIE,IAAIlG,SAAc,SAACC,SACA,QAAxBG,EAAAC,OAAOC,yBAAiB,IAAAF,GAAAA,EAAEG,MAAK,SAACC,GAC9BA,EAAUkG,KAAKrC,GAAS3D,MAAK,WAC3BuF,GAAyB,EACzBhG,aAPGD,QAAQE,OAAO,iJAvB3B2G,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,kEChqBZ,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';\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\ninterface IOSNotification {\n /**\n * The OneSignal notification id;\n * - Primary id on OneSignal's REST API and dashboard\n */\n readonly notificationId: string;\n\n /**\n * Visible title text on the notification\n */\n readonly title?: string;\n\n /**\n * Visible body text on the notification\n */\n readonly body: string;\n\n /**\n * Visible icon the notification; URL format\n */\n readonly icon?: string;\n\n /**\n * Visible small badgeIcon that displays on some devices; URL format\n * Example: On Android's status bar\n */\n readonly badgeIcon?: string;\n\n /**\n * Visible image on the notification; URL format\n */\n readonly image?: string;\n\n /**\n * Visible buttons on the notification\n */\n readonly actionButtons?: IOSNotificationActionButton[];\n\n /**\n * If this value is the same as existing notification, it will replace it\n * Can be set when creating the notification with \"Web Push Topic\" on the dashboard\n * or web_push_topic from the REST API.\n */\n readonly topic?: string;\n\n /**\n * Custom object that was sent with the notification;\n * definable when creating the notification from the OneSignal REST API or dashboard\n */\n readonly additionalData?: object;\n\n /**\n * URL to open when clicking or tapping on the notification\n */\n readonly launchURL?: string;\n\n /**\n * Confirm the push was received by reporting back to OneSignal\n */\n readonly confirmDelivery: boolean;\n}\n\ninterface IOSNotificationActionButton {\n /**\n * Any unique identifier to represent which button was clicked. This is typically passed back to the service worker\n * and host page through events to identify which button was clicked.\n * e.g. 'like-button'\n */\n readonly actionId: string;\n /**\n * The notification action button's text.\n */\n readonly text: string;\n /**\n * A valid publicly reachable HTTPS URL to an image.\n */\n readonly icon?: string;\n /**\n * The URL to open the web browser to when this action button is clicked.\n */\n readonly launchURL?: string;\n}\n\ninterface NotificationClickResult {\n readonly actionId?: string;\n readonly url?: string;\n}\n\ntype NotificationEventTypeMap = {\n 'click': NotificationClickEvent;\n 'foregroundWillDisplay': NotificationForegroundWillDisplayEvent;\n 'dismiss': NotificationDismissEvent;\n 'permissionChange': boolean;\n 'permissionPromptDisplay': void;\n}\n\ninterface NotificationForegroundWillDisplayEvent {\n readonly notification: IOSNotification;\n preventDefault(): void;\n}\n\ninterface NotificationDismissEvent {\n notification: IOSNotification;\n}\n\ninterface NotificationClickEvent {\n readonly notification: IOSNotification;\n readonly result: NotificationClickResult;\n}\n\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 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..00100b5 100644 --- a/esm2015/lib/onesignal-ngx.service.js +++ b/esm2015/lib/onesignal-ngx.service.js @@ -1,662 +1,468 @@ -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 +474,4 @@ OneSignal.decorators = [ },] } ]; OneSignal.ctorParameters = () => []; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25lc2lnbmFsLW5neC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvb25lc2lnbmFsLW5neC9zcmMvbGliL29uZXNpZ25hbC1uZ3guc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErQkEsT0FBTyxF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2goe1xuICAgICAgICAgIG5hbWU6ICdzZXREZWZhdWx0Tm90aWZpY2F0aW9uVXJsJyxcbiAgICAgICAgICBhcmdzOiBhcmd1bWVudHMsXG4gICAgICAgICAgcHJvbWlzZVJlc29sdmVyOiByZXNvbHZlLFxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICB3aW5kb3cuT25lU2lnbmFsLnB1c2goKCkgPT4ge1xuICAgICAgICB3aW5kb3cuT25lU2lnbmFsLnNldERlZmF1bHROb3RpZmljYXRpb25VcmwodXJsKVxuICAgICAgICAgIC50aGVuKCh2YWx1ZTogUHJvbWlzZTx2b2lkPikgPT4gcmVzb2x2ZSh2YWx1ZSkpXG4gICAgICAgICAgLmNhdGNoKChlcnJvcjogRXJyb3IpID0+IHJlamVjdChlcnJvcikpO1xuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICBzZXREZWZhdWx0VGl0bGUodGl0bGU6IHN0cmluZyk6IFByb21pc2U8dm9pZD4ge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICBpZiAoIXRoaXMuZG9lc09uZVNpZ25hbEV4aXN0KCkpIHtcbiAgICAgICAgdGhpcy5uZ09uZVNpZ25hbEZ1bmN0aW9uUXVldWUucHVzaCh7XG4gICAgICAgICAgbmFtZTogJ3NldERlZmF1bHRUaXRsZScsXG4gICAgICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5zZXREZWZhdWx0VGl0bGUodGl0bGUpXG4gICAgICAgICAgLnRoZW4oKHZhbHVlOiBQcm9taXNlPHZvaWQ+KSA9PiByZ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IHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5zaG93TmF0aXZlUHJvbXB0KClcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiByZWplY3QoZXJyb3IpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgc2hvd1NsaWRlZG93blByb21wdChvcHRpb25zPzogQXV0b1Byb21wdE9wdGlvbnMpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgaWYgKCF0aGlzLmRvZXNPbmVTaWduYWxFeGlzdCgpKSB7XG4gICAgICAgIHRoaXMubmdPbmVTaWduYWxGdW5jdGlvblF1ZXVlLnB1c2goe1xuICAgICAgICAgIG5hbWU6ICdzaG93U2xpZGVkb3duUHJvbXB0JyxcbiAgICAgICAgICBhcmdzOiBhcmd1bWVudHMsXG4gICAgICAgICAgcHJvbWlzZVJlc29sdmVyOiByZXNvbHZlLFxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICB3aW5kb3cuT25lU2lnbmFsLnB1c2goKCkgPT4ge1xuICAgICAgICB3aW5kb3cuT25lU2lnbmFsLnNob3dTbGlkZWRvd25Qcm9tcHQob3B0aW9ucylcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiByZWplY3QoZXJyb3IpKTtcbiAgICAgIH0pO1x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yxcbiAgICAgICAgICBhcmdzOiBhcmd1bWVudHMsXG4gICAgICAgICAgcHJvbWlzZVJlc29sdmVyOiByZXNvbHZlLFxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICB3aW5kb3cuT25lU2lnbmFsLnB1c2goKCkgPT4ge1xuICAgICAgICB3aW5kb3cuT25lU2lnbmFsLnNob3dTbXNTbGlkZWRvd24ob3B0aW9ucylcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiByZWplY3QoZXJyb3IpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgc2hvd0VtYWlsU2xpZGVkb3duKG9wdGlvbnM/OiBBdXRvUHJvbXB0T3B0aW9ucyk6IFByb21pc2U8dm9pZD4ge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICBpZiAoIXRoaXMuZG9lc09uZVNpZ25hbEV4aXN0KCkpIHtcbiAgICAgICAgdGhpcy5uZ09uZVNpZ25hbEZ1bmN0aW9uUXVldWUucHVzaCh7XG4gICAgICAgICAgbmFtZTogJ3Nob3dFbWFpbFNsaWRlZG93bicsXG4gICAgICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5zaG93RW1haWxTbGlkZWRvd24ob3B0aW9ucylcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRja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csXG4gICAgICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5wcm92aWRlVXNlckNvbnNlbnQoY29uc2VudClcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiByZWplY3QoZXJyb3IpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgZ2V0RW1haWxJZChjYWxsYmFjaz86IEFjdGlvbjxzdHJpbmcgfCB1bmRlZmluZWQ+KTogUHJvbWlzZTxzdHJpbmcgfCBudWxsIHwgdW5kZWZpbmVkPiB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgIGlmICghdGhpcy5kb2VzT25lU2lnbmFsRXhpc3QoKSkge1xuICAgICAgICB0aGlzLm5nT25lU2lnbmFsRnVuY3Rpb25RdWV1ZS5wdXNoKHtcbiAgICAgICAgICBuYW1lOiAnZ2V0RW1haWxJZCcsXG4gICAgICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5nZXRFbWFpbElkKGNhbGxiYWNrKVxuICAgICAgICAgIC50aGVuKCh2YWx1ZTogUHJvbWlzZTxzdHJpbmcgfCBudWxsIHwgdW5kZWZpbmVkPikgPT4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ge1xuICAgICAgaWYgKCF0aGlzLmRvZXNPbmVTaWduYWxFeGlzdCgpKSB7XG4gICAgICAgIHRoaXMubmdPbmVTaWduYWxGdW5jdGlvblF1ZXVlLnB1c2goe1xuICAgICAgICAgIG5hbWU6ICdzZW5kT3V0Y29tZScsXG4gICAgICAgICAgYXJnczogYXJndW1lbnRzLFxuICAgICAgICAgIHByb21pc2VSZXNvbHZlcjogcmVzb2x2ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgd2luZG93Lk9uZVNpZ25hbC5wdXNoKCgpID0+IHtcbiAgICAgICAgd2luZG93Lk9uZVNpZ25hbC5zZW5kT3V0Y29tZShvdXRjb21lTmFtZSwgb3V0Y29tZVdlaWdodClcbiAgICAgICAgICAudGhlbigodmFsdWU6IFByb21pc2U8dm9pZD4pID0+IHJlc29sdmUodmFsdWUpKVxuICAgICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiByZWplY3QoZXJyb3IpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG59XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25lc2lnbmFsLW5neC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvb25lc2lnbmFsLW5neC9zcmMvbGliL29uZXNpZ25hbC1uZ3guc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0TUEsU0FBUyxjQUFjLENBQUMsVUFBa0IsRUFBRSxRQUFpQjtJQUMzRCxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFOztRQUNyQyxJQUFJLHVCQUF1QixFQUFFO1lBQzNCLE1BQU0sRUFBRSxDQUFDO1NBQ1Y7UUFFRCxNQUFBLE1BQU0sQ0FBQy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JvdyBuZXcgRXJyb3IoJ1lvdSBuZWVkIHRvIHByb3ZpZGUgeW91ciBPbmVTaWduYWwgYXBwSWQuJyk7XG4gICAgfVxuXG4gICAgaWYgKCFkb2N1bWVudCkge1xuICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KGBEb2N1bWVudCBpcyBub3QgZGVmaW5lZC5gKTtcbiAgICB9XG5cbiAgICByZXR1cm4gbmV3IFByb21pc2U8dm9pZD4oKHJlc29sdmUpID0+IHtcbiAgICAgIHdpbmRvdy5PbmVTaWduYWxEZWZlcnJlZD8ucHVzaCgob25lU2lnbmFsOiBJT25lU2lnbmFsT25lU2lnbmFsKSA9PiB7XG4gICAgICAgIG9uZVNpZ25hbC5pbml0KG9wdGlvbnMpLnRoZW4oKCkgPT4ge1xuICAgICAgICAgIGlzT25lU2lnbmFsSW5pdGlhbGl6ZWQgPSB0cnVlO1xuICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG5cdFVzZXIgPSBVc2VyTmFtZXNwYWNlO1xuXHRTZXNzaW9uID0gU2Vzc2lvbk5hbWVzcGFjZTtcblx0RGVidWcgPSBEZWJ1Z05hbWVzcGFjZTtcblx0U2xpZGVkb3duID0gU2xpZGVkb3duTmFtZXNwYWNlO1xuXHROb3RpZmljYXRpb25zID0gTm90aWZpY2F0aW9uc05hbWVzcGFjZTtcblx0bG9naW4gPSBvbmVTaWduYWxMb2dpbjtcblx0bG9nb3V0ID0gb25lU2lnbmFsTG9nb3V0O1xuXHRzZXRDb25zZW50R2l2ZW4gPSBvbmVTaWduYWxTZXRDb25zZW50R2l2ZW47XG5cdHNldENvbnNlbnRSZXF1aXJlZCA9IG9uZVNpZ25hbFNldENvbnNlbnRSZXF1aXJlZDtcbn1cbiJdfQ== \ No newline at end of file diff --git a/fesm2015/onesignal-ngx.js b/fesm2015/onesignal-ngx.js index d3ec479..28832a5 100644 --- a/fesm2015/onesignal-ngx.js +++ b/fesm2015/onesignal-ngx.js @@ -1,663 +1,469 @@ 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..d3dcb2d 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\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,CAAC;SACnC,CAAA;QAEO,uBAAkB,GAAG;YAC3B,IAAI,MAAM,CAAC,SAAS,EAAE;gBACpB,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;SACd,CAAA;QAEO,oCAA+B,GAAG;YACxC,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,OAAO;gBAC3C,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;gBAEhD,IAAI,CAAC,CAAC,eAAe,EAAE;oBAC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AS,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';\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\ninterface IOSNotification {\n /**\n * The OneSignal notification id;\n * - Primary id on OneSignal's REST API and dashboard\n */\n readonly notificationId: string;\n\n /**\n * Visible title text on the notification\n */\n readonly title?: string;\n\n /**\n * Visible body text on the notification\n */\n readonly body: string;\n\n /**\n * Visible icon the notification; URL format\n */\n readonly icon?: string;\n\n /**\n * Visible small badgeIcon that displays on some devices; URL format\n * Example: On Android's status bar\n */\n readonly badgeIcon?: string;\n\n /**\n * Visible image on the notification; URL format\n */\n readonly image?: string;\n\n /**\n * Visible buttons on the notification\n */\n readonly actionButtons?: IOSNotificationActionButton[];\n\n /**\n * If this value is the same as existing notification, it will replace it\n * Can be set when creating the notification with \"Web Push Topic\" on the dashboard\n * or web_push_topic from the REST API.\n */\n readonly topic?: string;\n\n /**\n * Custom object that was sent with the notification;\n * definable when creating the notification from the OneSignal REST API or dashboard\n */\n readonly additionalData?: object;\n\n /**\n * URL to open when clicking or tapping on the notification\n */\n readonly launchURL?: string;\n\n /**\n * Confirm the push was received by reporting back to OneSignal\n */\n readonly confirmDelivery: boolean;\n}\n\ninterface IOSNotificationActionButton {\n /**\n * Any unique identifier to represent which button was clicked. This is typically passed back to the service worker\n * and host page through events to identify which button was clicked.\n * e.g. 'like-button'\n */\n readonly actionId: string;\n /**\n * The notification action button's text.\n */\n readonly text: string;\n /**\n * A valid publicly reachable HTTPS URL to an image.\n */\n readonly icon?: string;\n /**\n * The URL to open the web browser to when this action button is clicked.\n */\n readonly launchURL?: string;\n}\n\ninterface NotificationClickResult {\n readonly actionId?: string;\n readonly url?: string;\n}\n\ntype NotificationEventTypeMap = {\n 'click': NotificationClickEvent;\n 'foregroundWillDisplay': NotificationForegroundWillDisplayEvent;\n 'dismiss': NotificationDismissEvent;\n 'permissionChange': boolean;\n 'permissionPromptDisplay': void;\n}\n\ninterface NotificationForegroundWillDisplayEvent {\n readonly notification: IOSNotification;\n preventDefault(): void;\n}\n\ninterface NotificationDismissEvent {\n notification: IOSNotification;\n}\n\ninterface NotificationClickEvent {\n readonly notification: IOSNotification;\n readonly result: NotificationClickResult;\n}\n\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 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":";;;AA4MA,SAAS,cAAc,CAAC,UAAkB,EAAE,QAAiB;IAC3D,O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AQ;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..fba4c53 100644 --- a/lib/onesignal-ngx.service.d.ts +++ b/lib/onesignal-ngx.service.d.ts @@ -1,25 +1,8 @@ -declare type Action