idea-toolbox
Advanced tools
Comparing version 6.5.16 to 6.5.17
@@ -1,69 +0,57 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./src/address.model"), exports); | ||
__exportStar(require("./src/amazonTranslateLanguages.enum"), exports); | ||
__exportStar(require("./src/announcement.model"), exports); | ||
__exportStar(require("./src/APIRequestLog.model"), exports); | ||
__exportStar(require("./src/appointment.model"), exports); | ||
__exportStar(require("./src/attachment.model"), exports); | ||
__exportStar(require("./src/booleanChoices.enum"), exports); | ||
__exportStar(require("./src/cacheable.model"), exports); | ||
__exportStar(require("./src/cacheableResource.model"), exports); | ||
__exportStar(require("./src/calendar.model"), exports); | ||
__exportStar(require("./src/check.model"), exports); | ||
__exportStar(require("./src/clientInfo.model"), exports); | ||
__exportStar(require("./src/cognitoUser.model"), exports); | ||
__exportStar(require("./src/contactRequest.model"), exports); | ||
__exportStar(require("./src/contacts.model"), exports); | ||
__exportStar(require("./src/countries.enum"), exports); | ||
__exportStar(require("./src/customBlockMeta.model"), exports); | ||
__exportStar(require("./src/customFieldMeta.model"), exports); | ||
__exportStar(require("./src/customFieldTypes.enum"), exports); | ||
__exportStar(require("./src/customSectionMeta.model"), exports); | ||
__exportStar(require("./src/delta.model"), exports); | ||
__exportStar(require("./src/emailChangeRequest.model"), exports); | ||
__exportStar(require("./src/emailData.model"), exports); | ||
__exportStar(require("./src/epoch"), exports); | ||
__exportStar(require("./src/errorReport.model"), exports); | ||
__exportStar(require("./src/errorWhitelisted.model"), exports); | ||
__exportStar(require("./src/excelRow.model"), exports); | ||
__exportStar(require("./src/invitation.model"), exports); | ||
__exportStar(require("./src/ionicons.enum"), exports); | ||
__exportStar(require("./src/label.model"), exports); | ||
__exportStar(require("./src/labelVariable.model"), exports); | ||
__exportStar(require("./src/languages.model"), exports); | ||
__exportStar(require("./src/languages.enum"), exports); | ||
__exportStar(require("./src/limitCounter.model"), exports); | ||
__exportStar(require("./src/markdown"), exports); | ||
__exportStar(require("./src/membership.model"), exports); | ||
__exportStar(require("./src/notification.model"), exports); | ||
__exportStar(require("./src/pdfTemplate.model"), exports); | ||
__exportStar(require("./src/projectPlan.model"), exports); | ||
__exportStar(require("./src/projectSubscription.model"), exports); | ||
__exportStar(require("./src/pushNotificationsDevice.model"), exports); | ||
__exportStar(require("./src/pushNotificationsPlatforms.enum"), exports); | ||
__exportStar(require("./src/RCAttachedResource.model"), exports); | ||
__exportStar(require("./src/RCConfiguredFolder.model"), exports); | ||
__exportStar(require("./src/RCFolder.model"), exports); | ||
__exportStar(require("./src/RCResource.model"), exports); | ||
__exportStar(require("./src/resource.model"), exports); | ||
__exportStar(require("./src/sentiment.enum"), exports); | ||
__exportStar(require("./src/signature.model"), exports); | ||
__exportStar(require("./src/signedURL.model"), exports); | ||
__exportStar(require("./src/stringVariable.model"), exports); | ||
__exportStar(require("./src/suggestion.model"), exports); | ||
__exportStar(require("./src/team.model"), exports); | ||
__exportStar(require("./src/teamModules.model"), exports); | ||
__exportStar(require("./src/timeInterval.model"), exports); | ||
__exportStar(require("./src/user.model"), exports); | ||
__exportStar(require("./src/utils"), exports); | ||
export * from './src/address.model'; | ||
export * from './src/amazonTranslateLanguages.enum'; | ||
export * from './src/announcement.model'; | ||
export * from './src/APIRequestLog.model'; | ||
export * from './src/appointment.model'; | ||
export * from './src/attachment.model'; | ||
export * from './src/booleanChoices.enum'; | ||
export * from './src/cacheable.model'; | ||
export * from './src/cacheableResource.model'; | ||
export * from './src/calendar.model'; | ||
export * from './src/check.model'; | ||
export * from './src/clientInfo.model'; | ||
export * from './src/cognitoUser.model'; | ||
export * from './src/contactRequest.model'; | ||
export * from './src/contacts.model'; | ||
export * from './src/countries.enum'; | ||
export * from './src/customBlockMeta.model'; | ||
export * from './src/customFieldMeta.model'; | ||
export * from './src/customFieldTypes.enum'; | ||
export * from './src/customSectionMeta.model'; | ||
export * from './src/delta.model'; | ||
export * from './src/emailChangeRequest.model'; | ||
export * from './src/emailData.model'; | ||
export * from './src/epoch'; | ||
export * from './src/errorReport.model'; | ||
export * from './src/errorWhitelisted.model'; | ||
export * from './src/excelRow.model'; | ||
export * from './src/invitation.model'; | ||
export * from './src/ionicons.enum'; | ||
export * from './src/label.model'; | ||
export * from './src/labelVariable.model'; | ||
export * from './src/languages.model'; | ||
export * from './src/languages.enum'; | ||
export * from './src/limitCounter.model'; | ||
export * from './src/markdown'; | ||
export * from './src/membership.model'; | ||
export * from './src/notification.model'; | ||
export * from './src/pdfTemplate.model'; | ||
export * from './src/projectPlan.model'; | ||
export * from './src/projectSubscription.model'; | ||
export * from './src/pushNotificationsDevice.model'; | ||
export * from './src/pushNotificationsPlatforms.enum'; | ||
export * from './src/RCAttachedResource.model'; | ||
export * from './src/RCConfiguredFolder.model'; | ||
export * from './src/RCFolder.model'; | ||
export * from './src/RCResource.model'; | ||
export * from './src/resource.model'; | ||
export * from './src/sentiment.enum'; | ||
export * from './src/signature.model'; | ||
export * from './src/signedURL.model'; | ||
export * from './src/stringVariable.model'; | ||
export * from './src/suggestion.model'; | ||
export * from './src/team.model'; | ||
export * from './src/teamModules.model'; | ||
export * from './src/timeInterval.model'; | ||
export * from './src/user.model'; | ||
export * from './src/utils'; |
@@ -1,7 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AddressGeolocation = exports.Address = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const countries_enum_1 = require("./countries.enum"); | ||
class Address extends resource_model_1.Resource { | ||
import { Resource } from './resource.model'; | ||
import { Countries } from './countries.enum'; | ||
export class Address extends Resource { | ||
load(x) { | ||
@@ -31,3 +28,3 @@ super.load(x); | ||
e.push('city'); | ||
if (!(this.country in countries_enum_1.Countries)) | ||
if (!(this.country in Countries)) | ||
e.push('country'); | ||
@@ -90,7 +87,6 @@ if (this.phone && this.iE(this.phone, 'phone')) | ||
} | ||
exports.Address = Address; | ||
/** | ||
* An address' geolocation expressed in latitute and longitude. | ||
*/ | ||
class AddressGeolocation extends resource_model_1.Resource { | ||
export class AddressGeolocation extends Resource { | ||
load(x) { | ||
@@ -102,2 +98,1 @@ super.load(x); | ||
} | ||
exports.AddressGeolocation = AddressGeolocation; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AmazonTranslateLanguages = void 0; | ||
var AmazonTranslateLanguages; | ||
export var AmazonTranslateLanguages; | ||
(function (AmazonTranslateLanguages) { | ||
@@ -57,2 +54,2 @@ AmazonTranslateLanguages["Afrikaans"] = "af"; | ||
AmazonTranslateLanguages["Vietnamese"] = "vi"; | ||
})(AmazonTranslateLanguages = exports.AmazonTranslateLanguages || (exports.AmazonTranslateLanguages = {})); | ||
})(AmazonTranslateLanguages || (AmazonTranslateLanguages = {})); |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Announcement = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
class Announcement extends resource_model_1.Resource { | ||
import { Resource } from './resource.model'; | ||
export class Announcement extends Resource { | ||
load(x) { | ||
@@ -13,2 +10,1 @@ super.load(x); | ||
} | ||
exports.Announcement = Announcement; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.APIRequestLog = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -13,3 +10,3 @@ * The log of an API request, in IDEA's format. | ||
*/ | ||
class APIRequestLog extends resource_model_1.Resource { | ||
export class APIRequestLog extends Resource { | ||
load(x) { | ||
@@ -33,2 +30,1 @@ super.load(x); | ||
} | ||
exports.APIRequestLog = APIRequestLog; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AppointmentNotificationUnitsOfTime = exports.AppointmentNotificationMethods = exports.AppointmentNotification = exports.AppointmentAttendance = exports.AppointmentAttendee = exports.AppointmentLinkedObjectTypes = exports.AppointmentLinkedObject = exports.AppointmentKeys = exports.Appointment = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -17,3 +14,3 @@ * Represents an appointment (event) of a calendar. | ||
*/ | ||
class Appointment extends resource_model_1.Resource { | ||
export class Appointment extends Resource { | ||
load(x) { | ||
@@ -145,7 +142,6 @@ super.load(x); | ||
} | ||
exports.Appointment = Appointment; | ||
/** | ||
* A brief view of the appointment, composed by only its keys. | ||
*/ | ||
class AppointmentKeys extends resource_model_1.Resource { | ||
export class AppointmentKeys extends Resource { | ||
load(x) { | ||
@@ -167,7 +163,6 @@ super.load(x); | ||
} | ||
exports.AppointmentKeys = AppointmentKeys; | ||
/** | ||
* A generic structure to reference to a linked object. | ||
*/ | ||
class AppointmentLinkedObject extends resource_model_1.Resource { | ||
export class AppointmentLinkedObject extends Resource { | ||
load(x) { | ||
@@ -187,15 +182,14 @@ super.load(x); | ||
} | ||
exports.AppointmentLinkedObject = AppointmentLinkedObject; | ||
/** | ||
* The linked object types. | ||
*/ | ||
var AppointmentLinkedObjectTypes; | ||
export var AppointmentLinkedObjectTypes; | ||
(function (AppointmentLinkedObjectTypes) { | ||
AppointmentLinkedObjectTypes[AppointmentLinkedObjectTypes["SCARLETT_ACTIVITY"] = 100] = "SCARLETT_ACTIVITY"; | ||
AppointmentLinkedObjectTypes[AppointmentLinkedObjectTypes["ARTHUR_ACTIVITY"] = 200] = "ARTHUR_ACTIVITY"; | ||
})(AppointmentLinkedObjectTypes = exports.AppointmentLinkedObjectTypes || (exports.AppointmentLinkedObjectTypes = {})); | ||
})(AppointmentLinkedObjectTypes || (AppointmentLinkedObjectTypes = {})); | ||
/** | ||
* The info about the attendee to an appointment. | ||
*/ | ||
class AppointmentAttendee extends resource_model_1.Resource { | ||
export class AppointmentAttendee extends Resource { | ||
load(x) { | ||
@@ -209,7 +203,6 @@ super.load(x); | ||
} | ||
exports.AppointmentAttendee = AppointmentAttendee; | ||
/** | ||
* Possible attendance status for the appointment. | ||
*/ | ||
var AppointmentAttendance; | ||
export var AppointmentAttendance; | ||
(function (AppointmentAttendance) { | ||
@@ -220,7 +213,7 @@ AppointmentAttendance[AppointmentAttendance["DECLINED"] = -1] = "DECLINED"; | ||
AppointmentAttendance[AppointmentAttendance["ACCEPTED"] = 2] = "ACCEPTED"; | ||
})(AppointmentAttendance = exports.AppointmentAttendance || (exports.AppointmentAttendance = {})); | ||
})(AppointmentAttendance || (AppointmentAttendance = {})); | ||
/** | ||
* The info about the appointment notification. | ||
*/ | ||
class AppointmentNotification extends resource_model_1.Resource { | ||
export class AppointmentNotification extends Resource { | ||
load(x) { | ||
@@ -232,15 +225,14 @@ super.load(x); | ||
} | ||
exports.AppointmentNotification = AppointmentNotification; | ||
/** | ||
* Possible notification methods (currently supported for Google Calendars and internal calendars). | ||
*/ | ||
var AppointmentNotificationMethods; | ||
export var AppointmentNotificationMethods; | ||
(function (AppointmentNotificationMethods) { | ||
AppointmentNotificationMethods["PUSH"] = "PUSH"; | ||
AppointmentNotificationMethods["EMAIL"] = "EMAIL"; | ||
})(AppointmentNotificationMethods = exports.AppointmentNotificationMethods || (exports.AppointmentNotificationMethods = {})); | ||
})(AppointmentNotificationMethods || (AppointmentNotificationMethods = {})); | ||
/** | ||
* Possible notification units of time. | ||
*/ | ||
var AppointmentNotificationUnitsOfTime; | ||
export var AppointmentNotificationUnitsOfTime; | ||
(function (AppointmentNotificationUnitsOfTime) { | ||
@@ -251,2 +243,2 @@ AppointmentNotificationUnitsOfTime["MINUTES"] = "MINUTES"; | ||
AppointmentNotificationUnitsOfTime["WEEKS"] = "WEEKS"; | ||
})(AppointmentNotificationUnitsOfTime = exports.AppointmentNotificationUnitsOfTime || (exports.AppointmentNotificationUnitsOfTime = {})); | ||
})(AppointmentNotificationUnitsOfTime || (AppointmentNotificationUnitsOfTime = {})); |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Attachment = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* An attachment to attach to a resource. | ||
*/ | ||
class Attachment extends resource_model_1.Resource { | ||
export class Attachment extends Resource { | ||
load(x) { | ||
@@ -31,2 +28,1 @@ super.load(x); | ||
} | ||
exports.Attachment = Attachment; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BooleanChoices = void 0; | ||
var BooleanChoices; | ||
export var BooleanChoices; | ||
(function (BooleanChoices) { | ||
@@ -9,2 +6,2 @@ BooleanChoices[BooleanChoices["FALSE"] = 0] = "FALSE"; | ||
BooleanChoices[BooleanChoices["ALL"] = 2] = "ALL"; | ||
})(BooleanChoices = exports.BooleanChoices || (exports.BooleanChoices = {})); | ||
})(BooleanChoices || (BooleanChoices = {})); |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CacheableResource = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -9,3 +6,3 @@ * An abstract class to inherit to manage a resource model. | ||
*/ | ||
class CacheableResource extends resource_model_1.Resource { | ||
export class CacheableResource extends Resource { | ||
constructor(x, options) { | ||
@@ -27,2 +24,1 @@ super(x, options); | ||
} | ||
exports.CacheableResource = CacheableResource; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExternalCalendarSources = exports.ExternalCalendarToken = exports.ExternalCalendarPermissions = exports.ExternalCalendarInfo = exports.Calendar = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -16,3 +13,3 @@ * Representation of a calendar, which can be: | ||
*/ | ||
class Calendar extends resource_model_1.Resource { | ||
export class Calendar extends Resource { | ||
load(x) { | ||
@@ -85,7 +82,6 @@ super.load(x); | ||
} | ||
exports.Calendar = Calendar; | ||
/** | ||
* Additional info for the calendar, in case it's linked to an external service. | ||
*/ | ||
class ExternalCalendarInfo extends resource_model_1.Resource { | ||
export class ExternalCalendarInfo extends Resource { | ||
load(x) { | ||
@@ -103,7 +99,6 @@ super.load(x); | ||
} | ||
exports.ExternalCalendarInfo = ExternalCalendarInfo; | ||
/** | ||
* Possible permissions for an external calendar. | ||
*/ | ||
var ExternalCalendarPermissions; | ||
export var ExternalCalendarPermissions; | ||
(function (ExternalCalendarPermissions) { | ||
@@ -114,3 +109,3 @@ ExternalCalendarPermissions[ExternalCalendarPermissions["FREE_BUSY"] = 0] = "FREE_BUSY"; | ||
ExternalCalendarPermissions[ExternalCalendarPermissions["OWNER"] = 3] = "OWNER"; | ||
})(ExternalCalendarPermissions = exports.ExternalCalendarPermissions || (exports.ExternalCalendarPermissions = {})); | ||
})(ExternalCalendarPermissions || (ExternalCalendarPermissions = {})); | ||
/** | ||
@@ -121,3 +116,3 @@ * Additional info on a external calendar, detached from the main object for security reasons. | ||
*/ | ||
class ExternalCalendarToken extends resource_model_1.Resource { | ||
export class ExternalCalendarToken extends Resource { | ||
load(x) { | ||
@@ -134,10 +129,9 @@ super.load(x); | ||
} | ||
exports.ExternalCalendarToken = ExternalCalendarToken; | ||
/** | ||
* Possible services as source for external calendars. | ||
*/ | ||
var ExternalCalendarSources; | ||
export var ExternalCalendarSources; | ||
(function (ExternalCalendarSources) { | ||
ExternalCalendarSources["GOOGLE"] = "GOOGLE"; | ||
ExternalCalendarSources["MICROSOFT"] = "MICROSOFT"; | ||
})(ExternalCalendarSources = exports.ExternalCalendarSources || (exports.ExternalCalendarSources = {})); | ||
})(ExternalCalendarSources || (ExternalCalendarSources = {})); |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Check = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
class Check extends resource_model_1.Resource { | ||
import { Resource } from './resource.model'; | ||
export class Check extends Resource { | ||
load(x) { | ||
@@ -18,2 +15,1 @@ if (x) | ||
} | ||
exports.Check = Check; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ClientInfo = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
class ClientInfo extends resource_model_1.Resource { | ||
import { Resource } from './resource.model'; | ||
export class ClientInfo extends Resource { | ||
load(x) { | ||
@@ -20,2 +17,1 @@ super.load(x); | ||
} | ||
exports.ClientInfo = ClientInfo; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CognitoUser = void 0; | ||
const utils_1 = require("./utils"); | ||
import { isEmpty } from './utils'; | ||
/** | ||
* A user stored in a Cognito User Pool. | ||
*/ | ||
class CognitoUser { | ||
export class CognitoUser { | ||
constructor(x = {}) { | ||
@@ -43,5 +40,5 @@ this.userId = x.userId || x.sub; | ||
const e = []; | ||
if ((0, utils_1.isEmpty)(this.name)) | ||
if (isEmpty(this.name)) | ||
e.push('name'); | ||
if ((0, utils_1.isEmpty)(this.email, 'email')) | ||
if (isEmpty(this.email, 'email')) | ||
e.push('email'); | ||
@@ -63,2 +60,1 @@ return e; | ||
} | ||
exports.CognitoUser = CognitoUser; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContactRequest = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const clientInfo_model_1 = require("./clientInfo.model"); | ||
import { Resource } from './resource.model'; | ||
import { ClientInfo } from './clientInfo.model'; | ||
/** | ||
@@ -14,3 +11,3 @@ * Contact request from the Contacts Us box of the website or from specific campaigns. | ||
*/ | ||
class ContactRequest extends resource_model_1.Resource { | ||
export class ContactRequest extends Resource { | ||
load(x) { | ||
@@ -27,3 +24,3 @@ super.load(x); | ||
if (x.client) | ||
this.client = new clientInfo_model_1.ClientInfo(x.client); | ||
this.client = new ClientInfo(x.client); | ||
if (x.notes) | ||
@@ -39,2 +36,1 @@ this.notes = this.clean(x.notes, String); | ||
} | ||
exports.ContactRequest = ContactRequest; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Contacts = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
class Contacts extends resource_model_1.Resource { | ||
import { Resource } from './resource.model'; | ||
export class Contacts extends Resource { | ||
load(x) { | ||
@@ -24,2 +21,1 @@ super.load(x); | ||
} | ||
exports.Contacts = Contacts; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Countries = void 0; | ||
var Countries; | ||
export var Countries; | ||
(function (Countries) { | ||
@@ -255,2 +252,2 @@ Countries["Afghanistan"] = "AF"; | ||
Countries["Zimbabwe"] = "ZW"; | ||
})(Countries = exports.Countries || (exports.Countries = {})); | ||
})(Countries || (Countries = {})); |
@@ -1,7 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CustomBlockMeta = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const customSectionMeta_model_1 = require("./customSectionMeta.model"); | ||
class CustomBlockMeta extends resource_model_1.Resource { | ||
import { Resource } from './resource.model'; | ||
import { CustomSectionMeta } from './customSectionMeta.model'; | ||
export class CustomBlockMeta extends Resource { | ||
load(x, languages) { | ||
@@ -11,3 +8,3 @@ super.load(x, languages); | ||
this.sections = {}; | ||
this.sectionsLegend.forEach(s => (this.sections[s] = new customSectionMeta_model_1.CustomSectionMeta(x.sections[s], languages))); | ||
this.sectionsLegend.forEach(s => (this.sections[s] = new CustomSectionMeta(x.sections[s], languages))); | ||
} | ||
@@ -48,2 +45,1 @@ validate(languages) { | ||
} | ||
exports.CustomBlockMeta = CustomBlockMeta; |
@@ -1,12 +0,9 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CustomFieldMeta = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const customFieldTypes_enum_1 = require("./customFieldTypes.enum"); | ||
const label_model_1 = require("./label.model"); | ||
const suggestion_model_1 = require("./suggestion.model"); | ||
import { Resource } from './resource.model'; | ||
import { CustomFieldTypes } from './customFieldTypes.enum'; | ||
import { Label } from './label.model'; | ||
import { Suggestion } from './suggestion.model'; | ||
/** | ||
* Metadata of a custom field. | ||
*/ | ||
class CustomFieldMeta extends resource_model_1.Resource { | ||
export class CustomFieldMeta extends Resource { | ||
load(x, languages) { | ||
@@ -18,11 +15,11 @@ super.load(x, languages); | ||
this.fieldId = this.clean(x.fieldId, String); | ||
this.name = new label_model_1.Label(x.name, languages); | ||
this.description = new label_model_1.Label(x.description, languages); | ||
this.type = this.clean(x.type, String, customFieldTypes_enum_1.CustomFieldTypes.STRING); | ||
this.name = new Label(x.name, languages); | ||
this.description = new Label(x.description, languages); | ||
this.type = this.clean(x.type, String, CustomFieldTypes.STRING); | ||
switch (this.type) { | ||
case customFieldTypes_enum_1.CustomFieldTypes.STRING: | ||
case customFieldTypes_enum_1.CustomFieldTypes.TEXT: | ||
case CustomFieldTypes.STRING: | ||
case CustomFieldTypes.TEXT: | ||
this.default = this.clean(x.default, String); | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.ENUM: | ||
case CustomFieldTypes.ENUM: | ||
this.default = this.clean(x.default, String); | ||
@@ -32,5 +29,5 @@ this.enum = this.cleanArray(x.enum, String); | ||
if (x.enumLabels) | ||
this.enum.forEach(e => (this.enumLabels[e] = new label_model_1.Label(x.enumLabels[e], languages))); | ||
this.enum.forEach(e => (this.enumLabels[e] = new Label(x.enumLabels[e], languages))); | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.NUMBER: | ||
case CustomFieldTypes.NUMBER: | ||
this.default = this.clean(x.default, Number); | ||
@@ -40,3 +37,3 @@ this.min = this.clean(x.min, Number); | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.BOOLEAN: | ||
case CustomFieldTypes.BOOLEAN: | ||
this.default = this.clean(x.default, Boolean, false); | ||
@@ -59,3 +56,3 @@ break; | ||
e.push('name'); | ||
if (this.type === customFieldTypes_enum_1.CustomFieldTypes.ENUM && !(this.enum && this.enum.length)) | ||
if (this.type === CustomFieldTypes.ENUM && !(this.enum && this.enum.length)) | ||
e.push('enum'); | ||
@@ -74,11 +71,11 @@ return e; | ||
switch (this.type) { | ||
case customFieldTypes_enum_1.CustomFieldTypes.STRING: | ||
case customFieldTypes_enum_1.CustomFieldTypes.TEXT: | ||
case customFieldTypes_enum_1.CustomFieldTypes.ENUM: | ||
case CustomFieldTypes.STRING: | ||
case CustomFieldTypes.TEXT: | ||
case CustomFieldTypes.ENUM: | ||
field = null; | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.NUMBER: | ||
case CustomFieldTypes.NUMBER: | ||
field = 0; | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.BOOLEAN: | ||
case CustomFieldTypes.BOOLEAN: | ||
field = false; | ||
@@ -96,11 +93,11 @@ break; | ||
switch (this.type) { | ||
case customFieldTypes_enum_1.CustomFieldTypes.STRING: | ||
case customFieldTypes_enum_1.CustomFieldTypes.TEXT: | ||
case customFieldTypes_enum_1.CustomFieldTypes.ENUM: | ||
case CustomFieldTypes.STRING: | ||
case CustomFieldTypes.TEXT: | ||
case CustomFieldTypes.ENUM: | ||
field = this.clean(newField, String); | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.NUMBER: | ||
case CustomFieldTypes.NUMBER: | ||
field = this.clean(newField, Number, 0); | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.BOOLEAN: | ||
case CustomFieldTypes.BOOLEAN: | ||
field = this.clean(newField, Boolean); | ||
@@ -122,13 +119,13 @@ break; | ||
switch (this.type) { | ||
case customFieldTypes_enum_1.CustomFieldTypes.STRING: | ||
case customFieldTypes_enum_1.CustomFieldTypes.TEXT: | ||
case customFieldTypes_enum_1.CustomFieldTypes.ENUM: | ||
case CustomFieldTypes.STRING: | ||
case CustomFieldTypes.TEXT: | ||
case CustomFieldTypes.ENUM: | ||
if (!field || !String(field).length) | ||
return false; | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.NUMBER: | ||
case CustomFieldTypes.NUMBER: | ||
if ((!field && field !== 0) || isNaN(field)) | ||
return false; | ||
break; | ||
case customFieldTypes_enum_1.CustomFieldTypes.BOOLEAN: | ||
case CustomFieldTypes.BOOLEAN: | ||
if (!field) | ||
@@ -139,3 +136,3 @@ return false; | ||
// interval check | ||
if (this.type === customFieldTypes_enum_1.CustomFieldTypes.NUMBER) { | ||
if (this.type === CustomFieldTypes.NUMBER) { | ||
if (this.min !== null && this.min !== undefined) | ||
@@ -149,3 +146,3 @@ if (field < this.min) | ||
// enum check | ||
if (this.type === customFieldTypes_enum_1.CustomFieldTypes.ENUM) { | ||
if (this.type === CustomFieldTypes.ENUM) { | ||
if (field && !this.enum.some(x => x === field)) | ||
@@ -161,7 +158,7 @@ return false; | ||
getEnumElement(enumKey, language, languages) { | ||
if (this.type !== customFieldTypes_enum_1.CustomFieldTypes.ENUM) | ||
if (this.type !== CustomFieldTypes.ENUM) | ||
return null; | ||
if (!this.enumLabels || | ||
!this.enumLabels[enumKey] || | ||
!(this.enumLabels[enumKey] instanceof label_model_1.Label) || | ||
!(this.enumLabels[enumKey] instanceof Label) || | ||
!language || | ||
@@ -177,8 +174,7 @@ !languages) | ||
getEnumAsSuggestion(language, languages) { | ||
if (this.type !== customFieldTypes_enum_1.CustomFieldTypes.ENUM) | ||
if (this.type !== CustomFieldTypes.ENUM) | ||
return []; | ||
else | ||
return this.enum.map(e => new suggestion_model_1.Suggestion({ value: e, name: this.getEnumElement(e, language, languages) })); | ||
return this.enum.map(e => new Suggestion({ value: e, name: this.getEnumElement(e, language, languages) })); | ||
} | ||
} | ||
exports.CustomFieldMeta = CustomFieldMeta; |
@@ -1,8 +0,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CustomFieldTypes = void 0; | ||
/** | ||
* Possible field types. | ||
*/ | ||
var CustomFieldTypes; | ||
export var CustomFieldTypes; | ||
(function (CustomFieldTypes) { | ||
@@ -14,2 +11,2 @@ CustomFieldTypes["STRING"] = "STRING"; | ||
CustomFieldTypes["TEXT"] = "TEXT"; | ||
})(CustomFieldTypes = exports.CustomFieldTypes || (exports.CustomFieldTypes = {})); | ||
})(CustomFieldTypes || (CustomFieldTypes = {})); |
@@ -1,21 +0,18 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CustomSectionMeta = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const customFieldMeta_model_1 = require("./customFieldMeta.model"); | ||
const label_model_1 = require("./label.model"); | ||
import { Resource } from './resource.model'; | ||
import { CustomFieldMeta } from './customFieldMeta.model'; | ||
import { Label } from './label.model'; | ||
/** | ||
* A custom section meta containing any number of custom fields meta. | ||
*/ | ||
class CustomSectionMeta extends resource_model_1.Resource { | ||
export class CustomSectionMeta extends Resource { | ||
load(x, languages) { | ||
super.load(x); | ||
if (x.name) | ||
this.name = new label_model_1.Label(x.name, languages); | ||
this.name = new Label(x.name, languages); | ||
if (x.description) | ||
this.description = new label_model_1.Label(x.description, languages); | ||
this.description = new Label(x.description, languages); | ||
this.fieldsLegend = this.cleanArray(x.fieldsLegend, String); | ||
this.fields = {}; | ||
x.fields = x.fields || {}; | ||
this.fieldsLegend.forEach(f => (this.fields[f] = new customFieldMeta_model_1.CustomFieldMeta(x.fields[f], languages))); | ||
this.fieldsLegend.forEach(f => (this.fields[f] = new CustomFieldMeta(x.fields[f], languages))); | ||
if (x.displayTemplate) | ||
@@ -60,2 +57,1 @@ this.displayTemplate = (x.displayTemplate || []).map((z) => this.cleanArray(z, String) | ||
} | ||
exports.CustomSectionMeta = CustomSectionMeta; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DeltaCount = exports.DeltaResources = exports.DeltaNext = exports.Delta = exports.DeltaRecord = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -15,3 +12,3 @@ * A record for the Delta mechanism. | ||
*/ | ||
class DeltaRecord extends resource_model_1.Resource { | ||
export class DeltaRecord extends Resource { | ||
load(x) { | ||
@@ -28,7 +25,6 @@ super.load(x); | ||
} | ||
exports.DeltaRecord = DeltaRecord; | ||
/** | ||
* A structure to manage the delta (changes since a timestamp) of a set of resources. | ||
*/ | ||
class Delta extends resource_model_1.Resource { | ||
export class Delta extends Resource { | ||
load(x) { | ||
@@ -53,7 +49,6 @@ super.load(x); | ||
} | ||
exports.Delta = Delta; | ||
/** | ||
* The structure to have the next page of a previous delta request. | ||
*/ | ||
class DeltaNext extends resource_model_1.Resource { | ||
export class DeltaNext extends Resource { | ||
load(x) { | ||
@@ -88,3 +83,2 @@ super.load(x); | ||
} | ||
exports.DeltaNext = DeltaNext; | ||
/** | ||
@@ -94,10 +88,10 @@ * The resources supporting the delta mechanism. | ||
*/ | ||
var DeltaResources; | ||
export var DeltaResources; | ||
(function (DeltaResources) { | ||
DeltaResources["RESOURCE"] = "RESOURCE"; | ||
})(DeltaResources = exports.DeltaResources || (exports.DeltaResources = {})); | ||
})(DeltaResources || (DeltaResources = {})); | ||
/** | ||
* A structure to have an overview of the number of elements for each resource. | ||
*/ | ||
class DeltaCount extends resource_model_1.Resource { | ||
export class DeltaCount extends Resource { | ||
load(x) { | ||
@@ -112,2 +106,1 @@ super.load(x); | ||
} | ||
exports.DeltaCount = DeltaCount; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EmailChangeRequest = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -10,3 +7,3 @@ * Helper structure to create a confirmation flow before to change the email address used for login. | ||
*/ | ||
class EmailChangeRequest extends resource_model_1.Resource { | ||
export class EmailChangeRequest extends Resource { | ||
load(x) { | ||
@@ -20,2 +17,1 @@ super.load(x); | ||
} | ||
exports.EmailChangeRequest = EmailChangeRequest; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EmailData = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
class EmailData extends resource_model_1.Resource { | ||
import { Resource } from './resource.model'; | ||
export class EmailData extends Resource { | ||
load(x) { | ||
@@ -16,2 +13,1 @@ super.load(x); | ||
} | ||
exports.EmailData = EmailData; |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -1,10 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ErrorReport = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const clientInfo_model_1 = require("./clientInfo.model"); | ||
import { Resource } from './resource.model'; | ||
import { ClientInfo } from './clientInfo.model'; | ||
/** | ||
* Table: `idea_projects_errorsReports`. | ||
*/ | ||
class ErrorReport extends resource_model_1.Resource { | ||
export class ErrorReport extends Resource { | ||
load(x) { | ||
@@ -20,5 +17,4 @@ super.load(x); | ||
this.stack = this.clean(x.stack, String); | ||
this.client = new clientInfo_model_1.ClientInfo(x.client); | ||
this.client = new ClientInfo(x.client); | ||
} | ||
} | ||
exports.ErrorReport = ErrorReport; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ErrorWhitelisted = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -10,3 +7,3 @@ * A whitelisted error for a project, i.e. an error to ignore during the reporting for a specific project. | ||
*/ | ||
class ErrorWhitelisted extends resource_model_1.Resource { | ||
export class ErrorWhitelisted extends Resource { | ||
load(x) { | ||
@@ -20,2 +17,1 @@ super.load(x); | ||
} | ||
exports.ErrorWhitelisted = ErrorWhitelisted; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExcelRow = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* A class to inherit for specifying the format of an Excel file's rows. | ||
*/ | ||
class ExcelRow extends resource_model_1.Resource { | ||
export class ExcelRow extends Resource { | ||
load(x) { | ||
@@ -21,2 +18,1 @@ super.load(x); | ||
} | ||
exports.ExcelRow = ExcelRow; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Invitation = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -11,3 +8,3 @@ * Table: `idea_invitations`. | ||
*/ | ||
class Invitation extends resource_model_1.Resource { | ||
export class Invitation extends Resource { | ||
load(x) { | ||
@@ -28,2 +25,1 @@ super.load(x); | ||
} | ||
exports.Invitation = Invitation; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Ionicons = void 0; | ||
var Ionicons; | ||
export var Ionicons; | ||
(function (Ionicons) { | ||
@@ -463,2 +460,2 @@ Ionicons["ADD"] = "add"; | ||
Ionicons["WOMAN"] = "woman"; | ||
})(Ionicons = exports.Ionicons || (exports.Ionicons = {})); | ||
})(Ionicons || (Ionicons = {})); |
@@ -1,4 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Label = void 0; | ||
/** | ||
@@ -13,3 +10,3 @@ * Each of the attributes contains the translation in that language of the Label. | ||
*/ | ||
class Label { | ||
export class Label { | ||
constructor(x, languages) { | ||
@@ -37,2 +34,1 @@ this.load(x, languages); | ||
} | ||
exports.Label = Label; |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LanguagesISO639 = void 0; | ||
var LanguagesISO639; | ||
export var LanguagesISO639; | ||
(function (LanguagesISO639) { | ||
@@ -191,2 +188,2 @@ LanguagesISO639["Abkhazian"] = "ab"; | ||
LanguagesISO639["Zulu"] = "zu"; | ||
})(LanguagesISO639 = exports.LanguagesISO639 || (exports.LanguagesISO639 = {})); | ||
})(LanguagesISO639 || (LanguagesISO639 = {})); |
@@ -1,10 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ServiceLanguages = exports.Languages = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const utils_1 = require("./utils"); | ||
import { Resource } from './resource.model'; | ||
import { loopStringEnumValues } from './utils'; | ||
/** | ||
* Structure representing language preferences in a context. | ||
*/ | ||
class Languages extends resource_model_1.Resource { | ||
export class Languages extends Resource { | ||
load(x) { | ||
@@ -19,3 +16,3 @@ super.load(x); | ||
e.push('default'); | ||
if (!this.available.every(l => (0, utils_1.loopStringEnumValues)(languagesOfSpecificService).some(x => x === l))) | ||
if (!this.available.every(l => loopStringEnumValues(languagesOfSpecificService).some(x => x === l))) | ||
e.push('available'); | ||
@@ -25,9 +22,8 @@ return e; | ||
} | ||
exports.Languages = Languages; | ||
/** | ||
* The languages available in a specific service. It must be redefined in every service. | ||
*/ | ||
var ServiceLanguages; | ||
export var ServiceLanguages; | ||
(function (ServiceLanguages) { | ||
ServiceLanguages["English"] = "en"; | ||
})(ServiceLanguages = exports.ServiceLanguages || (exports.ServiceLanguages = {})); | ||
})(ServiceLanguages || (ServiceLanguages = {})); |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LimitCounter = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* A limit counter. | ||
*/ | ||
class LimitCounter extends resource_model_1.Resource { | ||
export class LimitCounter extends Resource { | ||
load(x) { | ||
@@ -67,2 +64,1 @@ super.load(x); | ||
} | ||
exports.LimitCounter = LimitCounter; |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MembershipSummary = exports.Membership = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -15,3 +12,3 @@ * This class serve two purposes: | ||
*/ | ||
class Membership extends resource_model_1.Resource { | ||
export class Membership extends Resource { | ||
load(x) { | ||
@@ -41,7 +38,6 @@ super.load(x); | ||
} | ||
exports.Membership = Membership; | ||
/** | ||
* Minimal info on the membership, to attach to other entities. | ||
*/ | ||
class MembershipSummary extends resource_model_1.Resource { | ||
export class MembershipSummary extends Resource { | ||
load(x) { | ||
@@ -63,2 +59,1 @@ super.load(x); | ||
} | ||
exports.MembershipSummary = MembershipSummary; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EventNotificationPreference = exports.Notification = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* An object to pass to SNS topics that manage notifications. | ||
*/ | ||
class Notification extends resource_model_1.Resource { | ||
export class Notification extends Resource { | ||
load(x) { | ||
@@ -26,7 +23,6 @@ super.load(x); | ||
} | ||
exports.Notification = Notification; | ||
/** | ||
* Preferences for receiving notifications after a specific event. | ||
*/ | ||
class EventNotificationPreference extends resource_model_1.Resource { | ||
export class EventNotificationPreference extends Resource { | ||
load(x) { | ||
@@ -38,2 +34,1 @@ super.load(x); | ||
} | ||
exports.EventNotificationPreference = EventNotificationPreference; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PDFTemplateComplexField = exports.PDFTemplateSimpleField = exports.PDFTemplateSectionTypes = exports.PDFTemplateSection = exports.PDFEntity = void 0; | ||
const label_model_1 = require("./label.model"); | ||
const resource_model_1 = require("./resource.model"); | ||
import { Label } from './label.model'; | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -10,9 +7,8 @@ * The PDF-printable version of an entity, that contains variables and inner contextes as defined by either a | ||
*/ | ||
class PDFEntity extends resource_model_1.Resource { | ||
export class PDFEntity extends Resource { | ||
} | ||
exports.PDFEntity = PDFEntity; | ||
/** | ||
* The section of a multi-sections template for PDF printing of entities. | ||
*/ | ||
class PDFTemplateSection extends resource_model_1.Resource { | ||
export class PDFTemplateSection extends Resource { | ||
load(x, languages) { | ||
@@ -43,3 +39,3 @@ super.load(x); | ||
case PDFTemplateSectionTypes.HEADER: | ||
this.title = new label_model_1.Label(x.title, languages); | ||
this.title = new Label(x.title, languages); | ||
break; | ||
@@ -49,6 +45,6 @@ case PDFTemplateSectionTypes.INNER_SECTION: | ||
if (x.title) | ||
this.title = new label_model_1.Label(x.title, languages); | ||
this.title = new Label(x.title, languages); | ||
else { | ||
// init the title equal to the section description | ||
this.title = new label_model_1.Label(null, languages); | ||
this.title = new Label(null, languages); | ||
this.title[languages.default] = this.description; | ||
@@ -152,7 +148,6 @@ } | ||
} | ||
exports.PDFTemplateSection = PDFTemplateSection; | ||
/** | ||
* The type of sections for a PDF template. | ||
*/ | ||
var PDFTemplateSectionTypes; | ||
export var PDFTemplateSectionTypes; | ||
(function (PDFTemplateSectionTypes) { | ||
@@ -165,10 +160,10 @@ PDFTemplateSectionTypes[PDFTemplateSectionTypes["PAGE_BREAK"] = 0] = "PAGE_BREAK"; | ||
PDFTemplateSectionTypes[PDFTemplateSectionTypes["REPEATED_INNER_SECTION"] = 5] = "REPEATED_INNER_SECTION"; | ||
})(PDFTemplateSectionTypes = exports.PDFTemplateSectionTypes || (exports.PDFTemplateSectionTypes = {})); | ||
})(PDFTemplateSectionTypes || (PDFTemplateSectionTypes = {})); | ||
/** | ||
* A simple field, with a direct reference to a variable, depending on the current section's context. | ||
*/ | ||
class PDFTemplateSimpleField extends resource_model_1.Resource { | ||
export class PDFTemplateSimpleField extends Resource { | ||
load(x, languages) { | ||
super.load(x); | ||
this.label = new label_model_1.Label(x.label, languages); | ||
this.label = new Label(x.label, languages); | ||
this.code = this.clean(x.code, String); | ||
@@ -183,10 +178,9 @@ } | ||
} | ||
exports.PDFTemplateSimpleField = PDFTemplateSimpleField; | ||
/** | ||
* A complex field, with a content depending on the current section's context. | ||
*/ | ||
class PDFTemplateComplexField extends resource_model_1.Resource { | ||
export class PDFTemplateComplexField extends Resource { | ||
load(x, languages) { | ||
super.load(x); | ||
this.content = new label_model_1.Label(x.content, languages); | ||
this.content = new Label(x.content, languages); | ||
} | ||
@@ -200,2 +194,1 @@ /** | ||
} | ||
exports.PDFTemplateComplexField = PDFTemplateComplexField; |
@@ -1,10 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ProjectPlan = exports.ProjectPlanTargets = exports.ProjectPlatforms = exports.ProjectPlanDurations = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const label_model_1 = require("./label.model"); | ||
import { Resource } from './resource.model'; | ||
import { Label } from './label.model'; | ||
/** | ||
* Expressed in months (WEEK is an exception, with value 0). | ||
*/ | ||
var ProjectPlanDurations; | ||
export var ProjectPlanDurations; | ||
(function (ProjectPlanDurations) { | ||
@@ -18,4 +15,4 @@ ProjectPlanDurations[ProjectPlanDurations["WEEK"] = 0] = "WEEK"; | ||
ProjectPlanDurations[ProjectPlanDurations["LIFETIME"] = 9999] = "LIFETIME"; | ||
})(ProjectPlanDurations = exports.ProjectPlanDurations || (exports.ProjectPlanDurations = {})); | ||
var ProjectPlatforms; | ||
})(ProjectPlanDurations || (ProjectPlanDurations = {})); | ||
export var ProjectPlatforms; | ||
(function (ProjectPlatforms) { | ||
@@ -27,8 +24,8 @@ ProjectPlatforms["WEB"] = "web"; | ||
ProjectPlatforms["WINDOWS"] = "windows"; | ||
})(ProjectPlatforms = exports.ProjectPlatforms || (exports.ProjectPlatforms = {})); | ||
var ProjectPlanTargets; | ||
})(ProjectPlatforms || (ProjectPlatforms = {})); | ||
export var ProjectPlanTargets; | ||
(function (ProjectPlanTargets) { | ||
ProjectPlanTargets["USERS"] = "users"; | ||
ProjectPlanTargets["TEAMS"] = "teams"; | ||
})(ProjectPlanTargets = exports.ProjectPlanTargets || (exports.ProjectPlanTargets = {})); | ||
})(ProjectPlanTargets || (ProjectPlanTargets = {})); | ||
/** | ||
@@ -40,3 +37,3 @@ * Table: `idea_projects_plans`. | ||
*/ | ||
class ProjectPlan extends resource_model_1.Resource { | ||
export class ProjectPlan extends Resource { | ||
load(x, languages) { | ||
@@ -53,4 +50,4 @@ super.load(x); | ||
this.platforms = x.platforms ? this.clean(x.platforms, String) : [ProjectPlatforms.WEB]; | ||
this.title = new label_model_1.Label(x.title, languages); | ||
this.description = new label_model_1.Label(x.description, languages); | ||
this.title = new Label(x.title, languages); | ||
this.description = new Label(x.description, languages); | ||
this.order = this.clean(x.order, Number, 0); | ||
@@ -89,2 +86,1 @@ this.special = this.clean(x.special, Boolean); | ||
} | ||
exports.ProjectPlan = ProjectPlan; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ProjectSubscription = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const membership_model_1 = require("./membership.model"); | ||
import { Resource } from './resource.model'; | ||
import { MembershipSummary } from './membership.model'; | ||
/** | ||
@@ -15,3 +12,3 @@ * Table: `idea_projects_subscriptions`. | ||
*/ | ||
class ProjectSubscription extends resource_model_1.Resource { | ||
export class ProjectSubscription extends Resource { | ||
load(x) { | ||
@@ -28,5 +25,4 @@ super.load(x); | ||
this.storeReceipt = this.clean(x.storeReceipt, String); | ||
this.managedByUser = new membership_model_1.MembershipSummary(x.managedByUser); | ||
this.managedByUser = new MembershipSummary(x.managedByUser); | ||
} | ||
} | ||
exports.ProjectSubscription = ProjectSubscription; |
@@ -1,10 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PushNotificationsDevice = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const pushNotificationsPlatforms_enum_1 = require("./pushNotificationsPlatforms.enum"); | ||
import { Resource } from './resource.model'; | ||
import { PushNotificationsPlatforms } from './pushNotificationsPlatforms.enum'; | ||
/** | ||
* Devices for push notifications. | ||
*/ | ||
class PushNotificationsDevice extends resource_model_1.Resource { | ||
export class PushNotificationsDevice extends Resource { | ||
load(x) { | ||
@@ -20,3 +17,3 @@ super.load(x); | ||
e.push('token'); | ||
if (!(this.platform in pushNotificationsPlatforms_enum_1.PushNotificationsPlatforms)) | ||
if (!(this.platform in PushNotificationsPlatforms)) | ||
e.push('platform'); | ||
@@ -30,2 +27,1 @@ if (complete) { | ||
} | ||
exports.PushNotificationsDevice = PushNotificationsDevice; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PushNotificationsPlatforms = void 0; | ||
var PushNotificationsPlatforms; | ||
export var PushNotificationsPlatforms; | ||
(function (PushNotificationsPlatforms) { | ||
@@ -9,2 +6,2 @@ PushNotificationsPlatforms["APNS"] = "APNS"; | ||
PushNotificationsPlatforms["FCM"] = "FCM"; | ||
})(PushNotificationsPlatforms = exports.PushNotificationsPlatforms || (exports.PushNotificationsPlatforms = {})); | ||
})(PushNotificationsPlatforms || (PushNotificationsPlatforms = {})); |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RCAttachedResource = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* A Resource Center's resource attached to other Objects. | ||
*/ | ||
class RCAttachedResource extends resource_model_1.Resource { | ||
export class RCAttachedResource extends Resource { | ||
load(x) { | ||
@@ -32,2 +29,1 @@ super.load(x); | ||
} | ||
exports.RCAttachedResource = RCAttachedResource; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RCConfiguredFolder = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* A Resource Center's folder configured in other Objects. | ||
*/ | ||
class RCConfiguredFolder extends resource_model_1.Resource { | ||
export class RCConfiguredFolder extends Resource { | ||
load(x) { | ||
@@ -26,2 +23,1 @@ super.load(x); | ||
} | ||
exports.RCConfiguredFolder = RCConfiguredFolder; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RCFolder = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const membership_model_1 = require("./membership.model"); | ||
import { Resource } from './resource.model'; | ||
import { MembershipSummary } from './membership.model'; | ||
/** | ||
@@ -14,3 +11,3 @@ * A team's Resource Center folder. | ||
*/ | ||
class RCFolder extends resource_model_1.Resource { | ||
export class RCFolder extends Resource { | ||
load(x) { | ||
@@ -22,7 +19,7 @@ super.load(x); | ||
this.createdAt = this.clean(x.createdAt, d => new Date(d).getTime(), Date.now()); | ||
this.createdBy = new membership_model_1.MembershipSummary(x.createdBy); | ||
this.createdBy = new MembershipSummary(x.createdBy); | ||
if (x.updatedAt) | ||
this.updatedAt = this.clean(x.updatedAt, d => new Date(d).getTime()); | ||
if (x.updatedBy) | ||
this.updatedBy = new membership_model_1.MembershipSummary(x.updatedBy); | ||
this.updatedBy = new MembershipSummary(x.updatedBy); | ||
} | ||
@@ -45,2 +42,1 @@ safeLoad(newData, safeData) { | ||
} | ||
exports.RCFolder = RCFolder; |
@@ -55,3 +55,3 @@ import { Resource } from './resource.model'; | ||
safeLoad(newData: any, safeData: any): void; | ||
validate(): string[]; | ||
validate(): any[]; | ||
} | ||
@@ -58,0 +58,0 @@ /** |
@@ -1,7 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RCResourceFormats = exports.RCResource = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
const membership_model_1 = require("./membership.model"); | ||
const utils_1 = require("./utils"); | ||
import { Resource } from './resource.model'; | ||
import { MembershipSummary } from './membership.model'; | ||
import { loopStringEnumValues } from './utils'; | ||
/** | ||
@@ -15,3 +12,3 @@ * A team's Resource Center resource. | ||
*/ | ||
class RCResource extends resource_model_1.Resource { | ||
export class RCResource extends Resource { | ||
load(x) { | ||
@@ -26,7 +23,7 @@ super.load(x); | ||
this.createdAt = this.clean(x.createdAt, d => new Date(d).getTime(), Date.now()); | ||
this.createdBy = new membership_model_1.MembershipSummary(x.createdBy); | ||
this.createdBy = new MembershipSummary(x.createdBy); | ||
if (x.updatedAt) | ||
this.updatedAt = this.clean(x.updatedAt, d => new Date(d).getTime()); | ||
if (x.updatedBy) | ||
this.updatedBy = new membership_model_1.MembershipSummary(x.updatedBy); | ||
this.updatedBy = new MembershipSummary(x.updatedBy); | ||
} | ||
@@ -48,3 +45,3 @@ safeLoad(newData, safeData) { | ||
e.push('name'); | ||
if (!(0, utils_1.loopStringEnumValues)(RCResourceFormats).some(x => x === this.format)) | ||
if (!loopStringEnumValues(RCResourceFormats).some(x => x === this.format)) | ||
e.push('format'); | ||
@@ -54,7 +51,6 @@ return e; | ||
} | ||
exports.RCResource = RCResource; | ||
/** | ||
* The allowed formats for a resource. | ||
*/ | ||
var RCResourceFormats; | ||
export var RCResourceFormats; | ||
(function (RCResourceFormats) { | ||
@@ -65,2 +61,2 @@ RCResourceFormats["JPG"] = "jpg"; | ||
RCResourceFormats["PDF"] = "pdf"; | ||
})(RCResourceFormats = exports.RCResourceFormats || (exports.RCResourceFormats = {})); | ||
})(RCResourceFormats || (RCResourceFormats = {})); |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Resource = void 0; | ||
const utils_1 = require("./utils"); | ||
import { isEmpty } from './utils'; | ||
/** | ||
* An abstract class to inherit to manage a resource model. | ||
*/ | ||
class Resource { | ||
export class Resource { | ||
/** | ||
@@ -95,3 +92,3 @@ * Object initialization, setting all the default values. | ||
iE(field, type) { | ||
return (0, utils_1.isEmpty)(field, type); | ||
return isEmpty(field, type); | ||
} | ||
@@ -126,2 +123,1 @@ /** | ||
} | ||
exports.Resource = Resource; |
@@ -1,8 +0,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Sentiment = void 0; | ||
/** | ||
* The inferred sentiment (on a text) on which Amazon Comprehend has the highest level of confidence in. | ||
*/ | ||
var Sentiment; | ||
export var Sentiment; | ||
(function (Sentiment) { | ||
@@ -13,2 +10,2 @@ Sentiment["POSITIVE"] = "POSITIVE"; | ||
Sentiment["MIXED"] = "MIXED"; | ||
})(Sentiment = exports.Sentiment || (exports.Sentiment = {})); | ||
})(Sentiment || (Sentiment = {})); |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Signature = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* The signature, composed by a signatory and various dataURL formats. | ||
*/ | ||
class Signature extends resource_model_1.Resource { | ||
export class Signature extends Resource { | ||
load(x) { | ||
@@ -35,2 +32,1 @@ super.load(x); | ||
} | ||
exports.Signature = Signature; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SignedURL = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* Signed URL with additional metadata. | ||
*/ | ||
class SignedURL extends resource_model_1.Resource { | ||
export class SignedURL extends Resource { | ||
load(x) { | ||
@@ -16,2 +13,1 @@ super.load(x); | ||
} | ||
exports.SignedURL = SignedURL; |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Suggestion = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* A suggestion made to appear as value to select. | ||
*/ | ||
class Suggestion extends resource_model_1.Resource { | ||
export class Suggestion extends Resource { | ||
load(x) { | ||
@@ -28,2 +25,1 @@ super.load(x); | ||
} | ||
exports.Suggestion = Suggestion; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Team = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* Table: `idea_teams`. | ||
*/ | ||
class Team extends resource_model_1.Resource { | ||
export class Team extends Resource { | ||
load(x) { | ||
@@ -29,2 +26,1 @@ super.load(x); | ||
} | ||
exports.Team = Team; |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TimeInterval = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
@@ -9,3 +6,3 @@ * An interval between two moments of the same day. | ||
*/ | ||
class TimeInterval extends resource_model_1.Resource { | ||
export class TimeInterval extends Resource { | ||
load(x) { | ||
@@ -47,2 +44,1 @@ super.load(x); | ||
} | ||
exports.TimeInterval = TimeInterval; |
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.User = void 0; | ||
const resource_model_1 = require("./resource.model"); | ||
import { Resource } from './resource.model'; | ||
/** | ||
* Table: `idea_users`. | ||
*/ | ||
class User extends resource_model_1.Resource { | ||
export class User extends Resource { | ||
load(x) { | ||
@@ -49,2 +46,1 @@ super.load(x); | ||
} | ||
exports.User = User; |
@@ -1,13 +0,7 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mdToHtml = exports.loopNumericEnumValues = exports.loopNumericEnumKeys = exports.getStringEnumKeyByValue = exports.loopStringEnumValues = exports.loopStringEnumKeys = exports.logger = exports.isEmpty = exports.joinArraysOnKeys = exports.cleanStr = exports.dateToLocale = exports.toISODate = exports.ISODateToItalianFormat = void 0; | ||
const isEmail_1 = __importDefault(require("validator/lib/isEmail")); | ||
const isMobilePhone_1 = __importDefault(require("validator/lib/isMobilePhone")); | ||
const isURL_1 = __importDefault(require("validator/lib/isURL")); | ||
const isFQDN_1 = __importDefault(require("validator/lib/isFQDN")); | ||
const isDate_1 = __importDefault(require("validator/lib/isDate")); | ||
const marked_1 = require("marked"); | ||
import isEmail from 'validator/lib/isEmail'; | ||
import isMobilePhone from 'validator/lib/isMobilePhone'; | ||
import isURL from 'validator/lib/isURL'; | ||
import isFQDN from 'validator/lib/isFQDN'; | ||
import isDate from 'validator/lib/isDate'; | ||
import { marked } from 'marked'; | ||
/** | ||
@@ -22,10 +16,9 @@ * Utilities (static) functions, to support IDEA's projects. | ||
*/ | ||
function ISODateToItalianFormat(ds) { | ||
export function ISODateToItalianFormat(ds) { | ||
return `${ds.slice(8, 10)}/${ds.slice(5, 7)}/${ds.slice(0, 4)}`; | ||
} | ||
exports.ISODateToItalianFormat = ISODateToItalianFormat; | ||
/** | ||
* Parse a date in the format YYYY-MM-DD. | ||
*/ | ||
function toISODate(date) { | ||
export function toISODate(date) { | ||
if (!date) | ||
@@ -35,3 +28,2 @@ return null; | ||
} | ||
exports.toISODate = toISODate; | ||
/** | ||
@@ -46,3 +38,3 @@ * Convert a date to the specified locale format. | ||
*/ | ||
function dateToLocale(date, lang, short, noYear) { | ||
export function dateToLocale(date, lang, short, noYear) { | ||
let dayName = date.toLocaleDateString(lang, { weekday: short ? 'short' : 'long' }); | ||
@@ -56,3 +48,2 @@ dayName = dayName.slice(0, 1).toUpperCase().concat(dayName.slice(1)); | ||
} | ||
exports.dateToLocale = dateToLocale; | ||
/** | ||
@@ -64,6 +55,5 @@ * Clean a string to use it within filenames and so. | ||
*/ | ||
function cleanStr(str, separator) { | ||
export function cleanStr(str, separator) { | ||
return (str || '').toLowerCase().replace(/[^a-zA-Z0-9]+/g, separator || ''); | ||
} | ||
exports.cleanStr = cleanStr; | ||
/** | ||
@@ -80,3 +70,3 @@ * Join two arrays by a common column, selecting which data to extract. | ||
*/ | ||
function joinArraysOnKeys(mainTable, lookupTable, mainKey, lookupKey, selectFunction) { | ||
export function joinArraysOnKeys(mainTable, lookupTable, mainKey, lookupKey, selectFunction) { | ||
const l = lookupTable.length; | ||
@@ -101,3 +91,2 @@ const m = mainTable.length; | ||
} | ||
exports.joinArraysOnKeys = joinArraysOnKeys; | ||
/** | ||
@@ -110,3 +99,3 @@ * Check if a field (/variable) is empty or invalid, based on its type. | ||
*/ | ||
function isEmpty(field, type = typeof field) { | ||
export function isEmpty(field, type = typeof field) { | ||
if (field === null || field === undefined) | ||
@@ -129,15 +118,15 @@ return true; | ||
else if (field instanceof Date) | ||
return !(0, isDate_1.default)(field.toISOString().slice(0, 10)); | ||
return !isDate(field.toISOString().slice(0, 10)); | ||
else | ||
return Object.keys(field).length <= 0; | ||
case 'date': | ||
return !(0, isDate_1.default)(new Date(field).toISOString().slice(0, 10)); | ||
return !isDate(new Date(field).toISOString().slice(0, 10)); | ||
case 'email': | ||
return !(0, isEmail_1.default)(field); | ||
return !isEmail(field); | ||
case 'phone': | ||
return !(0, isMobilePhone_1.default)(field, 'any'); | ||
return !isMobilePhone(field, 'any'); | ||
case 'url': | ||
return !(0, isURL_1.default)(field); | ||
return !isURL(field); | ||
case 'domain': | ||
return !(0, isFQDN_1.default)(field, { require_tld: false }); | ||
return !isFQDN(field, { require_tld: false }); | ||
default: | ||
@@ -147,3 +136,2 @@ return true; | ||
} | ||
exports.isEmpty = isEmpty; | ||
/** | ||
@@ -157,3 +145,3 @@ * Add a formatted log in the console. | ||
*/ | ||
function logger(context, err, content, important) { | ||
export function logger(context, err, content, important) { | ||
const someContent = content !== undefined && content !== null; | ||
@@ -169,21 +157,18 @@ // eslint-disable-next-line no-console | ||
} | ||
exports.logger = logger; | ||
/** | ||
* Get an array to iterate containing the keys of a string enum. | ||
*/ | ||
function loopStringEnumKeys(theEnum) { | ||
export function loopStringEnumKeys(theEnum) { | ||
return Object.keys(theEnum); | ||
} | ||
exports.loopStringEnumKeys = loopStringEnumKeys; | ||
/** | ||
* Get an array to iterate containing the values of a string enum. | ||
*/ | ||
function loopStringEnumValues(theEnum) { | ||
export function loopStringEnumValues(theEnum) { | ||
return Object.keys(theEnum).map(key => theEnum[key]); | ||
} | ||
exports.loopStringEnumValues = loopStringEnumValues; | ||
/** | ||
* Get an array to iterate containing the keys of a numeric enum. | ||
*/ | ||
function getStringEnumKeyByValue(theEnum, value) { | ||
export function getStringEnumKeyByValue(theEnum, value) { | ||
const el = Object.keys(theEnum) | ||
@@ -194,7 +179,6 @@ .map(key => ({ value: theEnum[key], key })) | ||
} | ||
exports.getStringEnumKeyByValue = getStringEnumKeyByValue; | ||
/** | ||
* Get an array to iterate containing the keys of a numeric enum. | ||
*/ | ||
function loopNumericEnumKeys(theEnum) { | ||
export function loopNumericEnumKeys(theEnum) { | ||
return Object.keys(theEnum) | ||
@@ -204,7 +188,6 @@ .filter(key => !isNaN(Number(key))) | ||
} | ||
exports.loopNumericEnumKeys = loopNumericEnumKeys; | ||
/** | ||
* Get an array to iterate containing the values of a numeric enum. | ||
*/ | ||
function loopNumericEnumValues(theEnum) { | ||
export function loopNumericEnumValues(theEnum) { | ||
return Object.keys(theEnum) | ||
@@ -214,11 +197,9 @@ .filter(key => !isNaN(Number(theEnum[key]))) | ||
} | ||
exports.loopNumericEnumValues = loopNumericEnumValues; | ||
/** | ||
* Convert a markdown string to HTML. | ||
*/ | ||
function mdToHtml(mdString) { | ||
export function mdToHtml(mdString) { | ||
if (!mdString) | ||
return ''; | ||
return (0, marked_1.marked)(mdString, { gfm: true, breaks: true }); | ||
return marked(mdString, { gfm: true, breaks: true }); | ||
} | ||
exports.mdToHtml = mdToHtml; |
{ | ||
"name": "idea-toolbox", | ||
"version": "6.5.16", | ||
"version": "6.5.17", | ||
"description": "IDEA's utility functions", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
@@ -10,3 +11,3 @@ "types": "dist/index.d.ts", | ||
"compile": "tsc --build", | ||
"docs": "typedoc", | ||
"docs": "typedoc index.ts", | ||
"build": "./build.sh", | ||
@@ -35,3 +36,3 @@ "publishPackage": "./build.sh && npm publish" | ||
"devDependencies": { | ||
"@tsconfig/node14": "^1.0.0", | ||
"@tsconfig/node16": "^1.0.3", | ||
"@types/aws-lambda": "^8.10.72", | ||
@@ -38,0 +39,0 @@ "@types/marked": "^4.0.3", |
Yes
226910
6851