phases one of time logged now with log display

This commit is contained in:
Mark Gregory
2026-06-22 12:53:56 +01:00
parent c1a9d0de27
commit 052bae718e
231 changed files with 15113 additions and 12891 deletions
@@ -7,30 +7,28 @@
$isSticky = $isSticky();
$verticalAlignment = $getVerticalAlignment();
if (! $verticalAlignment instanceof VerticalAlignment) {
$verticalAlignment = filled($verticalAlignment) ? (VerticalAlignment::tryFrom($verticalAlignment) ?? $verticalAlignment) : null;
if (!$verticalAlignment instanceof VerticalAlignment) {
$verticalAlignment = filled($verticalAlignment)
? VerticalAlignment::tryFrom($verticalAlignment) ?? $verticalAlignment
: null;
}
@endphp
<div
@if ($isSticky)
x-data="filamentActionsSchemaComponent()"
<div @if ($isSticky) x-data="filamentActionsSchemaComponent()"
x-intersect:enter.half="disableSticky"
x-intersect:leave="enableSticky"
x-bind:class="{ 'fi-sticky': isSticky }"
@endif
{{
$attributes
->merge([
x-bind:class="{ 'fi-sticky': isSticky }" @endif
{{ $attributes->merge(
[
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class([
'fi-sc-actions',
($verticalAlignment instanceof VerticalAlignment) ? "fi-vertical-align-{$verticalAlignment->value}" : $verticalAlignment,
])
}}
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->class([
'fi-sc-actions',
$verticalAlignment instanceof VerticalAlignment
? "fi-vertical-align-{$verticalAlignment->value}"
: $verticalAlignment,
]) }}>
@if (filled($label = $getLabel()))
<div class="fi-sc-actions-label-ctn">
{{ $getChildSchema($schemaComponent::BEFORE_LABEL_SCHEMA_KEY) }}
@@ -47,12 +45,8 @@
{{ $aboveContentContainer }}
@endif
<x-filament::actions
:actions="$actions"
:alignment="$alignment"
:full-width="$isFullWidth"
:x-bind:style="$isSticky ? 'isSticky ? `width: ${width}px;` : \'\'' : null"
/>
<x-filament::actions :actions="$actions" :alignment="$alignment" :full-width="$isFullWidth"
:x-bind:style="$isSticky ? 'isSticky ? `width: ${width}px;` : \'\'' : null" />
@if ($belowContentContainer = $getChildSchema($schemaComponent::BELOW_CONTENT_SCHEMA_KEY)?->toHtmlString())
{{ $belowContentContainer }}
@@ -12,18 +12,8 @@
$iconSize = $getIconSize() ?? IconSize::Large;
@endphp
<x-filament::callout
:attributes="
\Filament\Support\prepare_inherited_attributes($extraAttributeBag)
->class(['fi-sc-callout'])
"
:color="$color ?? 'gray'"
:description="$description"
:heading="$heading"
:icon="$icon"
:icon-color="$iconColor"
:icon-size="$iconSize"
>
<x-filament::callout :attributes="\Filament\Support\prepare_inherited_attributes($extraAttributeBag)->class(['fi-sc-callout'])" :color="$color ?? 'gray'" :description="$description" :heading="$heading" :icon="$icon"
:icon-color="$iconColor" :icon-size="$iconSize">
<x-slot name="footer">
{{ $footer }}
</x-slot>
@@ -10,22 +10,7 @@
$isContained = $isContained();
@endphp
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class(['fi-sc-empty-state'])
}}
>
<x-filament::empty-state
:compact="$isCompact"
:contained="$isContained"
:description="$description"
:footer="$footer"
:heading="$heading"
:heading-tag="$headingTag"
:icon="$icon"
:icon-color="$iconColor"
:icon-size="$iconSize"
/>
<div {{ $attributes->merge($getExtraAttributes(), escape: false)->class(['fi-sc-empty-state']) }}>
<x-filament::empty-state :compact="$isCompact" :contained="$isContained" :description="$description" :footer="$footer" :heading="$heading"
:heading-tag="$headingTag" :icon="$icon" :icon-color="$iconColor" :icon-size="$iconSize" />
</div>
@@ -6,19 +6,14 @@
$isContained = $isContained();
@endphp
<x-filament::fieldset
:contained="$isContained"
:label="$label"
:label-hidden="$isLabelHidden"
:required="isset($isMarkedAsRequired) ? $isMarkedAsRequired() : false"
:attributes="
\Filament\Support\prepare_inherited_attributes($attributes)
->merge([
'id' => $id,
], escape: false)
->merge($extraAttributes, escape: false)
->class(['fi-sc-fieldset'])
"
>
<x-filament::fieldset :contained="$isContained" :label="$label" :label-hidden="$isLabelHidden" :required="isset($isMarkedAsRequired) ? $isMarkedAsRequired() : false" :attributes="\Filament\Support\prepare_inherited_attributes($attributes)
->merge(
[
'id' => $id,
],
escape: false,
)
->merge($extraAttributes, escape: false)
->class(['fi-sc-fieldset'])">
{{ $getChildSchema() }}
</x-filament::fieldset>
@@ -11,30 +11,29 @@
$verticalAlignment = $getVerticalAlignment();
$alignment = $getAlignment();
if (! $verticalAlignment instanceof VerticalAlignment) {
$verticalAlignment = filled($verticalAlignment) ? (VerticalAlignment::tryFrom($verticalAlignment) ?? $verticalAlignment) : null;
if (!$verticalAlignment instanceof VerticalAlignment) {
$verticalAlignment = filled($verticalAlignment)
? VerticalAlignment::tryFrom($verticalAlignment) ?? $verticalAlignment
: null;
}
if (! $alignment instanceof Alignment) {
$alignment = filled($alignment) ? (Alignment::tryFrom($alignment) ?? $alignment) : null;
if (!$alignment instanceof Alignment) {
$alignment = filled($alignment) ? Alignment::tryFrom($alignment) ?? $alignment : null;
}
@endphp
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class([
'fi-sc-flex',
'fi-dense' => $isDense(),
'fi-from-' . ($fromBreakpoint ?? 'default'),
($verticalAlignment instanceof VerticalAlignment) ? "fi-vertical-align-{$verticalAlignment->value}" : $verticalAlignment,
($alignment instanceof Alignment) ? "fi-align-{$alignment->value}" : $alignment,
])
}}
>
{{ $attributes->merge($getExtraAttributes(), escape: false)->class([
'fi-sc-flex',
'fi-dense' => $isDense(),
'fi-from-' . ($fromBreakpoint ?? 'default'),
$verticalAlignment instanceof VerticalAlignment
? "fi-vertical-align-{$verticalAlignment->value}"
: $verticalAlignment,
$alignment instanceof Alignment ? "fi-align-{$alignment->value}" : $alignment,
]) }}>
@foreach ($getChildSchema()->getComponents() as $schemaComponent)
@if (($schemaComponent instanceof Action) || ($schemaComponent instanceof ActionGroup))
@if ($schemaComponent instanceof Action || $schemaComponent instanceof ActionGroup)
<div>
{{ $schemaComponent }}
</div>
@@ -46,31 +45,33 @@
$schemaComponentStatePath = $schemaComponent->getStatePath();
@endphp
<div
x-data="filamentSchemaComponent({
path: @js($schemaComponentStatePath),
containerPath: @js($statePath),
$wire,
})"
@if ($afterStateUpdatedJs = $schemaComponent->getAfterStateUpdatedJs())
x-init="{!! implode(';', array_map(
fn (string $js): string => '$wire; $wire.watch(' . Js::from($schemaComponentStatePath) . ', ($state, $old) => isStateChanged($state, $old) && eval(' . Js::from($js) . '))',
$afterStateUpdatedJs,
)) !!}"
@endif
@if (filled($visibilityJs = match ([filled($hiddenJs), filled($visibleJs)]) {
[true, true] => "(! ({$hiddenJs})) && ({$visibleJs})",
[true, false] => "! ({$hiddenJs})",
[false, true] => $visibleJs,
default => null,
}))
x-bind:class="{ 'fi-hidden': ! ({!! $visibilityJs !!}) }"
x-cloak
@endif
<div x-data="filamentSchemaComponent({
path: @js($schemaComponentStatePath),
containerPath: @js($statePath),
$wire,
})" @if ($afterStateUpdatedJs = $schemaComponent->getAfterStateUpdatedJs()) x-init="{!! implode(
';',
array_map(
fn(string $js): string => '$wire; $wire.watch(' .
Js::from($schemaComponentStatePath) .
', ($state, $old) => isStateChanged($state, $old) && eval(' .
Js::from($js) .
'))',
$afterStateUpdatedJs,
),
) !!}" @endif
@if (filled(
$visibilityJs = match ([filled($hiddenJs), filled($visibleJs)]) {
[true, true] => "(! ({$hiddenJs})) && ({$visibleJs})",
[true, false] => "! ({$hiddenJs})",
[false, true] => $visibleJs,
default => null,
})) x-bind:class="{ 'fi-hidden': ! ({!! $visibilityJs !!}) }"
x-cloak @endif
@class([
'fi-growable' => ($schemaComponent instanceof Component) && $schemaComponent->canGrow(),
])
>
'fi-growable' =>
$schemaComponent instanceof Component && $schemaComponent->canGrow(),
])>
{{ $schemaComponent }}
</div>
@endif
@@ -1,17 +1,11 @@
<form
{{
$attributes
->merge([
{{ $attributes->merge(
[
'id' => $getId(),
'wire:submit' => $getLivewireSubmitHandler(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class([
'fi-sc-form',
'fi-dense' => $isDense(),
])
}}
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->class(['fi-sc-form', 'fi-dense' => $isDense()]) }}>
{{ $getChildSchema($schemaComponent::HEADER_SCHEMA_KEY) }}
{{ $getChildSchema() }}
@@ -8,7 +8,7 @@
$errorMessage = null;
foreach ($getChildComponentContainer()->getComponents() as $childComponent) {
if (! ($childComponent instanceof Field)) {
if (!($childComponent instanceof Field)) {
continue;
}
@@ -31,7 +31,7 @@
break;
}
if (! ($childComponent instanceof HasNestedRecursiveValidationRules)) {
if (!($childComponent instanceof HasNestedRecursiveValidationRules)) {
continue;
}
@@ -50,24 +50,15 @@
}
@endphp
<x-dynamic-component
:component="$fieldWrapperView"
:error-message="$errorMessage"
:error-messages="$errorMessages"
:are-html-error-messages-allowed="$areHtmlValidationMessagesAllowed ?? false"
:should-show-all-validation-messages="$shouldShowAllValidationMessages ?? false"
:field="$schemaComponent"
>
<x-dynamic-component :component="$fieldWrapperView" :error-message="$errorMessage" :error-messages="$errorMessages" :are-html-error-messages-allowed="$areHtmlValidationMessagesAllowed ?? false" :should-show-all-validation-messages="$shouldShowAllValidationMessages ?? false"
:field="$schemaComponent">
<div
{{
$attributes
->merge([
{{ $attributes->merge(
[
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class(['fi-sc-fused-group'])
}}
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->class(['fi-sc-fused-group']) }}>
{{ $getChildSchema() }}
</div>
</x-dynamic-component>
@@ -1,11 +1,9 @@
<div
{{
$attributes
->merge([
{{ $attributes->merge(
[
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
}}
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false) }}>
{{ $getChildSchema() }}
</div>
@@ -6,26 +6,14 @@
$width = $getImageWidth();
$tooltip = $getTooltip();
if (! $alignment instanceof Alignment) {
$alignment = filled($alignment) ? (Alignment::tryFrom($alignment) ?? $alignment) : null;
if (!$alignment instanceof Alignment) {
$alignment = filled($alignment) ? Alignment::tryFrom($alignment) ?? $alignment : null;
}
@endphp
<img
alt="{{ $getAlt() }}"
src="{{ $getUrl() }}"
@if (filled($tooltip))
x-tooltip="{ content: @js($tooltip), theme: $store.theme, allowHTML: @js($tooltip instanceof \Illuminate\Contracts\Support\Htmlable) }"
@endif
{{
$getExtraAttributeBag()
->class([
'fi-sc-image',
($alignment instanceof Alignment) ? "fi-align-{$alignment->value}" : $alignment,
])
->style([
('height: ' . e($height)) => $height,
('width: ' . e($width)) => $width,
])
}}
/>
<img alt="{{ $getAlt() }}" src="{{ $getUrl() }}"
@if (filled($tooltip)) x-tooltip="{ content: @js($tooltip), theme: $store.theme, allowHTML: @js($tooltip instanceof \Illuminate\Contracts\Support\Htmlable) }" @endif
{{ $getExtraAttributeBag()->class(['fi-sc-image', $alignment instanceof Alignment ? "fi-align-{$alignment->value}" : $alignment])->style([
'height: ' . e($height) => $height,
'width: ' . e($width) => $width,
]) }} />
@@ -6,13 +6,12 @@
@if (filled($id) || filled($extraAttributes))
{!! '<div' !!}
{{-- Avoid formatting issues with unclosed elements --}}
{{
$attributes
->merge([
{{ $attributes->merge(
[
'id' => $id,
], escape: false)
->merge($extraAttributes, escape: false)
}}
],
escape: false,
)->merge($extraAttributes, escape: false) }}
>
@endif
@@ -20,22 +20,25 @@
$isSecondary = $isSecondary();
$id = $getId();
$stateResetHandler = ($isCollapsible && (! $isAside) && (! $shouldPersistCollapsed))
? ('if (($event.detail.livewireId === ' . Js::from($this->getId()) . ') && ($event.detail.schemaKey === ' . Js::from($getRootContainer()->getKey()) . ')) $nextTick(() => isCollapsed = ' . Js::from($isCollapsed) . ')')
: null;
$stateResetHandler =
$isCollapsible && !$isAside && !$shouldPersistCollapsed
? 'if (($event.detail.livewireId === ' .
Js::from($this->getId()) .
') && ($event.detail.schemaKey === ' .
Js::from($getRootContainer()->getKey()) .
')) $nextTick(() => isCollapsed = ' .
Js::from($isCollapsed) .
')'
: null;
@endphp
<div
{{
$attributes
->merge([
{{ $attributes->merge(
[
'id' => $id,
], escape: false)
->merge($getExtraAttributes(), escape: false)
->merge($getExtraAlpineAttributes(), escape: false)
->class(['fi-sc-section'])
}}
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->merge($getExtraAlpineAttributes(), escape: false)->class(['fi-sc-section']) }}>
@if (filled($label = $getLabel()))
<div class="fi-sc-section-label-ctn">
{{ $getChildSchema($schemaComponent::BEFORE_LABEL_SCHEMA_KEY) }}
@@ -52,28 +55,11 @@
{{ $aboveContentContainer }}
@endif
<x-filament::section
:x-on:reset-schema-component-state.window="$stateResetHandler"
:after-header="$afterHeader"
:aside="$isAside"
:collapsed="$isCollapsed"
:collapse-id="$id"
:collapsible="$isCollapsible && (! $isAside)"
:compact="$isCompact"
:contained="$isContained"
:content-before="$isFormBefore"
:description="$description"
:divided="$isDivided"
:footer="$footer"
:has-content-el="false"
:heading="$heading"
:heading-tag="$headingTag"
:icon="$icon"
:icon-color="$iconColor"
:icon-size="$iconSize"
:persist-collapsed="$shouldPersistCollapsed"
:secondary="$isSecondary"
>
<x-filament::section :x-on:reset-schema-component-state.window="$stateResetHandler" :after-header="$afterHeader"
:aside="$isAside" :collapsed="$isCollapsed" :collapse-id="$id" :collapsible="$isCollapsible && !$isAside" :compact="$isCompact" :contained="$isContained"
:content-before="$isFormBefore" :description="$description" :divided="$isDivided" :footer="$footer" :has-content-el="false" :heading="$heading"
:heading-tag="$headingTag" :icon="$icon" :icon-color="$iconColor" :icon-size="$iconSize" :persist-collapsed="$shouldPersistCollapsed"
:secondary="$isSecondary">
{{ $getChildSchema()->extraAttributes(['class' => 'fi-section-content']) }}
</x-filament::section>
@@ -34,7 +34,8 @@
$dropdownJs = match ($mode) {
'inline' => "(!withinDropdownMounted || withinDropdownIndex === null || {$index} < withinDropdownIndex)",
'trigger' => "(withinDropdownMounted && withinDropdownIndex !== null && {$index} >= withinDropdownIndex && '{$tabKey}' === tab)",
'trigger'
=> "(withinDropdownMounted && withinDropdownIndex !== null && {$index} >= withinDropdownIndex && '{$tabKey}' === tab)",
default => null,
};
@@ -43,63 +44,45 @@
@endphp
@if (blank($livewireProperty))
<div
x-data="tabsSchemaComponent({
activeTab: @js($activeTab),
isScrollable: @js($isScrollable),
isTabPersisted: @js($isTabPersisted()),
isTabPersistedInQueryString: @js($isTabPersistedInQueryString()),
livewireId: @js($this->getId()),
schemaKey: @js($getRootContainer()->getKey()),
tab: @if ($isTabPersisted() && filled($id)) $persist(null).as(@js($id)) @else @js(null) @endif,
tabQueryStringKey: @js($getTabQueryStringKey()),
})"
x-load
<div x-data="tabsSchemaComponent({
activeTab: @js($activeTab),
isScrollable: @js($isScrollable),
isTabPersisted: @js($isTabPersisted()),
isTabPersistedInQueryString: @js($isTabPersistedInQueryString()),
livewireId: @js($this->getId()),
schemaKey: @js($getRootContainer()->getKey()),
tab: @if ($isTabPersisted() && filled($id)) $persist(null).as(@js($id)) @else @js(null) @endif,
tabQueryStringKey: @js($getTabQueryStringKey()),
})" x-load
x-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('tabs', 'filament/schemas') }}"
wire:ignore.self
{{
$attributes
->merge([
{{ $attributes->merge(
[
'id' => $id,
'wire:key' => $getLivewireKey() . '.container',
], escape: false)
->merge($getExtraAttributes(), escape: false)
->merge($getExtraAlpineAttributes(), escape: false)
->class([
'fi-sc-tabs',
'fi-contained' => $isContained,
'fi-vertical' => $isVertical,
])
}}
>
<input
type="hidden"
value="{{ collect($tabs)->filter(static fn (Tab $tab): bool => $tab->isVisible())->map(static fn (Tab $tab) => $tab->getKey(isAbsolute: false))->values()->toJson() }}"
x-ref="tabsData"
/>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->merge($getExtraAlpineAttributes(), escape: false)->class(['fi-sc-tabs', 'fi-contained' => $isContained, 'fi-vertical' => $isVertical]) }}>
<input type="hidden"
value="{{ collect($tabs)->filter(static fn(Tab $tab): bool => $tab->isVisible())->map(static fn(Tab $tab) => $tab->getKey(isAbsolute: false))->values()->toJson() }}"
x-ref="tabsData" />
<x-filament::tabs
:contained="$isContained"
:label="$label"
:vertical="$isVertical"
x-cloak
:x-bind:class="! $isScrollable ? '{ \'fi-invisible\': ! withinDropdownMounted }' : null"
:x-data="
$hasDeferredBadges ? '{
deferredBadges: {},
isLoadingDeferredBadges: true,
async init() {
try {
const badges = await $wire.callSchemaComponentMethod(' . \Illuminate\Support\Js::from($tabsKey) . ', \'getDeferredTabBadges\')
<x-filament::tabs :contained="$isContained" :label="$label" :vertical="$isVertical" x-cloak
:x-bind:class="!$isScrollable ? '{ \'fi-invisible\': ! withinDropdownMounted }' : null" :x-data="$hasDeferredBadges ? '{
deferredBadges: {},
isLoadingDeferredBadges: true,
async init() {
try {
const badges = await $wire.callSchemaComponentMethod(' . \Illuminate\Support\Js::from($tabsKey) . ', \'getDeferredTabBadges\')
this.deferredBadges = badges ?? {}
} finally {
}
finally {
this.isLoadingDeferredBadges = false
}
},
}' : null
"
>
}
' : null">
@foreach ($getStartRenderHooks() as $startRenderHook)
{{ \Filament\Support\Facades\FilamentView::renderHook($startRenderHook, scopes: $renderHookScopes) }}
@endforeach
@@ -120,31 +103,16 @@
$tabVisibilityJs = $getTabVisibilityJs($tab, $index, 'inline');
@endphp
<x-filament::tabs.item
:alpine-active="'tab === \'' . $tabKey . '\''"
:alpine-deferred-badge-data="$isTabBadgeDeferred ? 'deferredBadges[' . \Illuminate\Support\Js::from($index) . ']' : null"
:alpine-deferred-badge-loading="$isTabBadgeDeferred ? 'isLoadingDeferredBadges' : null"
:attributes="$tabExtraAttributeBag"
:badge="$tabBadge"
:badge-color="$tabBadgeColor"
:badge-icon="$tabBadgeIcon"
:badge-icon-position="$tabBadgeIconPosition"
:badge-tooltip="$tabBadgeTooltip"
:data-tab-key="$tabKey"
:icon="$tabIcon"
:icon-position="$tabIconPosition"
:x-cloak="$tabVisibilityJs !== null"
:x-on:click="'tab = \'' . $tabKey . '\''"
:x-show="$tabVisibilityJs"
>
<x-filament::tabs.item :alpine-active="'tab === \'' . $tabKey . '\''" :alpine-deferred-badge-data="$isTabBadgeDeferred ? 'deferredBadges[' . \Illuminate\Support\Js::from($index) . ']' : null" :alpine-deferred-badge-loading="$isTabBadgeDeferred ? 'isLoadingDeferredBadges' : null" :attributes="$tabExtraAttributeBag"
:badge="$tabBadge" :badge-color="$tabBadgeColor" :badge-icon="$tabBadgeIcon" :badge-icon-position="$tabBadgeIconPosition" :badge-tooltip="$tabBadgeTooltip"
:data-tab-key="$tabKey" :icon="$tabIcon" :icon-position="$tabIconPosition" :x-cloak="$tabVisibilityJs !== null"
:x-on:click="'tab = \'' . $tabKey . '\''" :x-show="$tabVisibilityJs">
{{ $tabLabel }}
</x-filament::tabs.item>
@endforeach
@if (! $isScrollable)
<x-filament::dropdown
:placement="__('filament-panels::layout.direction') === 'ltr' ? 'bottom-start' : 'bottom-end'"
>
@if (!$isScrollable)
<x-filament::dropdown :placement="__('filament-panels::layout.direction') === 'ltr' ? 'bottom-start' : 'bottom-end'">
<x-slot name="trigger">
@foreach ($tabs as $index => $tab)
@php
@@ -158,30 +126,20 @@
$tabVisibilityJs = $getTabVisibilityJs($tab, $index, 'trigger');
@endphp
<x-filament::tabs.item
:alpine-active="'tab === \'' . $tabKey . '\''"
:alpine-deferred-badge-data="$isTabBadgeDeferred ? 'deferredBadges[' . \Illuminate\Support\Js::from($index) . ']' : null"
:alpine-deferred-badge-loading="$isTabBadgeDeferred ? 'isLoadingDeferredBadges' : null"
:attributes="$tabExtraAttributeBag"
:badge="$tabBadge"
:badge-color="$tabBadgeColor"
:badge-tooltip="$tabBadgeTooltip"
:icon="Heroicon::ChevronDown"
:icon-alias="SchemaIconAlias::COMPONENTS_TABS_DROPDOWN_TRIGGER_BUTTON"
:x-cloak="$tabVisibilityJs !== null"
:x-show="$tabVisibilityJs"
>
<x-filament::tabs.item :alpine-active="'tab === \'' . $tabKey . '\''" :alpine-deferred-badge-data="$isTabBadgeDeferred
? 'deferredBadges[' . \Illuminate\Support\Js::from($index) . ']'
: null" :alpine-deferred-badge-loading="$isTabBadgeDeferred ? 'isLoadingDeferredBadges' : null"
:attributes="$tabExtraAttributeBag" :badge="$tabBadge" :badge-color="$tabBadgeColor" :badge-tooltip="$tabBadgeTooltip"
:icon="Heroicon::ChevronDown" :icon-alias="SchemaIconAlias::COMPONENTS_TABS_DROPDOWN_TRIGGER_BUTTON" :x-cloak="$tabVisibilityJs !== null" :x-show="$tabVisibilityJs">
{{ $tabLabel }}
</x-filament::tabs.item>
@endforeach
<x-filament::tabs.item x-show="isDropdownButtonVisible">
{{
\Filament\Support\generate_icon_html(
Heroicon::EllipsisHorizontal,
alias: SchemaIconAlias::COMPONENTS_TABS_MORE_TABS_BUTTON,
)
}}
{{ \Filament\Support\generate_icon_html(
Heroicon::EllipsisHorizontal,
alias: SchemaIconAlias::COMPONENTS_TABS_MORE_TABS_BUTTON,
) }}
</x-filament::tabs.item>
</x-slot>
@@ -197,17 +155,12 @@
$tabLabel = $tab->getLabel();
@endphp
<x-filament::dropdown.list.item
:alpine-deferred-badge-data="$isTabBadgeDeferred ? 'deferredBadges[' . \Illuminate\Support\Js::from($index) . ']' : null"
:alpine-deferred-badge-loading="$isTabBadgeDeferred ? 'isLoadingDeferredBadges' : null"
:badge="$tabBadge"
:badge-color="$tabBadgeColor"
:badge-tooltip="$tabBadgeTooltip"
:icon="$tabIcon"
<x-filament::dropdown.list.item :alpine-deferred-badge-data="$isTabBadgeDeferred
? 'deferredBadges[' . \Illuminate\Support\Js::from($index) . ']'
: null" :alpine-deferred-badge-loading="$isTabBadgeDeferred ? 'isLoadingDeferredBadges' : null" :badge="$tabBadge"
:badge-color="$tabBadgeColor" :badge-tooltip="$tabBadgeTooltip" :icon="$tabIcon"
x-bind:class="{ 'fi-selected': tab === '{{ $tabKey }}' }"
:x-on:click="'tab = \'' . $tabKey . '\'; close($event);'"
:x-show="$index . ' >= withinDropdownIndex'"
>
:x-on:click="'tab = \'' . $tabKey . '\'; close($event);'" :x-show="$index . ' >= withinDropdownIndex'">
{{ $tabLabel }}
</x-filament::dropdown.list.item>
@endforeach
@@ -239,9 +192,7 @@
$activeTab = strval($this->{$livewireProperty});
@endphp
<div
@if ($hasDeferredBadges)
x-data="{
<div @if ($hasDeferredBadges) x-data="{
deferredBadges: {},
isLoadingDeferredBadges: true,
@@ -257,27 +208,15 @@
this.isLoadingDeferredBadges = false
}
},
}"
@endif
{{
$attributes
->merge([
}" @endif
{{ $attributes->merge(
[
'id' => $id,
'wire:key' => $getLivewireKey() . '.container',
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class([
'fi-sc-tabs',
'fi-contained' => $isContained,
'fi-vertical' => $isVertical,
])
}}
>
<x-filament::tabs
:contained="$isContained"
:label="$label"
:vertical="$isVertical"
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->class(['fi-sc-tabs', 'fi-contained' => $isContained, 'fi-vertical' => $isVertical]) }}>
<x-filament::tabs :contained="$isContained" :label="$label" :vertical="$isVertical">
@foreach ($getStartRenderHooks() as $startRenderHook)
{{ \Filament\Support\Facades\FilamentView::renderHook($startRenderHook, scopes: $renderHookScopes) }}
@endforeach
@@ -297,20 +236,10 @@
$tabLabel = $tab->getLabel() ?? $this->generateTabLabel($tabKey);
@endphp
<x-filament::tabs.item
:active="$activeTab === $tabKey"
:alpine-deferred-badge-data="$isTabBadgeDeferred ? 'deferredBadges[' . \Illuminate\Support\Js::from($tabKey) . ']' : null"
:alpine-deferred-badge-loading="$isTabBadgeDeferred ? 'isLoadingDeferredBadges' : null"
:attributes="$tabExtraAttributeBag"
:badge="$tabBadge"
:badge-color="$tabBadgeColor"
:badge-icon="$tabBadgeIcon"
:badge-icon-position="$tabBadgeIconPosition"
:badge-tooltip="$tabBadgeTooltip"
:icon="$tabIcon"
:icon-position="$tabIconPosition"
:wire:click="'$set(\'' . $livewireProperty . '\', ' . (filled($tabKey) ? ('\'' . $tabKey . '\'') : 'null') . ')'"
>
<x-filament::tabs.item :active="$activeTab === $tabKey" :alpine-deferred-badge-data="$isTabBadgeDeferred ? 'deferredBadges[' . \Illuminate\Support\Js::from($tabKey) . ']' : null" :alpine-deferred-badge-loading="$isTabBadgeDeferred ? 'isLoadingDeferredBadges' : null" :attributes="$tabExtraAttributeBag"
:badge="$tabBadge" :badge-color="$tabBadgeColor" :badge-icon="$tabBadgeIcon" :badge-icon-position="$tabBadgeIconPosition" :badge-tooltip="$tabBadgeTooltip"
:icon="$tabIcon" :icon-position="$tabIconPosition"
:wire:click="'$set(\'' . $livewireProperty . '\', ' . (filled($tabKey) ? ('\'' . $tabKey . '\'') : 'null') . ')'">
{{ $tabLabel }}
</x-filament::tabs.item>
@endforeach
@@ -8,41 +8,34 @@
$childSchema = $getChildSchema();
@endphp
@if (! empty($childSchema->getComponents()))
@if (!empty($childSchema->getComponents()))
@if (blank($livewireProperty))
<div
x-bind:class="{
'fi-active': tab === @js($key),
}"
<div x-bind:class="{
'fi-active': tab === @js($key),
}"
x-on:expand="tab = @js($key)"
{{
$attributes
->merge([
{{ $attributes->merge(
[
'aria-labelledby' => $id,
'id' => $id,
'role' => 'tabpanel',
'wire:key' => $getLivewireKey() . '.container',
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class(['fi-sc-tabs-tab'])
}}
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->class(['fi-sc-tabs-tab']) }}>
{{ $childSchema }}
</div>
@elseif (strval($this->{$livewireProperty}) === strval($key))
<div
{{
$attributes
->merge([
{{ $attributes->merge(
[
'aria-labelledby' => $id,
'id' => $id,
'role' => 'tabpanel',
'wire:key' => $getLivewireKey() . '.container',
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class(['fi-sc-tabs-tab fi-active'])
}}
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->class(['fi-sc-tabs-tab fi-active']) }}>
{{ $childSchema }}
</div>
@endif
@@ -21,12 +21,7 @@
@endphp
@if ($isBadge())
<x-filament::badge
:color="$color"
:icon="$icon"
:icon-position="$iconPosition"
:icon-size="$iconSize"
:size="$size instanceof \Filament\Support\Enums\TextSize ? $size->value : $size"
<x-filament::badge :color="$color" :icon="$icon" :icon-position="$iconPosition" :icon-size="$iconSize" :size="$size instanceof \Filament\Support\Enums\TextSize ? $size->value : $size"
:x-on:click="
$isCopyable ? '
window.navigator.clipboard.writeText(' . \Illuminate\Support\Js::from($copyableState) . ')
@@ -35,44 +30,30 @@
timeout: ' . \Illuminate\Support\Js::from($copyMessageDuration) . ',
})
' : null
"
:tag="$isCopyable ? 'button' : 'span'"
:tooltip="$tooltip"
:attributes="\Filament\Support\prepare_inherited_attributes($getExtraAttributeBag()->class(['fi-sc-text']))"
>
" :tag="$isCopyable ? 'button' : 'span'" :tooltip="$tooltip" :attributes="\Filament\Support\prepare_inherited_attributes($getExtraAttributeBag()->class(['fi-sc-text']))">
{{ $content }}
</x-filament::badge>
@else
<span
@if ($isCopyable)
x-on:click="
@if ($isCopyable) x-on:click="
window.navigator.clipboard.writeText(@js($copyableState))
$tooltip(@js($copyMessage), {
theme: $store.theme,
timeout: @js($copyMessageDuration),
})
"
@endif
@if (filled($tooltip))
x-tooltip="{
" @endif
@if (filled($tooltip)) x-tooltip="{
content: @js($tooltip),
theme: $store.theme,
allowHTML: @js($tooltip instanceof \Illuminate\Contracts\Support\Htmlable),
}"
@endif
{{
(new \Illuminate\View\ComponentAttributeBag)
->color(TextComponent::class, $color)
->class([
'fi-sc-text',
'fi-copyable' => $isCopyable,
($size instanceof \BackedEnum) ? "fi-size-{$size->value}" : $size,
($weight instanceof FontWeight) ? "fi-font-{$weight->value}" : $weight,
($fontFamily instanceof FontFamily) ? "fi-font-{$fontFamily->value}" : $fontFamily,
])
->merge($getExtraAttributes(), escape: false)
}}
>
}" @endif
{{ new \Illuminate\View\ComponentAttributeBag()->color(TextComponent::class, $color)->class([
'fi-sc-text',
'fi-copyable' => $isCopyable,
$size instanceof \BackedEnum ? "fi-size-{$size->value}" : $size,
$weight instanceof FontWeight ? "fi-font-{$weight->value}" : $weight,
$fontFamily instanceof FontFamily ? "fi-font-{$fontFamily->value}" : $fontFamily,
])->merge($getExtraAttributes(), escape: false) }}>
{{ $content }}
</span>
@endif
@@ -1,13 +1,8 @@
<ul
{{
$getExtraAttributeBag()
->grid($getColumns(), \Filament\Support\Enums\GridDirection::Column)
->class([
'fi-sc-unordered-list',
(($size = $getSize()) instanceof \Filament\Support\Enums\TextSize) ? "fi-size-{$size->value}" : $size,
])
}}
>
{{ $getExtraAttributeBag()->grid($getColumns(), \Filament\Support\Enums\GridDirection::Column)->class([
'fi-sc-unordered-list',
($size = $getSize()) instanceof \Filament\Support\Enums\TextSize ? "fi-size-{$size->value}" : $size,
]) }}>
@foreach ($getChildSchema()->getComponents() as $schemaComponent)
<li>
{{ $schemaComponent }}
@@ -7,141 +7,96 @@
$isHeaderHidden = $isHeaderHidden();
@endphp
<div
x-load
<div x-load
x-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('wizard', 'filament/schemas') }}"
x-data="wizardSchemaComponent({
isSkippable: @js($isSkippable()),
isStepPersistedInQueryString: @js($isStepPersistedInQueryString()),
key: @js($key),
livewireId: @js($this->getId()),
schemaKey: @js($getRootContainer()->getKey()),
startStep: @js($getStartStep()),
stepQueryStringKey: @js($getStepQueryStringKey()),
})"
isSkippable: @js($isSkippable()),
isStepPersistedInQueryString: @js($isStepPersistedInQueryString()),
key: @js($key),
livewireId: @js($this->getId()),
schemaKey: @js($getRootContainer()->getKey()),
startStep: @js($getStartStep()),
stepQueryStringKey: @js($getStepQueryStringKey()),
})"
x-on:next-wizard-step.window="if ($event.detail.key === @js($key)) goToNextStep()"
x-on:go-to-wizard-step.window="$event.detail.key === @js($key) && goToStep($event.detail.step)"
wire:ignore.self
{{
$attributes
->merge([
{{ $attributes->merge(
[
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->merge($getExtraAlpineAttributes(), escape: false)
->class([
'fi-sc-wizard',
'fi-contained' => $isContained,
'fi-sc-wizard-header-hidden' => $isHeaderHidden,
])
}}
>
<input
type="hidden"
value="{{
collect($steps)
->filter(static fn (\Filament\Schemas\Components\Wizard\Step $step): bool => $step->isVisible())
->map(static fn (\Filament\Schemas\Components\Wizard\Step $step): ?string => $step->getKey())
->values()
->toJson()
}}"
x-ref="stepsData"
/>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->merge($getExtraAlpineAttributes(), escape: false)->class(['fi-sc-wizard', 'fi-contained' => $isContained, 'fi-sc-wizard-header-hidden' => $isHeaderHidden]) }}>
<input type="hidden"
value="{{ collect($steps)->filter(static fn(\Filament\Schemas\Components\Wizard\Step $step): bool => $step->isVisible())->map(static fn(\Filament\Schemas\Components\Wizard\Step $step): ?string => $step->getKey())->values()->toJson() }}"
x-ref="stepsData" />
@if (! $isHeaderHidden)
<ol
@if (filled($label = $getLabel()))
aria-label="{{ $label }}"
@endif
role="list"
x-cloak
x-ref="header"
class="fi-sc-wizard-header"
>
@if (!$isHeaderHidden)
<ol @if (filled($label = $getLabel())) aria-label="{{ $label }}" @endif role="list" x-cloak
x-ref="header" class="fi-sc-wizard-header">
@foreach ($steps as $step)
<li
class="fi-sc-wizard-header-step"
<li class="fi-sc-wizard-header-step"
x-bind:class="{
'fi-active': getStepIndex(step) === {{ $loop->index }},
'fi-completed': getStepIndex(step) > {{ $loop->index }},
}"
>
<button
type="button"
}">
<button type="button"
x-bind:aria-current="getStepIndex(step) === {{ $loop->index }} ? 'step' : null"
x-on:click="step = @js($step->getKey())"
x-bind:disabled="! isStepAccessible(@js($step->getKey())) || @js($previousAction->isDisabled())"
class="fi-sc-wizard-header-step-btn"
>
x-bind:disabled="!isStepAccessible(@js($step->getKey())) || @js($previousAction->isDisabled())"
class="fi-sc-wizard-header-step-btn">
<div class="fi-sc-wizard-header-step-icon-ctn">
@php
$completedIcon = $step->getCompletedIcon();
@endphp
{{
\Filament\Support\generate_icon_html(
$completedIcon ?? \Filament\Support\Icons\Heroicon::OutlinedCheck,
alias: filled($completedIcon) ? null : \Filament\Schemas\View\SchemaIconAlias::COMPONENTS_WIZARD_COMPLETED_STEP,
attributes: new \Illuminate\View\ComponentAttributeBag([
'x-cloak' => 'x-cloak',
'x-show' => "getStepIndex(step) > {$loop->index}",
]),
size: \Filament\Support\Enums\IconSize::Large,
)
}}
{{ \Filament\Support\generate_icon_html(
$completedIcon ?? \Filament\Support\Icons\Heroicon::OutlinedCheck,
alias: filled($completedIcon) ? null : \Filament\Schemas\View\SchemaIconAlias::COMPONENTS_WIZARD_COMPLETED_STEP,
attributes: new \Illuminate\View\ComponentAttributeBag([
'x-cloak' => 'x-cloak',
'x-show' => "getStepIndex(step) > {$loop->index}",
]),
size: \Filament\Support\Enums\IconSize::Large,
) }}
@if (filled($icon = $step->getIcon()))
{{
\Filament\Support\generate_icon_html(
$icon,
attributes: new \Illuminate\View\ComponentAttributeBag([
'x-cloak' => 'x-cloak',
'x-show' => "getStepIndex(step) <= {$loop->index}",
]),
size: \Filament\Support\Enums\IconSize::Large,
)
}}
{{ \Filament\Support\generate_icon_html(
$icon,
attributes: new \Illuminate\View\ComponentAttributeBag([
'x-cloak' => 'x-cloak',
'x-show' => "getStepIndex(step) <= {$loop->index}",
]),
size: \Filament\Support\Enums\IconSize::Large,
) }}
@else
<span
x-show="getStepIndex(step) <= {{ $loop->index }}"
class="fi-sc-wizard-header-step-number"
>
<span x-show="getStepIndex(step) <= {{ $loop->index }}"
class="fi-sc-wizard-header-step-number">
{{ str_pad($loop->index + 1, 2, '0', STR_PAD_LEFT) }}
</span>
@endif
</div>
<div class="fi-sc-wizard-header-step-text">
@if (! $step->isLabelHidden())
@if (!$step->isLabelHidden())
<span class="fi-sc-wizard-header-step-label">
{{ $step->getLabel() }}
</span>
@endif
@if (filled($description = $step->getDescription()))
<span
class="fi-sc-wizard-header-step-description"
>
<span class="fi-sc-wizard-header-step-description">
{{ $description }}
</span>
@endif
</div>
</button>
@if (! $loop->last)
<svg
fill="none"
preserveAspectRatio="none"
viewBox="0 0 22 80"
aria-hidden="true"
class="fi-sc-wizard-header-step-separator"
>
<path
d="M0 -2L20 40L0 82"
stroke-linejoin="round"
stroke="currentcolor"
vector-effect="non-scaling-stroke"
></path>
@if (!$loop->last)
<svg fill="none" preserveAspectRatio="none" viewBox="0 0 22 80" aria-hidden="true"
class="fi-sc-wizard-header-step-separator">
<path d="M0 -2L20 40L0 82" stroke-linejoin="round" stroke="currentcolor"
vector-effect="non-scaling-stroke"></path>
</svg>
@endif
</li>
@@ -154,13 +109,7 @@
@endforeach
<div x-cloak class="fi-sc-wizard-footer">
<div
x-cloak
@if (! $previousAction->isDisabled())
x-on:click="goToPreviousStep"
@endif
x-show="! isFirstStep()"
>
<div x-cloak @if (!$previousAction->isDisabled()) x-on:click="goToPreviousStep" @endif x-show="! isFirstStep()">
{{ $previousAction }}
</div>
@@ -168,18 +117,12 @@
{{ $getCancelAction() }}
</div>
<div
x-cloak
@if (! $nextAction->isDisabled())
x-on:click="requestNextStep()"
@endif
x-bind:class="{ 'fi-hidden': isLastStep() }"
wire:loading.class="fi-disabled"
>
<div x-cloak @if (!$nextAction->isDisabled()) x-on:click="requestNextStep()" @endif
x-bind:class="{ 'fi-hidden': isLastStep() }" wire:loading.class="fi-disabled">
{{ $nextAction }}
</div>
<div x-bind:class="{ 'fi-hidden': ! isLastStep() }">
<div x-bind:class="{ 'fi-hidden': !isLastStep() }">
{{ $getSubmitAction() }}
</div>
</div>
@@ -6,8 +6,7 @@
$alpineSubmitHandler = $hasFormWrapper() ? $wizard->getAlpineSubmitHandler() : null;
@endphp
<{{ filled($alpineSubmitHandler) ? 'form' : 'div' }}
x-bind:tabindex="$el.querySelector('[autofocus]') ? '-1' : '0'"
<{{ filled($alpineSubmitHandler) ? 'form' : 'div' }} x-bind:tabindex="$el.querySelector('[autofocus]') ? '-1' : '0'"
x-bind:class="{
'fi-active': step === @js($key),
}"
@@ -18,26 +17,20 @@
step = @js($key)
"
@if (filled($alpineSubmitHandler))
x-on:submit.prevent="isLastStep() ? {!! $alpineSubmitHandler !!} : requestNextStep()"
@endif
x-cloak
x-ref="step-{{ $key }}"
{{
$attributes
->merge([
@if (filled($alpineSubmitHandler)) x-on:submit.prevent="isLastStep() ? {!! $alpineSubmitHandler !!} : requestNextStep()" @endif
x-cloak x-ref="step-{{ $key }}"
{{ $attributes->merge(
[
'aria-labelledby' => $id,
'id' => $id,
'role' => 'tabpanel',
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class(['fi-sc-wizard-step'])
}}
>
],
escape: false,
)->merge($getExtraAttributes(), escape: false)->class(['fi-sc-wizard-step']) }}>
{{ $getChildSchema() }}
@if (filled($alpineSubmitHandler))
{{-- This is a hack to allow the form to submit when the user presses the enter key, even if there is no other submit button in the form. --}}
<input type="submit" hidden />
@endif
</{{ filled($alpineSubmitHandler) ? 'form' : 'div' }}>
</{{ filled($alpineSubmitHandler) ? 'form' : 'div' }}>