-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Updating Third party capital version. #54418
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f997216
Updating Third party capital version. Refactor next/third-parties to …
janicklas-ralph 919ff80
Merge branch 'canary' of github.com:vercel/next.js into tpc3
janicklas-ralph cf8eb13
fix lint
janicklas-ralph 70c22a5
fix lint
janicklas-ralph 36b4852
Merge branch 'canary' of github.com:vercel/next.js into tpc3
janicklas-ralph 2a61505
Fix test
janicklas-ralph 8bddfcf
Merge branch 'canary' of github.com:vercel/next.js into tpc3
janicklas-ralph 9b38b56
Fix test
janicklas-ralph 7a22708
Merge branch 'canary' of github.com:vercel/next.js into tpc3
janicklas-ralph b642249
Updating types
janicklas-ralph 2b84ad5
Merge branch 'canary' of github.com:vercel/next.js into tpc3
janicklas-ralph 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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 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,20 @@ | ||
import React from 'react' | ||
import { GoogleMapsEmbed as TPCGoogleMapEmbed } from 'third-party-capital' | ||
|
||
import ThirdPartyScriptEmbed from '../ThirdPartyScriptEmbed' | ||
import { GoogleMapsEmbed as GoogleMapsEmbedTypes } from '../types/google' | ||
|
||
export default function GoogleMapsEmbed(props: GoogleMapsEmbedTypes) { | ||
const { apiKey, ...restProps } = props | ||
const formattedProps = { ...restProps, key: apiKey } | ||
const { html } = TPCGoogleMapEmbed(formattedProps) | ||
|
||
return ( | ||
<ThirdPartyScriptEmbed | ||
height={formattedProps.height || null} | ||
width={formattedProps.width || null} | ||
html={html} | ||
dataNtpc="GoogleMapsEmbed" | ||
></ThirdPartyScriptEmbed> | ||
) | ||
} |
This file contains 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,34 @@ | ||
import React from 'react' | ||
import Script, { ScriptProps } from 'next/script' | ||
import { YouTubeEmbed as TPCYouTubeEmbed } from 'third-party-capital' | ||
|
||
import ThirdPartyScriptEmbed from '../ThirdPartyScriptEmbed' | ||
import { YouTubeEmbed as YouTubeEmbedTypes } from '../types/google' | ||
|
||
const scriptStrategy = { | ||
server: 'beforeInteractive', | ||
client: 'afterInteractive', | ||
idle: 'lazyOnload', | ||
worker: 'worker', | ||
} | ||
|
||
export default function YouTubeEmbed(props: YouTubeEmbedTypes) { | ||
const { html, scripts, stylesheets } = TPCYouTubeEmbed(props) | ||
|
||
return ( | ||
<ThirdPartyScriptEmbed | ||
height={props.height || null} | ||
width={props.width || null} | ||
html={html} | ||
dataNtpc="YouTubeEmbed" | ||
> | ||
{scripts?.map((script) => ( | ||
<Script | ||
src={script.url} | ||
strategy={scriptStrategy[script.strategy] as ScriptProps['strategy']} | ||
stylesheets={stylesheets} | ||
/> | ||
))} | ||
</ThirdPartyScriptEmbed> | ||
) | ||
} |
This file contains 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 |
---|---|---|
@@ -1,39 +1,2 @@ | ||
/** | ||
* This is an autogenerated file by update-third-parties.js | ||
*/ | ||
import React from 'react' | ||
import Script from 'next/script' | ||
|
||
import ThirdPartyScriptEmbed from '../ThirdPartyScriptEmbed' | ||
import * as Types from '../types/google' | ||
|
||
// Embed a Google Maps embed on your webpage | ||
export function GoogleMapsEmbed(args: Types.GoogleMapsEmbed) { | ||
return ( | ||
<ThirdPartyScriptEmbed | ||
height={args.height || null} | ||
width={args.width || null} | ||
content={`<iframe loading="lazy" src="https://www.google.com/maps/embed/v1/${args.mapMode}?key=${args.apiKey}&${args.parameters}" width=${args.width} height=${args.height} style=${args.style} allowfullscreen=${args.allowfullscreen} referrerpolicy="no-referrer-when-downgrade"></iframe>`} | ||
dataNtpc="GoogleMapsEmbed" | ||
></ThirdPartyScriptEmbed> | ||
) | ||
} | ||
// Embed a YouTube embed on your webpage. | ||
export function YoutubeEmbed(args: Types.YoutubeEmbed) { | ||
return ( | ||
<ThirdPartyScriptEmbed | ||
height={args.height || null} | ||
width={args.width || null} | ||
content={`<lite-youtube videoid=${args.videoid} playlabel=${args.playlabel}></lite-youtube>`} | ||
dataNtpc="YoutubeEmbed" | ||
> | ||
<Script | ||
src={`https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.js`} | ||
strategy="lazyOnload" | ||
stylesheets={[ | ||
'https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.css', | ||
]} | ||
/> | ||
</ThirdPartyScriptEmbed> | ||
) | ||
} | ||
export { default as GoogleMapsEmbed } from './GoogleMapsEmbed' | ||
export { default as YouTubeEmbed } from './YouTubeEmbed' |
This file was deleted.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to update and reflect these changes to
types/google.ts
?