Skip to content

Commit

Permalink
Merge branch '3.x' into pr/15310
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Jan 10, 2025
2 parents 4d0f09f + 9416993 commit 72f1f97
Show file tree
Hide file tree
Showing 46 changed files with 1,037 additions and 91 deletions.
2 changes: 1 addition & 1 deletion packages/actions/resources/lang/hr/attach.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],

'attach_another' => [
'label' => 'Priloži i priloži drugi',
'label' => 'Priloži i dodaj još jedan',
],

],
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/resources/lang/hr/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],

'create_another' => [
'label' => 'Napravi i napravi drugi',
'label' => 'Napravi i dodaj još jedan',
],

],
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/resources/lang/hr/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

'modal' => [

'heading' => 'Obriši odabrano :label',
'heading' => 'Obriši odabrano',

'actions' => [

Expand Down
76 changes: 76 additions & 0 deletions packages/actions/resources/lang/hr/export.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php

return [
'label' => 'Izvezi :label',

'modal' => [

'heading' => 'Izvezi :label',

'form' => [

'columns' => [

'label' => 'Stupci',

'form' => [

'is_enabled' => [
'label' => ':column je omogućen',
],

'label' => [
'label' => ':column oznaka',
],

],

],

],

'actions' => [

'export' => [
'label' => 'Izvoz',
],

],

],

'notifications' => [

'completed' => [

'title' => 'Izvoz podataka završen',

'actions' => [

'download_csv' => [
'label' => 'Preuzmi .csv',
],

'download_xlsx' => [
'label' => 'Preuzmi .xlsx',
],

],

],

'max_rows' => [
'title' => 'Datoteka za preuzimanje je prevelika',
'body' => '{1} Ne možeš preuzeti više od jednog reda odjednom.|[2,4] Ne možeš preuzeti više od :count reda odjednom.|[5,*] Ne možeš preuzeti više od :count redova odjednom.',
],

'started' => [
'title' => 'Izvoz datoteka je započeo',
'body' => '{1} Tvoj izvoz datoteka je započeo i jedan red će se obraditi u pozadini. Dobit ćeš obavijest kada je izrađena poveznica za preuzimanje.|[2,4] Tvoj izvoz datoteka je započeo i :count reda će se obraditi u pozadini. Dobit ćeš obavijest kada je izrađena poveznica za preuzimanje.|[5,*] Tvoj izvoz datoteka je započeo i :count redova će se obraditi u pozadini. Dobit ćeš obavijest kada je izrađena poveznica za preuzimanje.',
],

],

'file_name' => 'export-:export_id-:model',

];
8 changes: 4 additions & 4 deletions packages/actions/resources/lang/hr/force-delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

'single' => [

'label' => 'Prisilno izbriši',
'label' => 'Prisilno obriši',

'modal' => [

'heading' => 'Prisilno izbriši :label',
'heading' => 'Prisilno obriši :label',

'actions' => [

Expand All @@ -32,11 +32,11 @@

'multiple' => [

'label' => 'Prisilno izbriši odabrano',
'label' => 'Prisilno obriši odabrano',

'modal' => [

'heading' => 'Prisilno izbriši odabrano :label',
'heading' => 'Prisilno obriši odabrano',

'actions' => [

Expand Down
84 changes: 84 additions & 0 deletions packages/actions/resources/lang/hr/import.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php

return [
'label' => 'Uvezi :label',

'modal' => [

'heading' => 'Uvezi :label',

'form' => [

'file' => [

'label' => 'File',

'placeholder' => 'Prenesi CSV datoteku',
// Ovdje nisam bio siguran je li moramo i to pravilo prevesti
'rules' => [
'duplicate_columns' => '{0} The file must not contain more than one empty column header.|{1,*} The file must not contain duplicate column headers: :columns.',
],

],

'columns' => [
'label' => 'Stupac',
'placeholder' => 'Odaberi stupac',
],

],

'actions' => [

'download_example' => [
'label' => 'Preuzmi primjer CSV datoteke',
],

'import' => [
'label' => 'Uvoz',
],

],

],

'notifications' => [

'completed' => [

'title' => 'Uvoz je završen',

'actions' => [

'download_failed_rows_csv' => [
'label' => 'Preuzmi informaciju o neuspjelom pokušaju preuzimanja retka|Preuzmi informaciju o neuspjelom pokušaju preuzimanja redaka',
],

],

],

'max_rows' => [
'title' => 'Poslana CSV datoteka je prevelika',
'body' => '{1} Ne možeš uvesti više od jednog reda odjednom.|[2,4] Ne možeš uvesti više od :count reda odjednom.|[5,*] Ne možeš uvesti više od :count redova odjednom.',
],

'started' => [
'title' => 'Uvoz je započeo',
'body' => '{1} Uvoz je započeo i jedan red će se obraditi u pozadini.|[2,4] Uvoz je započeo i :count reda će se obraditi u pozadini.|[5,*] Uvoz je započeo i :count redova će se obraditi u pozadini.',
],

],

'example_csv' => [
'file_name' => ':importer-example',
],

'failure_csv' => [
'file_name' => 'import-:import_id-:csv_name-failed-rows',
'error_header' => 'error',
'system_error' => 'System error, please contact support.',
'column_mapping_required_for_new_record' => 'The :attribute column was not mapped to a column in the file, but it is required for creating new records.',
],

];
2 changes: 1 addition & 1 deletion packages/actions/resources/lang/hr/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

return [

'confirmation' => 'Jeste li sigurni da želite to učiniti?',
'confirmation' => 'Jesi li siguran da želiš to učiniti?',

'actions' => [

Expand Down
14 changes: 7 additions & 7 deletions packages/forms/dist/components/file-upload.js

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions packages/forms/docs/03-fields/09-file-upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ class Message extends Model
}
```

### Controlling the maximum parallel uploads

You can control the maximum number of parallel uploads using the `maxParallelUploads()` method:

```php
use Filament\Forms\Components\FileUpload;

FileUpload::make('attachments')
->multiple()
->maxParallelUploads(1)
```

This will limit the number of parallel uploads to `1`. If unset, we'll use the [default FilePond value](https://pqina.nl/filepond/docs/api/instance/properties/#core-properties) which is `2`.

## Controlling file names

By default, a random file name will be generated for newly-uploaded files. This is to ensure that there are never any conflicts with existing files.
Expand Down
17 changes: 17 additions & 0 deletions packages/forms/docs/03-fields/12-repeater.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,23 @@ Repeater::make('members')

This method will automatically enable the `distinct()` and `live()` methods on the field.

In case you want to add another condition to [disable options](../select#disabling-specific-options) with, you can chain `disableOptionWhen()` with the `merge: true` argument:

```php
use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\Select;

Repeater::make('members')
->schema([
Select::make('role')
->options([
// ...
])
->disableOptionsWhenSelectedInSiblingRepeaterItems()
->disableOptionWhen(fn (string $value): bool => $value === 'super_admin', merge: true),
])
```

## Customizing the repeater item actions

This field uses action objects for easy customization of buttons within it. You can customize these buttons by passing a function to an action registration method. The function has access to the `$action` object, which you can use to [customize it](../../actions/trigger-button). The following methods are available to customize the actions:
Expand Down
2 changes: 2 additions & 0 deletions packages/forms/resources/js/components/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default function fileUploadFormComponent({
maxFiles,
maxSize,
minSize,
maxParallelUploads,
panelAspectRatio,
panelLayout,
placeholder,
Expand Down Expand Up @@ -122,6 +123,7 @@ export default function fileUploadFormComponent({
maxFiles,
maxFileSize: maxSize,
minFileSize: minSize,
...(maxParallelUploads && { maxParallelUploads }),
styleButtonProcessItemPosition: uploadButtonPosition,
styleButtonRemoveItemPosition: removeUploadedFileButtonPosition,
styleItemPanelAspectRatio: itemPanelAspectRatio,
Expand Down
Loading

0 comments on commit 72f1f97

Please sign in to comment.