@@ -12,6 +12,7 @@ import Button from 'primevue/button';
1212import {FontAwesomeIcon } from ' @fortawesome/vue-fontawesome' ;
1313import {isSubSchemaDefinedInDefinitions } from ' @/schema/schemaReadingUtils' ;
1414import {getObjectDisplayName } from ' ../../../schema/graph-representation/schemaGraphConstructor' ;
15+ import { computed } from ' vue' ;
1516
1617const props = defineProps <{
1718 data: SchemaEnumNodeData ;
@@ -83,6 +84,17 @@ function addEnumItem() {
8384 enumValues .value .push (' NEW_ITEM' );
8485 emit (' update_enum_values' , props .data , enumValues .value );
8586}
87+
88+ const maxEnumValuesToShow = computed (() => settings .value .schemaDiagram .maxEnumValuesToShow );
89+
90+ const isEnumTruncated = computed (() => {
91+ if (! settings .value .schemaDiagram .showEnumValues ) {
92+ return false ;
93+ }
94+
95+ return props .data .values .length > maxEnumValuesToShow .value ;
96+ });
97+
8698 </script >
8799
88100<template >
@@ -124,6 +136,8 @@ function addEnumItem() {
124136 {{ value }}
125137 </p >
126138 </div >
139+
140+ <p v-if =" isEnumTruncated" class =" vue-flow-enum-ellipsis" >...</p >
127141 </div >
128142
129143 <div v-else >
@@ -194,6 +208,7 @@ function addEnumItem() {
194208</template >
195209
196210<style >
211+
197212.vue-flow__node-schemaenum {
198213 border-radius : 8px ;
199214 box-shadow : 0 4px 8px rgba (0 , 0 , 0 , 0.1 );
@@ -203,6 +218,11 @@ function addEnumItem() {
203218 color : #536878 ;
204219 background : linear-gradient (135deg , #e9f5ff 0% , #ffffff 100% );
205220}
221+ .vue-flow-enum-ellipsis {
222+ font-style : italic ;
223+ opacity : 0.7 ;
224+ margin : 0 ;
225+ }
206226
207227.vue-flow__handle {
208228 border : none ;
0 commit comments