2017-03-16 01:25:08 +08:00
|
|
|
import SimpleSchema from 'simpl-schema';
|
2016-11-17 20:00:20 +01:00
|
|
|
|
2016-02-17 14:39:56 +09:00
|
|
|
/**
|
2017-04-06 11:10:23 +09:00
|
|
|
* @summary Kick off the namespace for Vulcan.
|
|
|
|
* @namespace Vulcan
|
2016-02-17 14:39:56 +09:00
|
|
|
*/
|
|
|
|
|
2017-04-06 11:10:23 +09:00
|
|
|
Vulcan = {};
|
2016-02-17 14:39:56 +09:00
|
|
|
|
2017-12-28 10:11:44 +09:00
|
|
|
Vulcan.VERSION = '1.8.2';
|
2016-02-17 14:39:56 +09:00
|
|
|
|
2016-02-16 15:08:30 +09:00
|
|
|
// ------------------------------------- Schemas -------------------------------- //
|
|
|
|
|
2017-03-16 01:25:08 +08:00
|
|
|
SimpleSchema.extendOptions([
|
|
|
|
'private',
|
|
|
|
'editable', // editable: true means the field can be edited by the document's owner
|
|
|
|
'hidden', // hidden: true means the field is never shown in a form no matter what
|
2017-05-01 10:49:27 +09:00
|
|
|
'mustComplete', // mustComplete: true means the field is required to have a complete profile
|
2017-03-16 01:25:08 +08:00
|
|
|
'profile', // profile: true means the field is shown on user profiles
|
|
|
|
'template', // legacy template used to display the field; backward compatibility (not used anymore)
|
|
|
|
'form', // form placeholder
|
|
|
|
'autoform', // legacy form placeholder; backward compatibility (not used anymore)
|
|
|
|
'control', // SmartForm control (String or React component)
|
|
|
|
'order', // position in the form
|
2017-04-28 09:24:28 +09:00
|
|
|
'group', // form fieldset group
|
|
|
|
'onInsert', // field insert callback
|
|
|
|
'onEdit', // field edit callback
|
|
|
|
'onRemove', // field remove callback
|
2017-06-07 17:59:02 -07:00
|
|
|
'viewableBy',
|
|
|
|
'insertableBy',
|
|
|
|
'editableBy',
|
|
|
|
'resolveAs',
|
|
|
|
'limit',
|
2017-08-02 16:18:34 +09:00
|
|
|
'searchable',
|
2017-11-03 11:40:53 +09:00
|
|
|
'default',
|
2018-01-02 13:04:33 +09:00
|
|
|
'description',
|
2017-03-16 01:25:08 +08:00
|
|
|
]);
|
2016-02-16 15:08:30 +09:00
|
|
|
|
2017-04-06 11:10:23 +09:00
|
|
|
export default Vulcan;
|