Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import handler from "./handler";
import {creatorTypeFactory} from "@form-create/core";
import Render from '../../factory/render';
const name = "timePicker";
const render = Render.factory(name, true);
const maker = {
time: creatorTypeFactory(name, (m) => m.props.isRange = false),
timeRange: creatorTypeFactory(name, (m) => m.props.isRange = true)
};
export default {handler, render, name, maker};
export default ['year', 'month', 'date', 'dates', 'week', 'datetime', 'datetimeRange', 'dateRange'].reduce((initial, type) => {
initial[type] = creatorTypeFactory(name, type.toLowerCase());
return initial
}, {});
import {creatorTypeFactory} from '@form-create/core';
const name = 'timePicker';
export default {
time: creatorTypeFactory(name, (m) => m.props.isRange = false),
timeRange: creatorTypeFactory(name, (m) => m.props.isRange = true)
};
import handler from "./handler";
import {creatorTypeFactory} from "@form-create/core";
import Render from '../../factory/render';
const name = "slider";
const maker = {
sliderRange: creatorTypeFactory(name, true, 'range')
};
const render = Render.factory(name);
export default {handler, render, name, maker};
const maker = ['date', 'dateRange', 'dateTime', 'dateTimeRange', 'year', 'month'].reduce((initial, type) => {
initial[type] = creatorTypeFactory(name, type.toLowerCase());
return initial
}, {});
import {creatorTypeFactory} from '@form-create/core';
const name = 'timePicker';
export default {
time: creatorTypeFactory(name, 'time'),
timeRange: creatorTypeFactory(name, 'timerange')
};
const maker = ['year', 'month', 'date', 'dates', 'week', 'datetime', 'datetimeRange', 'dateRange'].reduce((initial, type) => {
initial[type] = creatorTypeFactory(name, type.toLowerCase());
return initial
}, {});
import {Handler as handler, creatorTypeFactory} from "@form-create/core";
import render from "./render";
const name = "switch";
const maker = {
sliderRange: creatorTypeFactory(name, true, 'range')
};
export default {handler, render, name, maker};
import parser from './parser';
import {creatorTypeFactory} from '@form-create/core';
const name = 'input';
const maker = ['password', 'url', 'email', 'text', 'textarea'].reduce((initial, type) => {
initial[type] = creatorTypeFactory(name, type);
return initial;
}, {});
maker.idate = creatorTypeFactory(name, 'date');
export default {parser, name, maker};
const maker = Object.keys(types).reduce((maker, key) => {
maker[key] = creatorTypeFactory(name, m => m.props({type: types[key][0], maxLength: types[key][1]}));
return maker
}, {});