Skip to content

Commit

Permalink
Merge branch '5.x' of https://github.com/statamic/cms into starter-ki…
Browse files Browse the repository at this point in the history
…t-addons
  • Loading branch information
jesseleite committed Nov 26, 2024
2 parents bdfce39 + 79f00e6 commit faeb1dc
Show file tree
Hide file tree
Showing 190 changed files with 2,697 additions and 902 deletions.
81 changes: 81 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,86 @@
# Release Notes

## 5.39.0 (2024-11-22)

### What's new
- Field actions [#10352](https://github.com/statamic/cms/issues/10352) by @jacksleight
- Field action modals [#11129](https://github.com/statamic/cms/issues/11129) by @jacksleight
- Add ArrayableString to Blade value helper [#11041](https://github.com/statamic/cms/issues/11041) by @ajnsn
- Add `always_augment_to_query` option [#11086](https://github.com/statamic/cms/issues/11086) by @jacksleight

### What's fixed
- Fix multisite command not moving directories [#11105](https://github.com/statamic/cms/issues/11105) by @duncanmcclean
- Fix asset folder sort across pages [#11130](https://github.com/statamic/cms/issues/11130) by @daun
- Avoid creation of duplicate terms in typeahead input [#11060](https://github.com/statamic/cms/issues/11060) by @daun
- Fix error when using user ID as folder name for avatar asset field in non-admin context [#11141](https://github.com/statamic/cms/issues/11141) by @jonasemde
- Fix incorrect namespaces in tests [#11149](https://github.com/statamic/cms/issues/11149) by @duncanmcclean
- Prevent `str_replace` warning when using Debugbar [#11148](https://github.com/statamic/cms/issues/11148) by @duncanmcclean



## 5.38.1 (2024-11-19)

### What's fixed
- Fix issue when preprocessing dictionary config [#11133](https://github.com/statamic/cms/issues/11133) by @duncanmcclean
- Prevent unnecessary requests to the Outpost when PHP version is different [#11137](https://github.com/statamic/cms/issues/11137) by @duncanmcclean
- Fix bard text trimming when CP is on root URL [#11127](https://github.com/statamic/cms/issues/11127) by @jacksleight
- Hide "Localizable" button in asset blueprints [#11118](https://github.com/statamic/cms/issues/11118) by @duncanmcclean
- Add upload path traversal tests [#11139](https://github.com/statamic/cms/issues/11139) by @jasonvarga
- Prevent asset folder path traversal [#11136](https://github.com/statamic/cms/issues/11136) by @jasonvarga
- More path traversal fixes [#11140](https://github.com/statamic/cms/issues/11140) by @jasonvarga
- Italian translations [#11145](https://github.com/statamic/cms/issues/11145) by @gioppy



## 5.38.0 (2024-11-12)

### What's new
- Extra values for nav field conditions, including depth [#11106](https://github.com/statamic/cms/issues/11106) by @duncanmcclean
- Make button groups clearable [#11110](https://github.com/statamic/cms/issues/11110) by @caseydwyer
- Allow transformResults to be called separately from getBaseItems [#11115](https://github.com/statamic/cms/issues/11115) by @ryanmitchell
- Allow customizing term create label [#11103](https://github.com/statamic/cms/issues/11103) by @daun
- Accept collections in ampersand list modifier [#11102](https://github.com/statamic/cms/issues/11102) by @daun
- Add "Container" option to Asset Folders fieldtype [#11099](https://github.com/statamic/cms/issues/11099) by @duncanmcclean
- Add `fullyQualifiedHandle` method to `Blueprint` [#11096](https://github.com/statamic/cms/issues/11096) by @duncanmcclean
- Create edit/{id} route for control panel access [#11092](https://github.com/statamic/cms/issues/11092) by @aaronbushnell

### What's fixed
- Fix wrong blueprint parent after revision publish [#11116](https://github.com/statamic/cms/issues/11116) by @jacksleight
- Prevent duplicate nocache regions in session [#11109](https://github.com/statamic/cms/issues/11109) by @duncanmcclean
- Hide "Localizable" button on non-localizable blueprints [#11107](https://github.com/statamic/cms/issues/11107) by @duncanmcclean
- Fix error after deleting role when storing users in the database [#11069](https://github.com/statamic/cms/issues/11069) by @duncanmcclean
- Render HTML for dictionary fields in listings [#11088](https://github.com/statamic/cms/issues/11088) by @jasonvarga
- Use layout config in errors too [#11083](https://github.com/statamic/cms/issues/11083) by @ryanmitchell
- French translations [#11093](https://github.com/statamic/cms/issues/11093) by @ebeauchamps
- French translations [#11100](https://github.com/statamic/cms/issues/11100) by @ebeauchamps
- French translations [#11108](https://github.com/statamic/cms/issues/11108) by @jasonvarga
- German translations [#11098](https://github.com/statamic/cms/issues/11098) by @helloDanuk



## 5.37.0 (2024-11-06)

### What's new
- Improved fieldtype search using keywords [#11053](https://github.com/statamic/cms/issues/11053) by @jasonvarga
- Offer to enable Pro during make user command [#11071](https://github.com/statamic/cms/issues/11071) by @jasonvarga
- Add `--clear` option for `starter-kit:export` [#11079](https://github.com/statamic/cms/issues/11079) by @jesseleite
- Extra values for entry field conditions, including depth [#11080](https://github.com/statamic/cms/issues/11080) by @jasonvarga
- Add a config for specifying the default layout [#11025](https://github.com/statamic/cms/issues/11025) by @ryanmitchell

### What's fixed
- Integer fields should render with `type="number"` [#11065](https://github.com/statamic/cms/issues/11065) by @duncanmcclean
- Update addon `.gitignore` stub [#11068](https://github.com/statamic/cms/issues/11068) by @duncanmcclean
- Adjust legacy ignition classes [#11073](https://github.com/statamic/cms/issues/11073) by @jasonvarga
- Fix Ignition Runnable Error Solutions [#11072](https://github.com/statamic/cms/issues/11072) by @jasonvarga
- Fix typeahead relationship input corrupting data [#11059](https://github.com/statamic/cms/issues/11059) by @daun
- Files Fieldtype: Don't truncate existing filename [#11055](https://github.com/statamic/cms/issues/11055) by @duncanmcclean
- Fix addon events dispatched twice if registered manually [#11049](https://github.com/statamic/cms/issues/11049) by @morhi
- Fix query parameters in external script URLs being wrongly encoded [#11052](https://github.com/statamic/cms/issues/11052) by @duncanmcclean
- Fix inline Bard with leading line break [#11038](https://github.com/statamic/cms/issues/11038) by @jacksleight
- Update Translations and fill in blanks with Google Translate [#11050](https://github.com/statamic/cms/issues/11050) by @jasonvarga



## 5.36.0 (2024-10-31)

### What's new
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"rebing/graphql-laravel": "^9.5",
"rhukster/dom-sanitizer": "^1.0.6",
"spatie/blink": "^1.3",
"spatie/ignition": "^1.12",
"spatie/ignition": "^1.15",
"statamic/stringy": "^3.1.2",
"stillat/blade-parser": "^1.10.1",
"symfony/lock": "^6.4",
Expand Down
13 changes: 13 additions & 0 deletions config/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,19 @@

'update_references' => true,

/*
|--------------------------------------------------------------------------
| Always Augment to Query
|--------------------------------------------------------------------------
|
| By default, Statamic will augment relationship fields with max_items: 1
| to the result of a query, for example an Entry instance. Setting this
| to true will augment to the query builder instead of the result.
|
*/

'always_augment_to_query' => false,

/*
|--------------------------------------------------------------------------
| Row ID handle
Expand Down
2 changes: 1 addition & 1 deletion resources/css/components/fieldtypes/bard.css
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
========================================================================== */

.bard-fullscreen {
@apply fixed bg-gray-200 dark:bg-dark-700 inset-0 min-h-screen overflow-scroll rounded-none pt-16;
@apply fixed bg-gray-200 dark:bg-dark-700 inset-0 min-h-screen overflow-scroll rounded-none pt-14;

& > .bard-editor {
@apply bg-white dark:bg-dark-800 shadow dark:shadow-dark max-w-xl mx-auto rounded relative my-6 px-8;
Expand Down
5 changes: 3 additions & 2 deletions resources/css/components/fieldtypes/code.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
}
}

.code-fieldtype-toolbar select {
.code-fieldtype-toolbar select,
.code-fieldtype-toolbar-fullscreen select {
@apply h-8 text-sm leading-none;
}


.code-fieldtype-container.code-fullscreen {
@apply fixed bg-gray-200 dark:bg-dark-600 inset-0 min-h-screen overflow-scroll rounded-none pt-12;
@apply fixed bg-gray-200 dark:bg-dark-600 inset-0 min-h-screen overflow-scroll rounded-none pt-14;

.code-fieldtype-toolbar {
@apply fixed z-2 top-0 w-full px-6 py-2 h-12 shadow dark:shadow-dark text-base rounded-none bg-gradient-to-b from-white to-gray-100 dark:from-dark-550 dark:to-dark-600;
Expand Down
5 changes: 2 additions & 3 deletions resources/css/components/fieldtypes/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,12 @@
}

.markdown-fieldtype-wrapper.markdown-fullscreen {
@apply fixed bg-gray-200 inset-0 min-h-screen overflow-scroll rounded-none pt-16;
@apply fixed bg-gray-200 inset-0 min-h-screen overflow-scroll rounded-none pt-14 border-0;
/* padding-top: 52px; offset the nav */
will-change: transform;

.markdown-toolbar {
@apply fixed top-0 w-full px-6 py-2 h-12 shadow text-base flex items-center justify-between;
@apply bg-gradient-to-b from-white to-gray-100;
@apply border-0;
}

.mode-wrap {
Expand Down
14 changes: 14 additions & 0 deletions resources/css/components/publish.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ code.parent-url {
@apply absolute inset-0 cursor-not-allowed bg-white/25;
z-index: 100;
}

.has-field-dropdown {
.field-inner {
@apply pr-6;
}
.field-dropdown {
@apply block absolute bottom-[-3px] right-0;
}
&:not(.has-field-label) {
.field-inner {
@apply min-h-[19.5px] mb-2;
}
}
}
}

.publish-field {
Expand Down
15 changes: 14 additions & 1 deletion resources/css/elements/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ button {
========================================================================== */

.btn-group {
@apply flex items-center justify-start p-0;
@apply flex items-center justify-start p-0 cursor-auto;
height: 2.375rem;

button {
Expand Down Expand Up @@ -291,6 +291,19 @@ td .btn-icon {
}
}

.btn-quick-action {
@apply text-center p-0 text-xl text-gray-600 dark:text-dark-150 rounded-full w-8 h-8 outline-none shrink-0 leading-none inline-flex items-center justify-center;

&:hover {
@apply bg-gray-400 dark:bg-dark-700;
}

&:active, &:focus:hover {
outline: none;
@apply bg-gray-500 dark:bg-dark-750;
}
}

.super-btn {
@apply p-4 flex items-start hover:bg-gray-200 border border-transparent rounded-md space-x-4 rtl:space-x-reverse;
@apply dark:hover:bg-dark-575 dark:hover:border-dark-400;
Expand Down
40 changes: 40 additions & 0 deletions resources/css/elements/dropdowns.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,44 @@
.align-left & {
right: auto ; [dir="rtl"] & { right: auto ; left: auto ; }
}

}

.quick-list {

@apply relative;

.quick-list-content {
@apply absolute top-1/2 right-full mr-[8px] -translate-y-1/2 min-w-max transition origin-right flex bg-white dark:bg-dark-550 shadow-quick rounded-full p-0.5;
&::before {
content: '';
position: absolute;
inset: -8px -8px -8px -20px;
z-index: -1;
}
button, a {
@apply rounded-full p-1.5 text-gray-800 dark:text-dark-100 flex shrink-0;
&:hover {
@apply bg-blue text-white;
}
}
&:empty {
@apply hidden;
}
}

button.warning, a.warning {
@apply text-red-500;

&:hover {
@apply bg-red-500 text-white;
}
}

&:not(:hover) {
.quick-list-content {
@apply opacity-0 pointer-events-none scale-[0.85];
}
}

}
2 changes: 1 addition & 1 deletion resources/css/vendors/codemirror.css
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@


.CodeMirror-fullscreen {
@apply fixed h-auto inset-0 top-12 rounded-none;
@apply fixed h-auto inset-0 pt-14 rounded-none;
}

.CodeMirror-rulers {
Expand Down
1 change: 1 addition & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Vue.prototype.$echo = Statamic.$echo;
Vue.prototype.$bard = Statamic.$bard;
Vue.prototype.$keys = Statamic.$keys;
Vue.prototype.$reveal = Statamic.$reveal;
Vue.prototype.$fieldActions = Statamic.$fieldActions;
Vue.prototype.$slug = Statamic.$slug;

import Moment from 'moment';
Expand Down
6 changes: 6 additions & 0 deletions resources/js/bootstrap/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import PublishForm from '../components/publish/PublishForm.vue';
import Fields from '../components/publish/Fields.vue';
import FieldsContainer from '../components/publish/FieldsContainer.vue'; // deprecated
import Field from '../components/publish/Field.vue';
import FullscreenHeader from '../components/publish/FullscreenHeader.vue';
import FieldMeta from '../components/publish/FieldMeta.vue';
import FieldActions from '../components/field-actions/FieldActions.vue';
import ConfigureTabs from '../components/configure/Tabs.vue';
import PublishTabs from '../components/publish/Tabs.vue';
import PublishSections from '../components/publish/Sections.vue';
Expand Down Expand Up @@ -56,6 +58,7 @@ import Modal from '../components/Modal.vue';
import ConfirmationModal from '../components/modals/ConfirmationModal.vue';
import FavoriteCreator from '../components/FavoriteCreator.vue';
import KeyboardShortcutsModal from '../components/modals/KeyboardShortcutsModal.vue';
import FieldActionModal from '../components/field-actions/FieldActionModal.vue';
import ResourceDeleter from '../components/ResourceDeleter.vue';
import Stack from '../components/stacks/Stack.vue';
import StackTest from '../components/stacks/StackTest.vue';
Expand All @@ -77,6 +80,8 @@ Vue.component('publish-fields', Fields);
Vue.component('publish-fields-container', FieldsContainer);
Vue.component('publish-field', Field);
Vue.component('publish-field-meta', FieldMeta);
Vue.component('publish-field-actions', FieldActions);
Vue.component('publish-field-fullscreen-header', FullscreenHeader);
Vue.component('configure-tabs', ConfigureTabs);
Vue.component('publish-tabs', PublishTabs);
Vue.component('publish-sections', PublishSections);
Expand Down Expand Up @@ -140,6 +145,7 @@ Vue.component('confirmation-modal', ConfirmationModal);
Vue.component('favorite-creator', FavoriteCreator);
Vue.component('keyboard-shortcuts-modal', KeyboardShortcutsModal);
Vue.component('resource-deleter', ResourceDeleter);
Vue.component('field-action-modal', FieldActionModal);

Vue.component('stack', Stack);
Vue.component('stack-test', StackTest);
Expand Down
2 changes: 2 additions & 0 deletions resources/js/bootstrap/fieldtypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import TitleFormats from '../components/collections/TitleFormats.vue';
import ColorFieldtype from '../components/fieldtypes/ColorFieldtype.vue';
import DateFieldtype from '../components/fieldtypes/DateFieldtype.vue';
import DictionaryFieldtype from "../components/fieldtypes/DictionaryFieldtype.vue";
import DictionaryIndexFieldtype from "../components/fieldtypes/DictionaryIndexFieldtype.vue";
import DictionaryFields from "../components/fieldtypes/DictionaryFields.vue";
import FieldDisplayFieldtype from '../components/fieldtypes/FieldDisplayFieldtype.vue';
import FieldsFieldtype from '../components/fieldtypes/grid/FieldsFieldtype.vue';
Expand Down Expand Up @@ -89,6 +90,7 @@ Vue.component('collection_title_formats-fieldtype', TitleFormats);
Vue.component('color-fieldtype', ColorFieldtype);
Vue.component('date-fieldtype', DateFieldtype);
Vue.component('dictionary-fieldtype', DictionaryFieldtype);
Vue.component('dictionary-fieldtype-index', DictionaryIndexFieldtype);
Vue.component('dictionary_fields-fieldtype', DictionaryFields);
Vue.component('field_display-fieldtype', FieldDisplayFieldtype);
Vue.component('fields-fieldtype', FieldsFieldtype);
Expand Down
10 changes: 7 additions & 3 deletions resources/js/components/DropdownList.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<popover class="dropdown-list" :disabled="disabled" :placement="placement" :autoclose="autoclose" @opened="$emit('opened')" @closed="$emit('closed')">
<popover class="dropdown-list" :disabled="disabled" :placement="placement" :autoclose="autoclose" :offset="offset" @opened="$emit('opened')" @closed="$emit('closed')">
<template #trigger>
<slot name="trigger">
<button class="rotating-dots-button" :aria-label="__('Open Dropdown')">
<button class="rotating-dots-button" :aria-label="__('Open Dropdown')" type="button">
<svg class="rotating-dots fill-current" width="12" viewBox="0 0 24 24"><circle cx="3" cy="12" r="3"/><circle cx="12" cy="12" r="3"/><circle cx="21" cy="12" r="3"/></svg>
</button>
</slot>
Expand All @@ -25,7 +25,11 @@ export default {
autoclose: {
type: Boolean,
default: false
}
},
offset: {
type: Array,
default: () => [10, 0]
},
},
computed: {
strategy() {
Expand Down
6 changes: 6 additions & 0 deletions resources/js/components/Statamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Echo from './Echo';
import Bard from './Bard';
import Keys from './keys/Keys';
import Hooks from './Hooks';
import FieldActions from './field-actions/FieldActions';
import Reveal from './Reveal';
import Components from './Components';
import FieldConditions from './FieldConditions';
Expand All @@ -12,6 +13,7 @@ const echo = new Echo;
const bard = new Bard;
const keys = new Keys;
const hooks = new Hooks;
const fieldActions = new FieldActions;
const reveal = new Reveal;
const components = new Components;
const conditions = new FieldConditions;
Expand Down Expand Up @@ -54,6 +56,10 @@ export default new Vue({
return hooks;
},

$fieldActions() {
return fieldActions;
},

$reveal() {
return reveal;
},
Expand Down
4 changes: 3 additions & 1 deletion resources/js/components/blueprints/Builder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
:single-tab="!useTabs"
:initial-tabs="tabs"
:errors="errors.tabs"
:can-define-localizable="canDefineLocalizable"
@updated="tabsUpdated"
/>

Expand All @@ -53,10 +54,11 @@
<script>
import SuggestsConditionalFields from './SuggestsConditionalFields';
import Tabs from './Tabs.vue';
import CanDefineLocalizable from "../fields/CanDefineLocalizable";
export default {
mixins: [SuggestsConditionalFields],
mixins: [SuggestsConditionalFields, CanDefineLocalizable],
components: {
Tabs,
Expand Down
Loading

0 comments on commit faeb1dc

Please sign in to comment.