Stripe のUI拡張機能 SDK をアップグレードする
アプリを @stripe/ui-extension-sdk の最新バージョンにアップグレードします。
このページでは、@stripe/ui-extension-sdk の各メジャーバージョンで導入された重大な変更点を理解するのに役立つ包括的なガイドを提供し、アプリケーションのアップグレードに必要な変更点の概要を示します。
@stripe/ui-extension-sdk バージョンを更新する前に、stripe plugin upgrade apps
を実行して Stripe Apps CLI プラグインをアップグレードすることをお勧めします。これにより、最適な互換性、最新機能の実装、セキュリティ修正が保証されます。
@stripe/ui-extension-sdk v9
v9 の新機能
@stripe/ui-extension-sdk
のバージョン 9 では、すべてのコンポーネントのプロパティ検証が導入されています。このバージョンはより安全で、バグを軽減し、コーディングのベストプラクティスの遵守を促進します。インストール後は、無効なプロパティ値から発生する TypeScript エラーに注意してください。検証エラーが発生し、アプリケーションがクラッシュする可能性があります。
コンポーネントの変更
一部のコンポーネントの表示を更新しました。最新バージョンをインストールしたら、アプリを確認して、コンポーネントが適切に表示されていることを確認してください。
コンポーネント | 対応処理が必要な変更 |
---|---|
ボタン |
|
DateField |
|
FormFieldGroup |
|
リンク |
|
タブ |
|
TabPanel |
|
TextArea |
|
TextField |
|
変更ログ
9.0.0
- Add
PropertyList
andPropertyListItem
components. - Add
TaskList
andTaskListItem
components. - Add
PlatformConfigurationView
component to enable setup for embedded apps. - 型安全なプロパティを保証するためにランタイムコンポーネントのプロパティ検証を追加しました。
Button
コンポーネントにpending
プロパティを追加しました。Badge
コンポーネントのtype
プロパティにnew
のバリアント値を追加しました。- Add more format options to
BarChart
andLineChart
components:decimal
の形式スタイルを追加しました。- より適切な軸制限を設定するために
nice
オプションを追加しました。 - 軸上の市場数を指定するために
ticks
を追加しました。 - 目盛ラベルの表記を変更するために
tickFormat
を追加しました。 - ゼロ値の表示をコントロールするために
zero
を追加しました。 - 数値の精度をコントロールするため、通貨の形式に
fractionalDigits
オプションを追加しました。
- Remove deprecated
tabKey
prop fromTab
andTabPanel
components. Use theid
prop instead. Box
およびInline
コンポーネントのcss
プロパティから非推奨のbackground
プロパティを削除しました。代わりにbackgroundColor
プロパティを使用します。Button
およびLink
コンポーネントから非推奨のclassName
プロパティを削除しました。FormFieldGroup
コンポーネントから非推奨のinvalid
プロパティを削除しました。Box
およびInline
コンポーネントのcss
プロパティから非推奨のlayout
プロパティを削除しました。代わりにstack
プロパティを使用します。- Remove deprecated
onClose
prop fromFocusView
component. Use thesetShown
prop instead. TextArea
およびTextField
コンポーネントから非推奨のonKeyPress
プロパティを削除しました。DateField
コンポーネントのonChange
プロパティが、変更イベントではなく値を直接受け取るようになりました。FormFieldGroup
コンポーネントのlayout
プロパティ値が、row
とcolumn
からhorizontal
とvertical
に変更されました。
8.9.3
- Fix the type definition for
SignInView
’sonPress
callback argument to match its actual runtime value. - Upgrade
@remote-ui
dependencies.
8.9.2
- Fix
minTileWidth
prop types to accept only compatible values. - Remove
React.
type from theRefObject Tooltip
component’strigger
prop, as it is not supported at runtime. - Add
id
prop toTab
andTabPanel
components to replacetabKey
. - Remove deprecation notice from border color properties (
borderColor
,borderBottomColor
,borderLeftColor
,borderRightColor
,borderTopColor
) in thecss
prop ofBox
andInline
components. - Add border style and width properties (
borderStyle
,borderWidth
,borderBottomStyle
,borderBottomWidth
,borderLeftStyle
,borderLeftWidth
,borderRightStyle
,borderRightWidth
,borderTopStyle
,borderTopWidth
) to thecss
prop ofBox
andInline
components. - Add literal types to the
name
prop on theIcon
component.
8.9.1
- 修正済みの依存関係バージョンを使用します。
- テストラッパーの検索メソッドを修正しました。
8.9.0
DateField
コンポーネントにvalue
プロパティを追加しました。Box
およびInline
コンポーネントのbackground
プロパティに非推奨通知を追加しました。代わりにbackgroundColor
プロパティを使用します。Button
およびLink
コンポーネントのclassName
プロパティに非推奨通知を追加しました。FormFieldGroup
コンポーネントのinvalid
プロパティに非推奨通知を追加しました。Box
およびInline
コンポーネントのcss
プロパティのlayout
プロパティに非推奨通知を追加しました。代わりにstack
プロパティを使用します。Tab
およびTabPanel
コンポーネントのtabKey
プロパティに非推奨通知を追加しました。Box
およびInline
コンポーネントのcss
プロパティのボーダーカラープロパティ (borderColor
、borderTopColor
、borderRightColor
、borderBottomColor
、borderLeftColor
) に非推奨通知を追加しました。ボーダーのスタイルを設定する場合は、代わりにkeyline
プロパティを使用します。value
およびchecked
プロパティから非推奨通知を削除しました。
8.8.0
- Add
StripeFileUploader
component. - Add
platform
prop to environment context. - Add
appContext
to theExtensionContextValue
type. - Add types for
AuthorizedPermission
andAuthorizedContentSecurityPolicy
. - Add some utility functions for interacting with
appContext
:getUserAuthorizedPermissions
: アプリの承認済みの権限と、ダッシュボードの現在のユーザーの権限の共通部分を取得します。isPermissionAuthorized
: 権限がアプリの承認済みの権限に含まれているかどうかを表示します。isSourceInAuthorizedCSP
: URL がアプリの承認済みの連結ソースまたは画像ソースに存在するかどうかを表示します。
8.7.0
- Add
roles
to the account passed to extensions in theuserContext
property.
8.6.0
- Add
secondaryAction
prop toSignInView
. - Add
target
toSignInView
action props. - Allow both
href
andonPress
onSignInView
action props.
8.5.0
- Add
constants
prop to environment context.
8.4.1
- Add
SignInView
component.
8.3.0
- Remove unsupported
contentUses
property fromTableCell
andTableHeaderCell
typing. - Updated
useToast
to returnshow
anddismiss
utility methods.
8.2.0
StripeAppsHttpResponse.
now returns a rejected promise if the HTTP response body was empty.prototype. toJSON() - Add support for calling
fetchStripeSignature
with nested JSON. - Fix
debug
to filter props according toall
option. - Add
tabKey
toTab
andTabPanel
. - Upgrade
stripe
package dependency to^9.
.11. 0 - Add
external
toLink
. - Add
setShown
prop toFocusView
. - Add
showToast
utility function for rendering toast notifications at the bottom of an app’s view.
8.1.0
- Fix
ExtensionContextValue
typing to markname
andobjectContext
values as possiblynull
. - Add
textAlign
toBox
css
. - Make
onSave
prop optional forSettingsView
components. - Upgrade to
@remote-ui/react
4.5.2. - Add
Sparkline
component.
8.0.0
- Add deprecation notice to the
value
prop onTextArea
,TextField
, andSelect
components. - Add deprecation notice to the
checked
prop onCheckbox
,Radio
, andSwitch
components. - Remove unsupported
outerRef
props from inputs.
7.1.0
- Add
brandIcon
andbrandColor
toContextView
.
7.0.0
- Deprecate
Notice
component; useBanner
instead. - Add
overflowX
andoverflowY
toBox
css
.
6.3.1
- Internal update, no user-facing changes.
6.3.0
- Add
Banner
component. - Add deprecation warning for
Notice
component. - Add
locale
toExtensionContextValue['oauthContext']
. - Add
overflowWrap
andwordBreak
toBox
css
properties. - Add
textTransform
toBox
andInline
css
properties. ContextView
にprimaryAction
、secondaryAction
、footerContent
プロパティを追加しました。- Add
whiteSpace
toBox
css
properties.
6.2.0
BarChart
およびLineChart
の改善:- Configurable axis formatting.
- Configurable value formatting.
- Configurable channel domains.
- Configurable channel ranges.
- Show/hide axis labels and ticks in charts.
- Show/hide grid lines in charts.
- Show/hide tooltips in chart presets.
- Show/hide legends in chart presets.
6.1.0
- Add a confirmation dialog to
FocusView
. - Add
Chip
andChipList
components. - Update the
getDashboardUserEmail
utility to return the email directly and reject the promise if there’s an error. - Fix React components not being accepted in the
label
prop of form elements. - Expose
text-overflow: ellipsis
andword-wrap: normal | break-word
onBox
css
. - Add
country
to the account passed to extensions in theuserContext
property. Img
コンポーネントにdata:
URL サポートを追加しました。詳しくは、Img
コンポーネントをご覧ください。
6.0.0
- Deprecate email in view context.
- Consolidated utilities in
/utils
path. - Fixed react-reconciler dependency issue affecting unit tests.
5.0.1
- Fix prop types for
Switch
,Checkbox
andRadio
.
5.0.0
- Adds the
Accordion
,Icon
,Spinner
, andTooltip
components. - Adds tooltips to
BarChart
andLineChart
. - Fix prop typing for
BarChart
andLineChart
. - Deprecates legacy view context parameters.
- Enables setting width through
css={{ width: .
on. }} Select
,TextArea
,TextField
,Button
, andLink
. - Enables setting internal horizontal alignment through
css={{ alignX: .
on. }} Button
andLink
. - Adds the
clipboardWriteText
function. - Adds the
getDashboardUserEmail
function.
4.0.0
- Deprecates the
slot
property.
3.2.0
- Adds the
createOAuthState
function. - Adds
oauthContext
to theExtensionContextValue
type.
3.1.0
- Adds the
Img
component.
3.0.0
- Adds support for the
Notice
,Charts
, andTabs
components. - 対応処理が必要な変更:
ListItem
: 以前までは、子として渡されたコンテンツが、コンポーネントに表示される主要なコンテンツでした。現在はtitle
プロパティに主要なコンテンツが渡されます。description
スロットもsecondaryTitle
プロパティに再割り当てされるようになっています。MenuTrigger
: このコンポーネントは廃止され、代わりにMenu
コンポーネントのtrigger
プロパティが使用されるようになりました。Slot API の使用も廃止されています。
- ユーザーコンテキストに渡される権限を削除しました。
2.2.1
- Expose
docs.
files injson dist
.
2.2.0
ContextView
にactions
プロパティを追加しました。
2.1.0
ButtonGroup
コンポーネントを導入しました。- フォーム管理から
margin-bottom
を削除しました。 - ボタンに
white-space: nowrap
とalignY: center
をデフォルトで追加しました。 - ボタンテーマですべてのサイズバリアントに
min-height
を設定できるようになりました。 Link
およびButton
をコンテンツに合わせて縮小しました。TextField
およびTextArea
のdefaultValue
属性を公開しました。hiddenElements
プロパティを使用して、フォーム管理でerror
とdescription
を非表示にできるようになりました。Select
とTextArea
のinvalid
およびsize
プロパティを公開しました。Radio
のdefaultChecked
属性を公開しました。TextArea
のresizeable
およびrows
プロパティを公開しました。- コントロールコンポーネントの無効状態を修正しました。
Chip
のonDropdown
が 2 回起動する問題を修正しました。Divider
の表示を修正しました。
2.0.3
- ダッシュボードのデータが更新されることで解決する
useRefreshDashboardData
のプロミスを返します。 - 追加のリクエストペイロードを必要に応じて受け付ける
fetchStripeSignature
メソッドを追加しました。署名を使用して、アプリのバックエンドに対する認証済みリクエストが可能になります。 - テスト要素のチェックメソッド
.
がコンポーネントの識別に失敗する問題を修正しました。is
2.0.2
- Fixes an issue with the
testing
package in which comopnents with fragment props were not findable usingwrapper.
.find()
2.0.1
2.0.0
- Fixes a render error with
SettingsView
. - Updates
SettingsView
types to match the available component props. - テスト用の
getMockContextProps
ヘルパーを追加しました。詳しくは、コンテキストプロパティをご覧ください。 - List コンポーネントで
string
だけでなくReact.
もReactNode value
プロパティの有効なタイプとして受け付けられるようになりました。 - Adds hover state to ListItem components.
- Updates ListItem component such that hover state is only visible when there is an action associated.
- Fix Select rendering when multiple is true.
- Fix Checkbox onChange firing twice.
1.1.7
- アプリの Jest テストを作成するためのヘルパーを含む「テスト」モジュールを追加しました。詳しくは、UI テストをご覧ください。
- Fixes some components that take React nodes as props:
MenuGroup
now supports thetitle
prop.FocusView
now supports thefooterContent
prop.SettingsView
now supports theheaderActions
prop.
- タイプの修正と文法の更新を行いました。
1.1.6
- Added types for
FocusView
,SettingsView
, andContextView
. - Stripe API クライアントの初期化時に使用する新しい定数
STRIPE_
を http_client からエクスポートします。API_ KEY