2017-01-11 18:02:12 +01:00
|
|
|
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
|
2016-11-17 20:00:20 +01:00
|
|
|
|
2016-02-17 14:39:56 +09:00
|
|
|
/**
|
2017-02-16 10:14:25 +01:00
|
|
|
* @summary Kick off the namespace for Telescope.
|
2016-02-17 14:39:56 +09:00
|
|
|
* @namespace Telescope
|
|
|
|
*/
|
|
|
|
|
2016-11-17 20:00:20 +01:00
|
|
|
const Telescope = {};
|
2016-02-17 14:39:56 +09:00
|
|
|
|
2016-12-27 11:58:58 +01:00
|
|
|
Telescope.VERSION = '1.0.0';
|
2016-02-17 14:39:56 +09:00
|
|
|
|
2016-02-16 15:08:30 +09:00
|
|
|
// ------------------------------------- Schemas -------------------------------- //
|
|
|
|
|
|
|
|
SimpleSchema.extendOptions({
|
|
|
|
private: Match.Optional(Boolean),
|
|
|
|
editable: Match.Optional(Boolean), // editable: true means the field can be edited by the document's owner
|
2017-02-08 10:48:17 +01:00
|
|
|
hidden: Match.Optional(Match.OneOf(Boolean, Function)), // hidden: true means the field is never shown in a form no matter what
|
2016-02-16 15:08:30 +09:00
|
|
|
required: Match.Optional(Boolean), // required: true means the field is required to have a complete profile
|
|
|
|
profile: Match.Optional(Boolean), // profile: true means the field is shown on user profiles
|
2016-11-18 10:03:01 +01:00
|
|
|
template: Match.Optional(String), // legacy template used to display the field; backward compatibility (not used anymore)
|
2016-10-05 08:43:13 +02:00
|
|
|
form: Match.Optional(Object), // form placeholder
|
2016-11-18 10:03:01 +01:00
|
|
|
autoform: Match.Optional(Object), // legacy form placeholder; backward compatibility (not used anymore)
|
2016-12-20 09:27:16 +09:00
|
|
|
control: Match.Optional(Match.Any), // SmartForm control (String or React component)
|
2016-06-03 11:03:36 +09:00
|
|
|
order: Match.Optional(Number), // position in the form
|
2016-11-29 18:54:12 +09:00
|
|
|
group: Match.Optional(Object), // form fieldset group
|
|
|
|
preload: Match.Optional(Boolean),
|
2016-02-16 15:08:30 +09:00
|
|
|
});
|
|
|
|
|
2016-11-26 02:46:55 +08:00
|
|
|
export default Telescope;
|