-
Notifications
You must be signed in to change notification settings - Fork 938
Component framework implementation #2316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 47 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
14332f0
Component implementation
Feiyang1 85487f8
update dep version
Feiyang1 832b19c
[AUTOMATED]: Prettier Code Styling
Feiyang1 ab51efb
[AUTOMATED]: License Headers
Feiyang1 369cffe
rename variables
Feiyang1 bed9fb4
address comments
Feiyang1 2f13e66
[AUTOMATED]: Prettier Code Styling
Feiyang1 de6cc28
remove unused comment
Feiyang1 baab794
update code
Feiyang1 f68319a
[AUTOMATED]: Prettier Code Styling
Feiyang1 368b2a2
rename to clearInstance to have naming consistency
Feiyang1 7dce8de
make FirebaseApp tests work again
Feiyang1 89c31e1
fix node tests
Feiyang1 062975d
[AUTOMATED]: Prettier Code Styling
Feiyang1 fb6ea29
add comments for ComponentType
Feiyang1 766fb58
[AUTOMATED]: Prettier Code Styling
Feiyang1 b692476
pass Component directly into Providers
Feiyang1 2b78788
[AUTOMATED]: Prettier Code Styling
Feiyang1 6f69e1c
correct spellings
Feiyang1 f60cdd2
update readme
Feiyang1 f32b110
fix lint issue
Feiyang1 837c1a5
remove unused import
Feiyang1 c4f26f8
fix API change
Feiyang1 2f454ac
move types around
Feiyang1 ab2908e
[AUTOMATED]: Prettier Code Styling
Feiyang1 cb71e3c
improve provider typing
Feiyang1 d2d63fa
[AUTOMATED]: Prettier Code Styling
Feiyang1 a71cbb6
Migrate analytics to component platform (#220)
Feiyang1 188aa5d
allow overwriting a registered component
Feiyang1 7e97582
[AUTOMATED]: Prettier Code Styling
Feiyang1 af4fdc4
change ComponentType to string enum
Feiyang1 56bbdee
address comments
Feiyang1 3007773
[AUTOMATED]: Prettier Code Styling
Feiyang1 7b8439d
remove return only generics
Feiyang1 8c172b8
Move identifier to options object for getImmediate()
Feiyang1 086df99
[AUTOMATED]: Prettier Code Styling
Feiyang1 9971b33
Make getProvider() type safe
Feiyang1 e38d251
[AUTOMATED]: Prettier Code Styling
Feiyang1 15ec97e
define a new method to replace overwrite flag
Feiyang1 f425f8c
[AUTOMATED]: Prettier Code Styling
Feiyang1 6888f35
Make component type safe
Feiyang1 e84bad8
[AUTOMATED]: Prettier Code Styling
Feiyang1 9538682
remove the generic type from component container
Feiyang1 3dd9ec3
Update FirebaseApp and Analytics
Feiyang1 e7d7e5b
[AUTOMATED]: Prettier Code Styling
Feiyang1 2b1e4d4
remove unneccessary casting
Feiyang1 c30b9c7
[AUTOMATED]: Prettier Code Styling
Feiyang1 dab2486
fix typo
Feiyang1 2187664
address comments
Feiyang1 c7255b9
[AUTOMATED]: Prettier Code Styling
Feiyang1 777026d
update some types
Feiyang1 059fb5d
[AUTOMATED]: Prettier Code Styling
Feiyang1 917322c
handle errors from instance factory
Feiyang1 4e661d1
[AUTOMATED]: Prettier Code Styling
Feiyang1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @firebase/analytics-interop-types | ||
|
||
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* @license | ||
* Copyright 2019 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
export interface FirebaseAnalyticsInternal { | ||
/** | ||
* Sends analytics event with given `eventParams`. This method | ||
* automatically associates this logged event with this Firebase web | ||
* app instance on this device. | ||
* List of official event parameters can be found in | ||
* {@link https://developers.google.com/gtagjs/reference/event | ||
* the gtag.js reference documentation}. | ||
*/ | ||
logEvent( | ||
eventName: string, | ||
eventParams?: { [key: string]: unknown }, | ||
options?: AnalyticsCallOptions | ||
): void; | ||
} | ||
|
||
export interface AnalyticsCallOptions { | ||
/** | ||
* If true, this config or event call applies globally to all | ||
* analytics properties on the page. | ||
*/ | ||
global: boolean; | ||
} | ||
|
||
declare module '@firebase/component' { | ||
interface NameServiceMapping { | ||
'analytics-internal': FirebaseAnalyticsInternal; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "@firebase/analytics-interop-types", | ||
"version": "0.1.0", | ||
"description": "@firebase/analytics Types", | ||
"author": "Firebase <[email protected]> (https://firebase.google.com/)", | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"test": "tsc" | ||
}, | ||
"files": [ | ||
"index.d.ts" | ||
], | ||
"repository": { | ||
"directory": "packages/analytics-interop-types", | ||
"type": "git", | ||
"url": "https://github.com/firebase/firebase-js-sdk.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/firebase/firebase-js-sdk/issues" | ||
}, | ||
"devDependencies": { | ||
"typescript": "3.6.4" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../config/tsconfig.base.json", | ||
"compilerOptions": { | ||
"noEmit": true | ||
}, | ||
"exclude": [ | ||
"dist/**/*" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.