From da28464e8c233ae37824db57b349ab49f01fca55 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Fri, 28 Mar 2025 17:46:17 +0000 Subject: [PATCH] fix: add promise reject for init call - chore: improve vue global OneSignal type - chore: improve slidedownevent type --- .eslintignore | 2 + .github/os_probot_metadata.js | 58 --- .github/set_response_times.js | 47 -- .github/workflows/Zapier.yml | 34 -- .github/workflows/release-drafter.yml | 41 -- .github/workflows/set_response_time.yml | 32 -- dist/index.d.ts | 411 ---------------- dist/index.js | 599 ------------------------ dist/index.js.map | 1 - example/src/App.vue | 47 +- index.ts | 58 ++- package-lock.json | 4 +- 12 files changed, 64 insertions(+), 1270 deletions(-) create mode 100644 .eslintignore delete mode 100644 .github/os_probot_metadata.js delete mode 100644 .github/set_response_times.js delete mode 100644 .github/workflows/Zapier.yml delete mode 100644 .github/workflows/release-drafter.yml delete mode 100644 .github/workflows/set_response_time.yml delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..7be0951 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +dist/ +example/ diff --git a/.github/os_probot_metadata.js b/.github/os_probot_metadata.js deleted file mode 100644 index e0584bf..0000000 --- a/.github/os_probot_metadata.js +++ /dev/null @@ -1,58 +0,0 @@ -import { Octokit } from "@octokit/action" - -/** - * Based on probot-metadata - https://github.com/probot/metadata - */ -const regex = /\n\n/ - -const octokit = new Octokit() - -module.exports = (context, issue = null) => { - console.log(context) - const prefix = "onesignal-probot" - - if (!issue) issue = context.payload.issue - - return { - async get (key = null) { - let body = issue.body - - if (!body) { - body = (await octokit.issues.get(issue)).data.body || '' - } - - const match = body.match(regex) - - if (match) { - const data = JSON.parse(match[1])[prefix] - return key ? data && data[key] : data - } - }, - - async set (key, value) { - let body = issue.body - let data = {} - - if (!body) body = (await octokit.issues.get(issue)).data.body || '' - - body = body.replace(regex, (_, json) => { - data = JSON.parse(json) - return '' - }) - - if (!data[prefix]) data[prefix] = {} - - if (typeof key === 'object') { - Object.assign(data[prefix], key) - } else { - data[prefix][key] = value - } - - body = `${body}\n\n` - - const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/") - const issue_number = context.payload.issue.number - return octokit.issues.update({ owner, repo, issue_number, body }) - } - } -} diff --git a/.github/set_response_times.js b/.github/set_response_times.js deleted file mode 100644 index 5bcac44..0000000 --- a/.github/set_response_times.js +++ /dev/null @@ -1,47 +0,0 @@ -function calcResponseTimeForIssueCreatedAt(createdAt) { - const issueOpenedDate = new Date(createdAt); - const issueTriagedDate = new Date(); - const businessDaysResponseTime = calcBusinessDaysBetweenDates(issueOpenedDate, issueTriagedDate); - return businessDaysResponseTime; -} - -function calcBusinessDaysBetweenDates(openedDate, triagedDate) { - let differenceInWeeks, responseTime; - if (triagedDate < openedDate) - return -1; // error code if dates transposed - let openedDay = openedDate.getDay(); // day of week - let triagedDay = triagedDate.getDay(); - openedDay = (openedDay == 0) ? 7 : openedDay; // change Sunday from 0 to 7 - triagedDay = (triagedDay == 0) ? 7 : triagedDay; - openedDay = (openedDay > 5) ? 5 : openedDay; // only count weekdays - triagedDay = (triagedDay > 5) ? 5 : triagedDay; - // calculate differnece in weeks (1000mS * 60sec * 60min * 24hrs * 7 days = 604800000) - differenceInWeeks = Math.floor((triagedDate.getTime() - openedDate.getTime()) / 604800000); - if (openedDay < triagedDay) { //Equal to makes it reduce 5 days - responseTime = (differenceInWeeks * 5) + (triagedDay - openedDay); - } - else if (openedDay == triagedDay) { - responseTime = differenceInWeeks * 5; - } - else { - responseTime = ((differenceInWeeks + 1) * 5) - (openedDay - triagedDay); - } - return (responseTime); -} - -module.exports = async(context, osmetadata) => { - const foundResponseTime = await osmetadata(context).get('response_time_in_business_days'); - if (foundResponseTime) { - const foundString = "already found response time in business days: " + foundResponseTime - console.log(foundString); - return foundString; - } - if (context.payload.comment && context.payload.comment.author_association != "MEMBER" && context.payload.comment.author_association != "OWNER" && context.payload.comment.author_association != "CONTRIBUTOR") { - return; - } - const businessDaysResponseTime = calcResponseTimeForIssueCreatedAt(context.payload.issue.created_at); - console.log("response time in business days: " + businessDaysResponseTime); - const result = osmetadata(context, context.payload.issue).set('response_time_in_business_days', businessDaysResponseTime) - console.log("osmetadata update result: " + result); - return "set response time in business days: " + businessDaysResponseTime; -} diff --git a/.github/workflows/Zapier.yml b/.github/workflows/Zapier.yml deleted file mode 100644 index 3665dd5..0000000 --- a/.github/workflows/Zapier.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This is an action to close asana tasks that were generated by Github issues - -name: Zapier web hook - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "main" branch - issues: - types: [closed] - -permissions: - issues: read - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Runs a set of commands using the runners shell - - name: Call Zapier web hook to close Asana task - if: ${{ !github.event.issue.pull_request }} - env: - ISSUE_TITLE: ${{ github.event.issue.title }} - run: | - curl --location --request POST 'https://hooks.zapier.com/hooks/catch/12728683/b7009qc/' \ - --header 'Content-Type: application/json' \ - --header 'Accept: application/json' \ - --data-raw '{ - "task_name" : "$ISSUE_TITLE" - }' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 82e66d2..0000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Release Drafter - -on: - push: - # branches to consider in the event; optional, defaults to all - branches: - - main - # pull_request event is required only for autolabeler - pull_request: - # Only following types are handled by the action, but one can default to all as well - types: [opened, reopened, synchronize] - # pull_request_target event is required for autolabeler to support PRs from forks - # pull_request_target: - # types: [opened, reopened, synchronize] - -permissions: - contents: read - -jobs: - update_release_draft: - permissions: - # write permission is required to create a github release - contents: write - # write permission is required for autolabeler - # otherwise, read permission is required at least - pull-requests: write - runs-on: ubuntu-latest - steps: - # (Optional) GitHub Enterprise requires GHE_HOST variable set - #- name: Set GHE_HOST - # run: | - # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV - - # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5 - # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml - # with: - # config-name: my-config.yml - # disable-autolabeler: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/set_response_time.yml b/.github/workflows/set_response_time.yml deleted file mode 100644 index e77fc84..0000000 --- a/.github/workflows/set_response_time.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Set Response Time -on: - issue_comment: - types: - - created - issues: - types: - - closed -jobs: - calculate: - name: set reponse time for the issue - if: github.event.issue.pull_request == null - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - run: npm install @octokit/action - - uses: actions/github-script@v6 - id: set-time - with: - result-encoding: string - script: | - const os_probot_metadata = require('./.github/os_probot_metadata.js') - const set_response_time = require('./.github/set_response_times.js') - return await set_response_time(context, os_probot_metadata) - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get result - run: echo "${{steps.set-time.outputs.result}}" >> $GITHUB_STEP_SUMMARY diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index aa2435c..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,411 +0,0 @@ -import { App } from 'vue'; -declare module '@vue/runtime-core' { - interface ComponentCustomProperties { - $OneSignal: IOneSignalOneSignal; - } -} -declare global { - interface Window { - OneSignalDeferred?: OneSignalDeferredLoadedCallback[]; - OneSignal?: IOneSignalOneSignal; - safari?: { - pushNotification: any; - }; - } -} -export interface AutoPromptOptions { - force?: boolean; - forceSlidedownOverNative?: boolean; - slidedownPromptOptions?: IOneSignalAutoPromptOptions; -} -export interface IOneSignalAutoPromptOptions { - force?: boolean; - forceSlidedownOverNative?: boolean; - isInUpdateMode?: boolean; - categoryOptions?: IOneSignalCategories; -} -export interface IOneSignalCategories { - positiveUpdateButton: string; - negativeUpdateButton: string; - savingButtonText: string; - errorButtonText: string; - updateMessage: string; - tags: IOneSignalTagCategory[]; -} -export interface IOneSignalTagCategory { - tag: string; - label: string; - checked?: boolean; -} -export type PushSubscriptionNamespaceProperties = { - id: string | null | undefined; - token: string | null | undefined; - optedIn: boolean; -}; -export type SubscriptionChangeEvent = { - previous: PushSubscriptionNamespaceProperties; - current: PushSubscriptionNamespaceProperties; -}; -export type NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay'; -export type SlidedownEventName = 'slidedownShown'; -export type OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void; -export interface IOSNotification { - /** - * The OneSignal notification id; - * - Primary id on OneSignal's REST API and dashboard - */ - readonly notificationId: string; - /** - * Visible title text on the notification - */ - readonly title?: string; - /** - * Visible body text on the notification - */ - readonly body: string; - /** - * Visible icon the notification; URL format - */ - readonly icon?: string; - /** - * Visible small badgeIcon that displays on some devices; URL format - * Example: On Android's status bar - */ - readonly badgeIcon?: string; - /** - * Visible image on the notification; URL format - */ - readonly image?: string; - /** - * Visible buttons on the notification - */ - readonly actionButtons?: IOSNotificationActionButton[]; - /** - * If this value is the same as existing notification, it will replace it - * Can be set when creating the notification with "Web Push Topic" on the dashboard - * or web_push_topic from the REST API. - */ - readonly topic?: string; - /** - * Custom object that was sent with the notification; - * definable when creating the notification from the OneSignal REST API or dashboard - */ - readonly additionalData?: object; - /** - * URL to open when clicking or tapping on the notification - */ - readonly launchURL?: string; - /** - * Confirm the push was received by reporting back to OneSignal - */ - readonly confirmDelivery: boolean; -} -export interface IOSNotificationActionButton { - /** - * Any unique identifier to represent which button was clicked. This is typically passed back to the service worker - * and host page through events to identify which button was clicked. - * e.g. 'like-button' - */ - readonly actionId: string; - /** - * The notification action button's text. - */ - readonly text: string; - /** - * A valid publicly reachable HTTPS URL to an image. - */ - readonly icon?: string; - /** - * The URL to open the web browser to when this action button is clicked. - */ - readonly launchURL?: string; -} -export interface NotificationClickResult { - readonly actionId?: string; - readonly url?: string; -} -export type NotificationEventTypeMap = { - 'click': NotificationClickEvent; - 'foregroundWillDisplay': NotificationForegroundWillDisplayEvent; - 'dismiss': NotificationDismissEvent; - 'permissionChange': boolean; - 'permissionPromptDisplay': void; -}; -export interface NotificationForegroundWillDisplayEvent { - readonly notification: IOSNotification; - preventDefault(): void; -} -export interface NotificationDismissEvent { - notification: IOSNotification; -} -export interface NotificationClickEvent { - readonly notification: IOSNotification; - readonly result: NotificationClickResult; -} -export type UserChangeEvent = { - current: UserNamespaceProperties; -}; -export type UserNamespaceProperties = { - onesignalId: string | undefined; - externalId: string | undefined; -}; -export interface IInitObject { - appId: string; - subdomainName?: string; - requiresUserPrivacyConsent?: boolean; - promptOptions?: { - slidedown: { - prompts: { - /** - * Whether to automatically display the prompt. - * `true` will display the prompt based on the delay options. - * `false` will prevent the prompt from displaying until the Slidedowns methods are used. - */ - autoPrompt: boolean; - /** - * Only available for type: category. Up to 10 categories. - * @example - * categories: [{ tag: 'local_news', label: 'Local News' }] // The user will be tagged with local_news but will see "Local News" in the prompt. - */ - categories: { - /** Should identify the action. */ - tag: string; - /** What the user will see. */ - label: string; - }[]; - /** - * The delay options for the prompt. - * @example delay: { pageViews: 3, timeDelay: 20 } // The user will not be shown the prompt until 20 seconds after the 3rd page view. - */ - delay: { - /** The number of pages a user needs to visit before the prompt is displayed. */ - pageViews?: number; - /** The number of seconds a user needs to wait before the prompt is displayed.Both options must be satisfied for the prompt to display */ - timeDelay?: number; - }; - /** - * The text to display in the prompt. - */ - text?: { - /** The callout asking the user to opt-in. Up to 90 characters. */ - actionMessage?: string; - /** Triggers the opt-in. Up to 15 characters. */ - acceptButton?: string; - /** Cancels opt-in. Up to 15 characters. */ - cancelMessage?: string; - /** The message of the confirmation prompt displayed after the email and/or phone number is provided. Up to 90 characters. */ - confirmMessage?: string; - /** Identifies the email text field. Up to 15 characters. */ - emailLabel?: string; - /** Cancels the category update. Up to 15 characters. */ - negativeUpdateButton?: string; - /** Saves the updated category tags. Up to 15 characters. */ - positiveUpdateButton?: string; - /** Identifies the phone number text field. Up to 15 characters. */ - smsLabel?: string; - /** A different message shown to subscribers presented the prompt again to update categories. Up to 90 characters. */ - updateMessage?: string; - }; - /** - * The type of prompt to display. - * `push` which is the Slide Prompt without categories. - * `category` which is the Slide Prompt with categories. - * `sms` only asks for phone number. - * `email` only asks for email address. - * `smsAndEmail` asks for both phone number and email address. - */ - type: 'push' | 'category' | 'sms' | 'email' | 'smsAndEmail'; - }[]; - }; - }; - welcomeNotification?: { - /** - * Disables sending a welcome notification to new site visitors. If you want to disable welcome notifications, this is the only option you need. - */ - disabled?: boolean; - /** - * The welcome notification's message. You can localize this to your own language. - * If left blank or set to blank, the default of 'Thanks for subscribing!' will be used. - */ - message: string; - /** - * The welcome notification's title. You can localize this to your own language. If not set, or left blank, the site's title will be used. - * Set to one space ' ' to clear the title, although this is not recommended. - */ - title?: string; - /** - * By default, clicking the welcome notification does not open any link. - * This is recommended because the user has just visited your site and subscribed. - */ - url: string; - }; - /** - * Will enable customization of the notify/subscription bell button. - */ - notifyButton?: { - /** - * A function you define that returns true to show the Subscription Bell, or false to hide it. - * Typically used the hide the Subscription Bell after the user is subscribed. - * This function is not re-evaluated on every state change; this function is only evaluated once when the Subscription Bell begins to show. - */ - displayPredicate?: () => boolean | Promise; - /** - * Enable the Subscription Bell. The Subscription Bell is otherwise disabled by default. - */ - enable?: boolean; - /** Specify CSS-valid pixel offsets using bottom, left, and right. */ - offset?: { - bottom: string; - left: string; - right: string; - }; - /** - * If `true`, the Subscription Bell will display an icon that there is 1 unread message. - * When hovering over the Subscription Bell, the user will see custom text set by message.prenotify. - */ - prenotify: boolean; - /** Either `bottom-left` or `bottom-right`. The Subscription Bell will be fixed at this location on your page. */ - position?: 'bottom-left' | 'bottom-right'; - /** Set `false` to hide the 'Powered by OneSignal' text in the Subscription Bell dialog popup. */ - showCredit: boolean; - /** - * The Subscription Bell will initially appear at one of these sizes, and then shrink down to size `small` after the user subscribes. - */ - size?: 'small' | 'medium' | 'large'; - /** Customize the Subscription Bell text. */ - text: { - 'dialog.blocked.message': string; - 'dialog.blocked.title': string; - 'dialog.main.button.subscribe': string; - 'dialog.main.button.unsubscribe': string; - 'dialog.main.title': string; - 'message.action.resubscribed': string; - 'message.action.subscribed': string; - 'message.action.subscribing': string; - 'message.action.unsubscribed': string; - 'message.prenotify': string; - 'tip.state.blocked': string; - 'tip.state.subscribed': string; - 'tip.state.unsubscribed': string; - }; - }; - persistNotification?: boolean; - webhooks?: { - /** - * Enable this setting only if your server has CORS enabled and supports non-simple CORS requests. - * If this setting is disabled, your webhook will not need CORS to receive data, but it will not receive the custom headers. - * The simplest option is to leave it disabled. - * @default false - */ - cors: boolean; - /** - * This event occurs after a notification is clicked. - * @example https://site.com/hook - */ - 'notification.clicked'?: string; - /** - * This event occurs after a notification is intentionally dismissed by the user (clicking the notification body or one of the notification action buttons does not trigger the dismissed webhook), - * after a group of notifications are all dismissed (with this notification as part of that group), or after a notification expires on its own time and disappears. This event is supported on Chrome only. - * @example https://site.com/hook - */ - 'notification.dismissed'?: string; - /** - * This event occurs after a notification is displayed. - * @example https://site.com/hook - */ - 'notification.willDisplay'?: string; - }; - autoResubscribe?: boolean; - autoRegister?: boolean; - notificationClickHandlerMatch?: string; - notificationClickHandlerAction?: string; - path?: string; - serviceWorkerParam?: { - scope: string; - }; - serviceWorkerPath?: string; - serviceWorkerOverrideForTypical?: boolean; - serviceWorkerUpdaterPath?: string; - allowLocalhostAsSecureOrigin?: boolean; - [key: string]: any; -} -export interface IOneSignalOneSignal { - Slidedown: IOneSignalSlidedown; - Notifications: IOneSignalNotifications; - Session: IOneSignalSession; - User: IOneSignalUser; - Debug: IOneSignalDebug; - login(externalId: string, jwtToken?: string): Promise; - logout(): Promise; - init(options: IInitObject): Promise; - setConsentGiven(consent: boolean): Promise; - setConsentRequired(requiresConsent: boolean): Promise; -} -export interface IOneSignalNotifications { - permissionNative: NotificationPermission; - permission: boolean; - setDefaultUrl(url: string): Promise; - setDefaultTitle(title: string): Promise; - isPushSupported(): boolean; - requestPermission(): Promise; - addEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void; - removeEventListener(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void; -} -export interface IOneSignalSlidedown { - promptPush(options?: AutoPromptOptions): Promise; - promptPushCategories(options?: AutoPromptOptions): Promise; - promptSms(options?: AutoPromptOptions): Promise; - promptEmail(options?: AutoPromptOptions): Promise; - promptSmsAndEmail(options?: AutoPromptOptions): Promise; - addEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void; - removeEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void; -} -export interface IOneSignalDebug { - setLogLevel(logLevel: string): void; -} -export interface IOneSignalSession { - sendOutcome(outcomeName: string, outcomeWeight?: number): Promise; - sendUniqueOutcome(outcomeName: string): Promise; -} -export interface IOneSignalUser { - onesignalId: string | undefined; - externalId: string | undefined; - PushSubscription: IOneSignalPushSubscription; - addAlias(label: string, id: string): void; - addAliases(aliases: { - [key: string]: string; - }): void; - removeAlias(label: string): void; - removeAliases(labels: string[]): void; - addEmail(email: string): void; - removeEmail(email: string): void; - addSms(smsNumber: string): void; - removeSms(smsNumber: string): void; - addTag(key: string, value: string): void; - addTags(tags: { - [key: string]: string; - }): void; - removeTag(key: string): void; - removeTags(keys: string[]): void; - getTags(): { - [key: string]: string; - }; - addEventListener(event: 'change', listener: (change: UserChangeEvent) => void): void; - removeEventListener(event: 'change', listener: (change: UserChangeEvent) => void): void; - setLanguage(language: string): void; - getLanguage(): string; -} -export interface IOneSignalPushSubscription { - id: string | null | undefined; - token: string | null | undefined; - optedIn: boolean | undefined; - optIn(): Promise; - optOut(): Promise; - addEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void; - removeEventListener(event: 'change', listener: (change: SubscriptionChangeEvent) => void): void; -} -export declare const useOneSignal: () => IOneSignalOneSignal; -declare const OneSignalVuePlugin: { - install(app: App, options: IInitObject): void; -}; -export default OneSignalVuePlugin; diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index f6bf88a..0000000 --- a/dist/index.js +++ /dev/null @@ -1,599 +0,0 @@ -const ONESIGNAL_SDK_ID = 'onesignal-sdk'; -const ONE_SIGNAL_SCRIPT_SRC = "https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js"; -// true if the script is successfully loaded from CDN. -let isOneSignalInitialized = false; -// true if the script fails to load from CDN. A separate flag is necessary -// to disambiguate between a CDN load failure and a delayed call to -// OneSignal#init. -let isOneSignalScriptFailed = false; -if (typeof window !== 'undefined') { - window.OneSignalDeferred = window.OneSignalDeferred || []; - addSDKScript(); -} -/* H E L P E R S */ -function handleOnError() { - isOneSignalScriptFailed = true; -} -function addSDKScript() { - const script = document.createElement('script'); - script.id = ONESIGNAL_SDK_ID; - script.defer = true; - script.src = ONE_SIGNAL_SCRIPT_SRC; - // Always resolve whether or not the script is successfully initialized. - // This is important for users who may block cdn.onesignal.com w/ adblock. - script.onerror = () => { - handleOnError(); - }; - document.head.appendChild(script); -} -/* O N E S I G N A L A P I */ -/** - * @PublicApi - */ -const init = (options) => { - if (isOneSignalInitialized) { - return Promise.reject(`OneSignal is already initialized.`); - } - if (!options || !options.appId) { - throw new Error('You need to provide your OneSignal appId.'); - } - if (!document) { - return Promise.reject(`Document is not defined.`); - } - return new Promise((resolve) => { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.init(options).then(() => { - isOneSignalInitialized = true; - resolve(); - }); - }); - }); -}; -/** - * The following code is copied directly from the native SDK source file BrowserSupportsPush.ts - * S T A R T - */ -// Checks if the browser supports push notifications by checking if specific -// classes and properties on them exist -function isPushNotificationsSupported() { - return supportsVapidPush() || supportsSafariPush(); -} -function isMacOSSafariInIframe() { - // Fallback detection for Safari on macOS in an iframe context - return window.top !== window && // isContextIframe - navigator.vendor === "Apple Computer, Inc." && // isSafari - navigator.platform === "MacIntel"; // isMacOS -} -function supportsSafariPush() { - return (window.safari && typeof window.safari.pushNotification !== "undefined") || - isMacOSSafariInIframe(); -} -// Does the browser support the standard Push API -function supportsVapidPush() { - return typeof PushSubscriptionOptions !== "undefined" && - PushSubscriptionOptions.prototype.hasOwnProperty("applicationServerKey"); -} -/* E N D */ -/** - * @PublicApi - */ -const isPushSupported = () => { - return isPushNotificationsSupported(); -}; -function oneSignalLogin(externalId, jwtToken) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.login(externalId, jwtToken).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function oneSignalLogout() { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.logout().then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function oneSignalSetConsentGiven(consent) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.setConsentGiven(consent).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function oneSignalSetConsentRequired(requiresConsent) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.setConsentRequired(requiresConsent).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function slidedownPromptPush(options) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Slidedown.promptPush(options).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function slidedownPromptPushCategories(options) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Slidedown.promptPushCategories(options).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function slidedownPromptSms(options) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Slidedown.promptSms(options).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function slidedownPromptEmail(options) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Slidedown.promptEmail(options).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function slidedownPromptSmsAndEmail(options) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Slidedown.promptSmsAndEmail(options).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function slidedownAddEventListener(event, listener) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Slidedown.addEventListener(event, listener); - }); -} -function slidedownRemoveEventListener(event, listener) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Slidedown.removeEventListener(event, listener); - }); -} -function notificationsSetDefaultUrl(url) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Notifications.setDefaultUrl(url).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function notificationsSetDefaultTitle(title) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Notifications.setDefaultTitle(title).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function notificationsRequestPermission() { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Notifications.requestPermission().then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function notificationsAddEventListener(event, listener) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Notifications.addEventListener(event, listener); - }); -} -function notificationsRemoveEventListener(event, listener) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Notifications.removeEventListener(event, listener); - }); -} -function sessionSendOutcome(outcomeName, outcomeWeight) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Session.sendOutcome(outcomeName, outcomeWeight).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function sessionSendUniqueOutcome(outcomeName) { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Session.sendUniqueOutcome(outcomeName).then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function userAddAlias(label, id) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.addAlias(label, id); - }); -} -function userAddAliases(aliases) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.addAliases(aliases); - }); -} -function userRemoveAlias(label) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.removeAlias(label); - }); -} -function userRemoveAliases(labels) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.removeAliases(labels); - }); -} -function userAddEmail(email) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.addEmail(email); - }); -} -function userRemoveEmail(email) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.removeEmail(email); - }); -} -function userAddSms(smsNumber) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.addSms(smsNumber); - }); -} -function userRemoveSms(smsNumber) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.removeSms(smsNumber); - }); -} -function userAddTag(key, value) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.addTag(key, value); - }); -} -function userAddTags(tags) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.addTags(tags); - }); -} -function userRemoveTag(key) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.removeTag(key); - }); -} -function userRemoveTags(keys) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.removeTags(keys); - }); -} -function userGetTags() { - var _a; - let retVal; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - retVal = OneSignal.User.getTags(); - }); - return retVal; -} -function userAddEventListener(event, listener) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.addEventListener(event, listener); - }); -} -function userRemoveEventListener(event, listener) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.removeEventListener(event, listener); - }); -} -function userSetLanguage(language) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.setLanguage(language); - }); -} -function userGetLanguage() { - var _a; - let retVal; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - retVal = OneSignal.User.getLanguage(); - }); - return retVal; -} -function pushSubscriptionOptIn() { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.PushSubscription.optIn().then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function pushSubscriptionOptOut() { - return new Promise(function (resolve, reject) { - var _a; - if (isOneSignalScriptFailed) { - reject(new Error('OneSignal script failed to load.')); - return; - } - try { - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.PushSubscription.optOut().then(() => resolve()) - .catch(error => reject(error)); - }); - } - catch (error) { - reject(error); - } - }); -} -function pushSubscriptionAddEventListener(event, listener) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.PushSubscription.addEventListener(event, listener); - }); -} -function pushSubscriptionRemoveEventListener(event, listener) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.User.PushSubscription.removeEventListener(event, listener); - }); -} -function debugSetLogLevel(logLevel) { - var _a; - (_a = window.OneSignalDeferred) === null || _a === void 0 ? void 0 : _a.push((OneSignal) => { - OneSignal.Debug.setLogLevel(logLevel); - }); -} -const PushSubscriptionNamespace = { - get id() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.id; }, - get token() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.token; }, - get optedIn() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.PushSubscription) === null || _c === void 0 ? void 0 : _c.optedIn; }, - optIn: pushSubscriptionOptIn, - optOut: pushSubscriptionOptOut, - addEventListener: pushSubscriptionAddEventListener, - removeEventListener: pushSubscriptionRemoveEventListener, -}; -const UserNamespace = { - get onesignalId() { var _a, _b; return (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.onesignalId; }, - get externalId() { var _a, _b; return (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.User) === null || _b === void 0 ? void 0 : _b.externalId; }, - addAlias: userAddAlias, - addAliases: userAddAliases, - removeAlias: userRemoveAlias, - removeAliases: userRemoveAliases, - addEmail: userAddEmail, - removeEmail: userRemoveEmail, - addSms: userAddSms, - removeSms: userRemoveSms, - addTag: userAddTag, - addTags: userAddTags, - removeTag: userRemoveTag, - removeTags: userRemoveTags, - getTags: userGetTags, - addEventListener: userAddEventListener, - removeEventListener: userRemoveEventListener, - setLanguage: userSetLanguage, - getLanguage: userGetLanguage, - PushSubscription: PushSubscriptionNamespace, -}; -const SessionNamespace = { - sendOutcome: sessionSendOutcome, - sendUniqueOutcome: sessionSendUniqueOutcome, -}; -const DebugNamespace = { - setLogLevel: debugSetLogLevel, -}; -const SlidedownNamespace = { - promptPush: slidedownPromptPush, - promptPushCategories: slidedownPromptPushCategories, - promptSms: slidedownPromptSms, - promptEmail: slidedownPromptEmail, - promptSmsAndEmail: slidedownPromptSmsAndEmail, - addEventListener: slidedownAddEventListener, - removeEventListener: slidedownRemoveEventListener, -}; -const NotificationsNamespace = { - get permissionNative() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.Notifications) === null || _b === void 0 ? void 0 : _b.permissionNative) !== null && _c !== void 0 ? _c : 'default'; }, - get permission() { var _a, _b, _c; return (_c = (_b = (_a = window.OneSignal) === null || _a === void 0 ? void 0 : _a.Notifications) === null || _b === void 0 ? void 0 : _b.permission) !== null && _c !== void 0 ? _c : false; }, - setDefaultUrl: notificationsSetDefaultUrl, - setDefaultTitle: notificationsSetDefaultTitle, - isPushSupported, - requestPermission: notificationsRequestPermission, - addEventListener: notificationsAddEventListener, - removeEventListener: notificationsRemoveEventListener, -}; -const OneSignalNamespace = { - login: oneSignalLogin, - logout: oneSignalLogout, - init, - setConsentGiven: oneSignalSetConsentGiven, - setConsentRequired: oneSignalSetConsentRequired, - Slidedown: SlidedownNamespace, - Notifications: NotificationsNamespace, - Session: SessionNamespace, - User: UserNamespace, - Debug: DebugNamespace, -}; -export const useOneSignal = () => { - return OneSignalNamespace; -}; -const OneSignalVuePlugin = { - install(app, options) { - app.config.globalProperties.$OneSignal = OneSignalNamespace; - app.config.globalProperties.$OneSignal.init(options); - } -}; -export default OneSignalVuePlugin; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index a8a035c..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,MAAM,gBAAgB,GAAG,eAAe,CAAC;AACzC,MAAM,qBAAqB,GAAG,6DAA6D,CAAC;AAE5F,sDAAsD;AACtD,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,0EAA0E;AAC1E,mEAAmE;AACnE,kBAAkB;AAClB,IAAI,uBAAuB,GAAG,KAAK,CAAC;AAEpC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,EAAE,CAAC;IAC1D,YAAY,EAAE,CAAC;CAChB;AAED,mBAAmB;AAEnB,SAAS,aAAa;IACpB,uBAAuB,GAAG,IAAI,CAAC;AACjC,CAAC;AAED,SAAS,YAAY;IACnB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,CAAC,EAAE,GAAG,gBAAgB,CAAC;IAC7B,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,MAAM,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AAE,UAAU,mCAAI,KAAK,CAAC,CAAC,CAAC;IAC1F,aAAa,EAAE,0BAA0B;IACzC,eAAe,EAAE,4BAA4B;IAC7C,eAAe;IACf,iBAAiB,EAAE,8BAA8B;IACjD,gBAAgB,EAAE,6BAA6B;IAC/C,mBAAmB,EAAE,gCAAgC;CACrD,CAAC;AAEF,MAAM,kBAAkB,GAAwB;IAC/C,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,eAAe;IACvB,IAAI;IACJ,eAAe,EAAE,wBAAwB;IACzC,kBAAkB,EAAE,2BAA2B;IAC/C,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,sBAAsB;IACrC,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,cAAc;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG;IACzB,OAAO,CAAC,GAAQ,EAAE,OAAoB;QACpC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,GAAG,kBAAyC,CAAC;QACnF,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;CACF,CAAA;AAED,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/example/src/App.vue b/example/src/App.vue index a65de20..1d81228 100644 --- a/example/src/App.vue +++ b/example/src/App.vue @@ -1,34 +1,41 @@