Skip to content

Commit

Permalink
feat(admin-ui): Use customField ui components specified in config
Browse files Browse the repository at this point in the history
Relates to #415
  • Loading branch information
michaelbromley committed Nov 25, 2021
1 parent e22e006 commit f52459f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
25 changes: 17 additions & 8 deletions packages/admin-ui/src/lib/core/src/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ export type BooleanCustomFieldConfig = CustomField & {
readonly?: Maybe<Scalars['Boolean']>;
internal?: Maybe<Scalars['Boolean']>;
nullable?: Maybe<Scalars['Boolean']>;
ui?: Maybe<Scalars['JSON']>;
};

export type BooleanOperators = {
Expand Down Expand Up @@ -1132,6 +1133,7 @@ export type CustomField = {
readonly?: Maybe<Scalars['Boolean']>;
internal?: Maybe<Scalars['Boolean']>;
nullable?: Maybe<Scalars['Boolean']>;
ui?: Maybe<Scalars['JSON']>;
};

export type CustomFieldConfig = StringCustomFieldConfig | LocaleStringCustomFieldConfig | IntCustomFieldConfig | FloatCustomFieldConfig | BooleanCustomFieldConfig | DateTimeCustomFieldConfig | RelationCustomFieldConfig | TextCustomFieldConfig;
Expand Down Expand Up @@ -1310,6 +1312,7 @@ export type DateTimeCustomFieldConfig = CustomField & {
min?: Maybe<Scalars['String']>;
max?: Maybe<Scalars['String']>;
step?: Maybe<Scalars['Int']>;
ui?: Maybe<Scalars['JSON']>;
};

export type DeleteAssetInput = {
Expand Down Expand Up @@ -1533,6 +1536,7 @@ export type FloatCustomFieldConfig = CustomField & {
min?: Maybe<Scalars['Float']>;
max?: Maybe<Scalars['Float']>;
step?: Maybe<Scalars['Float']>;
ui?: Maybe<Scalars['JSON']>;
};

export type FulfillOrderInput = {
Expand Down Expand Up @@ -1693,6 +1697,7 @@ export type IntCustomFieldConfig = CustomField & {
min?: Maybe<Scalars['Int']>;
max?: Maybe<Scalars['Int']>;
step?: Maybe<Scalars['Int']>;
ui?: Maybe<Scalars['JSON']>;
};

/** Returned if the user authentication credentials are not valid */
Expand Down Expand Up @@ -2153,6 +2158,7 @@ export type LocaleStringCustomFieldConfig = CustomField & {
internal?: Maybe<Scalars['Boolean']>;
nullable?: Maybe<Scalars['Boolean']>;
pattern?: Maybe<Scalars['String']>;
ui?: Maybe<Scalars['JSON']>;
};

export type LocalizedString = {
Expand Down Expand Up @@ -4364,6 +4370,7 @@ export type RelationCustomFieldConfig = CustomField & {
nullable?: Maybe<Scalars['Boolean']>;
entity: Scalars['String'];
scalarFields: Array<Scalars['String']>;
ui?: Maybe<Scalars['JSON']>;
};

export type Release = Node & StockMovement & {
Expand Down Expand Up @@ -4711,6 +4718,7 @@ export type StringCustomFieldConfig = CustomField & {
nullable?: Maybe<Scalars['Boolean']>;
pattern?: Maybe<Scalars['String']>;
options?: Maybe<Array<StringFieldOption>>;
ui?: Maybe<Scalars['JSON']>;
};

export type StringFieldOption = {
Expand Down Expand Up @@ -4902,6 +4910,7 @@ export type TextCustomFieldConfig = CustomField & {
readonly?: Maybe<Scalars['Boolean']>;
internal?: Maybe<Scalars['Boolean']>;
nullable?: Maybe<Scalars['Boolean']>;
ui?: Maybe<Scalars['JSON']>;
};

export type TransitionFulfillmentToStateResult = Fulfillment | FulfillmentStateTransitionError;
Expand Down Expand Up @@ -7727,7 +7736,7 @@ export type UpdateGlobalSettingsMutation = { updateGlobalSettings: (

type CustomFieldConfig_BooleanCustomFieldConfig_Fragment = (
{ __typename?: 'BooleanCustomFieldConfig' }
& Pick<BooleanCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable'>
& Pick<BooleanCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable' | 'ui'>
& { description?: Maybe<Array<(
{ __typename?: 'LocalizedString' }
& Pick<LocalizedString, 'languageCode' | 'value'>
Expand All @@ -7739,7 +7748,7 @@ type CustomFieldConfig_BooleanCustomFieldConfig_Fragment = (

type CustomFieldConfig_DateTimeCustomFieldConfig_Fragment = (
{ __typename?: 'DateTimeCustomFieldConfig' }
& Pick<DateTimeCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable'>
& Pick<DateTimeCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable' | 'ui'>
& { description?: Maybe<Array<(
{ __typename?: 'LocalizedString' }
& Pick<LocalizedString, 'languageCode' | 'value'>
Expand All @@ -7751,7 +7760,7 @@ type CustomFieldConfig_DateTimeCustomFieldConfig_Fragment = (

type CustomFieldConfig_FloatCustomFieldConfig_Fragment = (
{ __typename?: 'FloatCustomFieldConfig' }
& Pick<FloatCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable'>
& Pick<FloatCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable' | 'ui'>
& { description?: Maybe<Array<(
{ __typename?: 'LocalizedString' }
& Pick<LocalizedString, 'languageCode' | 'value'>
Expand All @@ -7763,7 +7772,7 @@ type CustomFieldConfig_FloatCustomFieldConfig_Fragment = (

type CustomFieldConfig_IntCustomFieldConfig_Fragment = (
{ __typename?: 'IntCustomFieldConfig' }
& Pick<IntCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable'>
& Pick<IntCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable' | 'ui'>
& { description?: Maybe<Array<(
{ __typename?: 'LocalizedString' }
& Pick<LocalizedString, 'languageCode' | 'value'>
Expand All @@ -7775,7 +7784,7 @@ type CustomFieldConfig_IntCustomFieldConfig_Fragment = (

type CustomFieldConfig_LocaleStringCustomFieldConfig_Fragment = (
{ __typename?: 'LocaleStringCustomFieldConfig' }
& Pick<LocaleStringCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable'>
& Pick<LocaleStringCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable' | 'ui'>
& { description?: Maybe<Array<(
{ __typename?: 'LocalizedString' }
& Pick<LocalizedString, 'languageCode' | 'value'>
Expand All @@ -7787,7 +7796,7 @@ type CustomFieldConfig_LocaleStringCustomFieldConfig_Fragment = (

type CustomFieldConfig_RelationCustomFieldConfig_Fragment = (
{ __typename?: 'RelationCustomFieldConfig' }
& Pick<RelationCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable'>
& Pick<RelationCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable' | 'ui'>
& { description?: Maybe<Array<(
{ __typename?: 'LocalizedString' }
& Pick<LocalizedString, 'languageCode' | 'value'>
Expand All @@ -7799,7 +7808,7 @@ type CustomFieldConfig_RelationCustomFieldConfig_Fragment = (

type CustomFieldConfig_StringCustomFieldConfig_Fragment = (
{ __typename?: 'StringCustomFieldConfig' }
& Pick<StringCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable'>
& Pick<StringCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable' | 'ui'>
& { description?: Maybe<Array<(
{ __typename?: 'LocalizedString' }
& Pick<LocalizedString, 'languageCode' | 'value'>
Expand All @@ -7811,7 +7820,7 @@ type CustomFieldConfig_StringCustomFieldConfig_Fragment = (

type CustomFieldConfig_TextCustomFieldConfig_Fragment = (
{ __typename?: 'TextCustomFieldConfig' }
& Pick<TextCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable'>
& Pick<TextCustomFieldConfig, 'name' | 'type' | 'list' | 'readonly' | 'nullable' | 'ui'>
& { description?: Maybe<Array<(
{ __typename?: 'LocalizedString' }
& Pick<LocalizedString, 'languageCode' | 'value'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ export const CUSTOM_FIELD_CONFIG_FRAGMENT = gql`
}
readonly
nullable
ui
}
`;

Expand Down

0 comments on commit f52459f

Please sign in to comment.