* fix(forms): preserve the order of rich editor mention options
Mention options were sent to JavaScript as an object keyed by ID, and
`toItemsArray()` reads them back with `Object.entries()`. JavaScript orders
integer-like keys ascending numerically, so for models with numeric primary
keys the developer's ordering was silently replaced with an ascending-ID
sort, for both `items()` and `getSearchResultsUsing()`.
Items are now sent as an ordered list of `id` and `label` pairs. The JS
already supports that shape, so no JS change is required.
This also fixes a related edge case: PHP re-casts numeric-string array keys
back to integers, so a provider whose IDs were 0-based and sequential
serialised to a JSON array of bare labels, and the inserted mention took its
label as its `id`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011LniPBty6yFENqFFcMcNad
* fix(forms): preserve zero-valued mention IDs
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
* fix: Dropdown aria-controls loop when the component is initialised twice on the same element
* test: Reproduce the dropdown `aria-controls` loop through a real morph
Prepending a row to a keyed list whose rows also carry an `x-text` binding makes
Alpine initialise every retained row's dropdown a second time: the `x-text` effect
flushes the mutation observer mid-morph, so a row's removal and re-insertion land in
different batches. A second prepend then strips `aria-controls` and the two instances
ping-pong. Fails on the previous `dropdown.js` (5000+ writes, renderer frozen) and
stays at ~100 writes with the fix. Includes the rebuilt support bundle so the browser
test runs against the fixed component.
* fix: Clean up dropdown observers when destroyed
---------
Co-authored-by: Dan Harrin <git@danharrin.com>
* fix: query builder filter indicators when a rule is deleted from the deferred filters form
* test: reproduce the query builder indicator failure with the standard testing helpers
Delete the rule with `callAction()` and then sort the table, instead of
building the Livewire request by hand. Sorting re-renders the whole table,
which is what rebuilds the indicators and triggers the failure.
* fix: count applied query builder filters
* refactor: centralize applied filter form state
---------
Co-authored-by: Dan Harrin <git@danharrin.com>
`bind()` is not shared, so when `filament/support` registers after
`livewire/livewire` it overwrites Livewire's shared `DataStore` instance
with a non-shared binding. Every `app(DataStore::class)` then builds a new
store with an empty `WeakMap`, losing all per-component state, and every
render throws from `ViewErrorBag::put()` with a null message bag.
`singleton()` is order-independent: either provider order ends up with one
shared `DataStoreOverride`, which is what the binding already intended.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: skip tenant association for HasOneThrough ownership relationships
The `created` observer registered by `observeTenancyModelCreation()` only
returned early for `BelongsTo` and `BelongsToThrough` ownership
relationships before calling `$relationship->save($tenant)`. Laravel's
`HasOneThrough` and `HasManyThrough` are read-only and have no `save()`
method, so creating a record in a resource whose ownership relationship
goes through an intermediate model crashed with
`Call to undefined method HasOneThrough::save()`.
Treat `HasOneOrManyThrough` like the other non-writable ownership
relationships and return early, since the tenant is already implied by
the intermediate model. Query scoping through `whereHas()` is unaffected.
* Simplify tenancy relationship tests
---------
Co-authored-by: Ricardo Sawir <rian.segalhidajat@gmail.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
* feat: add missing Khmer translations for the view record page and chart widget.
* chore: update the missing Khmer language translations for multi-factor authentication and form components
* chore: update Khmer language translations for validation and email verification controller
* fix: fallback to default GITHUB_TOKEN if GH_ACCESS_TOKEN is not defined in workflow checkout
* feat: add and update Khmer language translations for various components and packages
* Update Khmer (km) translations