Allow to set values per line in the enum field

This commit is contained in:
soupette 2019-03-25 12:36:04 +01:00
parent 2b4396151c
commit cde09a20e8
18 changed files with 36 additions and 36 deletions

View File

@ -138,7 +138,7 @@ export function getDataSucceeded({ allModels, models }, connections) {
}
export function onChangeExistingContentTypeMainInfos({ target }) {
const value = target.name === 'name' ? camelCase(target.value.trim()).toLowerCase() : target.value.trim();
const value = target.name === 'name' ? camelCase(target.value.trim()).toLowerCase() : target.value;
return {
type: ON_CHANGE_EXISTING_CONTENT_TYPE_MAIN_INFOS,
@ -148,7 +148,7 @@ export function onChangeExistingContentTypeMainInfos({ target }) {
}
export function onChangeNewContentTypeMainInfos({ target }) {
const value = target.name === 'name' ? camelCase(target.value.trim()).toLowerCase() : target.value.trim();
const value = target.name === 'name' ? camelCase(target.value.trim()).toLowerCase() : target.value;
return {
type: ON_CHANGE_NEW_CONTENT_TYPE_MAIN_INFOS,
@ -307,7 +307,7 @@ export function updateTempContentType() {
export const buildModelAttributes = attributes => {
const formattedAttributes = attributes.reduce((acc, current) => {
if (current.params.type === 'enumeration') {
acc[current.name] = Object.assign(current.params, { enum: current.params.enum.join(',') });
acc[current.name] = Object.assign(current.params, { enum: current.params.enum.join('\n') });
} else if (current.params.nature === 'oneWay') {
acc[current.name] = Object.assign(current.params, { key: '-' });
} else {
@ -338,7 +338,7 @@ export const formatModelAttributes = attributes =>
acc2.params.pluginValue = value;
acc2.params.plugin = true;
} else if (curr === 'enum') {
acc2.params.enum = value.split(',');
acc2.params.enum = value.split('\n');
} else {
acc2.params[curr] = value;
}

View File

@ -110,7 +110,7 @@ describe('Content Type Builder Action utils', () => {
},
test: {
type: 'enumeration',
enum: 'test,test1',
enum: 'test\ntest1',
},
otherTest: {
columnName: '',
@ -220,7 +220,7 @@ describe('Content Type Builder Action utils', () => {
},
otherTest: {
type: 'enumeration',
enum: 'test,test1',
enum: 'test\ntest1',
},
};

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "يسمح لك بتجاوز الاسم الذي تم إنشاؤه افتراضيًا لـ GraphQL",
"form.attribute.item.enumeration.name": "أسم",
"form.attribute.item.enumeration.placeholder": "مثال: صباح,قمر,احداث",
"form.attribute.item.enumeration.rules": "قيم ( مقسمة بإستخدام الفاصلة )",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "الأسم",
"form.attribute.item.maximum": "اقصى قيمة",
"form.attribute.item.maximumLength": "أقصى طول",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Ermöglicht dir, den standardmäßig generierten Namen für GraphQL zu überschreiben",
"form.attribute.item.enumeration.name": "Name",
"form.attribute.item.enumeration.placeholder": "Ex: Morgen, Mittag, Abend",
"form.attribute.item.enumeration.rules": "Werte (trenne sie mit einem Komma)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Name",
"form.attribute.item.maximum": "Maximalwert",
"form.attribute.item.maximumLength": "Maximallänge",

View File

@ -42,7 +42,7 @@
"form.attribute.item.enumeration.graphql.description": "Allows you to override the default generated name for GraphQL",
"form.attribute.item.enumeration.name": "Name",
"form.attribute.item.enumeration.placeholder": "Ex: morning,noon,evening",
"form.attribute.item.enumeration.rules": "Values (separate them with a comma)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Name",
"form.attribute.item.maximum": "Maximum value",
"form.attribute.item.maximumLength": "Maximum length",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Le permite redefinir el nombre generado por defecto para GraphQL",
"form.attribute.item.enumeration.name": "Nombre",
"form.attribute.item.enumeration.placeholder": "Ej: mañana, mediodía, noche",
"form.attribute.item.enumeration.rules": "Valores (separados con una coma)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Nombre",
"form.attribute.item.maximum": "Valor máximo",
"form.attribute.item.maximumLength": "Longitud máxima",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Vous permet de remplacer le nom généré par défaut pour GraphQL",
"form.attribute.item.enumeration.name": "Nom",
"form.attribute.item.enumeration.placeholder": "Ex : matin,midi,soir",
"form.attribute.item.enumeration.rules": "Valeurs (les séparer par une virgule)",
"form.attribute.item.enumeration.rules": "Valeurs (les séparer par une nouvelle ligne)",
"form.attribute.item.json.name": "Nom",
"form.attribute.item.maximum": "Valeur maximum",
"form.attribute.item.maximumLength": "Taille maximum",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Consente di ignorare l'impostazione predefinita generata nome per GraphQL",
"form.attribute.item.enumeration.name": "Nome",
"form.attribute.item.enumeration.placeholder": "Ex: mattina,mezzogiorno,sera",
"form.attribute.item.enumeration.rules": "Valori (separati da una virgola)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Nome",
"form.attribute.item.maximum": "Valore massimo",
"form.attribute.item.maximumLength": "Lunghezza massima",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "GraphQLの既定の生成名をオーバーライドできます",
"form.attribute.item.enumeration.name": "名前",
"form.attribute.item.enumeration.placeholder": "例:朝、正午、夕方",
"form.attribute.item.enumeration.rules": "値 (カンマ区切り)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "名前",
"form.attribute.item.maximum": "最大値",
"form.attribute.item.maximumLength": "最大長",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "기본 생성된 이름을 GraphQL에서 사용합니다.",
"form.attribute.item.enumeration.name": "이름",
"form.attribute.item.enumeration.placeholder": "Ex: morning,noon,evening",
"form.attribute.item.enumeration.rules": "값 (쉼표로 구분)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "이름",
"form.attribute.item.maximum": "최대 값",
"form.attribute.item.maximumLength": "최대 길이",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Zorgt ervoor dat je de standaard gegenereerde naam voor GraphQL kan overschrijven",
"form.attribute.item.enumeration.name": "Naam",
"form.attribute.item.enumeration.placeholder": "Bijv.: ochtend,middag,avond",
"form.attribute.item.enumeration.rules": "Waardes (onderscheid ze met een komma)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Naam",
"form.attribute.item.maximum": "Maximale waarde",
"form.attribute.item.maximumLength": "Maximale lengte",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Pozwalaj na nadpisanie domyślnie wygenerowanej nazwy dla GraphQL.",
"form.attribute.item.enumeration.name": "Nazwa",
"form.attribute.item.enumeration.placeholder": "Przykład: rano,południe,wieczór",
"form.attribute.item.enumeration.rules": "Wartości (oddzielone przecinkiem)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Nazwa",
"form.attribute.item.maximum": "Maksymalna wartość",
"form.attribute.item.maximumLength": "Maksymalna długość",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Permite à si a substituição do nome predefinido para o GraphQL",
"form.attribute.item.enumeration.name": "Nome",
"form.attribute.item.enumeration.placeholder": "Ex: manhã,tarde,noite",
"form.attribute.item.enumeration.rules": "Valores (separe-os com uma vírgula)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Nome",
"form.attribute.item.maximum": "Valor máximo",
"form.attribute.item.maximumLength": "Tamanho máximo",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Permite à si a substituição do nome predefinido para o GraphQL",
"form.attribute.item.enumeration.name": "Nome",
"form.attribute.item.enumeration.placeholder": "Ex: manhã,tarde,noite",
"form.attribute.item.enumeration.rules": "Valores (separe-os com uma vírgula)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Nome",
"form.attribute.item.maximum": "Valor máximo",
"form.attribute.item.maximumLength": "Comprimento máximo",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Позволяет переопределить название поля в GraphQL, сгенерированное по умолчанию",
"form.attribute.item.enumeration.name": "Название",
"form.attribute.item.enumeration.placeholder": "Например: morning,noon,evening",
"form.attribute.item.enumeration.rules": "Значения (через запятую)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Название",
"form.attribute.item.maximum": "Максимальное значение",
"form.attribute.item.maximumLength": "Максимальная длина",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "GraphQL için varsayılan oluşturulan adı geçersiz kılmanıza izin verir.",
"form.attribute.item.enumeration.name": "İsim",
"form.attribute.item.enumeration.placeholder": "Örn: sabah, öğlen, akşam",
"form.attribute.item.enumeration.rules": "Değerler (virgülle ayırın)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "İsim",
"form.attribute.item.maximum": "En yüksek değer",
"form.attribute.item.maximumLength": "En yüksek uzunluk",

View File

@ -40,7 +40,7 @@
"form.attribute.item.enumeration.graphql.description": "Allows you to override the default generated name for GraphQL",
"form.attribute.item.enumeration.name": "Name",
"form.attribute.item.enumeration.placeholder": "Ex: morning,noon,evening",
"form.attribute.item.enumeration.rules": "Values (separate them with a comma)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "Name",
"form.attribute.item.maximum": "最大值",
"form.attribute.item.maximumLength": "最大长度",

View File

@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "可以讓您覆寫 GraphQL 的預設名稱",
"form.attribute.item.enumeration.name": "名稱",
"form.attribute.item.enumeration.placeholder": "例: morning,noon,evening",
"form.attribute.item.enumeration.rules": "選項(以半形逗號分隔)",
"form.attribute.item.enumeration.rules": "Values (one line per value)",
"form.attribute.item.json.name": "名稱",
"form.attribute.item.maximum": "最大數值",
"form.attribute.item.maximumLength": "最大長度",