diff --git a/api/collections/fieldLists/iconCycleCircle.yml b/api/collections/fieldLists/iconCycleCircle.yml index ea08196..d7443fb 100644 --- a/api/collections/fieldLists/iconCycleCircle.yml +++ b/api/collections/fieldLists/iconCycleCircle.yml @@ -2,6 +2,8 @@ type: object[] meta: label: Boxen + pathStep: + title: "icons im Kreis" widget: containerLessObjectArray subFields: !include box.yml diff --git a/api/collections/fieldLists/iconCycleSquare.yml b/api/collections/fieldLists/iconCycleSquare.yml index 6f4dcca..febdf80 100644 --- a/api/collections/fieldLists/iconCycleSquare.yml +++ b/api/collections/fieldLists/iconCycleSquare.yml @@ -2,5 +2,7 @@ type: object[] meta: label: Boxen + pathStep: + title: "icons im Rechteck" widget: containerLessObjectArray subFields: !include box.yml diff --git a/api/collections/module.yml b/api/collections/module.yml index ee0dd7b..3f073fa 100644 --- a/api/collections/module.yml +++ b/api/collections/module.yml @@ -123,6 +123,7 @@ fields: meta: label: Icons im Kreis widget: containerLessObject + dependsOn: eval: $parent.type == 'iconCycleCircle' subFields: !include fieldLists/iconCycleCircle.yml diff --git a/types/global.d.ts b/types/global.d.ts index ec9d42e..cb399d2 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -58,14 +58,28 @@ interface MediaLibrary { id: string } -type Module = - | { id: string; type: "iconCycleCircle"; iconCycleCircle: IconCycleCircle } - | { id: string; type: "iconCycleSquare"; iconCycleSquare: IconCycleSquare } - | { id: string; type: "worldCard"; worldCard: WorldCard } - | { id: string; type: "chefTeam" } - | { id: string; type: "employeeTeam" } - | { id: string; type: "jobOfferLink"; jobOfferPage: string } - | { id: string; type: "jobOffer" } +type BaseModule = { id: string } + +type IconCycleModule = BaseModule & { + type: "iconCycleCircle" | "iconCycleSquare" + iconCycle?: IconCycleCircle | IconCycleSquare +} + +type WorldCardModule = BaseModule & { + type: "worldCard" + worldCard?: WorldCard +} + +type JobOfferModule = BaseModule & { + type: "jobOfferLink" | "jobOffer" + jobOfferPage?: string +} + +type SimpleModule = BaseModule & { + type: "chefTeam" | "employeeTeam" +} + +type Module = IconCycleModule | WorldCardModule | JobOfferModule | SimpleModule interface Publication { file: string