mirror of
https://github.com/clarencechaan/ufc-cal.git
synced 2026-10-19 08:38:30 -07:00
Add node_modules
This commit is contained in:
1 parent
1df571f777
commit
c01615d999
530 files changed
+38186
No files matched your search
+46
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = buildEvent;
|
||||
var _defaults = _interopRequireDefault(require("../defaults"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function buildEvent() {
|
||||
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
var title = attributes.title,
|
||||
productId = attributes.productId,
|
||||
method = attributes.method,
|
||||
uid = attributes.uid,
|
||||
sequence = attributes.sequence,
|
||||
start = attributes.start,
|
||||
startType = attributes.startType,
|
||||
duration = attributes.duration,
|
||||
end = attributes.end,
|
||||
description = attributes.description,
|
||||
url = attributes.url,
|
||||
geo = attributes.geo,
|
||||
location = attributes.location,
|
||||
status = attributes.status,
|
||||
categories = attributes.categories,
|
||||
organizer = attributes.organizer,
|
||||
attendees = attributes.attendees,
|
||||
alarms = attributes.alarms,
|
||||
recurrenceRule = attributes.recurrenceRule,
|
||||
created = attributes.created,
|
||||
lastModified = attributes.lastModified,
|
||||
calName = attributes.calName,
|
||||
htmlContent = attributes.htmlContent;
|
||||
|
||||
// fill in default values where necessary
|
||||
var output = Object.assign({}, _defaults["default"], attributes);
|
||||
|
||||
// remove undefined values
|
||||
return Object.entries(output).reduce(function (clean, entry) {
|
||||
return typeof entry[1] !== 'undefined' ? Object.assign(clean, _defineProperty({}, entry[0], entry[1])) : clean;
|
||||
}, {});
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = formatEvent;
|
||||
var _utils = require("../utils");
|
||||
function formatEvent() {
|
||||
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
var title = attributes.title,
|
||||
productId = attributes.productId,
|
||||
method = attributes.method,
|
||||
uid = attributes.uid,
|
||||
sequence = attributes.sequence,
|
||||
timestamp = attributes.timestamp,
|
||||
start = attributes.start,
|
||||
startType = attributes.startType,
|
||||
startInputType = attributes.startInputType,
|
||||
startOutputType = attributes.startOutputType,
|
||||
duration = attributes.duration,
|
||||
end = attributes.end,
|
||||
endInputType = attributes.endInputType,
|
||||
endOutputType = attributes.endOutputType,
|
||||
description = attributes.description,
|
||||
url = attributes.url,
|
||||
geo = attributes.geo,
|
||||
location = attributes.location,
|
||||
status = attributes.status,
|
||||
categories = attributes.categories,
|
||||
organizer = attributes.organizer,
|
||||
attendees = attributes.attendees,
|
||||
alarms = attributes.alarms,
|
||||
recurrenceRule = attributes.recurrenceRule,
|
||||
busyStatus = attributes.busyStatus,
|
||||
transp = attributes.transp,
|
||||
classification = attributes.classification,
|
||||
created = attributes.created,
|
||||
lastModified = attributes.lastModified,
|
||||
calName = attributes.calName,
|
||||
htmlContent = attributes.htmlContent;
|
||||
var icsFormat = '';
|
||||
icsFormat += 'BEGIN:VCALENDAR\r\n';
|
||||
icsFormat += 'VERSION:2.0\r\n';
|
||||
icsFormat += 'CALSCALE:GREGORIAN\r\n';
|
||||
icsFormat += (0, _utils.foldLine)("PRODID:".concat(productId)) + '\r\n';
|
||||
icsFormat += (0, _utils.foldLine)("METHOD:".concat(method)) + '\r\n';
|
||||
icsFormat += calName ? (0, _utils.foldLine)("X-WR-CALNAME:".concat(calName)) + '\r\n' : '';
|
||||
icsFormat += "X-PUBLISHED-TTL:PT1H\r\n";
|
||||
icsFormat += 'BEGIN:VEVENT\r\n';
|
||||
icsFormat += "UID:".concat(uid, "\r\n");
|
||||
icsFormat += (0, _utils.foldLine)("SUMMARY:".concat(title ? (0, _utils.setSummary)(title) : title)) + '\r\n';
|
||||
icsFormat += "DTSTAMP:".concat(timestamp, "\r\n");
|
||||
|
||||
// All day events like anniversaries must be specified as VALUE type DATE
|
||||
icsFormat += "DTSTART".concat(start && start.length == 3 ? ";VALUE=DATE" : "", ":").concat((0, _utils.formatDate)(start, startOutputType || startType, startInputType), "\r\n");
|
||||
|
||||
// End is not required for all day events on single days (like anniversaries)
|
||||
if (!end || end.length !== 3 || start.length !== end.length || start.some(function (val, i) {
|
||||
return val !== end[i];
|
||||
})) {
|
||||
if (end) {
|
||||
icsFormat += "DTEND".concat(end.length === 3 ? ";VALUE=DATE" : "", ":").concat((0, _utils.formatDate)(end, endOutputType || startOutputType || startType, endInputType || startInputType), "\r\n");
|
||||
}
|
||||
}
|
||||
icsFormat += typeof sequence !== 'undefined' ? "SEQUENCE:".concat(sequence, "\r\n") : '';
|
||||
icsFormat += description ? (0, _utils.foldLine)("DESCRIPTION:".concat((0, _utils.setDescription)(description))) + '\r\n' : '';
|
||||
icsFormat += url ? (0, _utils.foldLine)("URL:".concat(url)) + '\r\n' : '';
|
||||
icsFormat += geo ? (0, _utils.foldLine)("GEO:".concat((0, _utils.setGeolocation)(geo))) + '\r\n' : '';
|
||||
icsFormat += location ? (0, _utils.foldLine)("LOCATION:".concat((0, _utils.setLocation)(location))) + '\r\n' : '';
|
||||
icsFormat += status ? (0, _utils.foldLine)("STATUS:".concat(status)) + '\r\n' : '';
|
||||
icsFormat += categories ? (0, _utils.foldLine)("CATEGORIES:".concat(categories)) + '\r\n' : '';
|
||||
icsFormat += organizer ? (0, _utils.foldLine)("ORGANIZER;".concat((0, _utils.setOrganizer)(organizer))) + '\r\n' : '';
|
||||
icsFormat += busyStatus ? (0, _utils.foldLine)("X-MICROSOFT-CDO-BUSYSTATUS:".concat(busyStatus)) + '\r\n' : '';
|
||||
icsFormat += transp ? (0, _utils.foldLine)("TRANSP:".concat(transp)) + '\r\n' : '';
|
||||
icsFormat += classification ? (0, _utils.foldLine)("CLASS:".concat(classification)) + '\r\n' : '';
|
||||
icsFormat += created ? 'CREATED:' + (0, _utils.formatDate)(created) + '\r\n' : '';
|
||||
icsFormat += lastModified ? 'LAST-MODIFIED:' + (0, _utils.formatDate)(lastModified) + '\r\n' : '';
|
||||
icsFormat += htmlContent ? (0, _utils.foldLine)("X-ALT-DESC;FMTTYPE=text/html:".concat(htmlContent)) + '\r\n' : '';
|
||||
if (attendees) {
|
||||
attendees.map(function (attendee) {
|
||||
icsFormat += (0, _utils.foldLine)("ATTENDEE;".concat((0, _utils.setContact)(attendee))) + '\r\n';
|
||||
});
|
||||
}
|
||||
icsFormat += recurrenceRule ? "RRULE:".concat(recurrenceRule, "\r\n") : '';
|
||||
icsFormat += duration ? "DURATION:".concat((0, _utils.formatDuration)(duration), "\r\n") : '';
|
||||
if (alarms) {
|
||||
alarms.map(function (alarm) {
|
||||
icsFormat += (0, _utils.setAlarm)(alarm);
|
||||
});
|
||||
}
|
||||
icsFormat += "END:VEVENT\r\n";
|
||||
icsFormat += "END:VCALENDAR\r\n";
|
||||
return icsFormat;
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "buildEvent", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _build["default"];
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "formatEvent", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _format["default"];
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "validateEvent", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _validate["default"];
|
||||
}
|
||||
});
|
||||
var _build = _interopRequireDefault(require("./build"));
|
||||
var _format = _interopRequireDefault(require("./format"));
|
||||
var _validate = _interopRequireDefault(require("./validate"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
var _schema = _interopRequireDefault(require("../schema"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
var _default = _schema["default"];
|
||||
exports["default"] = _default;
|
||||
Reference in new issue
Block a user