File tree Expand file tree Collapse file tree 5 files changed +41
-2
lines changed
ui-extensions-react/src/surfaces/admin
components/InternalMetaobjectField
ui-extensions/src/surfaces/admin
components/InternalMetaobjectField Expand file tree Collapse file tree 5 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -83,3 +83,5 @@ export {URLField} from './components/URLField/URLField';
8383export type { URLFieldProps } from './components/URLField/URLField' ;
8484export { InternalLocationList } from './components/InternalLocationList/InternalLocationList' ;
8585export type { InternalLocationListProps } from './components/InternalLocationList/InternalLocationList' ;
86+ export { InternalMetaobjectField } from './components/InternalMetaobjectField/InternalMetaobjectField' ;
87+ export type { InternalMetaobjectFieldProps } from './components/InternalMetaobjectField/InternalMetaobjectField' ;
Original file line number Diff line number Diff line change 1+ import { InternalMetaobjectField as BaseInternalMetaobjectField } from '@shopify/ui-extensions/admin' ;
2+ import { createRemoteReactComponent } from '@remote-ui/react' ;
3+
4+ export const InternalMetaobjectField = createRemoteReactComponent (
5+ BaseInternalMetaobjectField ,
6+ ) ;
7+ export type { InternalMetaobjectFieldProps } from '@shopify/ui-extensions/admin' ;
Original file line number Diff line number Diff line change @@ -87,3 +87,5 @@ export {URLField} from './components/URLField/URLField';
8787export type { URLFieldProps } from './components/URLField/URLField' ;
8888export { InternalLocationList } from './components/InternalLocationList/InternalLocationList' ;
8989export type { InternalLocationListProps } from './components/InternalLocationList/InternalLocationList' ;
90+ export { InternalMetaobjectField } from './components/InternalMetaobjectField/InternalMetaobjectField' ;
91+ export type { InternalMetaobjectFieldProps } from './components/InternalMetaobjectField/InternalMetaobjectField' ;
Original file line number Diff line number Diff line change 1+ import { createRemoteComponent } from '@remote-ui/core' ;
2+
3+ export interface InternalMetaobjectFieldProps {
4+ /**
5+ * The id of the metaobject.
6+ */
7+ id : string ;
8+
9+ /**
10+ * The definition type of the metaobject.
11+ */
12+ definitionType : string ;
13+
14+ /**
15+ * The key of the metaobject field.
16+ */
17+ fieldKey : string ;
18+ }
19+
20+ export const InternalMetaobjectField = createRemoteComponent <
21+ 'InternalMetaobjectField' ,
22+ InternalMetaobjectFieldProps
23+ > ( 'InternalMetaobjectField' ) ;
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ type OrderRoutingComponents = AnyComponentBuilder<
4747 Pick < Components , 'InternalLocationList' >
4848> ;
4949
50+ type CustomDataComponents = AnyComponentBuilder <
51+ Pick < Components , 'InternalMetaobjectField' >
52+ > ;
53+
5054/**
5155 * See the [list of available components](/docs/api/admin-extensions/components).
5256 */
@@ -56,6 +60,7 @@ type AllComponents = AnyComponentBuilder<
5660 | 'CustomerSegmentTemplate'
5761 | 'InternalCustomerSegmentTemplate'
5862 | 'InternalLocationList'
63+ | 'InternalMetaobjectField'
5964 >
6065> ;
6166
@@ -181,7 +186,7 @@ export interface ExtensionTargets {
181186 */
182187 'admin.metaobject-details.block.render' : RenderExtension <
183188 BlockExtensionApi < 'admin.metaobject-details.block.render' > ,
184- AllComponents
189+ AllComponents | CustomDataComponents
185190 > ;
186191
187192 /**
@@ -292,7 +297,7 @@ export interface ExtensionTargets {
292297 */
293298 'admin.metaobject-details.action.render' : RenderExtension <
294299 ActionExtensionApi < 'admin.metaobject-details.action.render' > ,
295- AllComponents
300+ AllComponents | CustomDataComponents
296301 > ;
297302
298303 /**
You can’t perform that action at this time.
0 commit comments