@firebase/analytics-compat
Advanced tools
Comparing version 0.0.900-exp.f8e97019f to 0.1.0-202171919375
@@ -14,3 +14,3 @@ 'use strict'; | ||
var name = "@firebase/analytics-compat"; | ||
var version = "0.0.900"; | ||
var version = "0.1.0-202171919375"; | ||
@@ -34,20 +34,20 @@ /** | ||
var AnalyticsService = /** @class */ (function () { | ||
function AnalyticsService(app, _analyticsServiceExp) { | ||
function AnalyticsService(app, _delegate) { | ||
this.app = app; | ||
this._analyticsServiceExp = _analyticsServiceExp; | ||
this._delegate = _delegate; | ||
} | ||
AnalyticsService.prototype.logEvent = function (eventName, eventParams, options) { | ||
analytics.logEvent(this._analyticsServiceExp, eventName, eventParams, options); | ||
analytics.logEvent(this._delegate, eventName, eventParams, options); | ||
}; | ||
AnalyticsService.prototype.setCurrentScreen = function (screenName, options) { | ||
analytics.setCurrentScreen(this._analyticsServiceExp, screenName, options); | ||
analytics.setCurrentScreen(this._delegate, screenName, options); | ||
}; | ||
AnalyticsService.prototype.setUserId = function (id, options) { | ||
analytics.setUserId(this._analyticsServiceExp, id, options); | ||
analytics.setUserId(this._delegate, id, options); | ||
}; | ||
AnalyticsService.prototype.setUserProperties = function (properties, options) { | ||
analytics.setUserProperties(this._analyticsServiceExp, properties, options); | ||
analytics.setUserProperties(this._delegate, properties, options); | ||
}; | ||
AnalyticsService.prototype.setAnalyticsCollectionEnabled = function (enabled) { | ||
analytics.setAnalyticsCollectionEnabled(this._analyticsServiceExp, enabled); | ||
analytics.setAnalyticsCollectionEnabled(this._delegate, enabled); | ||
}; | ||
@@ -134,3 +134,3 @@ return AnalyticsService; | ||
var analyticsServiceExp = container | ||
.getProvider('analytics-exp') | ||
.getProvider('analytics') | ||
.getImmediate(); | ||
@@ -137,0 +137,0 @@ return new AnalyticsService(app, analyticsServiceExp); |
@@ -6,3 +6,3 @@ import firebase from '@firebase/app-compat'; | ||
var name = "@firebase/analytics-compat"; | ||
var version = "0.0.900"; | ||
var version = "0.1.0-202171919375"; | ||
@@ -26,20 +26,20 @@ /** | ||
var AnalyticsService = /** @class */ (function () { | ||
function AnalyticsService(app, _analyticsServiceExp) { | ||
function AnalyticsService(app, _delegate) { | ||
this.app = app; | ||
this._analyticsServiceExp = _analyticsServiceExp; | ||
this._delegate = _delegate; | ||
} | ||
AnalyticsService.prototype.logEvent = function (eventName, eventParams, options) { | ||
logEvent(this._analyticsServiceExp, eventName, eventParams, options); | ||
logEvent(this._delegate, eventName, eventParams, options); | ||
}; | ||
AnalyticsService.prototype.setCurrentScreen = function (screenName, options) { | ||
setCurrentScreen(this._analyticsServiceExp, screenName, options); | ||
setCurrentScreen(this._delegate, screenName, options); | ||
}; | ||
AnalyticsService.prototype.setUserId = function (id, options) { | ||
setUserId(this._analyticsServiceExp, id, options); | ||
setUserId(this._delegate, id, options); | ||
}; | ||
AnalyticsService.prototype.setUserProperties = function (properties, options) { | ||
setUserProperties(this._analyticsServiceExp, properties, options); | ||
setUserProperties(this._delegate, properties, options); | ||
}; | ||
AnalyticsService.prototype.setAnalyticsCollectionEnabled = function (enabled) { | ||
setAnalyticsCollectionEnabled(this._analyticsServiceExp, enabled); | ||
setAnalyticsCollectionEnabled(this._delegate, enabled); | ||
}; | ||
@@ -126,3 +126,3 @@ return AnalyticsService; | ||
var analyticsServiceExp = container | ||
.getProvider('analytics-exp') | ||
.getProvider('analytics') | ||
.getImmediate(); | ||
@@ -129,0 +129,0 @@ return new AnalyticsService(app, analyticsServiceExp); |
@@ -6,3 +6,3 @@ import firebase from '@firebase/app-compat'; | ||
const name = "@firebase/analytics-compat"; | ||
const version = "0.0.900"; | ||
const version = "0.1.0-202171919375"; | ||
@@ -26,20 +26,20 @@ /** | ||
class AnalyticsService { | ||
constructor(app, _analyticsServiceExp) { | ||
constructor(app, _delegate) { | ||
this.app = app; | ||
this._analyticsServiceExp = _analyticsServiceExp; | ||
this._delegate = _delegate; | ||
} | ||
logEvent(eventName, eventParams, options) { | ||
logEvent(this._analyticsServiceExp, eventName, eventParams, options); | ||
logEvent(this._delegate, eventName, eventParams, options); | ||
} | ||
setCurrentScreen(screenName, options) { | ||
setCurrentScreen(this._analyticsServiceExp, screenName, options); | ||
setCurrentScreen(this._delegate, screenName, options); | ||
} | ||
setUserId(id, options) { | ||
setUserId(this._analyticsServiceExp, id, options); | ||
setUserId(this._delegate, id, options); | ||
} | ||
setUserProperties(properties, options) { | ||
setUserProperties(this._analyticsServiceExp, properties, options); | ||
setUserProperties(this._delegate, properties, options); | ||
} | ||
setAnalyticsCollectionEnabled(enabled) { | ||
setAnalyticsCollectionEnabled(this._analyticsServiceExp, enabled); | ||
setAnalyticsCollectionEnabled(this._delegate, enabled); | ||
} | ||
@@ -125,3 +125,3 @@ } | ||
const analyticsServiceExp = container | ||
.getProvider('analytics-exp') | ||
.getProvider('analytics') | ||
.getImmediate(); | ||
@@ -128,0 +128,0 @@ return new AnalyticsService(app, analyticsServiceExp); |
@@ -18,8 +18,2 @@ /** | ||
import { FirebaseAnalytics } from '@firebase/analytics-types'; | ||
import { AnalyticsService } from './service'; | ||
declare module '@firebase/component' { | ||
interface NameServiceMapping { | ||
'analytics-compat': AnalyticsService; | ||
} | ||
} | ||
export declare function registerAnalytics(): void; | ||
@@ -37,1 +31,144 @@ /** | ||
} | ||
import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat"; | ||
import { Analytics, AnalyticsSettings, EventParams, AnalyticsCallOptions, CustomEventName, CustomParams } from "@firebase/analytics"; | ||
declare module "@firebase/analytics" { | ||
function getAnalytics(app?: FirebaseAppCompat): Analytics; | ||
function initializeAnalytics(app: FirebaseAppCompat, options?: AnalyticsSettings): Analytics; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_payment_info', eventParams?: { | ||
coupon?: EventParams['coupon']; | ||
currency?: EventParams['currency']; | ||
items?: EventParams['items']; | ||
payment_type?: EventParams['payment_type']; | ||
value?: EventParams['value']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_shipping_info', eventParams?: { | ||
coupon?: EventParams['coupon']; | ||
currency?: EventParams['currency']; | ||
items?: EventParams['items']; | ||
shipping_tier?: EventParams['shipping_tier']; | ||
value?: EventParams['value']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart', eventParams?: { | ||
currency?: EventParams['currency']; | ||
value?: EventParams['value']; | ||
items?: EventParams['items']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'begin_checkout', eventParams?: { | ||
currency?: EventParams['currency']; | ||
coupon?: EventParams['coupon']; | ||
value?: EventParams['value']; | ||
items?: EventParams['items']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'checkout_progress', eventParams?: { | ||
currency?: EventParams['currency']; | ||
coupon?: EventParams['coupon']; | ||
value?: EventParams['value']; | ||
items?: EventParams['items']; | ||
checkout_step?: EventParams['checkout_step']; | ||
checkout_option?: EventParams['checkout_option']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'exception', eventParams?: { | ||
description?: EventParams['description']; | ||
fatal?: EventParams['fatal']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'generate_lead', eventParams?: { | ||
value?: EventParams['value']; | ||
currency?: EventParams['currency']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'login', eventParams?: { | ||
method?: EventParams['method']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'page_view', eventParams?: { | ||
page_title?: string; | ||
page_location?: string; | ||
page_path?: string; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'purchase' | 'refund', eventParams?: { | ||
value?: EventParams['value']; | ||
currency?: EventParams['currency']; | ||
transaction_id: EventParams['transaction_id']; | ||
tax?: EventParams['tax']; | ||
shipping?: EventParams['shipping']; | ||
items?: EventParams['items']; | ||
coupon?: EventParams['coupon']; | ||
affiliation?: EventParams['affiliation']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'screen_view', eventParams?: { | ||
firebase_screen: EventParams['firebase_screen']; | ||
firebase_screen_class: EventParams['firebase_screen_class']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'search' | 'view_search_results', eventParams?: { | ||
search_term?: EventParams['search_term']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_content', eventParams?: { | ||
content_type?: EventParams['content_type']; | ||
item_id?: EventParams['item_id']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_item', eventParams?: { | ||
items?: EventParams['items']; | ||
item_list_name?: EventParams['item_list_name']; | ||
item_list_id?: EventParams['item_list_id']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_promotion' | 'view_promotion', eventParams?: { | ||
items?: EventParams['items']; | ||
promotion_id?: EventParams['promotion_id']; | ||
promotion_name?: EventParams['promotion_name']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'set_checkout_option', eventParams?: { | ||
checkout_step?: EventParams['checkout_step']; | ||
checkout_option?: EventParams['checkout_option']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'share', eventParams?: { | ||
method?: EventParams['method']; | ||
content_type?: EventParams['content_type']; | ||
item_id?: EventParams['item_id']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'sign_up', eventParams?: { | ||
method?: EventParams['method']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'timing_complete', eventParams?: { | ||
name: string; | ||
value: number; | ||
event_category?: string; | ||
event_label?: string; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'view_cart' | 'view_item', eventParams?: { | ||
currency?: EventParams['currency']; | ||
items?: EventParams['items']; | ||
value?: EventParams['value']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'view_item_list', eventParams?: { | ||
items?: EventParams['items']; | ||
item_list_name?: EventParams['item_list_name']; | ||
item_list_id?: EventParams['item_list_id']; | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function logEvent<T extends string>(analyticsInstance: FirebaseAnalytics, eventName: CustomEventName<T>, eventParams?: { | ||
[key: string]: any; | ||
}, options?: AnalyticsCallOptions): void; | ||
function setAnalyticsCollectionEnabled(analyticsInstance: FirebaseAnalytics, enabled: boolean): void; | ||
function setCurrentScreen(analyticsInstance: FirebaseAnalytics, screenName: string, options?: AnalyticsCallOptions): void; | ||
function setUserId(analyticsInstance: FirebaseAnalytics, id: string, options?: AnalyticsCallOptions): void; | ||
function setUserProperties(analyticsInstance: FirebaseAnalytics, properties: CustomParams, options?: AnalyticsCallOptions): void; | ||
} |
@@ -18,8 +18,8 @@ /** | ||
import { AnalyticsCallOptions, CustomParams, EventParams, FirebaseAnalytics } from '@firebase/analytics-types'; | ||
import { FirebaseApp } from '@firebase/app-types'; | ||
import { Analytics as AnalyticsServiceExp } from "@firebase/analytics"; | ||
export declare class AnalyticsService implements FirebaseAnalytics { | ||
import { Analytics as AnalyticsServiceExp } from '@firebase/analytics'; | ||
import { _FirebaseService, FirebaseApp } from '@firebase/app-compat'; | ||
export declare class AnalyticsService implements FirebaseAnalytics, _FirebaseService { | ||
app: FirebaseApp; | ||
private _analyticsServiceExp; | ||
constructor(app: FirebaseApp, _analyticsServiceExp: AnalyticsServiceExp); | ||
readonly _delegate: AnalyticsServiceExp; | ||
constructor(app: FirebaseApp, _delegate: AnalyticsServiceExp); | ||
logEvent(eventName: string, eventParams?: EventParams | CustomParams, options?: AnalyticsCallOptions): void; | ||
@@ -26,0 +26,0 @@ setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void; |
{ | ||
"name": "@firebase/analytics-compat", | ||
"version": "0.0.900-exp.f8e97019f", | ||
"version": "0.1.0-202171919375", | ||
"description": "", | ||
"private": false, | ||
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)", | ||
"main": "dist/index.cjs.js", | ||
"browser": "dist/index.esm.js", | ||
"module": "dist/index.esm.js", | ||
"esm2017": "dist/index.esm2017.js", | ||
"browser": "dist/index.esm2017.js", | ||
"module": "dist/index.esm2017.js", | ||
"files": [ | ||
@@ -16,13 +14,13 @@ "dist" | ||
"peerDependencies": { | ||
"@firebase/app-compat": "0.0.900-exp.f8e97019f" | ||
"@firebase/app-compat": "0.1.0-202171919375" | ||
}, | ||
"devDependencies": { | ||
"@firebase/app-compat": "0.0.900", | ||
"rollup": "2.35.1", | ||
"@firebase/app-compat": "0.1.0-202171919375", | ||
"rollup": "2.52.2", | ||
"@rollup/plugin-json": "4.1.0", | ||
"rollup-plugin-typescript2": "0.29.0", | ||
"rollup-plugin-typescript2": "0.30.0", | ||
"typescript": "4.2.2" | ||
}, | ||
"repository": { | ||
"directory": "packages-exp/analytics-compat", | ||
"directory": "packages/analytics-compat", | ||
"type": "git", | ||
@@ -39,3 +37,3 @@ "url": "https://github.com/firebase/firebase-js-sdk.git" | ||
"build:deps": "lerna run --scope @firebase/analytics-compat --include-dependencies build", | ||
"build:release": "rollup -c rollup.config.release.js", | ||
"build:release": "yarn build && yarn add-compat-overloads", | ||
"dev": "rollup -c -w", | ||
@@ -45,10 +43,11 @@ "test": "run-p lint test:browser", | ||
"test:browser": "karma start --single-run", | ||
"test:browser:debug": "karma start --browsers=Chrome --auto-watch" | ||
"test:browser:debug": "karma start --browsers=Chrome --auto-watch", | ||
"add-compat-overloads": "ts-node-script ../../scripts/exp/create-overloads.ts -i ../analytics/dist/analytics-public.d.ts -o dist/src/index.d.ts -a -r Analytics:FirebaseAnalytics -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/analytics" | ||
}, | ||
"typings": "dist/src/index.d.ts", | ||
"dependencies": { | ||
"@firebase/component": "0.2.1", | ||
"@firebase/analytics": "0.0.900-exp.f8e97019f", | ||
"@firebase/analytics-types": "0.4.0", | ||
"@firebase/util": "0.4.0", | ||
"@firebase/component": "0.5.6-202171919375", | ||
"@firebase/analytics": "0.7.0-202171919375", | ||
"@firebase/analytics-types": "0.7.0-202171919375", | ||
"@firebase/util": "1.3.0-202171919375", | ||
"tslib": "^2.1.0" | ||
@@ -61,3 +60,4 @@ }, | ||
"reportDir": "./coverage/node" | ||
} | ||
} | ||
}, | ||
"esm5": "dist/index.esm.js" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
57132
12
676
0
6
+ Added@firebase/analytics@0.7.0-202171919375(transitive)
+ Added@firebase/analytics-types@0.7.0-202171919375(transitive)
+ Added@firebase/app@0.7.0-202171919375(transitive)
+ Added@firebase/app-compat@0.1.0-202171919375(transitive)
+ Added@firebase/component@0.5.6-202171919375(transitive)
+ Added@firebase/installations@0.5.0-202171919375(transitive)
+ Added@firebase/util@1.3.0-202171919375(transitive)
- Removed@firebase/analytics@0.0.900-exp.f8e97019f(transitive)
- Removed@firebase/analytics-types@0.4.0(transitive)
- Removed@firebase/app@0.0.900-exp.f8e97019f(transitive)
- Removed@firebase/app-compat@0.0.900-exp.f8e97019f(transitive)
- Removed@firebase/component@0.2.1(transitive)
- Removed@firebase/installations@0.0.900-exp.f8e97019f(transitive)
- Removed@firebase/util@0.4.0(transitive)
- Removeddom-storage@2.1.0(transitive)
- Removedxmlhttprequest@1.8.0(transitive)