diff --git a/bundles/onesignal-ngx.umd.js b/bundles/onesignal-ngx.umd.js index d19a29a..5117cd3 100644 --- a/bundles/onesignal-ngx.umd.js +++ b/bundles/onesignal-ngx.umd.js @@ -336,6 +336,9 @@ }); } var PushSubscriptionNamespace = { + get id() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.id; }, + get token() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.token; }, + get optedIn() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.optedIn; }, optIn: pushSubscriptionOptIn, optOut: pushSubscriptionOptOut, addEventListener: pushSubscriptionAddEventListener, diff --git a/bundles/onesignal-ngx.umd.js.map b/bundles/onesignal-ngx.umd.js.map index 1bf63c1..420b79a 100644 --- a/bundles/onesignal-ngx.umd.js.map +++ b/bundles/onesignal-ngx.umd.js.map @@ -1 +1 @@ -{"version":3,"file":"onesignal-ngx.umd.js","sources":["../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts","../../../projects/onesignal-ngx/src/public-api.ts","../../../projects/onesignal-ngx/src/onesignal-ngx.ts"],"sourcesContent":["type Action = (item: T) => void;\ninterface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }\ninterface 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' | 'willDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData { action?: string; title?: string; icon?: string; url?: string; }\ninterface StructuredNotification { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: string; buttons?: NotificationButtonData[]; }\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\tgetPermissionStatus(onComplete: Action): Promise;\n\trequestPermission(): Promise;\n\taddEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n\tremoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n}\ninterface IOneSignalPushSubscription {\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsGetPermissionStatus(onComplete: Action): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.getPermissionStatus(onComplete)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsAddEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsAddEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsAddEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsRemoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\tgetPermissionStatus: notificationsGetPermissionStatus,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nwindow.OneSignalDeferred = window.OneSignalDeferred || [];\n\naddSDKScript();\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n

\n onesignal-ngx works!\n

\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n","/*\n * Public API Surface of onesignal-ngx\n */\n\nexport * from './lib/onesignal-ngx.service';\nexport * from './lib/onesignal-ngx.component';\nexport * from './lib/onesignal-ngx.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Injectable","Component","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAyFA,SAAS,cAAc,CAAC,UAAkB,EAAE,QAAiB;QAC3D,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;;YACjC,IAAI,uBAAuB,EAAE;gBAC3B,MAAM,EAAE,CAAC;aACV;YAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,UAAC,SAA8B;gBAC5D,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC;qBAClC,IAAI,CAAC,UAAC,KAAU,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,GAAA,CAAC;qBACpC,KAAK,CAAC,UAAC,KAAY,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,GAAA,CAAC,CAAC;aAC3C,EAAE;SACJ,CAAC,CAAC;IACL,CAAC;IAED,SAAS,eAAe;QACtB,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;;YACjC,IAAI,uBAAuB,EAAE;gBAC3B,MAAM,EAAE,CAAC;aACV;YAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,UAAC,SAA8B;gBAC5D,SAAS,CAAC,MAAM,EAAE;qBACf,IAAI,CAAC,UAAC,KAAU,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,GAAA,CAAC;qBACpC,KAAK,CAAC,UAAC,K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AR;SACC;;;;gBAfFC,YAAS,SAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,QAAQ,EAAE,qDAIT;iBAGF;;;;;QCAD;;;;;gBANCC,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;iBACjC;;;ICVD;;;;ICAA;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"onesignal-ngx.umd.js","sources":["../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts","../../../projects/onesignal-ngx/src/public-api.ts","../../../projects/onesignal-ngx/src/onesignal-ngx.ts"],"sourcesContent":["type Action = (item: T) => void;\ninterface 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' | 'willDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData { action?: string; title?: string; icon?: string; url?: string; }\ninterface StructuredNotification { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: string; buttons?: NotificationButtonData[]; }\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\tgetPermissionStatus(onComplete: Action): Promise;\n\trequestPermission(): Promise;\n\taddEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n\tremoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n}\ninterface IOneSignalPushSubscription {\n\tid: string | null | undefined;\n\ttoken: string | null | undefined;\n\toptedIn: boolean | undefined;\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsGetPermissionStatus(onComplete: Action): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.getPermissionStatus(onComplete)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsAddEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsAddEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsAddEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsRemoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\tget id(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.id },\n\tget token(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.token },\n\tget optedIn(): boolean | undefined { return window.OneSignal?.User?.PushSubscription?.optedIn },\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\tgetPermissionStatus: notificationsGetPermissionStatus,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nwindow.OneSignalDeferred = window.OneSignalDeferred || [];\n\naddSDKScript();\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n OneSignal?: IOneSignalOneSignal;\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n

\n onesignal-ngx works!\n

\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n","/*\n * Public API Surface of onesignal-ngx\n */\n\nexport * from './lib/onesignal-ngx.service';\nexport * from './lib/onesignal-ngx.component';\nexport * from './lib/onesignal-ngx.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Injectable","Component","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IA4FA,SAAS,cAAc,CAAC,UAAkB,EAAE,QAAiB;QAC3D,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;;YACjC,IAAI,uBAAuB,EAAE;gBAC3B,MAAM,EAAE,CAAC;aACV;YAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,UAAC,SAA8B;gBAC5D,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC;qBAClC,IAAI,CAAC,UAAC,KAAU,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,GAAA,CAAC;qBACpC,KAAK,CAAC,UAAC,KAAY,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,GAAA,CAAC,CAAC;aAC3C,EAAE;SACJ,CAAC,CAAC;IACL,CAAC;IAED,SAAS,eAAe;QACtB,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;;YACjC,IAAI,uBAAuB,EAAE;gBAC3B,MAAM,EAAE,CAAC;aACV;YAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,UAAC,SAA8B;gBAC5D,SAAS,CAAC,MAAM,EAAE;qBACf,IAAI,CAAC,UAAC,KAAU,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,GAAA,CAAC;qBACpC,KAAK,CAAC,UAAC,KAAY,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,GAAA,CAAC,CAAC;aAC3C,EAAE;SACJ,CAAC,CAAC;IACL,CAAC;IAED,SAAS,wBAAwB,CAAC,OAAgB;QAChD,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;;YACjC,IAAI,uBAAuB,EAAE;gBAC3B,MAAM,EAAE,CAAC;aACV;YAED,MAAA,MA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AU,EAAE,MAAM;iBACnB;;;;;QCziBC;SAAiB;QAEjB,wCAAQ,GAAR;SACC;;;;gBAfFC,YAAS,SAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,QAAQ,EAAE,qDAIT;iBAGF;;;;;QCAD;;;;;gBANCC,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;iBACjC;;;ICVD;;;;ICAA;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/bundles/onesignal-ngx.umd.min.js b/bundles/onesignal-ngx.umd.min.js index b5665c7..caf7883 100644 --- a/bundles/onesignal-ngx.umd.min.js +++ b/bundles/onesignal-ngx.umd.min.js @@ -1,2 +1,2 @@ -!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("onesignal-ngx",["exports","@angular/core"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self)["onesignal-ngx"]={},n.ng.core)}(this,(function(n,e){"use strict";function i(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(i){if("default"!==i){var t=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(e,i,t.get?t:{enumerable:!0,get:function(){return n[i]}})}})),e.default=n,Object.freeze(e)}var t=i(e);function r(n,e){return new Promise((function(i,t){var r;w&&t(),null===(r=window.OneSignalDeferred)||void 0===r||r.push((function(r){r.login(n,e).then((function(n){return i(n)})).catch((function(n){return t(n)}))}))}))}function o(){return new Promise((function(n,e){var i;w&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.logout().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))}function u(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.setConsentGiven(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}function c(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.setConsentRequired(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}var s={addAlias:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.addAlias(n,e)}))},addAliases:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addAliases(n)}))},removeAlias:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeAlias(n)}))},removeAliases:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeAliases(n)}))},addEmail:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addEmail(n)}))},removeEmail:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeEmail(n)}))},addSms:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addSms(n)}))},removeSms:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeSms(n)}))},PushSubscription:{optIn:function(){return new Promise((function(n,e){var i;w&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.optIn().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},optOut:function(){return new Promise((function(n,e){var i;w&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.optOut().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.removeEventListener(n,e)}))}}},f={sendOutcome:function(n,e){return new Promise((function(i,t){var r;w&&t(),null===(r=window.OneSignalDeferred)||void 0===r||r.push((function(r){r.Session.sendOutcome(n,e).then((function(n){return i(n)})).catch((function(n){return t(n)}))}))}))},sendUniqueOutcome:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Session.sendUniqueOutcome(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}},d={setLogLevel:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.Debug.setLogLevel(n)}))}},a={promptPush:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptPush(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptPushCategories:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptPushCategories(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptSms:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptSms(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptEmail:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptEmail(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptSmsAndEmail:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptSmsAndEmail(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Slidedown.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Slidedown.removeEventListener(n,e)}))}},l={setDefaultUrl:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Notifications.setDefaultUrl(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},setDefaultTitle:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Notifications.setDefaultTitle(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},isPushSupported:function(){return"undefined"!=typeof PushSubscriptionOptions&&PushSubscriptionOptions.prototype.hasOwnProperty("applicationServerKey")||window.safari&&void 0!==window.safari.pushNotification||window.top!==window&&"Apple Computer, Inc."===navigator.vendor&&"MacIntel"===navigator.platform},getPermissionStatus:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Notifications.getPermissionStatus(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},requestPermission:function(){return new Promise((function(n,e){var i;w&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.requestPermission().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.removeEventListener(n,e)}))}};var p,v=!1,w=!1;window.OneSignalDeferred=window.OneSignalDeferred||[],(p=document.createElement("script")).id="onesignal-sdk",p.defer=!0,p.src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js",p.onerror=function(){w=!0},document.head.appendChild(p);var h=function(){function n(){this.User=s,this.Session=f,this.Debug=d,this.Slidedown=a,this.Notifications=l,this.login=r,this.logout=o,this.setConsentGiven=u,this.setConsentRequired=c}return n.prototype.init=function(n){if(v)return Promise.reject("OneSignal is already initialized.");if(!n||!n.appId)throw new Error("You need to provide your OneSignal appId.");return document?new Promise((function(e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.init(n).then((function(){v=!0,e()}))}))})):Promise.reject("Document is not defined.")},n}();h.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new h},token:h,providedIn:"root"}),h.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[]};var m=function(){function n(){}return n.prototype.ngOnInit=function(){},n}();m.decorators=[{type:e.Component,args:[{selector:"onesignal-onesignal-ngx",template:"\n

\n onesignal-ngx works!\n

\n "}]}],m.ctorParameters=function(){return[]};var g=function(){};g.decorators=[{type:e.NgModule,args:[{declarations:[m],imports:[],exports:[m]}]}],n.OneSignal=h,n.OnesignalNgxComponent=m,n.OnesignalNgxModule=g,Object.defineProperty(n,"__esModule",{value:!0})})); +!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("onesignal-ngx",["exports","@angular/core"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self)["onesignal-ngx"]={},n.ng.core)}(this,(function(n,e){"use strict";function i(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(i){if("default"!==i){var t=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(e,i,t.get?t:{enumerable:!0,get:function(){return n[i]}})}})),e.default=n,Object.freeze(e)}var t=i(e);function o(n,e){return new Promise((function(i,t){var o;w&&t(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.login(n,e).then((function(n){return i(n)})).catch((function(n){return t(n)}))}))}))}function r(){return new Promise((function(n,e){var i;w&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.logout().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))}function u(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.setConsentGiven(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}function d(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.setConsentRequired(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}var s={addAlias:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.addAlias(n,e)}))},addAliases:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addAliases(n)}))},removeAlias:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeAlias(n)}))},removeAliases:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeAliases(n)}))},addEmail:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addEmail(n)}))},removeEmail:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeEmail(n)}))},addSms:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.addSms(n)}))},removeSms:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.User.removeSms(n)}))},PushSubscription:{get id(){var n,e,i;return null===(i=null===(e=null===(n=window.OneSignal)||void 0===n?void 0:n.User)||void 0===e?void 0:e.PushSubscription)||void 0===i?void 0:i.id},get token(){var n,e,i;return null===(i=null===(e=null===(n=window.OneSignal)||void 0===n?void 0:n.User)||void 0===e?void 0:e.PushSubscription)||void 0===i?void 0:i.token},get optedIn(){var n,e,i;return null===(i=null===(e=null===(n=window.OneSignal)||void 0===n?void 0:n.User)||void 0===e?void 0:e.PushSubscription)||void 0===i?void 0:i.optedIn},optIn:function(){return new Promise((function(n,e){var i;w&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.optIn().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},optOut:function(){return new Promise((function(n,e){var i;w&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.optOut().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.User.PushSubscription.removeEventListener(n,e)}))}}},c={sendOutcome:function(n,e){return new Promise((function(i,t){var o;w&&t(),null===(o=window.OneSignalDeferred)||void 0===o||o.push((function(o){o.Session.sendOutcome(n,e).then((function(n){return i(n)})).catch((function(n){return t(n)}))}))}))},sendUniqueOutcome:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Session.sendUniqueOutcome(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))}},f={setLogLevel:function(n){var e;null===(e=window.OneSignalDeferred)||void 0===e||e.push((function(e){e.Debug.setLogLevel(n)}))}},a={promptPush:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptPush(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptPushCategories:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptPushCategories(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptSms:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptSms(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptEmail:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptEmail(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},promptSmsAndEmail:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Slidedown.promptSmsAndEmail(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Slidedown.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Slidedown.removeEventListener(n,e)}))}},l={setDefaultUrl:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Notifications.setDefaultUrl(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},setDefaultTitle:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Notifications.setDefaultTitle(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},isPushSupported:function(){return"undefined"!=typeof PushSubscriptionOptions&&PushSubscriptionOptions.prototype.hasOwnProperty("applicationServerKey")||window.safari&&void 0!==window.safari.pushNotification||window.top!==window&&"Apple Computer, Inc."===navigator.vendor&&"MacIntel"===navigator.platform},getPermissionStatus:function(n){return new Promise((function(e,i){var t;w&&i(),null===(t=window.OneSignalDeferred)||void 0===t||t.push((function(t){t.Notifications.getPermissionStatus(n).then((function(n){return e(n)})).catch((function(n){return i(n)}))}))}))},requestPermission:function(){return new Promise((function(n,e){var i;w&&e(),null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.requestPermission().then((function(e){return n(e)})).catch((function(n){return e(n)}))}))}))},addEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.addEventListener(n,e)}))},removeEventListener:function(n,e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.Notifications.removeEventListener(n,e)}))}};var v,p=!1,w=!1;window.OneSignalDeferred=window.OneSignalDeferred||[],(v=document.createElement("script")).id="onesignal-sdk",v.defer=!0,v.src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js",v.onerror=function(){w=!0},document.head.appendChild(v);var h=function(){function n(){this.User=s,this.Session=c,this.Debug=f,this.Slidedown=a,this.Notifications=l,this.login=o,this.logout=r,this.setConsentGiven=u,this.setConsentRequired=d}return n.prototype.init=function(n){if(p)return Promise.reject("OneSignal is already initialized.");if(!n||!n.appId)throw new Error("You need to provide your OneSignal appId.");return document?new Promise((function(e){var i;null===(i=window.OneSignalDeferred)||void 0===i||i.push((function(i){i.init(n).then((function(){p=!0,e()}))}))})):Promise.reject("Document is not defined.")},n}();h.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new h},token:h,providedIn:"root"}),h.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[]};var g=function(){function n(){}return n.prototype.ngOnInit=function(){},n}();g.decorators=[{type:e.Component,args:[{selector:"onesignal-onesignal-ngx",template:"\n

\n onesignal-ngx works!\n

\n "}]}],g.ctorParameters=function(){return[]};var m=function(){};m.decorators=[{type:e.NgModule,args:[{declarations:[g],imports:[],exports:[g]}]}],n.OneSignal=h,n.OnesignalNgxComponent=g,n.OnesignalNgxModule=m,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 57a77c2..d8162a9 100644 --- a/bundles/onesignal-ngx.umd.min.js.map +++ b/bundles/onesignal-ngx.umd.min.js.map @@ -1 +1 @@ -{"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","PushSubscription","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","setDefaultUrl","url","Notifications","setDefaultTitle","title","isPushSupported","PushSubscriptionOptions","prototype","hasOwnProperty","safari","pushNotification","top","navigator","vendor","platform","getPermissionStatus","onComplete","requestPermission","script","isOneSignalInitialized","document","createElement","defer","src","onerror","head","appendChild","OneSignal","this","init","appId","Error","Injectable","args","providedIn","OnesignalNgxComponent","ngOnInit","Component","selector","template","NgModule","declarations","imports","exports"],"mappings":"umBAyFA,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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BrF,GAA0B,GAe1BiF,SAASK,KAAKC,YAAYR,oBAuB1B,SAAAS,IA8BDC,KAAAlE,KAAOJ,EACPsE,KAAA3C,QAAUJ,EACV+C,KAAAtC,MAAQH,EACRyC,KAAAlC,UAAYH,EACZqC,KAAA1B,cAAgBH,EAChB6B,KAAAnF,MAAQZ,EACR+F,KAAA7E,OAASD,EACT8E,KAAA1E,gBAAkBF,EAClB4E,KAAAvE,mBAAqBF,SA/BpBwE,EAAApB,UAAAsB,KAAA,SAAKpC,GACH,GAAI0B,EACF,OAAOnF,QAAQE,OAAO,qCAGxB,IAAKuD,IAAYA,EAAQqC,MACvB,MAAM,IAAIC,MAAM,6CAGlB,OAAKX,SAIE,IAAIpF,SAAc,SAACC,SACA,QAAxBG,EAAAC,OAAOC,yBAAiB,IAAAF,GAAAA,EAAEG,MAAK,SAACC,GAC9BA,EAAUqF,KAAKpC,GAAS/C,MAAK,WAC3ByE,GAAyB,EACzBlF,aAPGD,QAAQE,OAAO,iJAvB3B8F,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,kECjiBZ,SAAAC,YAEAA,EAAA5B,UAAA6B,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":["type Action = (item: T) => void;\ninterface 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' | 'willDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData { action?: string; title?: string; icon?: string; url?: string; }\ninterface StructuredNotification { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: string; buttons?: NotificationButtonData[]; }\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\tgetPermissionStatus(onComplete: Action): Promise;\n\trequestPermission(): Promise;\n\taddEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n\tremoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n}\ninterface IOneSignalPushSubscription {\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsGetPermissionStatus(onComplete: Action): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.getPermissionStatus(onComplete)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsAddEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsAddEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsAddEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsRemoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\tgetPermissionStatus: notificationsGetPermissionStatus,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nwindow.OneSignalDeferred = window.OneSignalDeferred || [];\n\naddSDKScript();\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n

\n onesignal-ngx works!\n

\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n"]} \ No newline at end of file +{"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","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","setDefaultUrl","url","Notifications","setDefaultTitle","title","isPushSupported","PushSubscriptionOptions","prototype","hasOwnProperty","safari","pushNotification","top","navigator","vendor","platform","getPermissionStatus","onComplete","requestPermission","script","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":"umBA4FA,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,I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B1F,GAA0B,GAe1BsF,SAASK,KAAKC,YAAYR,oBAwB1B,SAAA9C,IA8BDuD,KAAAtE,KAAOJ,EACP0E,KAAA1C,QAAUJ,EACV8C,KAAArC,MAAQH,EACRwC,KAAAjC,UAAYH,EACZoC,KAAAzB,cAAgBH,EAChB4B,KAAAvF,MAAQZ,EACRmG,KAAAjF,OAASD,EACTkF,KAAA9E,gBAAkBF,EAClBgF,KAAA3E,mBAAqBF,SA/BpBsB,EAAAmC,UAAAqB,KAAA,SAAKnC,GACH,GAAI0B,EACF,OAAOxF,QAAQE,OAAO,qCAGxB,IAAK4D,IAAYA,EAAQoC,MACvB,MAAM,IAAIC,MAAM,6CAGlB,OAAKV,SAIE,IAAIzF,SAAc,SAACC,SACA,QAAxBG,EAAAC,OAAOC,yBAAiB,IAAAF,GAAAA,EAAEG,MAAK,SAACC,GAC9BA,EAAUyF,KAAKnC,GAASpD,MAAK,WAC3B8E,GAAyB,EACzBvF,aAPGD,QAAQE,OAAO,iJAvB3BkG,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,kECxiBZ,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":["type Action = (item: T) => void;\ninterface 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' | 'willDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData { action?: string; title?: string; icon?: string; url?: string; }\ninterface StructuredNotification { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: string; buttons?: NotificationButtonData[]; }\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\tgetPermissionStatus(onComplete: Action): Promise;\n\trequestPermission(): Promise;\n\taddEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n\tremoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n}\ninterface IOneSignalPushSubscription {\n\tid: string | null | undefined;\n\ttoken: string | null | undefined;\n\toptedIn: boolean | undefined;\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsGetPermissionStatus(onComplete: Action): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.getPermissionStatus(onComplete)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsAddEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsAddEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsAddEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsRemoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\tget id(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.id },\n\tget token(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.token },\n\tget optedIn(): boolean | undefined { return window.OneSignal?.User?.PushSubscription?.optedIn },\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\tgetPermissionStatus: notificationsGetPermissionStatus,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nwindow.OneSignalDeferred = window.OneSignalDeferred || [];\n\naddSDKScript();\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n OneSignal?: IOneSignalOneSignal;\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n

\n onesignal-ngx works!\n

\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n"]} \ No newline at end of file diff --git a/esm2015/lib/onesignal-ngx.service.js b/esm2015/lib/onesignal-ngx.service.js index d91b0ec..979c117 100644 --- a/esm2015/lib/onesignal-ngx.service.js +++ b/esm2015/lib/onesignal-ngx.service.js @@ -310,6 +310,9 @@ function debugSetLogLevel(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, @@ -453,4 +456,4 @@ OneSignal.decorators = [ },] } ]; OneSignal.ctorParameters = () => []; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25lc2lnbmFsLW5neC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvb25lc2lnbmFsLW5neC9zcmMvbGliL29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nbmFsRGVmZXJyZWQ/LnB1c2goKG9uZVNpZ25hbDogSU9uZVNpZ25hbE9uZVNpZ25hbCkgPT4ge1xuICAgICAgICBvbmVTaWduYWwuaW5pdChvcHRpb25zKS50aGVuKCgpID0+IHtcbiAgICAgICAgICBpc09uZVNpZ25hbEluaXRpYWxpemVkID0gdHJ1ZTtcbiAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuXHRVc2VyID0gVXNlck5hbWVzcGFjZTtcblx0U2Vzc2lvbiA9IFNlc3Npb25OYW1lc3BhY2U7XG5cdERlYnVnID0gRGVidWdOYW1lc3BhY2U7XG5cdFNsaWRlZG93biA9IFNsaWRlZG93bk5hbWVzcGFjZTtcblx0Tm90aWZpY2F0aW9ucyA9IE5vdGlmaWNhdGlvbnNOYW1lc3BhY2U7XG5cdGxvZ2luID0gb25lU2lnbmFsTG9naW47XG5cdGxvZ291dCA9IG9uZVNpZ25hbExvZ291dDtcblx0c2V0Q29uc2VudEdpdmVuID0gb25lU2lnbmFsU2V0Q29uc2VudEdpdmVuO1xuXHRzZXRDb25zZW50UmVxdWlyZWQgPSBvbmVTaWduYWxTZXRDb25zZW50UmVxdWlyZWQ7XG59XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25lc2lnbmFsLW5neC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvb25lc2lnbmFsLW5neC9zcmMvbGliL29uZXNpZ25hbC1uZ3guc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0RkEsU0FBUyxjQUFjLENBQUMsVUFBa0IsRUFBRSxRQUFpQjtJQUMzRCxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFOztRQUN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SBVc2VyTmFtZXNwYWNlO1xuXHRTZXNzaW9uID0gU2Vzc2lvbk5hbWVzcGFjZTtcblx0RGVidWcgPSBEZWJ1Z05hbWVzcGFjZTtcblx0U2xpZGVkb3duID0gU2xpZGVkb3duTmFtZXNwYWNlO1xuXHROb3RpZmljYXRpb25zID0gTm90aWZpY2F0aW9uc05hbWVzcGFjZTtcblx0bG9naW4gPSBvbmVTaWduYWxMb2dpbjtcblx0bG9nb3V0ID0gb25lU2lnbmFsTG9nb3V0O1xuXHRzZXRDb25zZW50R2l2ZW4gPSBvbmVTaWduYWxTZXRDb25zZW50R2l2ZW47XG5cdHNldENvbnNlbnRSZXF1aXJlZCA9IG9uZVNpZ25hbFNldENvbnNlbnRSZXF1aXJlZDtcbn1cbiJdfQ== \ No newline at end of file diff --git a/fesm2015/onesignal-ngx.js b/fesm2015/onesignal-ngx.js index 720173c..969d3bf 100644 --- a/fesm2015/onesignal-ngx.js +++ b/fesm2015/onesignal-ngx.js @@ -313,6 +313,9 @@ function debugSetLogLevel(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, diff --git a/fesm2015/onesignal-ngx.js.map b/fesm2015/onesignal-ngx.js.map index 1c29a30..d004c5e 100644 --- a/fesm2015/onesignal-ngx.js.map +++ b/fesm2015/onesignal-ngx.js.map @@ -1 +1 @@ -{"version":3,"file":"onesignal-ngx.js","sources":["../../../projects/onesignal-ngx/src/lib/onesignal-ngx.service.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.component.ts","../../../projects/onesignal-ngx/src/lib/onesignal-ngx.module.ts","../../../projects/onesignal-ngx/src/public-api.ts","../../../projects/onesignal-ngx/src/onesignal-ngx.ts"],"sourcesContent":["type Action = (item: T) => void;\ninterface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }\ninterface 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' | 'willDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData { action?: string; title?: string; icon?: string; url?: string; }\ninterface StructuredNotification { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: string; buttons?: NotificationButtonData[]; }\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\tgetPermissionStatus(onComplete: Action): Promise;\n\trequestPermission(): Promise;\n\taddEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n\tremoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n}\ninterface IOneSignalPushSubscription {\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsGetPermissionStatus(onComplete: Action): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.getPermissionStatus(onComplete)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsAddEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsAddEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsAddEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsRemoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\tgetPermissionStatus: notificationsGetPermissionStatus,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nwindow.OneSignalDeferred = window.OneSignalDeferred || [];\n\naddSDKScript();\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n

\n onesignal-ngx works!\n

\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n","/*\n * Public API Surface of onesignal-ngx\n */\n\nexport * from './lib/onesignal-ngx.service';\nexport * from './lib/onesignal-ngx.component';\nexport * from './lib/onesignal-ngx.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAyFA,SAAS,cAAc,CAAC,UAAkB,EAAE,QAAiB;IAC3D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;;QACjC,IAAI,uBAAuB,EAAE;YAC3B,MAAM,EAAE,CAAC;SACV;QAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,CAAC,SAA8B;YAC5D,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC;iBAClC,IAAI,CAAC,CAAC,KAAU,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;iBACpC,KAAK,CAAC,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;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":["type Action = (item: T) => void;\ninterface 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' | 'willDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';\ninterface NotificationButtonData { action?: string; title?: string; icon?: string; url?: string; }\ninterface StructuredNotification { id: string; content: string; heading?: string; url?: string; data?: object; rr?: string; icon?: string; image?: string; tag?: string; badge?: string; vibrate?: string; buttons?: NotificationButtonData[]; }\ntype SlidedownEventName = 'slidedownShown';\ntype OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;\n\ninterface IInitObject {\n appId: string;\n subdomainName?: string;\n requiresUserPrivacyConsent?: boolean;\n promptOptions?: object;\n welcomeNotification?: object;\n notifyButton?: object;\n persistNotification?: boolean;\n webhooks?: object;\n autoResubscribe?: boolean;\n autoRegister?: boolean;\n notificationClickHandlerMatch?: string;\n notificationClickHandlerAction?: string;\n serviceWorkerParam?: { scope: string };\n serviceWorkerPath?: string;\n serviceWorkerUpdaterPath?: string;\n path?: string;\n allowLocalhostAsSecureOrigin?: boolean;\n [key: string]: any;\n}\n\ninterface IOneSignalOneSignal {\n\tSlidedown: IOneSignalSlidedown;\n\tNotifications: IOneSignalNotifications;\n\tSession: IOneSignalSession;\n\tUser: IOneSignalUser;\n\tDebug: IOneSignalDebug;\n\tlogin(externalId: string, jwtToken?: string): Promise;\n\tlogout(): Promise;\n\tinit(options: IInitObject): Promise;\n\tsetConsentGiven(consent: boolean): Promise;\n\tsetConsentRequired(requiresConsent: boolean): Promise;\n}\ninterface IOneSignalNotifications {\n\tsetDefaultUrl(url: string): Promise;\n\tsetDefaultTitle(title: string): Promise;\n\tisPushSupported(): boolean;\n\tgetPermissionStatus(onComplete: Action): Promise;\n\trequestPermission(): Promise;\n\taddEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n\tremoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void;\n}\ninterface IOneSignalSlidedown {\n\tpromptPush(options?: AutoPromptOptions): Promise;\n\tpromptPushCategories(options?: AutoPromptOptions): Promise;\n\tpromptSms(options?: AutoPromptOptions): Promise;\n\tpromptEmail(options?: AutoPromptOptions): Promise;\n\tpromptSmsAndEmail(options?: AutoPromptOptions): Promise;\n\taddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n\tremoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;\n}\ninterface IOneSignalDebug {\n\tsetLogLevel(logLevel: string): void;\n}\ninterface IOneSignalSession {\n\tsendOutcome(outcomeName: string, outcomeWeight?: number): Promise;\n\tsendUniqueOutcome(outcomeName: string): Promise;\n}\ninterface IOneSignalUser {\n\tPushSubscription: IOneSignalPushSubscription;\n\taddAlias(label: string, id: string): void;\n\taddAliases(aliases: { [key: string]: string }): void;\n\tremoveAlias(label: string): void;\n\tremoveAliases(labels: string[]): void;\n\taddEmail(email: string): void;\n\tremoveEmail(email: string): void;\n\taddSms(smsNumber: string): void;\n\tremoveSms(smsNumber: string): void;\n}\ninterface IOneSignalPushSubscription {\n\tid: string | null | undefined;\n\ttoken: string | null | undefined;\n\toptedIn: boolean | undefined;\n\toptIn(): Promise;\n\toptOut(): Promise;\n\taddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n\tremoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void;\n}\n\nfunction oneSignalLogin(externalId: string, jwtToken?: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.login(externalId, jwtToken)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalLogout(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.logout()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentGiven(consent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentGiven(consent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction oneSignalSetConsentRequired(requiresConsent: boolean): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.setConsentRequired(requiresConsent)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPush(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPush(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptPushCategories(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptPushCategories(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSms(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSms(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownPromptSmsAndEmail(options?: AutoPromptOptions): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.promptSmsAndEmail(options)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction slidedownAddEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.addEventListener(event, listener);\n });\n}\n\nfunction slidedownRemoveEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Slidedown.removeEventListener(event, listener);\n });\n}\n\nfunction notificationsSetDefaultUrl(url: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultUrl(url)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsSetDefaultTitle(title: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.setDefaultTitle(title)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsGetPermissionStatus(onComplete: Action): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.getPermissionStatus(onComplete)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsRequestPermission(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.requestPermission()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction notificationsAddEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsAddEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsAddEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsAddEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.addEventListener(event, listener);\n });\n}\n\nfunction notificationsRemoveEventListener(event: 'click' | 'willDisplay' | 'dismiss', listener: (obj: StructuredNotification) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionChange', listener: (obj: { to: NotificationPermission }) => void): void;\nfunction notificationsRemoveEventListener(event: 'permissionPromptDisplay', listener: () => void): void;\n\nfunction notificationsRemoveEventListener(event: NotificationEventName, listener: (obj: any) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Notifications.removeEventListener(event, listener);\n });\n}\n\nfunction sessionSendOutcome(outcomeName: string, outcomeWeight?: number): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendOutcome(outcomeName, outcomeWeight)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction sessionSendUniqueOutcome(outcomeName: string): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Session.sendUniqueOutcome(outcomeName)\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction userAddAlias(label: string, id: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAlias(label, id);\n });\n}\n\nfunction userAddAliases(aliases: { [key: string]: string }): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addAliases(aliases);\n });\n}\n\nfunction userRemoveAlias(label: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAlias(label);\n });\n}\n\nfunction userRemoveAliases(labels: string[]): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeAliases(labels);\n });\n}\n\nfunction userAddEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addEmail(email);\n });\n}\n\nfunction userRemoveEmail(email: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeEmail(email);\n });\n}\n\nfunction userAddSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.addSms(smsNumber);\n });\n}\n\nfunction userRemoveSms(smsNumber: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.removeSms(smsNumber);\n });\n}\n\nfunction pushSubscriptionOptIn(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optIn()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionOptOut(): Promise {\n return new Promise((resolve, reject) => {\n if (isOneSignalScriptFailed) {\n reject();\n }\n\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.optOut()\n .then((value: any) => resolve(value))\n .catch((error: Error) => reject(error));\n });\n });\n}\n\nfunction pushSubscriptionAddEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.addEventListener(event, listener);\n });\n}\n\nfunction pushSubscriptionRemoveEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.User.PushSubscription.removeEventListener(event, listener);\n });\n}\n\nfunction debugSetLogLevel(logLevel: string): void {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.Debug.setLogLevel(logLevel);\n });\n}\n\nconst PushSubscriptionNamespace: IOneSignalPushSubscription = {\n\tget id(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.id },\n\tget token(): string | null | undefined { return window.OneSignal?.User?.PushSubscription?.token },\n\tget optedIn(): boolean | undefined { return window.OneSignal?.User?.PushSubscription?.optedIn },\n\toptIn: pushSubscriptionOptIn,\n\toptOut: pushSubscriptionOptOut,\n\taddEventListener: pushSubscriptionAddEventListener,\n\tremoveEventListener: pushSubscriptionRemoveEventListener,\n};\n\nconst UserNamespace: IOneSignalUser = {\n\taddAlias: userAddAlias,\n\taddAliases: userAddAliases,\n\tremoveAlias: userRemoveAlias,\n\tremoveAliases: userRemoveAliases,\n\taddEmail: userAddEmail,\n\tremoveEmail: userRemoveEmail,\n\taddSms: userAddSms,\n\tremoveSms: userRemoveSms,\n\tPushSubscription: PushSubscriptionNamespace,\n};\n\nconst SessionNamespace: IOneSignalSession = {\n\tsendOutcome: sessionSendOutcome,\n\tsendUniqueOutcome: sessionSendUniqueOutcome,\n};\n\nconst DebugNamespace: IOneSignalDebug = {\n\tsetLogLevel: debugSetLogLevel,\n};\n\nconst SlidedownNamespace: IOneSignalSlidedown = {\n\tpromptPush: slidedownPromptPush,\n\tpromptPushCategories: slidedownPromptPushCategories,\n\tpromptSms: slidedownPromptSms,\n\tpromptEmail: slidedownPromptEmail,\n\tpromptSmsAndEmail: slidedownPromptSmsAndEmail,\n\taddEventListener: slidedownAddEventListener,\n\tremoveEventListener: slidedownRemoveEventListener,\n};\n\nconst NotificationsNamespace: IOneSignalNotifications = {\n\tsetDefaultUrl: notificationsSetDefaultUrl,\n\tsetDefaultTitle: notificationsSetDefaultTitle,\n\tisPushSupported,\n\tgetPermissionStatus: notificationsGetPermissionStatus,\n\trequestPermission: notificationsRequestPermission,\n\taddEventListener: notificationsAddEventListener,\n\tremoveEventListener: notificationsRemoveEventListener,\n};\n\n/**\n * @PublicApi\n */\nfunction isPushSupported(): boolean {\n return isPushNotificationsSupported();\n}\n\nimport { Injectable } from '@angular/core';\nconst ONESIGNAL_SDK_ID = 'onesignal-sdk';\nconst ONE_SIGNAL_SCRIPT_SRC = 'https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js';\n\n// true if the script is successfully loaded from CDN.\nlet isOneSignalInitialized = false;\n// true if the script fails to load from CDN. A separate flag is necessary\n// to disambiguate between a CDN load failure and a delayed call to\n// OneSignal#init.\nlet isOneSignalScriptFailed = false;\n\nwindow.OneSignalDeferred = window.OneSignalDeferred || [];\n\naddSDKScript();\n\n/**\n * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts\n * S T A R T\n */\n\n// Checks if the browser supports push notifications by checking if specific\n// classes and properties on them exist\nfunction isPushNotificationsSupported(): boolean {\n return supportsVapidPush() || supportsSafariPush();\n}\n\nfunction isMacOSSafariInIframe(): boolean {\n // Fallback detection for Safari on macOS in an iframe context\n return window.top !== window && // isContextIframe\n navigator.vendor === 'Apple Computer, Inc.' && // isSafari\n navigator.platform === 'MacIntel'; // isMacOS\n}\n\nfunction supportsSafariPush(): boolean {\n return (window.safari && typeof window.safari.pushNotification !== 'undefined') ||\n isMacOSSafariInIframe();\n}\n\n// Does the browser support the standard Push API\nfunction supportsVapidPush(): boolean {\n return typeof PushSubscriptionOptions !== 'undefined' &&\n PushSubscriptionOptions.prototype.hasOwnProperty('applicationServerKey');\n}\n/* E N D */\n\nfunction handleOnError(): void {\n isOneSignalScriptFailed = true;\n}\n\nfunction addSDKScript(): void {\n const script = document.createElement('script');\n script.id = ONESIGNAL_SDK_ID;\n script.defer = true;\n script.src = ONE_SIGNAL_SCRIPT_SRC;\n\n // Always resolve whether or not the script is successfully initialized.\n // This is important for users who may block cdn.onesignal.com w/ adblock.\n script.onerror = () => {\n handleOnError();\n };\n\n document.head.appendChild(script);\n}\n\n\ndeclare global {\n interface Window {\n OneSignalDeferred?: OneSignalDeferredLoadedCallback[];\n OneSignal?: IOneSignalOneSignal;\n safari?: {\n pushNotification: any;\n };\n }\n}\n\ninterface IOneSignalOneSignal {\n [key: string]: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignal implements IOneSignalOneSignal {\n [key: string]: any;\n\n constructor() { }\n\n /* P U B L I C */\n\n /**\n * @PublicApi\n */\n init(options: IInitObject): Promise {\n if (isOneSignalInitialized) {\n return Promise.reject(`OneSignal is already initialized.`);\n }\n\n if (!options || !options.appId) {\n throw new Error('You need to provide your OneSignal appId.');\n }\n\n if (!document) {\n return Promise.reject(`Document is not defined.`);\n }\n\n return new Promise((resolve) => {\n window.OneSignalDeferred?.push((oneSignal: IOneSignalOneSignal) => {\n oneSignal.init(options).then(() => {\n isOneSignalInitialized = true;\n resolve();\n });\n });\n });\n }\n\n\tUser = UserNamespace;\n\tSession = SessionNamespace;\n\tDebug = DebugNamespace;\n\tSlidedown = SlidedownNamespace;\n\tNotifications = NotificationsNamespace;\n\tlogin = oneSignalLogin;\n\tlogout = oneSignalLogout;\n\tsetConsentGiven = oneSignalSetConsentGiven;\n\tsetConsentRequired = oneSignalSetConsentRequired;\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'onesignal-onesignal-ngx',\n template: `\n

\n onesignal-ngx works!\n

\n `,\n styles: [\n ]\n})\nexport class OnesignalNgxComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { OnesignalNgxComponent } from './onesignal-ngx.component';\n\n\n\n@NgModule({\n declarations: [OnesignalNgxComponent],\n imports: [\n ],\n exports: [OnesignalNgxComponent]\n})\nexport class OnesignalNgxModule { }\n","/*\n * Public API Surface of onesignal-ngx\n */\n\nexport * from './lib/onesignal-ngx.service';\nexport * from './lib/onesignal-ngx.component';\nexport * from './lib/onesignal-ngx.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AA4FA,SAAS,cAAc,CAAC,UAAkB,EAAE,QAAiB;IAC3D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;;QACjC,IAAI,uBAAuB,EAAE;YAC3B,MAAM,EAAE,CAAC;SACV;QAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,CAAC,SAA8B;YAC5D,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC;iBAClC,IAAI,CAAC,CAAC,KAAU,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;iBACpC,KAAK,CAAC,CAAC,KAAY,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SAC3C,EAAE;KACJ,CAAC,CAAC;AACL,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;;QACjC,IAAI,uBAAuB,EAAE;YAC3B,MAAM,EAAE,CAAC;SACV;QAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,CAAC,SAA8B;YAC5D,SAAS,CAAC,MAAM,EAAE;iBACf,IAAI,CAAC,CAAC,KAAU,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;iBACpC,KAAK,CAAC,CAAC,KAAY,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SAC3C,EAAE;KACJ,CAAC,CAAC;AACL,CAAC;AAED,SAAS,wBAAwB,CAAC,OAAgB;IAChD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;;QACjC,IAAI,uBAAuB,EAAE;YAC3B,MAAM,EAAE,CAAC;SACV;QAED,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,CAAC,SAA8B;YAC5D,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC;iBAC/B,IAAI,CA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AG,wBAAwB,CAAC;QAC3C,uBAAkB,GAAG,2BAA2B,CAAC;KAtC/B;;;;;IAOjB,IAAI,CAAC,OAAoB;QACvB,IAAI,sBAAsB,EAAE;YAC1B,OAAO,OAAO,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;SAC5D;QAED,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;SAC9D;QAED,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO,OAAO,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;SACnD;QAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO;;YAC/B,MAAA,MAAM,CAAC,iBAAiB,0CAAE,IAAI,CAAC,CAAC,SAA8B;gBAC5D,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;oBAC3B,sBAAsB,GAAG,IAAI,CAAC;oBAC9B,OAAO,EAAE,CAAC;iBACX,CAAC,CAAC;aACJ,EAAE;SACJ,CAAC,CAAC;KACJ;;;;YAlCF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;;MC3iBY,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 diff --git a/lib/onesignal-ngx.service.d.ts b/lib/onesignal-ngx.service.d.ts index 6c219af..48977be 100644 --- a/lib/onesignal-ngx.service.d.ts +++ b/lib/onesignal-ngx.service.d.ts @@ -108,6 +108,9 @@ interface IOneSignalUser { removeSms(smsNumber: string): void; } interface IOneSignalPushSubscription { + id: string | null | undefined; + token: string | null | undefined; + optedIn: boolean | undefined; optIn(): Promise; optOut(): Promise; addEventListener(event: 'subscriptionChange', listener: (change: SubscriptionChangeEvent) => void): void; @@ -120,6 +123,7 @@ declare function oneSignalSetConsentRequired(requiresConsent: boolean): Promise< declare global { interface Window { OneSignalDeferred?: OneSignalDeferredLoadedCallback[]; + OneSignal?: IOneSignalOneSignal; safari?: { pushNotification: any; }; diff --git a/onesignal-ngx.metadata.json b/onesignal-ngx.metadata.json index 213707e..ecc4b13 100644 --- a/onesignal-ngx.metadata.json +++ b/onesignal-ngx.metadata.json @@ -1 +1 @@ -{"__symbolic":"module","version":4,"metadata":{"OneSignal":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":558,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"init":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"OnesignalNgxComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"onesignal-onesignal-ngx","template":"\n

\n onesignal-ngx works!\n

\n ","styles":[]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"OnesignalNgxModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"OnesignalNgxComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"OnesignalNgxComponent"}]}]}],"members":{}}},"origins":{"OneSignal":"./lib/onesignal-ngx.service","OnesignalNgxComponent":"./lib/onesignal-ngx.component","OnesignalNgxModule":"./lib/onesignal-ngx.module"},"importAs":"onesignal-ngx"} \ No newline at end of file +{"__symbolic":"module","version":4,"metadata":{"OneSignal":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":565,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"init":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"OnesignalNgxComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"onesignal-onesignal-ngx","template":"\n

\n onesignal-ngx works!\n

\n ","styles":[]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"OnesignalNgxModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"OnesignalNgxComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"OnesignalNgxComponent"}]}]}],"members":{}}},"origins":{"OneSignal":"./lib/onesignal-ngx.service","OnesignalNgxComponent":"./lib/onesignal-ngx.component","OnesignalNgxModule":"./lib/onesignal-ngx.module"},"importAs":"onesignal-ngx"} \ No newline at end of file diff --git a/package.json b/package.json index 105f4f3..e47932e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "onesignal-ngx", - "version": "2.0.0-beta.1", + "version": "2.0.0-beta.2", "description": "This is a JavaScript module that can be used to easily include OneSignal code in a website or app that uses Angular for its front-end codebase.", "author": "rgomezp", "contributors": [ diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..d164fc3 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +tslib@^2.0.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==