Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/jet-blocks   php

Repository URL to install this package:

Version: 1.2.8 

/ modules / vue-ui / assets / src / js / components / layout / repeater.js

import { ContainerMixin } from 'vue-slicksort';
import { checkConditions } from '../../mixins/check-conditions';

const Repeater = {
	name: 'cx-vui-repeater',
	template: '#cx-vui-repeater',
	mixins: [ ContainerMixin, checkConditions ],
	props: {
		buttonLabel: {
			type: String,
		},
		buttonStyle: {
			type: String,
			default: 'accent',
		},
		buttonSize: {
			type: String,
			default: 'default',
		},
		value: {
			type: Array,
			default() {
				return [];
			}
		},
		distance: {
			type: Number,
			default: 20,
		},
		useDragHandle: {
			type: Boolean,
			default: true,
		},
		conditions: {
			type: Array,
			default() {
				return [];
			}
		},
	},
	data() {
		return {
			inFocus: false,
		}
	},
	methods: {
		handleClick( event ) {
			this.$emit( 'add-new-item', event );
		},
	},
};

export default Repeater;