1010 >
1111 </publish-field-fullscreen-header >
1212 <section :class =" { 'mt-14 p-4': fullScreenMode }" >
13- <div :class =" { 'replicator-set rounded-sm border shadow-sm dark:border-dark-900': config.border }" >
14- <div
15- class =" publish-fields @container"
16- :class =" { 'replicator-set-body': config.border, '-mx-4': !config.border }"
13+ <div :class =" { 'replicator-set dark:border-dark-900 rounded-sm border shadow-sm': config.border }" >
14+ <FieldsProvider
15+ :fields =" fields"
16+ :field-path-prefix =" fieldPathPrefix || handle"
17+ :meta-path-prefix =" metaPathPrefix || handle"
1718 >
18- <set-field
19- v-for =" field in fields"
20- :key =" field.handle"
21- v-show =" showField(field, fieldPath(field.handle))"
22- :field =" field"
23- :meta =" meta[field.handle]"
24- :value =" value[field.handle]"
25- :parent-name =" name"
26- :set-index =" 0"
27- :errors =" errors(field.handle)"
28- :field-path =" fieldPath(field.handle)"
29- :read-only =" isReadOnly"
30- :show-field-previews =" config.replicator_preview"
31- @updated =" updated(field.handle, $event)"
32- @meta-updated =" updateMeta(field.handle, $event)"
33- @focus =" $emit('focus')"
34- @blur =" $emit('blur')"
35- @replicator-preview-updated =" previewUpdated(field.handle, $event)"
36- />
37- </div >
19+ <Fields class =" p-4" />
20+ </FieldsProvider >
3821 </div >
3922 </section >
4023 </div >
5639
5740<script >
5841import Fieldtype from ' ./Fieldtype.vue' ;
59- import SetField from ' ./replicator/Field.vue' ;
6042import { ValidatesFieldConditions } from ' ../field-conditions/FieldConditions.js' ;
6143import ManagesPreviewText from ' ./replicator/ManagesPreviewText' ;
44+ import Fields from ' @statamic/components/ui/Publish/Fields.vue' ;
45+ import FieldsProvider from ' @statamic/components/ui/Publish/FieldsProvider.vue' ;
6246
6347export default {
6448 mixins: [Fieldtype, ValidatesFieldConditions, ManagesPreviewText],
65- components: { SetField },
49+ components: { Fields, FieldsProvider },
6650 data () {
6751 return {
6852 containerWidth: null ,
6953 focused: false ,
7054 fullScreenMode: false ,
71- previews: {},
7255 provide: {
7356 group: this .makeGroupProvide (),
7457 },
@@ -85,6 +68,9 @@ export default {
8568 fields () {
8669 return this .config .fields ;
8770 },
71+ previews () {
72+ return data_get (this .store .previews , this .fieldPathPrefix || this .handle ) || {};
73+ },
8874 replicatorPreview () {
8975 if (! this .showFieldPreviews || ! this .config .replicator_preview ) return ;
9076
@@ -152,10 +138,6 @@ export default {
152138 this .$emit (' meta-updated' , { ... this .meta , [handle]: value });
153139 },
154140
155- previewUpdated (handle , value ) {
156- this .previews = { ... this .previews , [handle]: value };
157- },
158-
159141 fieldPath (handle ) {
160142 return (this .fieldPathPrefix || this .handle ) + ' .' + handle;
161143 },
0 commit comments