Skip to content

Commit 21ae6f6

Browse files
committed
Merge branch 'main' of github.com:backstagephp/fields
2 parents a80de9d + 110c0da commit 21ae6f6

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

src/Fields/CheckboxList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,16 @@ public function getForm(): array
9494
//
9595
Forms\Components\TextInput::make('config.noSearchResultsMessage')
9696
->label(__('No search results message'))
97-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
97+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
9898
Forms\Components\TextInput::make('config.searchPrompt')
9999
->label(__('Search prompt'))
100-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
100+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
101101
Forms\Components\TextInput::make('config.searchDebounce')
102102
->numeric()
103103
->minValue(0)
104104
->step(100)
105105
->label(__('Search debounce'))
106-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
106+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
107107
]),
108108
]),
109109
])->columnSpanFull(),

src/Fields/Repeater.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ public function getForm(): array
111111
Forms\Components\Toggle::make('config.reorderableWithButtons')
112112
->label(__('Reorderable with buttons'))
113113
->dehydrated()
114-
->disabled(fn(Forms\Get $get): bool => $get('config.reorderable') === false)
114+
->disabled(fn (Forms\Get $get): bool => $get('config.reorderable') === false)
115115
->inline(false),
116116
]),
117117
Forms\Components\Toggle::make('config.collapsible')
118118
->label(__('Collapsible'))
119119
->inline(false),
120120
Forms\Components\Toggle::make('config.collapsed')
121121
->label(__('Collapsed'))
122-
->visible(fn(Forms\Get $get): bool => $get('config.collapsible') === true)
122+
->visible(fn (Forms\Get $get): bool => $get('config.collapsible') === true)
123123
->inline(false),
124124
Forms\Components\Toggle::make('config.cloneable')
125125
->label(__('Cloneable'))
@@ -138,9 +138,9 @@ public function getForm(): array
138138
->live(debounce: 250)
139139
->labelKey('name')
140140
->maxDepth(0)
141-
->addable(fn(string $operation) => $operation !== 'create')
142-
->disabled(fn(string $operation) => $operation === 'create')
143-
->hint(fn(string $operation) => $operation === 'create' ? __('Fields can be added once the field is created.') : '')
141+
->addable(fn (string $operation) => $operation !== 'create')
142+
->disabled(fn (string $operation) => $operation === 'create')
143+
->hint(fn (string $operation) => $operation === 'create' ? __('Fields can be added once the field is created.') : '')
144144
->hintColor('primary')
145145
->form([
146146
Section::make('Field')
@@ -155,7 +155,7 @@ public function getForm(): array
155155
->required()
156156
->placeholder(__('Name'))
157157
->live(debounce: 250)
158-
->afterStateUpdated(fn(Set $set, ?string $state) => $set('slug', Str::slug($state))),
158+
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state))),
159159
TextInput::make('slug')
160160
->readonly(),
161161
Select::make('field_type')
@@ -185,10 +185,10 @@ function () {
185185
])->columnSpanFull(),
186186
Section::make('Configuration')
187187
->columns(3)
188-
->schema(fn(Get $get) => $this->getFieldTypeFormSchema(
188+
->schema(fn (Get $get) => $this->getFieldTypeFormSchema(
189189
$get('field_type')
190190
))
191-
->visible(fn(Get $get) => filled($get('field_type'))),
191+
->visible(fn (Get $get) => filled($get('field_type'))),
192192
]),
193193
])->columns(2),
194194
])->columnSpanFull(),

src/Fields/Select.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,45 +106,45 @@ public function getForm(): array
106106
->label(__('Preload'))
107107
->live()
108108
->inline(false)
109-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
109+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
110110
])->columnSpanFull(),
111111
self::optionFormFields(),
112112
self::affixFormFields(),
113113
Forms\Components\Grid::make(2)
114114
->schema([
115115
Forms\Components\TextInput::make('config.loadingMessage')
116116
->label(__('Loading message'))
117-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
117+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
118118
Forms\Components\TextInput::make('config.noSearchResultsMessage')
119119
->label(__('No search results message'))
120-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
120+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
121121
Forms\Components\TextInput::make('config.searchPrompt')
122122
->label(__('Search prompt'))
123-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
123+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
124124
Forms\Components\TextInput::make('config.searchingMessage')
125125
->label(__('Searching message'))
126-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
126+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
127127
Forms\Components\TextInput::make('config.searchDebounce')
128128
->numeric()
129129
->minValue(0)
130130
->step(100)
131131
->label(__('Search debounce'))
132-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
132+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
133133
Forms\Components\TextInput::make('config.optionsLimit')
134134
->numeric()
135135
->minValue(0)
136136
->label(__('Options limit'))
137-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
137+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
138138
Forms\Components\TextInput::make('config.minItemsForSearch')
139139
->numeric()
140140
->minValue(0)
141141
->label(__('Min items for search'))
142-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
142+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
143143
Forms\Components\TextInput::make('config.maxItemsForSearch')
144144
->numeric()
145145
->minValue(0)
146146
->label(__('Max items for search'))
147-
->visible(fn(Forms\Get $get): bool => $get('config.searchable')),
147+
->visible(fn (Forms\Get $get): bool => $get('config.searchable')),
148148
]),
149149
]),
150150
])->columnSpanFull(),

src/Fields/Text.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function getForm(): array
136136
->numeric()
137137
->minValue(0)
138138
->label(__('Step'))
139-
->visible(fn(Forms\Get $get): bool => $get('config.type') === 'numeric'),
139+
->visible(fn (Forms\Get $get): bool => $get('config.type') === 'numeric'),
140140
Forms\Components\Select::make('config.inputMode')
141141
->label(__('Input mode'))
142142
->options([
@@ -149,13 +149,13 @@ public function getForm(): array
149149
'email' => __('Email'),
150150
'url' => __('URL'),
151151
])
152-
->visible(fn(Forms\Get $get): bool => $get('config.type') === 'numeric'),
152+
->visible(fn (Forms\Get $get): bool => $get('config.type') === 'numeric'),
153153
Forms\Components\Toggle::make('config.revealable')
154154
->label(__('Revealable'))
155-
->visible(fn(Forms\Get $get): bool => $get('config.type') === 'password'),
155+
->visible(fn (Forms\Get $get): bool => $get('config.type') === 'password'),
156156
Forms\Components\TextInput::make('config.telRegex')
157157
->label(__('Telephone regex'))
158-
->visible(fn(Forms\Get $get): bool => $get('config.type') === 'tel'),
158+
->visible(fn (Forms\Get $get): bool => $get('config.type') === 'tel'),
159159
]),
160160
]),
161161
])->columnSpanFull(),

0 commit comments

Comments
 (0)