Skip to content

Commit

Permalink
Revert "fix: rename numeric list to list (#196)"
Browse files Browse the repository at this point in the history
This reverts commit 958347c.
  • Loading branch information
pgurusinga committed Nov 20, 2023
1 parent 958347c commit 04e26d2
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 110 deletions.
2 changes: 1 addition & 1 deletion src/api/page/content-types/page/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"page.box",
"page.link-list-box",
"page.box-with-image",
"page.list"
"page.numeric-list"
],
"required": true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"collectionName": "components_page_list_items",
"collectionName": "components_page_numeric_list_items",
"info": {
"displayName": "ListItem",
"displayName": "NumericListItem",
"description": ""
},
"options": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"collectionName": "components_page_lists",
"collectionName": "components_page_numeric_lists",
"info": {
"displayName": "List",
"displayName": "NumericList",
"description": ""
},
"options": {},
Expand All @@ -21,7 +21,7 @@
"items": {
"type": "component",
"repeatable": true,
"component": "page.list-item"
"component": "page.numeric-list-item"
},
"container": {
"type": "component",
Expand Down
72 changes: 0 additions & 72 deletions types/generated/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,6 @@ export interface FormElementsButton extends Schema.Component {
};
}

export interface FormElementsCheckbox extends Schema.Component {
collectionName: 'components_form_elements_checkboxes';
info: {
displayName: 'Checkbox';
icon: 'check';
description: '';
};
attributes: {
label: Attribute.String & Attribute.Required;
name: Attribute.String & Attribute.Required;
isRequiredError: Attribute.Relation<
'form-elements.checkbox',
'oneToOne',
'api::error.error'
>;
};
}

export interface FormElementsDropdown extends Schema.Component {
collectionName: 'components_form_elements_dropdowns';
info: {
Expand Down Expand Up @@ -172,24 +154,6 @@ export interface FormElementsSelect extends Schema.Component {
};
}

export interface FormElementsTextarea extends Schema.Component {
collectionName: 'components_basic_textareas';
info: {
displayName: 'textarea';
description: '';
};
attributes: {
name: Attribute.String & Attribute.Required;
label: Attribute.String;
errors: Attribute.Relation<
'form-elements.textarea',
'oneToMany',
'api::error.error'
>;
placeholder: Attribute.String;
};
}

export interface FormHelperErrors extends Schema.Component {
collectionName: 'components_basic_errors';
info: {
Expand Down Expand Up @@ -404,38 +368,6 @@ export interface PageLinkListBox extends Schema.Component {
};
}

export interface PageListItem extends Schema.Component {
collectionName: 'components_page_list_items';
info: {
displayName: 'ListItem';
description: '';
};
attributes: {
identifier: Attribute.String;
label: Attribute.Component<'basic.heading'>;
image: Attribute.Media;
content: Attribute.RichText;
headline: Attribute.Component<'basic.heading'>;
buttons: Attribute.Component<'form-elements.button', true>;
};
}

export interface PageList extends Schema.Component {
collectionName: 'components_page_lists';
info: {
displayName: 'List';
description: '';
};
attributes: {
identifier: Attribute.String;
heading: Attribute.Component<'basic.heading'>;
isNumeric: Attribute.Boolean & Attribute.DefaultTo<true>;
items: Attribute.Component<'page.list-item', true>;
container: Attribute.Component<'meta.container'> & Attribute.Required;
outerBackground: Attribute.Component<'meta.background'>;
};
}

export interface PageMetaPageInfo extends Schema.Component {
collectionName: 'components_page_meta_page_infos';
info: {
Expand Down Expand Up @@ -469,11 +401,9 @@ declare module '@strapi/types' {
'basic.link': BasicLink;
'basic.paragraph': BasicParagraph;
'form-elements.button': FormElementsButton;
'form-elements.checkbox': FormElementsCheckbox;
'form-elements.dropdown': FormElementsDropdown;
'form-elements.input': FormElementsInput;
'form-elements.select': FormElementsSelect;
'form-elements.textarea': FormElementsTextarea;
'form-helper.errors': FormHelperErrors;
'form-helper.select-option': FormHelperSelectOption;
'meta.background': MetaBackground;
Expand All @@ -484,8 +414,6 @@ declare module '@strapi/types' {
'page.info-box-item': PageInfoBoxItem;
'page.info-box': PageInfoBox;
'page.link-list-box': PageLinkListBox;
'page.list-item': PageListItem;
'page.list': PageList;
'page.meta-page-info': PageMetaPageInfo;
'page.navigation-item': PageNavigationItem;
}
Expand Down
84 changes: 52 additions & 32 deletions types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1070,12 +1070,6 @@ export interface ApiFormFlowPageFormFlowPage extends Schema.CollectionType {
localized: true;
};
}>;
preHeading: Attribute.String &
Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
heading: Attribute.String &
Attribute.Required &
Attribute.SetPluginOptions<{
Expand All @@ -1099,29 +1093,14 @@ export interface ApiFormFlowPageFormFlowPage extends Schema.CollectionType {
};
}>;
form: Attribute.DynamicZone<
[
'form-elements.input',
'form-elements.textarea',
'form-elements.select',
'form-elements.checkbox',
'form-elements.dropdown'
]
['form-elements.input', 'form-elements.select', 'form-elements.dropdown']
> &
Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
post_form: Attribute.DynamicZone<
[
'basic.heading',
'basic.paragraph',
'page.box-with-image',
'page.box',
'page.info-box',
'page.link-list-box'
]
> &
post_form: Attribute.DynamicZone<['basic.heading', 'basic.paragraph']> &
Attribute.SetPluginOptions<{
i18n: {
localized: true;
Expand Down Expand Up @@ -1203,6 +1182,53 @@ export interface ApiGlobalGlobal extends Schema.SingleType {
};
}

export interface ApiNavigationNavigation extends Schema.SingleType {
collectionName: 'navigations';
info: {
singularName: 'navigation';
pluralName: 'navigations';
displayName: 'Navigation';
description: '';
};
options: {
draftAndPublish: true;
};
pluginOptions: {
i18n: {
localized: true;
};
};
attributes: {
tree: Attribute.Component<'page.navigation-item', true> &
Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'api::navigation.navigation',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'api::navigation.navigation',
'oneToOne',
'admin::user'
> &
Attribute.Private;
localizations: Attribute.Relation<
'api::navigation.navigation',
'oneToMany',
'api::navigation.navigation'
>;
locale: Attribute.String;
};
}

export interface ApiPagePage extends Schema.CollectionType {
collectionName: 'pages';
info: {
Expand Down Expand Up @@ -1240,8 +1266,7 @@ export interface ApiPagePage extends Schema.CollectionType {
'page.header',
'page.box',
'page.link-list-box',
'page.box-with-image',
'page.list'
'page.box-with-image'
]
> &
Attribute.Required &
Expand Down Expand Up @@ -1558,13 +1583,7 @@ export interface ApiVorabCheckPageVorabCheckPage extends Schema.CollectionType {
};
}>;
form: Attribute.DynamicZone<
[
'form-elements.input',
'form-elements.textarea',
'form-elements.select',
'form-elements.checkbox',
'form-elements.dropdown'
]
['form-elements.input', 'form-elements.select', 'form-elements.dropdown']
> &
Attribute.SetPluginOptions<{
i18n: {
Expand Down Expand Up @@ -1618,6 +1637,7 @@ declare module '@strapi/types' {
'api::footer.footer': ApiFooterFooter;
'api::form-flow-page.form-flow-page': ApiFormFlowPageFormFlowPage;
'api::global.global': ApiGlobalGlobal;
'api::navigation.navigation': ApiNavigationNavigation;
'api::page.page': ApiPagePage;
'api::page-header.page-header': ApiPageHeaderPageHeader;
'api::result-page.result-page': ApiResultPageResultPage;
Expand Down

0 comments on commit 04e26d2

Please sign in to comment.