diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aab8bc9f5..70127a84cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # Release Notes +## 4.50.0 (2024-02-26) + +### What's new +- Add `hex_to_rgb` modifier. [#9582](https://github.com/statamic/cms/issues/9582) by @DanielDarrenJones +- Add UI mode option to forms fieldtype config. [#9591](https://github.com/statamic/cms/issues/9591) by @jacksleight +- First invalid field will be scrolled into view when submitting publish forms. [#9577](https://github.com/statamic/cms/issues/9577) by @jacksleight +- Add Antlers shorthand parameter value syntax. [#9505](https://github.com/statamic/cms/issues/9505) by @JohnathonKoster +- Hooks. [#9481](https://github.com/statamic/cms/issues/9481) by @ryanmitchell +- Add `Entry::findOrFail`. [#9506](https://github.com/statamic/cms/issues/9506) by @benfurfie + +### What's fixed +- Fix field conditions in Grid fields. [#9586](https://github.com/statamic/cms/issues/9586) by @duncanmcclean +- Fix pixel gap on relationship fieldtype items. [#9579](https://github.com/statamic/cms/issues/9579) by @jasonvarga +- Use static_cache store for nocache. [#9527](https://github.com/statamic/cms/issues/9527) by @ryanmitchell +- Make tags using old-style __call method compatible with Macroable. [#9553](https://github.com/statamic/cms/issues/9553) by @SylvesterDamgaard +- Fix `locales` tag inside replicator, bard, and grid. [#9566](https://github.com/statamic/cms/issues/9566) by @aerni +- Add `accepted_if` validation to Bard `enable_input_rules` [#9555](https://github.com/statamic/cms/issues/9555) by @robdekort +- Add `accepted_if` validation rule [#9557](https://github.com/statamic/cms/issues/9557) by @robdekort +- Fix modal height UI issue. [#9538](https://github.com/statamic/cms/issues/9538) by @JohnathonKoster +- Fix arrays being returned by translations. [#9525](https://github.com/statamic/cms/issues/9525) by @duncanmcclean +- Fix Stache pathing issue on Windows. [#9537](https://github.com/statamic/cms/issues/9537) by @JohnathonKoster +- Antlers: Resolve values from augmented values when there is more data to process. [#9548](https://github.com/statamic/cms/issues/9548) by @JohnathonKoster +- Antlers: Stop double-initial execution of tags within conditions. [#9504](https://github.com/statamic/cms/issues/9504) by @JohnathonKoster +- Fix error in event listener when uploading file in front-end forms. [#9542](https://github.com/statamic/cms/issues/9542) by @ryanmitchell +- Drop Laravel 6 mail view. [#9545](https://github.com/statamic/cms/issues/9545) by @duncanmcclean +- Remove any uploaded assets when submission silently fails or validation fails. [#9549](https://github.com/statamic/cms/issues/9549) by @ryanmitchell +- Check if form request wantsJson. [#9533](https://github.com/statamic/cms/issues/9533) by @ryanmitchell +- Pass parent field and index down to imported fields. [#9550](https://github.com/statamic/cms/issues/9550) by @jacksleight +- Fix protection redirect URLs when they contain query parameters. [#9543](https://github.com/statamic/cms/issues/9543) by @duncanmcclean +- Fix issues when saving entries with `JsonResource::withoutWrapping()`. [#9519](https://github.com/statamic/cms/issues/9519) by @duncanmcclean + + + ## 4.49.0 (2024-02-16) ### What's new diff --git a/resources/css/components/items.css b/resources/css/components/items.css index 2bbc020678..c1cffcce6a 100644 --- a/resources/css/components/items.css +++ b/resources/css/components/items.css @@ -2,7 +2,7 @@ @apply text-sm outline-none flex w-full justify-between rounded border bg-white shadow-sm items-center; .item-move { - @apply w-4 border-r rounded-l p-2; + @apply w-4 self-stretch border-r rounded-l p-2; cursor: grab; background: theme('colors.gray.200') url('../../svg/icons/light/drag-dots.svg') center center no-repeat; background-size: 7px 17px; diff --git a/resources/css/core/utilities.css b/resources/css/core/utilities.css index 22a0f1ec64..c2845dacee 100644 --- a/resources/css/core/utilities.css +++ b/resources/css/core/utilities.css @@ -90,3 +90,7 @@ [x-cloak] { display: none } + +.-max-h-screen-px { + max-height: calc(100vh - 1px) !important; +} diff --git a/resources/js/app.js b/resources/js/app.js index cb0b340799..968c30a852 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -66,6 +66,7 @@ Vue.prototype.$events = new Vue(); Vue.prototype.$echo = Statamic.$echo; Vue.prototype.$bard = Statamic.$bard; Vue.prototype.$keys = Statamic.$keys; +Vue.prototype.$reveal = Statamic.$reveal; import Moment from 'moment'; window.moment = Vue.moment = Vue.prototype.$moment = Moment; diff --git a/resources/js/bootstrap/fieldtypes.js b/resources/js/bootstrap/fieldtypes.js index d65917d3ef..2608b7a861 100644 --- a/resources/js/bootstrap/fieldtypes.js +++ b/resources/js/bootstrap/fieldtypes.js @@ -15,6 +15,7 @@ import AssetsFieldtype from '../components/fieldtypes/assets/AssetsFieldtype.vue import AssetsIndexFieldtype from '../components/fieldtypes/assets/AssetsIndexFieldtype.vue'; import AssetFolderFieldtype from '../components/fieldtypes/AssetFolderFieldtype.vue'; import BardFieldtype from '../components/fieldtypes/bard/BardFieldtype.vue'; +import BardSet from '../components/fieldtypes/bard/Set.vue'; import BardButtonsSettingFieldtype from '../components/fieldtypes/bard/BardButtonsSettingFieldtype.vue'; import ButtonGroupFieldtype from '../components/fieldtypes/ButtonGroupFieldtype.vue'; import CheckboxesFieldtype from '../components/fieldtypes/CheckboxesFieldtype.vue'; @@ -44,6 +45,7 @@ import RangeFieldtype from '../components/fieldtypes/RangeFieldtype.vue'; import RelationshipFieldtype from '../components/fieldtypes/relationship/RelationshipFieldtype.vue'; import RelationshipIndexFieldtype from '../components/fieldtypes/relationship/RelationshipIndexFieldtype.vue'; import Replicator from '../components/fieldtypes/replicator/Replicator.vue'; +import ReplicatorSet from '../components/fieldtypes/replicator/Set.vue'; import ReplicatorIndex from '../components/fieldtypes/replicator/ReplicatorIndex.vue'; import SectionFieldtype from '../components/fieldtypes/SectionFieldtype.vue'; import SelectFieldtype from '../components/fieldtypes/SelectFieldtype.vue'; @@ -74,6 +76,7 @@ Vue.component('assets-fieldtype', AssetsFieldtype); Vue.component('assets-fieldtype-index', AssetsIndexFieldtype); Vue.component('asset_folder-fieldtype', AssetFolderFieldtype); Vue.component('bard-fieldtype', BardFieldtype); +Vue.component('bard-fieldtype-set', BardSet); Vue.component('bard_buttons_setting-fieldtype', BardButtonsSettingFieldtype); Vue.component('button_group-fieldtype', ButtonGroupFieldtype); Vue.component('checkboxes-fieldtype', CheckboxesFieldtype); @@ -103,6 +106,7 @@ Vue.component('range-fieldtype', RangeFieldtype); Vue.component('relationship-fieldtype', RelationshipFieldtype); Vue.component('relationship-fieldtype-index', RelationshipIndexFieldtype); Vue.component('replicator-fieldtype', Replicator); +Vue.component('replicator-fieldtype-set', ReplicatorSet); Vue.component('replicator-fieldtype-index', ReplicatorIndex); Vue.component('section-fieldtype', SectionFieldtype); Vue.component('select-fieldtype', SelectFieldtype); diff --git a/resources/js/bootstrap/globals.js b/resources/js/bootstrap/globals.js index 3285c41f21..7a5b554862 100644 --- a/resources/js/bootstrap/globals.js +++ b/resources/js/bootstrap/globals.js @@ -108,3 +108,16 @@ export function escapeHtml(string) { export function replicatorPreviewHtml(html) { return new PreviewHtml(html); } + +export function closestVm(el, name) { + let parent = el; + while (parent) { + if (parent.__vue__) break; + parent = parent.parentElement; + } + let vm = parent.__vue__; + while (vm !== vm.$root) { + if (!name || name === vm.$options.name) return vm; + vm = vm.$parent; + } +} \ No newline at end of file diff --git a/resources/js/components/Reveal.js b/resources/js/components/Reveal.js new file mode 100644 index 0000000000..8fc136229c --- /dev/null +++ b/resources/js/components/Reveal.js @@ -0,0 +1,35 @@ +import { closestVm } from '../bootstrap/globals'; + +class Reveal { + element(el) { + if (!el) return; + let parent = el; + while (parent) { + if (parent.matches('.tab-panel')) { + closestVm(parent, 'publish-tabs').setActive(parent.dataset.tabHandle); + } + if (parent.matches('.replicator-set')) { + closestVm(parent, 'replicator-fieldtype-set').expand(); + } + if (parent.matches('.bard-set')) { + closestVm(parent, 'bard-fieldtype-set').expand(); + } + parent = parent.parentElement; + } + Vue.nextTick(() => { + el.scrollIntoView({ + block: 'center', + }); + }); + } + + invalid() { + Vue.nextTick(() => { + const el = document.querySelector('.publish-field.has-error:not(:has(.publish-field.has-error))'); + if (!el) return; + this.element(el); + }); + } +} + +export default Reveal; diff --git a/resources/js/components/SessionExpiry.vue b/resources/js/components/SessionExpiry.vue index e03d568603..e40cda9a46 100644 --- a/resources/js/components/SessionExpiry.vue +++ b/resources/js/components/SessionExpiry.vue @@ -5,6 +5,7 @@ -
+