From 832994d13e723609e2d7a5e2ec7303d97cd89918 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Sat, 2 Nov 2024 12:46:48 +0100 Subject: [PATCH] component enhancements --- src/api/page/content-types/page/schema.json | 2 +- src/components/dynamic-zone/gallery.json | 11 +- src/components/shared/hero.json | 13 +- .../1.0.0/full_documentation.json | 225 +++++++++--------- types/generated/components.d.ts | 6 +- types/generated/contentTypes.d.ts | 2 +- 6 files changed, 133 insertions(+), 126 deletions(-) diff --git a/src/api/page/content-types/page/schema.json b/src/api/page/content-types/page/schema.json index 86c2c79..44b7a81 100644 --- a/src/api/page/content-types/page/schema.json +++ b/src/api/page/content-types/page/schema.json @@ -36,7 +36,7 @@ "targetField": "identifier", "required": true }, - "Hero": { + "hero": { "type": "component", "repeatable": false, "pluginOptions": { diff --git a/src/components/dynamic-zone/gallery.json b/src/components/dynamic-zone/gallery.json index b51eb56..28f3a83 100644 --- a/src/components/dynamic-zone/gallery.json +++ b/src/components/dynamic-zone/gallery.json @@ -2,17 +2,18 @@ "collectionName": "components_dynamic_zone_galleries", "info": { "displayName": "Galerie", - "icon": "apps" + "icon": "apps", + "description": "" }, "options": {}, "attributes": { "images": { + "type": "media", + "multiple": true, + "required": true, "allowedTypes": [ "images" - ], - "type": "media", - "multiple": false, - "required": true + ] } } } diff --git a/src/components/shared/hero.json b/src/components/shared/hero.json index df2f46e..db0364f 100644 --- a/src/components/shared/hero.json +++ b/src/components/shared/hero.json @@ -2,19 +2,20 @@ "collectionName": "components_shared_heroes", "info": { "displayName": "hero", - "icon": "rocket" + "icon": "rocket", + "description": "" }, "options": {}, "attributes": { "banner": { - "allowedTypes": [ - "images" - ], "type": "media", "multiple": false, - "required": true + "required": true, + "allowedTypes": [ + "images" + ] }, - "titel": { + "title": { "type": "string", "required": true } diff --git a/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 67f778a..0fdfb06 100644 --- a/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2024-11-01T12:34:04.379Z" + "x-generation-date": "2024-11-02T11:42:52.169Z" }, "x-strapi-config": { "plugins": [ @@ -6506,7 +6506,7 @@ } } }, - "titel": { + "title": { "type": "string" } } @@ -6524,56 +6524,70 @@ ] }, "images": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "documentId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternativeText": { - "type": "string" - }, - "caption": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - }, - "formats": {}, - "hash": { - "type": "string" - }, - "ext": { - "type": "string" - }, - "mime": { - "type": "string" - }, - "size": { - "type": "number", - "format": "float" - }, - "url": { - "type": "string" - }, - "previewUrl": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "provider_metadata": {}, - "related": { - "type": "array", - "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { "type": "object", "properties": { "id": { @@ -6583,62 +6597,23 @@ "type": "string" } } - } - }, - "folder": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "documentId": { - "type": "string" - } - } - }, - "folderPath": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "publishedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "documentId": { - "type": "string" - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "documentId": { - "type": "string" - } - } - }, - "locale": { - "type": "string" - }, - "localizations": { - "type": "array", - "items": { + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { "type": "object", "properties": { "id": { @@ -6648,6 +6623,34 @@ "type": "string" } } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } } } } @@ -9093,7 +9096,7 @@ "slug": { "type": "string" }, - "Hero": { + "hero": { "$ref": "#/components/schemas/SharedHeroComponent" }, "content": { @@ -9211,7 +9214,7 @@ "slug": { "type": "string" }, - "Hero": { + "hero": { "$ref": "#/components/schemas/SharedHeroComponent" }, "content": { @@ -9308,7 +9311,7 @@ "slug": { "type": "string" }, - "Hero": { + "hero": { "$ref": "#/components/schemas/SharedHeroComponent" }, "content": { diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index 91b6c93..98fc0a3 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -69,11 +69,12 @@ export interface DynamicZoneFullText extends Struct.ComponentSchema { export interface DynamicZoneGallery extends Struct.ComponentSchema { collectionName: 'components_dynamic_zone_galleries'; info: { + description: ''; displayName: 'Galerie'; icon: 'apps'; }; attributes: { - images: Schema.Attribute.Media<'images'> & Schema.Attribute.Required; + images: Schema.Attribute.Media<'images', true> & Schema.Attribute.Required; }; } @@ -140,12 +141,13 @@ export interface ItemsNavbarSubItems extends Struct.ComponentSchema { export interface SharedHero extends Struct.ComponentSchema { collectionName: 'components_shared_heroes'; info: { + description: ''; displayName: 'hero'; icon: 'rocket'; }; attributes: { banner: Schema.Attribute.Media<'images'> & Schema.Attribute.Required; - titel: Schema.Attribute.String & Schema.Attribute.Required; + title: Schema.Attribute.String & Schema.Attribute.Required; }; } diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 4f5e78c..815dcbe 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -689,7 +689,7 @@ export interface ApiPagePage extends Struct.CollectionTypeSchema { createdAt: Schema.Attribute.DateTime; createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private; - Hero: Schema.Attribute.Component<'shared.hero', false> & + hero: Schema.Attribute.Component<'shared.hero', false> & Schema.Attribute.SetPluginOptions<{ i18n: { localized: true;