Vulcan/packages/vulcan-lib/lib/modules/config.js

43 lines
1.4 KiB
JavaScript
Raw Normal View History

import SimpleSchema from 'simpl-schema';
2016-02-17 14:39:56 +09:00
/**
* @summary Kick off the namespace for Vulcan.
* @namespace Vulcan
2016-02-17 14:39:56 +09:00
*/
2018-01-25 15:03:03 -06:00
// eslint-disable-next-line no-undef
Vulcan = {};
2016-02-17 14:39:56 +09:00
2018-01-25 15:03:03 -06:00
// eslint-disable-next-line no-undef
2018-03-05 09:54:26 +09:00
Vulcan.VERSION = '1.8.11';
2016-02-17 14:39:56 +09:00
2016-02-16 15:08:30 +09:00
// ------------------------------------- Schemas -------------------------------- //
SimpleSchema.extendOptions([
'hidden', // hidden: true means the field is never shown in a form no matter what
'mustComplete', // mustComplete: true means the field is required to have a complete profile
2018-03-26 17:50:03 +09:00
'form', // extra form properties
'inputProperties', // extra form properties
'input', // SmartForm control (String or React component)
'control', // SmartForm control (String or React component) (legacy)
'order', // position in the form
'group', // form fieldset group
'onInsert', // field insert callback
'onEdit', // field edit callback
'onRemove', // field remove callback
2018-03-26 17:50:03 +09:00
'viewableBy', // who can view the field
'insertableBy', // who can insert the field
'editableBy', // who can edit the field
'resolveAs', // field-level resolver
'searchable', // whether a field is searchable
'description', // description/help
'beforeComponent', // before form component
'afterComponent', // after form component
'placeholder', // form field placeholder value
'options', // form options
'query', // field-specific data loading query
]);
2016-02-16 15:08:30 +09:00
2018-01-25 15:03:03 -06:00
// eslint-disable-next-line no-undef
export default Vulcan;