2016-11-26 02:46:55 +08:00
|
|
|
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
|
2016-11-17 20:00:20 +01:00
|
|
|
|
2016-02-17 14:39:56 +09:00
|
|
|
/**
|
2016-04-09 09:41:20 +09:00
|
|
|
* @summary Kick off the global 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-20 10:55:11 +09:00
|
|
|
Telescope.VERSION = '0.27.5-nova';
|
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
|
|
|
|
hidden: Match.Optional(Boolean), // hidden: true means the field is never shown in a form no matter what
|
|
|
|
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-08-10 10:40:17 +09:00
|
|
|
// ------------------------------------- Statuses -------------------------------- //
|
|
|
|
|
|
|
|
Telescope.statuses = [
|
|
|
|
{
|
|
|
|
value: 1,
|
|
|
|
label: 'pending'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 2,
|
|
|
|
label: 'approved'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 3,
|
|
|
|
label: 'rejected'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 4,
|
|
|
|
label: 'spam'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 5,
|
|
|
|
label: 'deleted'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2016-10-19 10:32:24 +02:00
|
|
|
|
2016-11-26 02:46:55 +08:00
|
|
|
export default Telescope;
|