Skip to content

Commit

Permalink
Merge branch '3.x' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed May 8, 2024
2 parents c06f0f1 + c1bb0a9 commit ee70226
Show file tree
Hide file tree
Showing 22 changed files with 77 additions and 29 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"sortablejs": "^1.15.0",
"tailwindcss": "^3.4.0",
"tippy.js": "^6.3.7",
"trix": "^1.3.1",
"trix": "^2.1.1",
"uuid-browser": "^3.1.0",
"vanilla-colorful": "^0.6.2"
}
Expand Down
6 changes: 5 additions & 1 deletion packages/actions/src/Exports/Jobs/ExportCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ public function handle(): void
/** @var Authenticatable $user */
$user = $this->export->user;

auth()->setUser($user);
if (method_exists(auth()->guard(), 'login')) {
auth()->login($user);
} else {
auth()->setUser($user);
}

$exceptions = [];

Expand Down
6 changes: 5 additions & 1 deletion packages/actions/src/Imports/Jobs/ImportCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ public function handle(): void
/** @var Authenticatable $user */
$user = $this->import->user;

auth()->setUser($user);
if (method_exists(auth()->guard(), 'login')) {
auth()->login($user);
} else {
auth()->setUser($user);
}

$exceptions = [];

Expand Down
2 changes: 1 addition & 1 deletion packages/forms/resources/lang/no/components.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@

'max_items_message' => 'Bare :count kan velges.',

'no_search_results_message' => 'No alternativer matcher ditt søk.',
'no_search_results_message' => 'Ingen alternativer matcher ditt søk.',

'placeholder' => 'Velg et alternativ',

Expand Down
4 changes: 2 additions & 2 deletions packages/forms/resources/views/components/builder.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class="space-y-4"
class="fi-fo-builder-item rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-white/5 dark:ring-white/10"
x-bind:class="{ 'fi-collapsed overflow-hidden': isCollapsed }"
>
@if ($isReorderableWithDragAndDrop || $isReorderableWithButtons || $hasBlockLabels || $isCloneable || $isDeletable || $isCollapsible || count($visibleExtraItemActions))
@if ($isReorderableWithDragAndDrop || $isReorderableWithButtons || $hasBlockLabels || $isCloneable || $isDeletable || $isCollapsible || $visibleExtraItemActions)
<div
@if ($isCollapsible)
x-on:click.stop="isCollapsed = !isCollapsed"
Expand Down Expand Up @@ -142,7 +142,7 @@ class="fi-fo-builder-item rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 d
</h4>
@endif

@if ($isCloneable || $isDeletable || $isCollapsible || count($visibleExtraItemActions))
@if ($isCloneable || $isDeletable || $isCollapsible || $visibleExtraItemActions)
<ul
class="ms-auto flex items-center gap-x-3"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class="items-start gap-4"
$extraItemActions,
fn (Action $action): bool => $action(['item' => $uuid])->isVisible(),
);
$itemHasToolbar = $isReorderableWithDragAndDrop || $isReorderableWithButtons || filled($itemLabel) || $isCloneable || $isDeletable || $isCollapsible || count($visibleExtraItemActions);
$itemHasToolbar = $isReorderableWithDragAndDrop || $isReorderableWithButtons || filled($itemLabel) || $isCloneable || $isDeletable || $isCollapsible || $visibleExtraItemActions;
@endphp

<li
Expand Down Expand Up @@ -145,7 +145,7 @@ class="flex items-center justify-center"
</h4>
@endif

@if ($isCloneable || $isDeletable || $isCollapsible || count($visibleExtraItemActions))
@if ($isCloneable || $isDeletable || $isCollapsible || $visibleExtraItemActions)
<ul
class="ms-auto flex items-center gap-x-3"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@php
use Filament\Forms\Components\Actions\Action;
$containers = $getChildComponentContainers();
$addAction = $getAction($getAddActionName());
Expand All @@ -7,6 +9,7 @@
$moveDownAction = $getAction($getMoveDownActionName());
$moveUpAction = $getAction($getMoveUpActionName());
$reorderAction = $getAction($getReorderActionName());
$extraItemActions = $getExtraItemActions();
$isAddable = $isAddable();
$isCloneable = $isCloneable();
Expand Down Expand Up @@ -42,6 +45,13 @@
class="gap-4"
>
@foreach ($containers as $uuid => $item)
@php
$visibleExtraItemActions = array_filter(
$extraItemActions,
fn (Action $action): bool => $action(['item' => $uuid])->isVisible(),
);
@endphp

<li
wire:key="{{ $item->getLivewireKey() }}.item"
x-sortable-item="{{ $uuid }}"
Expand All @@ -51,7 +61,7 @@ class="fi-fo-repeater-item simple flex justify-start gap-x-3"
{{ $item }}
</div>

@if ($isReorderableWithDragAndDrop || $isReorderableWithButtons || $isCloneable || $isDeletable)
@if ($isReorderableWithDragAndDrop || $isReorderableWithButtons || $isCloneable || $isDeletable || $visibleExtraItemActions)
<ul class="flex items-center gap-x-1">
@if ($isReorderableWithDragAndDrop)
<li x-sortable-handle>
Expand All @@ -73,6 +83,12 @@ class="flex items-center justify-center"
</li>
@endif

@foreach ($visibleExtraItemActions as $extraItemAction)
<li>
{{ $extraItemAction(['item' => $uuid]) }}
</li>
@endforeach

@if ($isCloneable)
<li>
{{ $cloneAction(['item' => $uuid]) }}
Expand Down
2 changes: 1 addition & 1 deletion packages/panels/docs/03-resources/08-global-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function panel(Panel $panel): Panel
// ...
->globalSearchFieldSuffix(fn (): ?string => match (Platform::detect()) {
Platform::Windows, Platform::Linux => 'CTRL+K',
Platform::Mac => '⌘K'
Platform::Mac => '⌘K',
default => null,
});
}
Expand Down
8 changes: 8 additions & 0 deletions packages/panels/resources/lang/no/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,12 @@

],

'avatar' => [
'alt' => 'Avatar av :name',
],

'logo' => [
'alt' => ':name logo',
],

];
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'form' => [

'email' => [
'label' => 'E-post adresse',
'label' => 'E-postadresse',
],

'name' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

return [

'title' => 'Bekreft din e-post adresse',
'title' => 'Bekreft din e-postadresse',

'heading' => 'Bekreft din e-post adresse',
'heading' => 'Bekreft din e-postadresse',

'actions' => [

Expand All @@ -16,7 +16,7 @@

'messages' => [
'notification_not_received' => 'Ikke mottatt e-posten vi sendte?',
'notification_sent' => 'Vi har sendt e-post til :email med informasjon om hvordan du bekrefter din e-post adresse.',
'notification_sent' => 'Vi har sendt e-post til :email med informasjon om hvordan du bekrefter din e-postadresse.',
],

'notifications' => [
Expand Down
2 changes: 1 addition & 1 deletion packages/panels/resources/lang/no/pages/auth/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'form' => [

'email' => [
'label' => 'E-post adresse',
'label' => 'E-postedresse',
],

'password' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'form' => [

'email' => [
'label' => 'E-post adresse',
'label' => 'E-postadresse',
],

'password' => [
Expand Down
2 changes: 1 addition & 1 deletion packages/panels/resources/lang/no/pages/auth/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'form' => [

'email' => [
'label' => 'E-post adresse',
'label' => 'E-postadresse',
],

'name' => [
Expand Down
7 changes: 7 additions & 0 deletions packages/panels/resources/lang/no/unsaved-changes-alert.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

return [

'body' => 'Du har endringer som ikke er lagret. Er du sikker på at du vil forlate siden?',

];
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
</label>

<x-filament::input.wrapper
inline-prefix
prefix-icon="heroicon-m-magnifying-glass"
prefix-icon-alias="panels::global-search.field"
inline-prefix
:suffix="$suffix"
inline-suffix
wire:target="search"
>
<x-filament::input
Expand Down
6 changes: 3 additions & 3 deletions packages/schema/src/Components/Wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Wizard extends Component

protected string | Htmlable | null $cancelAction = null;

protected bool | Closure $skippable = false;
protected bool | Closure $isSkippable = false;

protected string | Closure | null $stepQueryStringKey = null;

Expand Down Expand Up @@ -190,7 +190,7 @@ public function submitAction(string | Htmlable | null $action): static

public function skippable(bool | Closure $condition = true): static
{
$this->skippable = $condition;
$this->isSkippable = $condition;

return $this;
}
Expand Down Expand Up @@ -236,7 +236,7 @@ public function getStepQueryStringKey(): ?string

public function isSkippable(): bool
{
return (bool) $this->evaluate($this->skippable);
return (bool) $this->evaluate($this->isSkippable);
}

public function isStepPersistedInQueryString(): bool
Expand Down
8 changes: 8 additions & 0 deletions packages/support/resources/lang/no/components/pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@

'actions' => [

'first' => [
'label' => 'Første',
],

'go_to_page' => [
'label' => 'Gå til side :page',
],

'last' => [
'label' => 'Siste',
],

'next' => [
'label' => 'Neste',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
'ring-1 ring-gray-950/10 dark:ring-white/20' => (($color === 'gray') || ($tag === 'label')) && (! $grouped),
'bg-custom-600 text-white hover:bg-custom-500 focus-visible:ring-custom-500/50 dark:bg-custom-500 dark:hover:bg-custom-400 dark:focus-visible:ring-custom-400/50' => ($color !== 'gray') && ($tag !== 'label'),
'[input:checked+&]:bg-custom-600 [input:checked+&]:text-white [input:checked+&]:ring-0 [input:checked+&]:hover:bg-custom-500 dark:[input:checked+&]:bg-custom-500 dark:[input:checked+&]:hover:bg-custom-400 [input:checked:focus-visible+&]:ring-custom-500/50 dark:[input:checked:focus-visible+&]:ring-custom-400/50 [input:focus-visible+&]:z-10 [input:focus-visible+&]:ring-2 [input:focus-visible+&]:ring-gray-950/10 dark:[input:focus-visible+&]:ring-white/20' => ($color !== 'gray') && ($tag === 'label'),
]
]
),
]);
Expand Down
4 changes: 2 additions & 2 deletions packages/tables/resources/lang/no/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
'text' => [

'actions' => [
'collapse_list' => 'Vis :count til',
'expand_list' => 'Vis :count mindre',
'collapse_list' => 'Vis :count mindre',
'expand_list' => 'Vis :count til',
],

'more_list_items' => 'og :count til',
Expand Down
2 changes: 1 addition & 1 deletion packages/widgets/docs/02-stats-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function getStats(): array
->description('32k increase')
->descriptionIcon('heroicon-m-arrow-trending-up'),
Stat::make('Bounce rate', '21%')
->description('7% increase')
->description('7% decrease')
->descriptionIcon('heroicon-m-arrow-trending-down'),
Stat::make('Average time on page', '3:12')
->description('3% increase')
Expand Down

0 comments on commit ee70226

Please sign in to comment.