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

62 lines
2.2 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-11-24 09:57:55 +09:00
Vulcan.VERSION = '1.12.10';
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
2018-06-04 17:59:18 +09:00
'onCreate', // field insert callback
'onInsert', // field insert callback (OpenCRUD backwards compatibility)
'onUpdate', // field edit callback
'onEdit', // field edit callback (OpenCRUD backwards compatibility)
'onDelete', // field remove callback
'onRemove', // field remove callback (OpenCRUD backwards compatibility)
2018-06-11 15:47:56 +09:00
'canRead', // who can view the field
2018-06-04 17:59:18 +09:00
'viewableBy', // who can view the field (OpenCRUD backwards compatibility)
2018-06-11 15:47:56 +09:00
'canCreate', // who can insert the field
2018-06-04 17:59:18 +09:00
'insertableBy', // who can insert the field (OpenCRUD backwards compatibility)
2018-06-11 15:47:56 +09:00
'canUpdate', // who can edit the field
2018-06-04 17:59:18 +09:00
'editableBy', // who can edit the field (OpenCRUD backwards compatibility)
2018-03-26 17:50:03 +09:00
'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
2018-06-04 15:45:13 +09:00
'selectable', // field can be used as part of a selector when querying for data
'unique', // field can be used as part of a selectorUnique when querying for data
2018-06-04 15:45:13 +09:00
'orderable', // field can be used to order results when querying for data
'intl', // set to `true` to make a field international
'isIntlData', // marker for the actual schema fields that hold intl strings
]);
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;