File tree Expand file tree Collapse file tree 4 files changed +11
-0
lines changed
Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { ValidationError } from './types/validation-error'
55
66export default class FieldLocale implements FieldAPI {
77 id : string
8+ name : string
89 locale : string
910 type : string
1011 required : boolean
@@ -19,6 +20,7 @@ export default class FieldLocale implements FieldAPI {
1920
2021 constructor ( channel : Channel , info : FieldInfo ) {
2122 this . id = info . id
23+ this . name = info . name
2224 this . locale = info . locale
2325 this . type = info . type
2426 this . required = info . required
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export default class Field implements EntryFieldAPI {
66 private _defaultLocale : string
77 private _fieldLocales : { [ key : string ] : FieldLocale }
88 id : string
9+ name : string
910 locales : string [ ]
1011 type : string
1112 required : boolean
@@ -14,6 +15,7 @@ export default class Field implements EntryFieldAPI {
1415
1516 constructor ( channel : Channel , info : EntryFieldInfo , defaultLocale : string ) {
1617 this . id = info . id
18+ this . name = info . name
1719 this . locales = info . locales
1820 this . type = info . type
1921 this . required = info . required
@@ -26,6 +28,7 @@ export default class Field implements EntryFieldAPI {
2628 ( acc : { [ key : string ] : FieldLocale } , locale : string ) => {
2729 const fieldLocale = new FieldLocale ( channel , {
2830 id : info . id ,
31+ name : info . name ,
2932 type : info . type ,
3033 required : info . required ,
3134 validations : info . validations ,
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { ValidationError } from './validation-error'
55export interface FieldAPI {
66 /** The ID of a field is defined in an entry's content type. */
77 id : string
8+ /** The name of the field */
9+ name : string
810 /** The current locale of a field the app is attached to. */
911 locale : string
1012 /** Holds the type of the field the app is attached to. */
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { ValidationError } from './validation-error'
55
66export interface FieldInfo {
77 id : string
8+ name : string
89 locale : string
910 type : string
1011 required : boolean
@@ -17,6 +18,7 @@ export interface FieldInfo {
1718
1819export interface EntryFieldInfo {
1920 id : string
21+ name : string
2022 locales : string [ ]
2123 type : string
2224 required : boolean
@@ -30,6 +32,8 @@ export interface EntryFieldInfo {
3032export interface EntryFieldAPI {
3133 /** The ID of a field is defined in an entry's content type. */
3234 id : string
35+ /** The name of the field */
36+ name : string
3337 /** The list of locales for the field. */
3438 locales : string [ ]
3539 /** Holds the type of the field. */
You can’t perform that action at this time.
0 commit comments