Auto backup before evolver run - 2026年 03月 06日 星期五 19:00:05 CST
This commit is contained in:
+9717
File diff suppressed because it is too large
Load Diff
+5
File diff suppressed because one or more lines are too long
+9732
File diff suppressed because it is too large
Load Diff
+5
File diff suppressed because one or more lines are too long
+49
@@ -0,0 +1,49 @@
|
||||
export default Binary;
|
||||
/**
|
||||
* Represents the BINARY value type, which contains extra methods for encoding and decoding.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Binary {
|
||||
/**
|
||||
* Creates a binary value from the given string.
|
||||
*
|
||||
* @param {String} aString The binary value string
|
||||
* @return {Binary} The binary value instance
|
||||
*/
|
||||
static fromString(aString: string): Binary;
|
||||
/**
|
||||
* Creates a new ICAL.Binary instance
|
||||
*
|
||||
* @param {String} aValue The binary data for this value
|
||||
*/
|
||||
constructor(aValue: string);
|
||||
value: string;
|
||||
/**
|
||||
* The type name, to be used in the jCal object.
|
||||
* @default "binary"
|
||||
* @constant
|
||||
*/
|
||||
icaltype: string;
|
||||
/**
|
||||
* Base64 decode the current value
|
||||
*
|
||||
* @return {String} The base64-decoded value
|
||||
*/
|
||||
decodeValue(): string;
|
||||
/**
|
||||
* Encodes the passed parameter with base64 and sets the internal
|
||||
* value to the result.
|
||||
*
|
||||
* @param {String} aValue The raw binary value to encode
|
||||
*/
|
||||
setEncodedValue(aValue: string): void;
|
||||
_b64_encode(data: any): any;
|
||||
_b64_decode(data: any): any;
|
||||
/**
|
||||
* The string representation of this value
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
//# sourceMappingURL=binary.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../lib/ical/binary.js"],"names":[],"mappings":";AAKA;;;;GAIG;AACH;IACE;;;;;OAKG;IACH,oCAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,4BAEC;IADC,cAAmB;IAGrB;;;;OAIG;IACH,iBAAoB;IAEpB;;;;OAIG;IACH,sBAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED,4BAiDC;IAED,4BAuDC;IAED;;;OAGG;IACH,mBAEC;CACF"}
|
||||
+235
@@ -0,0 +1,235 @@
|
||||
export default Component;
|
||||
/**
|
||||
* Imports the 'designSet' type from the "types.js" module
|
||||
*/
|
||||
export type designSet = import("./types.js").designSet;
|
||||
/**
|
||||
* Imports the 'Geo' type from the "types.js" module
|
||||
*/
|
||||
export type Geo = import("./types.js").Geo;
|
||||
/**
|
||||
* Wraps a jCal component, adding convenience methods to add, remove and update subcomponents and
|
||||
* properties.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Component {
|
||||
/**
|
||||
* Create an {@link ICAL.Component} by parsing the passed iCalendar string.
|
||||
*
|
||||
* @param {String} str The iCalendar string to parse
|
||||
*/
|
||||
static fromString(str: string): Component;
|
||||
/**
|
||||
* Creates a new Component instance.
|
||||
*
|
||||
* @param {Array|String} jCal Raw jCal component data OR name of new
|
||||
* component
|
||||
* @param {Component=} parent Parent component to associate
|
||||
*/
|
||||
constructor(jCal: any[] | string, parent?: Component | undefined);
|
||||
jCal: any[];
|
||||
parent: Component;
|
||||
/**
|
||||
* A cache of hydrated time zone objects which may be used by consumers, keyed
|
||||
* by time zone ID.
|
||||
*
|
||||
* @type {Map}
|
||||
* @private
|
||||
*/
|
||||
private _timezoneCache;
|
||||
/**
|
||||
* Hydrated properties are inserted into the _properties array at the same
|
||||
* position as in the jCal array, so it is possible that the array contains
|
||||
* undefined values for unhydrdated properties. To avoid iterating the
|
||||
* array when checking if all properties have been hydrated, we save the
|
||||
* count here.
|
||||
*
|
||||
* @type {Number}
|
||||
* @private
|
||||
*/
|
||||
private _hydratedPropertyCount;
|
||||
/**
|
||||
* The same count as for _hydratedPropertyCount, but for subcomponents
|
||||
*
|
||||
* @type {Number}
|
||||
* @private
|
||||
*/
|
||||
private _hydratedComponentCount;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private _components;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private _properties;
|
||||
/**
|
||||
* The name of this component
|
||||
*
|
||||
* @type {String}
|
||||
*/
|
||||
get name(): string;
|
||||
/**
|
||||
* The design set for this component, e.g. icalendar vs vcard
|
||||
*
|
||||
* @type {designSet}
|
||||
* @private
|
||||
*/
|
||||
private get _designSet();
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private _hydrateComponent;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private _hydrateProperty;
|
||||
/**
|
||||
* Finds first sub component, optionally filtered by name.
|
||||
*
|
||||
* @param {String=} name Optional name to filter by
|
||||
* @return {?Component} The found subcomponent
|
||||
*/
|
||||
getFirstSubcomponent(name?: string | undefined): Component | null;
|
||||
/**
|
||||
* Finds all sub components, optionally filtering by name.
|
||||
*
|
||||
* @param {String=} name Optional name to filter by
|
||||
* @return {Component[]} The found sub components
|
||||
*/
|
||||
getAllSubcomponents(name?: string | undefined): Component[];
|
||||
/**
|
||||
* Returns true when a named property exists.
|
||||
*
|
||||
* @param {String} name The property name
|
||||
* @return {Boolean} True, when property is found
|
||||
*/
|
||||
hasProperty(name: string): boolean;
|
||||
/**
|
||||
* Finds the first property, optionally with the given name.
|
||||
*
|
||||
* @param {String=} name Lowercase property name
|
||||
* @return {?Property} The found property
|
||||
*/
|
||||
getFirstProperty(name?: string | undefined): Property | null;
|
||||
/**
|
||||
* Returns first property's value, if available.
|
||||
*
|
||||
* @param {String=} name Lowercase property name
|
||||
* @return {Binary | Duration | Period |
|
||||
* Recur | Time | UtcOffset | Geo | string | null} The found property value.
|
||||
*/
|
||||
getFirstPropertyValue(name?: string | undefined): Binary | Duration | Period | Recur | Time | UtcOffset | import("./types.js").Geo | string | null;
|
||||
/**
|
||||
* Get all properties in the component, optionally filtered by name.
|
||||
*
|
||||
* @param {String=} name Lowercase property name
|
||||
* @return {Property[]} List of properties
|
||||
*/
|
||||
getAllProperties(name?: string | undefined): Property[];
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private _removeObjectByIndex;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private _removeObject;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private _removeAllObjects;
|
||||
/**
|
||||
* Adds a single sub component.
|
||||
*
|
||||
* @param {Component} component The component to add
|
||||
* @return {Component} The passed in component
|
||||
*/
|
||||
addSubcomponent(component: Component): Component;
|
||||
/**
|
||||
* Removes a single component by name or the instance of a specific
|
||||
* component.
|
||||
*
|
||||
* @param {Component|String} nameOrComp Name of component, or component
|
||||
* @return {Boolean} True when comp is removed
|
||||
*/
|
||||
removeSubcomponent(nameOrComp: Component | string): boolean;
|
||||
/**
|
||||
* Removes all components or (if given) all components by a particular
|
||||
* name.
|
||||
*
|
||||
* @param {String=} name Lowercase component name
|
||||
*/
|
||||
removeAllSubcomponents(name?: string | undefined): void;
|
||||
/**
|
||||
* Adds an {@link ICAL.Property} to the component.
|
||||
*
|
||||
* @param {Property} property The property to add
|
||||
* @return {Property} The passed in property
|
||||
*/
|
||||
addProperty(property: Property): Property;
|
||||
/**
|
||||
* Helper method to add a property with a value to the component.
|
||||
*
|
||||
* @param {String} name Property name to add
|
||||
* @param {String|Number|Object} value Property value
|
||||
* @return {Property} The created property
|
||||
*/
|
||||
addPropertyWithValue(name: string, value: string | number | any): Property;
|
||||
/**
|
||||
* Helper method that will update or create a property of the given name
|
||||
* and sets its value. If multiple properties with the given name exist,
|
||||
* only the first is updated.
|
||||
*
|
||||
* @param {String} name Property name to update
|
||||
* @param {String|Number|Object} value Property value
|
||||
* @return {Property} The created property
|
||||
*/
|
||||
updatePropertyWithValue(name: string, value: string | number | any): Property;
|
||||
/**
|
||||
* Removes a single property by name or the instance of the specific
|
||||
* property.
|
||||
*
|
||||
* @param {String|Property} nameOrProp Property name or instance to remove
|
||||
* @return {Boolean} True, when deleted
|
||||
*/
|
||||
removeProperty(nameOrProp: string | Property): boolean;
|
||||
/**
|
||||
* Removes all properties associated with this component, optionally
|
||||
* filtered by name.
|
||||
*
|
||||
* @param {String=} name Lowercase property name
|
||||
* @return {Boolean} True, when deleted
|
||||
*/
|
||||
removeAllProperties(name?: string | undefined): boolean;
|
||||
/**
|
||||
* Returns the Object representation of this component. The returned object
|
||||
* is a live jCal object and should be cloned if modified.
|
||||
* @return {Object}
|
||||
*/
|
||||
toJSON(): any;
|
||||
/**
|
||||
* The string representation of this component.
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Retrieve a time zone definition from the component tree, if any is present.
|
||||
* If the tree contains no time zone definitions or the TZID cannot be
|
||||
* matched, returns null.
|
||||
*
|
||||
* @param {String} tzid The ID of the time zone to retrieve
|
||||
* @return {Timezone} The time zone corresponding to the ID, or null
|
||||
*/
|
||||
getTimeZoneByID(tzid: string): Timezone;
|
||||
}
|
||||
import Property from "./property.js";
|
||||
import Binary from "./binary.js";
|
||||
import Duration from "./duration.js";
|
||||
import Period from "./period.js";
|
||||
import Recur from "./recur.js";
|
||||
import Time from "./time.js";
|
||||
import UtcOffset from "./utc_offset.js";
|
||||
import Timezone from "./timezone.js";
|
||||
//# sourceMappingURL=component.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../lib/ical/component.js"],"names":[],"mappings":";;;;wBAkCa,OAAO,YAAY,EAAE,SAAS;;;;kBAE9B,OAAO,YAAY,EAAE,GAAG;AAWrC;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,0CAEC;IAED;;;;;;OAMG;IACH,kBAJW,cAAY,WAEZ,SAAS,cAgBnB;IAPC,YAAgB;IAEhB,kBAA4B;IA2B9B;;;;;;OAMG;IACH,uBAAsB;IA3BtB;;;;;;;;;OASG;IACH,+BAA2B;IAE3B;;;;;OAKG;IACH,gCAA4B;IAW5B;;OAEG;IACH,oBAAmB;IAEnB;;OAEG;IACH,oBAAmB;IAEnB;;;;OAIG;IACH,mBAEC;IAED;;;;;OAKG;IACH,yBAcC;IAED;;OAEG;IACH,0BAiBC;IAED;;OAEG;IACH,yBAiBC;IAED;;;;;OAKG;IACH,iDAFa,SAAS,QAsBrB;IAED;;;;;OAKG;IACH,gDAFY,SAAS,EAAE,CA4BtB;IAED;;;;;OAKG;IACH,mCAaC;IAED;;;;;OAKG;IACH,6CAFa,QAAQ,QAqBpB;IAED;;;;;;OAMG;IACH,kDAHY,MAAM,GAAG,QAAQ,GAAG,MAAM,GACrC,KAAO,GAAG,IAAI,GAAG,SAAS,8BAAS,MAAM,GAAG,IAAI,CAShD;IAED;;;;;OAKG;IACH,6CAFY,QAAQ,EAAE,CA4BrB;IAED;;OAEG;IACH,6BAcC;IAED;;OAEG;IACH,sBAuBC;IAED;;OAEG;IACH,0BAeC;IAED;;;;;OAKG;IACH,2BAHW,SAAS,GACR,SAAS,CAiBpB;IAED;;;;;;OAMG;IACH,+BAHW,SAAS,SAAO,WAS1B;IAED;;;;;OAKG;IACH,wDAIC;IAED;;;;;OAKG;IACH,sBAHW,QAAQ,GACP,QAAQ,CAqBnB;IAED;;;;;;OAMG;IACH,0CAHW,qBAAoB,GACnB,QAAQ,CASnB;IAED;;;;;;;;OAQG;IACH,6CAHW,qBAAoB,GACnB,QAAQ,CAYnB;IAED;;;;;;OAMG;IACH,2BAHW,SAAO,QAAQ,WASzB;IAED;;;;;;OAMG;IACH,wDAIC;IAED;;;;OAIG;IACH,cAEC;IAED;;;OAGG;IACH,mBAIC;IAED;;;;;;;OAOG;IACH,+BAFY,QAAQ,CAsCnB;CACF;qBApnBoB,eAAe;mBAajB,aAAa;qBANX,eAAe;mBASjB,aAAa;kBAGd,YAAY;iBAGb,WAAW;sBAZN,iBAAiB;qBATlB,eAAe"}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
export default ComponentParser;
|
||||
/**
|
||||
* The ComponentParser is used to process a String or jCal Object,
|
||||
* firing callbacks for various found components, as well as completion.
|
||||
*
|
||||
* @example
|
||||
* var options = {
|
||||
* // when false no events will be emitted for type
|
||||
* parseEvent: true,
|
||||
* parseTimezone: true
|
||||
* };
|
||||
*
|
||||
* var parser = new ICAL.ComponentParser(options);
|
||||
*
|
||||
* parser.onevent(eventComponent) {
|
||||
* //...
|
||||
* }
|
||||
*
|
||||
* // ontimezone, etc...
|
||||
*
|
||||
* parser.oncomplete = function() {
|
||||
*
|
||||
* };
|
||||
*
|
||||
* parser.process(stringOrComponent);
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class ComponentParser {
|
||||
/**
|
||||
* Creates a new ICAL.ComponentParser instance.
|
||||
*
|
||||
* @param {Object=} options Component parser options
|
||||
* @param {Boolean} options.parseEvent Whether events should be parsed
|
||||
* @param {Boolean} options.parseTimezeone Whether timezones should be parsed
|
||||
*/
|
||||
constructor(options?: any | undefined);
|
||||
/**
|
||||
* When true, parse events
|
||||
*
|
||||
* @type {Boolean}
|
||||
*/
|
||||
parseEvent: boolean;
|
||||
/**
|
||||
* When true, parse timezones
|
||||
*
|
||||
* @type {Boolean}
|
||||
*/
|
||||
parseTimezone: boolean;
|
||||
/**
|
||||
* Fired when parsing is complete
|
||||
* @callback
|
||||
*/
|
||||
oncomplete: () => void;
|
||||
/**
|
||||
* Fired if an error occurs during parsing.
|
||||
*
|
||||
* @callback
|
||||
* @param {Error} err details of error
|
||||
*/
|
||||
onerror: (err: any) => void;
|
||||
/**
|
||||
* Fired when a top level component (VTIMEZONE) is found
|
||||
*
|
||||
* @callback
|
||||
* @param {Timezone} component Timezone object
|
||||
*/
|
||||
ontimezone: (component: any) => void;
|
||||
/**
|
||||
* Fired when a top level component (VEVENT) is found.
|
||||
*
|
||||
* @callback
|
||||
* @param {Event} component Top level component
|
||||
*/
|
||||
onevent: (component: any) => void;
|
||||
/**
|
||||
* Process a string or parse ical object. This function itself will return
|
||||
* nothing but will start the parsing process.
|
||||
*
|
||||
* Events must be registered prior to calling this method.
|
||||
*
|
||||
* @param {Component|String|Object} ical The component to process,
|
||||
* either in its final form, as a jCal Object, or string representation
|
||||
*/
|
||||
process(ical: Component | string | any): void;
|
||||
}
|
||||
import Component from "./component.js";
|
||||
//# sourceMappingURL=component_parser.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"component_parser.d.ts","sourceRoot":"","sources":["../../lib/ical/component_parser.js"],"names":[],"mappings":";AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IACE;;;;;;OAMG;IACH,uCAQC;IAED;;;;OAIG;IACH,oBAAkB;IAElB;;;;OAIG;IACH,uBAAqB;IAKrB;;;OAGG;IACH,uBAAgD;IAEhD;;;;;OAKG;IACH,4BAAgD;IAEhD;;;;;OAKG;IACH,qCAAyD;IAEzD;;;;;OAKG;IACH,kCAAsD;IAEtD;;;;;;;;OAQG;IACH,cAHW,SAAS,eAAc,QA8CjC;CACF;sBArJqB,gBAAgB"}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
export default design;
|
||||
/**
|
||||
* Imports the 'designSet' type from the "types.js" module
|
||||
*/
|
||||
export type designSet = import("./types.js").designSet;
|
||||
declare namespace design {
|
||||
export let strict: boolean;
|
||||
export { icalSet as defaultSet };
|
||||
export let defaultType: string;
|
||||
export let components: any;
|
||||
export { icalSet as icalendar };
|
||||
export { vcardSet as vcard };
|
||||
export { vcard3Set as vcard3 };
|
||||
export function getDesignSet(componentName: string): import("./types.js").designSet;
|
||||
}
|
||||
/**
|
||||
* iCalendar design set
|
||||
* @type {designSet}
|
||||
*/
|
||||
declare let icalSet: designSet;
|
||||
/**
|
||||
* vCard 4.0 design set
|
||||
* @type {designSet}
|
||||
*/
|
||||
declare let vcardSet: designSet;
|
||||
/**
|
||||
* vCard 3.0 design set
|
||||
* @type {designSet}
|
||||
*/
|
||||
declare let vcard3Set: designSet;
|
||||
//# sourceMappingURL=design.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../lib/ical/design.js"],"names":[],"mappings":";;;;wBAmBa,OAAO,YAAY,EAAE,SAAS;;;;;;;;;IA4+B3B,oFAGb;;AA1HH;;;GAGG;AACH,qBAFU,SAAS,CAQjB;AAEF;;;GAGG;AACH,sBAFU,SAAS,CAQjB;AAEF;;;GAGG;AACH,uBAFU,SAAS,CAQjB"}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
export default Duration;
|
||||
/**
|
||||
* This class represents the "duration" value type, with various calculation
|
||||
* and manipulation methods.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Duration {
|
||||
/**
|
||||
* Returns a new ICAL.Duration instance from the passed seconds value.
|
||||
*
|
||||
* @param {Number} aSeconds The seconds to create the instance from
|
||||
* @return {Duration} The newly created duration instance
|
||||
*/
|
||||
static fromSeconds(aSeconds: number): Duration;
|
||||
/**
|
||||
* Checks if the given string is an iCalendar duration value.
|
||||
*
|
||||
* @param {String} value The raw ical value
|
||||
* @return {Boolean} True, if the given value is of the
|
||||
* duration ical type
|
||||
*/
|
||||
static isValueString(string: any): boolean;
|
||||
/**
|
||||
* Creates a new {@link ICAL.Duration} instance from the passed string.
|
||||
*
|
||||
* @param {String} aStr The string to parse
|
||||
* @return {Duration} The created duration instance
|
||||
*/
|
||||
static fromString(aStr: string): Duration;
|
||||
/**
|
||||
* Creates a new ICAL.Duration instance from the given data object.
|
||||
*
|
||||
* @param {Object} aData An object with members of the duration
|
||||
* @param {Number=} aData.weeks Duration in weeks
|
||||
* @param {Number=} aData.days Duration in days
|
||||
* @param {Number=} aData.hours Duration in hours
|
||||
* @param {Number=} aData.minutes Duration in minutes
|
||||
* @param {Number=} aData.seconds Duration in seconds
|
||||
* @param {Boolean=} aData.isNegative If true, the duration is negative
|
||||
* @return {Duration} The createad duration instance
|
||||
*/
|
||||
static fromData(aData: {
|
||||
weeks?: number | undefined;
|
||||
days?: number | undefined;
|
||||
hours?: number | undefined;
|
||||
minutes?: number | undefined;
|
||||
seconds?: number | undefined;
|
||||
isNegative?: boolean | undefined;
|
||||
}): Duration;
|
||||
/**
|
||||
* Creates a new ICAL.Duration instance.
|
||||
*
|
||||
* @param {Object} data An object with members of the duration
|
||||
* @param {Number=} data.weeks Duration in weeks
|
||||
* @param {Number=} data.days Duration in days
|
||||
* @param {Number=} data.hours Duration in hours
|
||||
* @param {Number=} data.minutes Duration in minutes
|
||||
* @param {Number=} data.seconds Duration in seconds
|
||||
* @param {Boolean=} data.isNegative If true, the duration is negative
|
||||
*/
|
||||
constructor(data: {
|
||||
weeks?: number | undefined;
|
||||
days?: number | undefined;
|
||||
hours?: number | undefined;
|
||||
minutes?: number | undefined;
|
||||
seconds?: number | undefined;
|
||||
isNegative?: boolean | undefined;
|
||||
});
|
||||
wrappedJSObject: this;
|
||||
/**
|
||||
* The weeks in this duration
|
||||
* @type {Number}
|
||||
* @default 0
|
||||
*/
|
||||
weeks: number;
|
||||
/**
|
||||
* The days in this duration
|
||||
* @type {Number}
|
||||
* @default 0
|
||||
*/
|
||||
days: number;
|
||||
/**
|
||||
* The days in this duration
|
||||
* @type {Number}
|
||||
* @default 0
|
||||
*/
|
||||
hours: number;
|
||||
/**
|
||||
* The minutes in this duration
|
||||
* @type {Number}
|
||||
* @default 0
|
||||
*/
|
||||
minutes: number;
|
||||
/**
|
||||
* The seconds in this duration
|
||||
* @type {Number}
|
||||
* @default 0
|
||||
*/
|
||||
seconds: number;
|
||||
/**
|
||||
* The seconds in this duration
|
||||
* @type {Boolean}
|
||||
* @default false
|
||||
*/
|
||||
isNegative: boolean;
|
||||
/**
|
||||
* The class identifier.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "icalduration"
|
||||
*/
|
||||
icalclass: string;
|
||||
/**
|
||||
* The type name, to be used in the jCal object.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "duration"
|
||||
*/
|
||||
icaltype: string;
|
||||
/**
|
||||
* Returns a clone of the duration object.
|
||||
*
|
||||
* @return {Duration} The cloned object
|
||||
*/
|
||||
clone(): Duration;
|
||||
/**
|
||||
* The duration value expressed as a number of seconds.
|
||||
*
|
||||
* @return {Number} The duration value in seconds
|
||||
*/
|
||||
toSeconds(): number;
|
||||
/**
|
||||
* Reads the passed seconds value into this duration object. Afterwards,
|
||||
* members like {@link ICAL.Duration#days days} and {@link ICAL.Duration#weeks weeks} will be set up
|
||||
* accordingly.
|
||||
*
|
||||
* @param {Number} aSeconds The duration value in seconds
|
||||
* @return {Duration} Returns this instance
|
||||
*/
|
||||
fromSeconds(aSeconds: number): Duration;
|
||||
/**
|
||||
* Sets up the current instance using members from the passed data object.
|
||||
*
|
||||
* @param {Object} aData An object with members of the duration
|
||||
* @param {Number=} aData.weeks Duration in weeks
|
||||
* @param {Number=} aData.days Duration in days
|
||||
* @param {Number=} aData.hours Duration in hours
|
||||
* @param {Number=} aData.minutes Duration in minutes
|
||||
* @param {Number=} aData.seconds Duration in seconds
|
||||
* @param {Boolean=} aData.isNegative If true, the duration is negative
|
||||
*/
|
||||
fromData(aData: {
|
||||
weeks?: number | undefined;
|
||||
days?: number | undefined;
|
||||
hours?: number | undefined;
|
||||
minutes?: number | undefined;
|
||||
seconds?: number | undefined;
|
||||
isNegative?: boolean | undefined;
|
||||
}): void;
|
||||
/**
|
||||
* Resets the duration instance to the default values, i.e. PT0S
|
||||
*/
|
||||
reset(): void;
|
||||
/**
|
||||
* Compares the duration instance with another one.
|
||||
*
|
||||
* @param {Duration} aOther The instance to compare with
|
||||
* @return {Number} -1, 0 or 1 for less/equal/greater
|
||||
*/
|
||||
compare(aOther: Duration): number;
|
||||
/**
|
||||
* Normalizes the duration instance. For example, a duration with a value
|
||||
* of 61 seconds will be normalized to 1 minute and 1 second.
|
||||
*/
|
||||
normalize(): void;
|
||||
/**
|
||||
* The string representation of this duration.
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* The iCalendar string representation of this duration.
|
||||
* @return {String}
|
||||
*/
|
||||
toICALString(): string;
|
||||
}
|
||||
//# sourceMappingURL=duration.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../lib/ical/duration.js"],"names":[],"mappings":";AAUA;;;;;GAKG;AACH;IACE;;;;;OAKG;IACH,sCAFY,QAAQ,CAInB;IAED;;;;;;OAMG;IACH,2CAEC;IAED;;;;;OAKG;IACH,iCAFY,QAAQ,CAuBnB;IAED;;;;;;;;;;;OAWG;IACH;QAR0B,KAAK;QACL,IAAI;QACJ,KAAK;QACL,OAAO;QACP,OAAO;QACN,UAAU;QACzB,QAAQ,CAInB;IAED;;;;;;;;;;OAUG;IACH;QAPyB,KAAK;QACL,IAAI;QACJ,KAAK;QACL,OAAO;QACP,OAAO;QACN,UAAU;OAKnC;IAFC,sBAA2B;IAI7B;;;;OAIG;IACH,cAAU;IAEV;;;;OAIG;IACH,aAAS;IAET;;;;OAIG;IACH,cAAU;IAEV;;;;OAIG;IACH,gBAAY;IAEZ;;;;OAIG;IACH,gBAAY;IAEZ;;;;OAIG;IACH,oBAAmB;IAEnB;;;;;OAKG;IACH,kBAA2B;IAE3B;;;;;OAKG;IACH,iBAAsB;IAEtB;;;;OAIG;IACH,SAFY,QAAQ,CAInB;IAED;;;;OAIG;IACH,oBAIC;IAED;;;;;;;OAOG;IACH,+BAFY,QAAQ,CA0BnB;IAED;;;;;;;;;;OAUG;IACH;QAP0B,KAAK;QACL,IAAI;QACJ,KAAK;QACL,OAAO;QACP,OAAO;QACN,UAAU;aAUpC;IAED;;OAEG;IACH,cAOC;IAED;;;;;OAKG;IACH,gBAHW,QAAQ,UAOlB;IAED;;;OAGG;IACH,kBAEC;IAED;;;OAGG;IACH,mBAsCC;IAED;;;OAGG;IACH,uBAEC;CACF"}
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
export default Event;
|
||||
/**
|
||||
* Imports the 'frequencyValues' type from the "types.js" module
|
||||
*/
|
||||
export type frequencyValues = import("./types.js").frequencyValues;
|
||||
/**
|
||||
* Imports the 'occurrenceDetails' type from the "types.js" module
|
||||
*/
|
||||
export type occurrenceDetails = import("./types.js").occurrenceDetails;
|
||||
/**
|
||||
* This lets typescript resolve our custom types in the
|
||||
* generated d.ts files (jsdoc typedefs are converted to typescript types).
|
||||
* Ignore prevents the typedefs from being documented more than once.
|
||||
* @ignore
|
||||
* @typedef {import("./types.js").frequencyValues} frequencyValues
|
||||
* Imports the 'frequencyValues' type from the "types.js" module
|
||||
* @typedef {import("./types.js").occurrenceDetails} occurrenceDetails
|
||||
* Imports the 'occurrenceDetails' type from the "types.js" module
|
||||
*/
|
||||
/**
|
||||
* ICAL.js is organized into multiple layers. The bottom layer is a raw jCal
|
||||
* object, followed by the component/property layer. The highest level is the
|
||||
* event representation, which this class is part of. See the
|
||||
* {@tutorial layers} guide for more details.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Event {
|
||||
static THISANDFUTURE: string;
|
||||
/**
|
||||
* Creates a new ICAL.Event instance.
|
||||
*
|
||||
* @param {Component=} component The ICAL.Component to base this event on
|
||||
* @param {Object} [options] Options for this event
|
||||
* @param {Boolean=} options.strictExceptions When true, will verify exceptions are related by
|
||||
* their UUID
|
||||
* @param {Array<Component|Event>=} options.exceptions
|
||||
* Exceptions to this event, either as components or events. If not
|
||||
* specified exceptions will automatically be set in relation of
|
||||
* component's parent
|
||||
*/
|
||||
constructor(component?: Component | undefined, options?: {
|
||||
strictExceptions?: boolean | undefined;
|
||||
exceptions?: Array<Component | Event> | undefined;
|
||||
});
|
||||
component: Component;
|
||||
_rangeExceptionCache: any;
|
||||
/**
|
||||
* List of related event exceptions.
|
||||
*
|
||||
* @type {Event[]}
|
||||
*/
|
||||
exceptions: Event[];
|
||||
rangeExceptions: any[];
|
||||
/**
|
||||
* When true, will verify exceptions are related by their UUID.
|
||||
*
|
||||
* @type {Boolean}
|
||||
*/
|
||||
strictExceptions: boolean;
|
||||
/**
|
||||
* Relates a given event exception to this object. If the given component
|
||||
* does not share the UID of this event it cannot be related and will throw
|
||||
* an exception.
|
||||
*
|
||||
* If this component is an exception it cannot have other exceptions
|
||||
* related to it.
|
||||
*
|
||||
* @param {Component|Event} obj Component or event
|
||||
*/
|
||||
relateException(obj: Component | Event): void;
|
||||
/**
|
||||
* Checks if this record is an exception and has the RANGE=THISANDFUTURE
|
||||
* value.
|
||||
*
|
||||
* @return {Boolean} True, when exception is within range
|
||||
*/
|
||||
modifiesFuture(): boolean;
|
||||
/**
|
||||
* Finds the range exception nearest to the given date.
|
||||
*
|
||||
* @param {Time} time usually an occurrence time of an event
|
||||
* @return {?Event} the related event/exception or null
|
||||
*/
|
||||
findRangeException(time: Time): Event | null;
|
||||
/**
|
||||
* Returns the occurrence details based on its start time. If the
|
||||
* occurrence has an exception will return the details for that exception.
|
||||
*
|
||||
* NOTE: this method is intend to be used in conjunction
|
||||
* with the {@link ICAL.Event#iterator iterator} method.
|
||||
*
|
||||
* @param {Time} occurrence time occurrence
|
||||
* @return {occurrenceDetails} Information about the occurrence
|
||||
*/
|
||||
getOccurrenceDetails(occurrence: Time): occurrenceDetails;
|
||||
/**
|
||||
* Builds a recur expansion instance for a specific point in time (defaults
|
||||
* to startDate).
|
||||
*
|
||||
* @param {Time=} startTime Starting point for expansion
|
||||
* @return {RecurExpansion} Expansion object
|
||||
*/
|
||||
iterator(startTime?: Time | undefined): RecurExpansion;
|
||||
/**
|
||||
* Checks if the event is recurring
|
||||
*
|
||||
* @return {Boolean} True, if event is recurring
|
||||
*/
|
||||
isRecurring(): boolean;
|
||||
/**
|
||||
* Checks if the event describes a recurrence exception. See
|
||||
* {@tutorial terminology} for details.
|
||||
*
|
||||
* @return {Boolean} True, if the event describes a recurrence exception
|
||||
*/
|
||||
isRecurrenceException(): boolean;
|
||||
/**
|
||||
* Returns the types of recurrences this event may have.
|
||||
*
|
||||
* Returned as an object with the following possible keys:
|
||||
*
|
||||
* - YEARLY
|
||||
* - MONTHLY
|
||||
* - WEEKLY
|
||||
* - DAILY
|
||||
* - MINUTELY
|
||||
* - SECONDLY
|
||||
*
|
||||
* @return {Object.<frequencyValues, Boolean>}
|
||||
* Object of recurrence flags
|
||||
*/
|
||||
getRecurrenceTypes(): any;
|
||||
set uid(value: string);
|
||||
/**
|
||||
* The uid of this event
|
||||
* @type {String}
|
||||
*/
|
||||
get uid(): string;
|
||||
set startDate(value: Time);
|
||||
/**
|
||||
* The start date
|
||||
* @type {Time}
|
||||
*/
|
||||
get startDate(): Time;
|
||||
set endDate(value: Time);
|
||||
/**
|
||||
* The end date. This can be the result directly from the property, or the
|
||||
* end date calculated from start date and duration. Setting the property
|
||||
* will remove any duration properties.
|
||||
* @type {Time}
|
||||
*/
|
||||
get endDate(): Time;
|
||||
set duration(value: Duration);
|
||||
/**
|
||||
* The duration. This can be the result directly from the property, or the
|
||||
* duration calculated from start date and end date. Setting the property
|
||||
* will remove any `dtend` properties.
|
||||
* @type {Duration}
|
||||
*/
|
||||
get duration(): Duration;
|
||||
set location(value: string);
|
||||
/**
|
||||
* The location of the event.
|
||||
* @type {String}
|
||||
*/
|
||||
get location(): string;
|
||||
/**
|
||||
* The attendees in the event
|
||||
* @type {Property[]}
|
||||
*/
|
||||
get attendees(): Property[];
|
||||
set summary(value: string);
|
||||
/**
|
||||
* The event summary
|
||||
* @type {String}
|
||||
*/
|
||||
get summary(): string;
|
||||
set description(value: string);
|
||||
/**
|
||||
* The event description.
|
||||
* @type {String}
|
||||
*/
|
||||
get description(): string;
|
||||
set color(value: string);
|
||||
/**
|
||||
* The event color from [rfc7986](https://datatracker.ietf.org/doc/html/rfc7986)
|
||||
* @type {String}
|
||||
*/
|
||||
get color(): string;
|
||||
set organizer(value: string);
|
||||
/**
|
||||
* The organizer value as an uri. In most cases this is a mailto: uri, but
|
||||
* it can also be something else, like urn:uuid:...
|
||||
* @type {String}
|
||||
*/
|
||||
get organizer(): string;
|
||||
set sequence(value: number);
|
||||
/**
|
||||
* The sequence value for this event. Used for scheduling
|
||||
* see {@tutorial terminology}.
|
||||
* @type {Number}
|
||||
*/
|
||||
get sequence(): number;
|
||||
set recurrenceId(value: Time);
|
||||
/**
|
||||
* The recurrence id for this event. See {@tutorial terminology} for details.
|
||||
* @type {Time}
|
||||
*/
|
||||
get recurrenceId(): Time;
|
||||
/**
|
||||
* Set/update a time property's value.
|
||||
* This will also update the TZID of the property.
|
||||
*
|
||||
* TODO: this method handles the case where we are switching
|
||||
* from a known timezone to an implied timezone (one without TZID).
|
||||
* This does _not_ handle the case of moving between a known
|
||||
* (by TimezoneService) timezone to an unknown timezone...
|
||||
*
|
||||
* We will not add/remove/update the VTIMEZONE subcomponents
|
||||
* leading to invalid ICAL data...
|
||||
* @private
|
||||
* @param {String} propName The property name
|
||||
* @param {Time} time The time to set
|
||||
*/
|
||||
private _setTime;
|
||||
_setProp(name: any, value: any): void;
|
||||
_firstProp(name: any): string | import("./binary.js").default | Duration | Time | import("./recur.js").default | import("./period.js").default | import("./utc_offset.js").default | import("./types.js").Geo;
|
||||
/**
|
||||
* The string representation of this event.
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
import Component from "./component.js";
|
||||
import Time from "./time.js";
|
||||
import RecurExpansion from "./recur_expansion.js";
|
||||
import Duration from "./duration.js";
|
||||
import Property from "./property.js";
|
||||
//# sourceMappingURL=event.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../lib/ical/event.js"],"names":[],"mappings":";;;;8BAqBa,OAAO,YAAY,EAAE,eAAe;;;;gCAEpC,OAAO,YAAY,EAAE,iBAAiB;AAPnD;;;;;;;;;GASG;AAEH;;;;;;;GAOG;AACH;IA6CE,6BAAuC;IA5CvC;;;;;;;;;;;OAWG;IACH,wBATW,SAAS;QAES,gBAAgB;QAED,UAAU,GAA3C,MAAM,SAAS,GAAC,KAAK,CAAC;OAkChC;IAtBG,qBAA0B;IAK5B,0BAA+C;IAsBjD;;;;OAIG;IACH,YAFU,KAAK,EAAE,CAEC;IAzBhB,uBAAyB;IA2B3B;;;;OAIG;IACH,0BAAyB;IAEzB;;;;;;;;;OASG;IACH,qBAFW,SAAS,GAAC,KAAK,QAsCzB;IAED;;;;;OAKG;IACH,0BAOC;IAED;;;;;OAKG;IACH,yBAHW,IAAI,GACF,KAAK,QA8BjB;IAED;;;;;;;;;OASG;IACH,iCAHW,IAAI,GACH,iBAAiB,CAwE5B;IAED;;;;;;OAMG;IACH,qBAHW,IAAI,eACH,cAAc,CAOzB;IAED;;;;OAIG;IACH,uBAGC;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;;;;;;;;;;OAcG;IACH,0BAYC;IAUD,uBAEC;IAVD;;;OAGG;IACH,kBAEC;IAcD,2BAEC;IAVD;;;OAGG;IACH,sBAEC;IA0BD,yBAKC;IAzBD;;;;;OAKG;IACH,oBAYC;IAuBD,8BAMC;IApBD;;;;;OAKG;IACH,yBAMC;IAkBD,4BAEC;IAVD;;;OAGG;IACH,uBAEC;IAMD;;;OAGG;IACH,4BAIC;IAUD,2BAEC;IAVD;;;OAGG;IACH,sBAEC;IAcD,+BAEC;IAVD;;;OAGG;IACH,0BAEC;IAcD,yBAEC;IAVD;;;OAGG;IACH,oBAEC;IAeD,6BAEC;IAXD;;;;OAIG;IACH,wBAEC;IAeD,4BAEC;IAXD;;;;OAIG;IACH,uBAEC;IAcD,8BAEC;IAVD;;;OAGG;IACH,yBAEC;IAMD;;;;;;;;;;;;;;OAcG;IACH,iBAoBC;IAED,sCAEC;IAED,8MAEC;IAED;;;OAGG;IACH,mBAEC;CACF;sBA3iBqB,gBAAgB;iBAKrB,WAAW;2BAGD,sBAAsB;qBAD5B,eAAe;qBANf,eAAe"}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
/**
|
||||
* Helper functions used in various places within ical.js
|
||||
* @module ICAL.helpers
|
||||
*/
|
||||
/**
|
||||
* Compiles a list of all referenced TZIDs in all subcomponents and
|
||||
* removes any extra VTIMEZONE subcomponents. In addition, if any TZIDs
|
||||
* are referenced by a component, but a VTIMEZONE does not exist,
|
||||
* an attempt will be made to generate a VTIMEZONE using ICAL.TimezoneService.
|
||||
*
|
||||
* @param {Component} vcal The top-level VCALENDAR component.
|
||||
* @return {Component} The ICAL.Component that was passed in.
|
||||
*/
|
||||
export function updateTimezones(vcal: Component): Component;
|
||||
/**
|
||||
* Checks if the given type is of the number type and also NaN.
|
||||
*
|
||||
* @param {Number} number The number to check
|
||||
* @return {Boolean} True, if the number is strictly NaN
|
||||
*/
|
||||
export function isStrictlyNaN(number: number): boolean;
|
||||
/**
|
||||
* Parses a string value that is expected to be an integer, when the valid is
|
||||
* not an integer throws a decoration error.
|
||||
*
|
||||
* @param {String} string Raw string input
|
||||
* @return {Number} Parsed integer
|
||||
*/
|
||||
export function strictParseInt(string: string): number;
|
||||
/**
|
||||
* Creates or returns a class instance of a given type with the initialization
|
||||
* data if the data is not already an instance of the given type.
|
||||
*
|
||||
* @example
|
||||
* var time = new ICAL.Time(...);
|
||||
* var result = ICAL.helpers.formatClassType(time, ICAL.Time);
|
||||
*
|
||||
* (result instanceof ICAL.Time)
|
||||
* // => true
|
||||
*
|
||||
* result = ICAL.helpers.formatClassType({}, ICAL.Time);
|
||||
* (result isntanceof ICAL.Time)
|
||||
* // => true
|
||||
*
|
||||
*
|
||||
* @param {Object} data object initialization data
|
||||
* @param {Object} type object type (like ICAL.Time)
|
||||
* @return {?} An instance of the found type.
|
||||
*/
|
||||
export function formatClassType(data: any, type: any): unknown;
|
||||
/**
|
||||
* Identical to indexOf but will only match values when they are not preceded
|
||||
* by a backslash character.
|
||||
*
|
||||
* @param {String} buffer String to search
|
||||
* @param {String} search Value to look for
|
||||
* @param {Number} pos Start position
|
||||
* @return {Number} The position, or -1 if not found
|
||||
*/
|
||||
export function unescapedIndexOf(buffer: string, search: string, pos: number): number;
|
||||
/**
|
||||
* Find the index for insertion using binary search.
|
||||
*
|
||||
* @param {Array} list The list to search
|
||||
* @param {?} seekVal The value to insert
|
||||
* @param {function(?,?)} cmpfunc The comparison func, that can
|
||||
* compare two seekVals
|
||||
* @return {Number} The insert position
|
||||
*/
|
||||
export function binsearchInsert(list: any[], seekVal: unknown, cmpfunc: (arg0: unknown, arg1: unknown) => any): number;
|
||||
/**
|
||||
* Clone the passed object or primitive. By default a shallow clone will be
|
||||
* executed.
|
||||
*
|
||||
* @param {*} aSrc The thing to clone
|
||||
* @param {Boolean=} aDeep If true, a deep clone will be performed
|
||||
* @return {*} The copy of the thing
|
||||
*/
|
||||
export function clone(aSrc: any, aDeep?: boolean | undefined): any;
|
||||
/**
|
||||
* Performs iCalendar line folding. A line ending character is inserted and
|
||||
* the next line begins with a whitespace.
|
||||
*
|
||||
* @example
|
||||
* SUMMARY:This line will be fold
|
||||
* ed right in the middle of a word.
|
||||
*
|
||||
* @param {String} aLine The line to fold
|
||||
* @return {String} The folded line
|
||||
*/
|
||||
export function foldline(aLine: string): string;
|
||||
/**
|
||||
* Pads the given string or number with zeros so it will have at least two
|
||||
* characters.
|
||||
*
|
||||
* @param {String|Number} data The string or number to pad
|
||||
* @return {String} The number padded as a string
|
||||
*/
|
||||
export function pad2(data: string | number): string;
|
||||
/**
|
||||
* Truncates the given number, correctly handling negative numbers.
|
||||
*
|
||||
* @param {Number} number The number to truncate
|
||||
* @return {Number} The truncated number
|
||||
*/
|
||||
export function trunc(number: number): number;
|
||||
/**
|
||||
* Poor-man's cross-browser object extension. Doesn't support all the
|
||||
* features, but enough for our usage. Note that the target's properties are
|
||||
* not overwritten with the source properties.
|
||||
*
|
||||
* @example
|
||||
* var child = ICAL.helpers.extend(parent, {
|
||||
* "bar": 123
|
||||
* });
|
||||
*
|
||||
* @param {Object} source The object to extend
|
||||
* @param {Object} target The object to extend with
|
||||
* @return {Object} Returns the target.
|
||||
*/
|
||||
export function extend(source: any, target: any): any;
|
||||
import Component from "./component.js";
|
||||
//# sourceMappingURL=helpers.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/ical/helpers.js"],"names":[],"mappings":"AAWA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,sCAHW,SAAS,GACR,SAAS,CAgDpB;AAED;;;;;GAKG;AACH,uDAEC;AAED;;;;;;GAMG;AACH,uDAUC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,+DASC;AAED;;;;;;;;GAQG;AACH,sFASC;AAED;;;;;;;;GAQG;AACH,uHAyBC;AAED;;;;;;;GAOG;AACH,mEAwBC;AAED;;;;;;;;;;GAUG;AACH,gDAoBC;AAED;;;;;;GAMG;AACH,2BAHW,eAAa,UAsBvB;AAED;;;;;GAKG;AACH,8CAEC;AAED;;;;;;;;;;;;;GAaG;AACH,sDAQC;sBApTqB,gBAAgB"}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
declare namespace _default {
|
||||
export let foldLength: number;
|
||||
export let debug: boolean;
|
||||
export let newLineChar: string;
|
||||
export { Binary };
|
||||
export { Component };
|
||||
export { ComponentParser };
|
||||
export { Duration };
|
||||
export { Event };
|
||||
export { Period };
|
||||
export { Property };
|
||||
export { Recur };
|
||||
export { RecurExpansion };
|
||||
export { RecurIterator };
|
||||
export { Time };
|
||||
export { Timezone };
|
||||
export { TimezoneService };
|
||||
export { UtcOffset };
|
||||
export { VCardTime };
|
||||
export { parse };
|
||||
export { stringify };
|
||||
export { design };
|
||||
export { helpers };
|
||||
}
|
||||
export default _default;
|
||||
import Binary from "./binary.js";
|
||||
import Component from "./component.js";
|
||||
import ComponentParser from "./component_parser.js";
|
||||
import Duration from "./duration.js";
|
||||
import Event from "./event.js";
|
||||
import Period from "./period.js";
|
||||
import Property from "./property.js";
|
||||
import Recur from "./recur.js";
|
||||
import RecurExpansion from "./recur_expansion.js";
|
||||
import RecurIterator from "./recur_iterator.js";
|
||||
import Time from "./time.js";
|
||||
import Timezone from "./timezone.js";
|
||||
import TimezoneService from "./timezone_service.js";
|
||||
import UtcOffset from "./utc_offset.js";
|
||||
import VCardTime from "./vcard_time.js";
|
||||
import parse from "./parse.js";
|
||||
import stringify from "./stringify.js";
|
||||
import design from "./design.js";
|
||||
import * as helpers from "./helpers.js";
|
||||
//# sourceMappingURL=module.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../lib/ical/module.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;mBAKmB,aAAa;sBACV,gBAAgB;4BACV,uBAAuB;qBAE9B,eAAe;kBAClB,YAAY;mBAGX,aAAa;qBACX,eAAe;kBAClB,YAAY;2BACH,sBAAsB;0BACvB,qBAAqB;iBAE9B,WAAW;qBACP,eAAe;4BACR,uBAAuB;sBAC7B,iBAAiB;sBACjB,iBAAiB;kBAXrB,YAAY;sBAMR,gBAAgB;mBAVnB,aAAa;yBAGP,cAAc"}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* Parses iCalendar or vCard data into a raw jCal object. Consult
|
||||
* documentation on the {@tutorial layers|layers of parsing} for more
|
||||
* details.
|
||||
*
|
||||
* @function ICAL.parse
|
||||
* @memberof ICAL
|
||||
* @variation function
|
||||
* @todo Fix the API to be more clear on the return type
|
||||
* @param {String} input The string data to parse
|
||||
* @return {Object|Object[]} A single jCal object, or an array thereof
|
||||
*/
|
||||
declare function parse(input: string): any | any[];
|
||||
declare namespace parse {
|
||||
/**
|
||||
* Parse an iCalendar property value into the jCal for a single property
|
||||
*
|
||||
* @function ICAL.parse.property
|
||||
* @param {String} str
|
||||
* The iCalendar property string to parse
|
||||
* @param {designSet=} designSet
|
||||
* The design data to use for this property
|
||||
* @return {Object}
|
||||
* The jCal Object containing the property
|
||||
*/
|
||||
export function property(str: string, designSet?: import("./types.js").designSet): any;
|
||||
/**
|
||||
* Convenience method to parse a component. You can use ICAL.parse() directly
|
||||
* instead.
|
||||
*
|
||||
* @function ICAL.parse.component
|
||||
* @see ICAL.parse(function)
|
||||
* @param {String} str The iCalendar component string to parse
|
||||
* @return {Object} The jCal Object containing the component
|
||||
*/
|
||||
export function component(str: string): any;
|
||||
export { ParserError };
|
||||
/**
|
||||
* Handles a single line of iCalendar/vCard, updating the state.
|
||||
*
|
||||
* @private
|
||||
* @function ICAL.parse._handleContentLine
|
||||
* @param {String} line The content line to process
|
||||
* @param {parserState} state The current state of the line parsing
|
||||
*/
|
||||
export function _handleContentLine(line: string, state: import("./types.js").parserState): void;
|
||||
/**
|
||||
* Parse a value from the raw value into the jCard/jCal value.
|
||||
*
|
||||
* @private
|
||||
* @function ICAL.parse._parseValue
|
||||
* @param {String} value Original value
|
||||
* @param {String} type Type of value
|
||||
* @param {Object} designSet The design data to use for this value
|
||||
* @return {Object} varies on type
|
||||
*/
|
||||
export function _parseValue(value: string, type: string, designSet: any, structuredValue: any): any;
|
||||
/**
|
||||
* Parse parameters from a string to object.
|
||||
*
|
||||
* @function ICAL.parse._parseParameters
|
||||
* @private
|
||||
* @param {String} line A single unfolded line
|
||||
* @param {Number} start Position to start looking for properties
|
||||
* @param {Object} designSet The design data to use for this property
|
||||
* @return {Array} Array containing key/valye pairs of parsed parameters, the
|
||||
* parsed value, and the position of the last parameter found
|
||||
*/
|
||||
export function _parseParameters(line: string, start: number, designSet: any): any[];
|
||||
/**
|
||||
* Internal helper for rfc6868. Exposing this on ICAL.parse so that
|
||||
* hackers can disable the rfc6868 parsing if the really need to.
|
||||
*
|
||||
* @function ICAL.parse._rfc6868Escape
|
||||
* @param {String} val The value to escape
|
||||
* @return {String} The escaped value
|
||||
*/
|
||||
export function _rfc6868Escape(val: string): string;
|
||||
/**
|
||||
* Parse a multi value string. This function is used either for parsing
|
||||
* actual multi-value property's values, or for handling parameter values. It
|
||||
* can be used for both multi-value properties and structured value properties.
|
||||
*
|
||||
* @private
|
||||
* @function ICAL.parse._parseMultiValue
|
||||
* @param {String} buffer The buffer containing the full value
|
||||
* @param {String} delim The multi-value delimiter
|
||||
* @param {String} type The value type to be parsed
|
||||
* @param {Array.<?>} result The array to append results to, varies on value type
|
||||
* @param {String} innerMulti The inner delimiter to split each value with
|
||||
* @param {designSet} designSet The design data for this value
|
||||
* @return {?|Array.<?>} Either an array of results, or the first result
|
||||
*/
|
||||
export function _parseMultiValue(buffer: string, delim: string, type: string, result: any[], innerMulti: string, designSet: import("./types.js").designSet, structuredValue: any): any;
|
||||
/**
|
||||
* Process a complete buffer of iCalendar/vCard data line by line, correctly
|
||||
* unfolding content. Each line will be processed with the given callback
|
||||
*
|
||||
* @private
|
||||
* @function ICAL.parse._eachLine
|
||||
* @param {String} buffer The buffer to process
|
||||
* @param {function(?String, String)} callback The callback for each line
|
||||
*/
|
||||
export function _eachLine(buffer: string, callback: (arg0: string, arg1: string) => any): void;
|
||||
}
|
||||
export default parse;
|
||||
/**
|
||||
* Imports the 'parserState' type from the "types.js" module
|
||||
*/
|
||||
export type parserState = import("./types.js").parserState;
|
||||
/**
|
||||
* Imports the 'designSet' type from the "types.js" module
|
||||
*/
|
||||
export type designSet = import("./types.js").designSet;
|
||||
/**
|
||||
* An error that occurred during parsing.
|
||||
*
|
||||
* @param {String} message The error message
|
||||
* @memberof ICAL.parse
|
||||
* @extends {Error}
|
||||
*/
|
||||
declare class ParserError extends Error {
|
||||
}
|
||||
//# sourceMappingURL=parse.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../lib/ical/parse.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;;GAWG;AACH,uCAFY,MAAO,KAAQ,CAyB1B;;IAED;;;;;;;;;;OAUG;IACH,uFAOC;IAED;;;;;;;;OAQG;IACH,4CAEC;;IAkBD;;;;;;;OAOG;IACH,gGA+KC;IAED;;;;;;;;;OASG;IACH,oGAKC;IAED;;;;;;;;;;OAUG;IACH,qFAkHC;IAED;;;;;;;OAOG;IACH,oDAIC;IAED;;;;;;;;;;;;;;OAcG;IACH,uLA8BC;IAED;;;;;;;;OAQG;IACH,+FA2CC;;;;;;0BA9hBY,OAAO,YAAY,EAAE,WAAW;;;;wBAEhC,OAAO,YAAY,EAAE,SAAS;AAmF3C;;;;;;GAMG;AACH;CAEC"}
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
export default Period;
|
||||
/**
|
||||
* Imports the 'occurrenceDetails' type from the "types.js" module
|
||||
*/
|
||||
export type jCalComponent = import("./types.js").jCalComponent;
|
||||
/**
|
||||
* This lets typescript resolve our custom types in the
|
||||
* generated d.ts files (jsdoc typedefs are converted to typescript types).
|
||||
* Ignore prevents the typedefs from being documented more than once.
|
||||
* @ignore
|
||||
* @typedef {import("./types.js").jCalComponent} jCalComponent
|
||||
* Imports the 'occurrenceDetails' type from the "types.js" module
|
||||
*/
|
||||
/**
|
||||
* This class represents the "period" value type, with various calculation and manipulation methods.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Period {
|
||||
/**
|
||||
* Creates a new {@link ICAL.Period} instance from the passed string.
|
||||
*
|
||||
* @param {String} str The string to parse
|
||||
* @param {Property} prop The property this period will be on
|
||||
* @return {Period} The created period instance
|
||||
*/
|
||||
static fromString(str: string, prop: Property): Period;
|
||||
/**
|
||||
* Creates a new {@link ICAL.Period} instance from the given data object.
|
||||
* The passed data object cannot contain both and end date and a duration.
|
||||
*
|
||||
* @param {Object} aData An object with members of the period
|
||||
* @param {Time=} aData.start The start of the period
|
||||
* @param {Time=} aData.end The end of the period
|
||||
* @param {Duration=} aData.duration The duration of the period
|
||||
* @return {Period} The period instance
|
||||
*/
|
||||
static fromData(aData: {
|
||||
start?: Time | undefined;
|
||||
end?: Time | undefined;
|
||||
duration?: Duration | undefined;
|
||||
}): Period;
|
||||
/**
|
||||
* Returns a new period instance from the given jCal data array. The first
|
||||
* member is always the start date string, the second member is either a
|
||||
* duration or end date string.
|
||||
*
|
||||
* @param {jCalComponent} aData The jCal data array
|
||||
* @param {Property} aProp The property this jCal data is on
|
||||
* @param {Boolean} aLenient If true, data value can be both date and date-time
|
||||
* @return {Period} The period instance
|
||||
*/
|
||||
static fromJSON(aData: import("./types.js").jCalComponent, aProp: Property, aLenient: boolean): Period;
|
||||
/**
|
||||
* Creates a new ICAL.Period instance. The passed data object cannot contain both and end date and
|
||||
* a duration.
|
||||
*
|
||||
* @param {Object} aData An object with members of the period
|
||||
* @param {Time=} aData.start The start of the period
|
||||
* @param {Time=} aData.end The end of the period
|
||||
* @param {Duration=} aData.duration The duration of the period
|
||||
*/
|
||||
constructor(aData: {
|
||||
start?: Time | undefined;
|
||||
end?: Time | undefined;
|
||||
duration?: Duration | undefined;
|
||||
});
|
||||
wrappedJSObject: this;
|
||||
/**
|
||||
* The start of the period
|
||||
* @type {Time}
|
||||
*/
|
||||
start: Time;
|
||||
/**
|
||||
* The end of the period
|
||||
* @type {Time}
|
||||
*/
|
||||
end: Time;
|
||||
/**
|
||||
* The duration of the period
|
||||
* @type {Duration}
|
||||
*/
|
||||
duration: Duration;
|
||||
/**
|
||||
* The class identifier.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "icalperiod"
|
||||
*/
|
||||
icalclass: string;
|
||||
/**
|
||||
* The type name, to be used in the jCal object.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "period"
|
||||
*/
|
||||
icaltype: string;
|
||||
/**
|
||||
* Returns a clone of the duration object.
|
||||
*
|
||||
* @return {Period} The cloned object
|
||||
*/
|
||||
clone(): Period;
|
||||
/**
|
||||
* Calculates the duration of the period, either directly or by subtracting
|
||||
* start from end date.
|
||||
*
|
||||
* @return {Duration} The calculated duration
|
||||
*/
|
||||
getDuration(): Duration;
|
||||
/**
|
||||
* Calculates the end date of the period, either directly or by adding
|
||||
* duration to start date.
|
||||
*
|
||||
* @return {Time} The calculated end date
|
||||
*/
|
||||
getEnd(): Time;
|
||||
/**
|
||||
* Compare this period with a date or other period. To maintain the logic where a.compare(b)
|
||||
* returns 1 when a > b, this function will return 1 when the period is after the date, 0 when the
|
||||
* date is within the period, and -1 when the period is before the date. When comparing two
|
||||
* periods, as soon as they overlap in any way this will return 0.
|
||||
*
|
||||
* @param {Time|Period} dt The date or other period to compare with
|
||||
*/
|
||||
compare(dt: Time | Period): 0 | 1 | -1;
|
||||
/**
|
||||
* The string representation of this period.
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* The jCal representation of this period type.
|
||||
* @return {Object}
|
||||
*/
|
||||
toJSON(): any;
|
||||
/**
|
||||
* The iCalendar string representation of this period.
|
||||
* @return {String}
|
||||
*/
|
||||
toICALString(): string;
|
||||
}
|
||||
import Time from "./time.js";
|
||||
import Duration from "./duration.js";
|
||||
import Property from "./property.js";
|
||||
//# sourceMappingURL=period.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"period.d.ts","sourceRoot":"","sources":["../../lib/ical/period.js"],"names":[],"mappings":";;;;4BAgBa,OAAO,YAAY,EAAE,aAAa;AAL/C;;;;;;;GAOG;AAEH;;;;GAIG;AACH;IACE;;;;;;OAMG;IACH,qCAHW,QAAQ,GACP,MAAM,CAwBjB;IAED;;;;;;;;;OASG;IACH;QALwB,KAAK,GAAlB,IAAI;QACS,GAAG,GAAhB,IAAI;QACa,QAAQ,GAAzB,QAAQ;QACP,MAAM,CAIjB;IAED;;;;;;;;;OASG;IACH,kEAJW,QAAQ,sBAEP,MAAM,CAsBjB;IAED;;;;;;;;OAQG;IACH;QAJwB,KAAK,GAAlB,IAAI;QACS,GAAG,GAAhB,IAAI;QACa,QAAQ,GAAzB,QAAQ;OA6BlB;IA1BC,sBAA2B;IA6B7B;;;OAGG;IACH,OAFU,IAAI,CAED;IAEb;;;OAGG;IACH,KAFU,IAAI,CAEH;IAEX;;;OAGG;IACH,UAFU,QAAQ,CAEF;IAEhB;;;;;OAKG;IACH,kBAAyB;IAEzB;;;;;OAKG;IACH,iBAAoB;IAEpB;;;;OAIG;IACH,SAFY,MAAM,CAQjB;IAED;;;;;OAKG;IACH,eAFY,QAAQ,CAQnB;IAED;;;;;OAKG;IACH,UAFY,IAAI,CAUf;IAED;;;;;;;OAOG;IACH,YAFW,IAAI,GAAC,MAAM,cAUrB;IAED;;;OAGG;IACH,mBAEC;IAED;;;OAGG;IACH,cAEC;IAED;;;OAGG;IACH,uBAGC;CACF;iBAhQgB,WAAW;qBACP,eAAe;qBAGf,eAAe"}
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
export default Property;
|
||||
/**
|
||||
* Imports the 'designSet' type from the "types.js" module
|
||||
*/
|
||||
export type designSet = import("./types.js").designSet;
|
||||
/**
|
||||
* Imports the 'Geo' type from the "types.js" module
|
||||
*/
|
||||
export type Geo = import("./types.js").Geo;
|
||||
/**
|
||||
* This lets typescript resolve our custom types in the
|
||||
* generated d.ts files (jsdoc typedefs are converted to typescript types).
|
||||
* Ignore prevents the typedefs from being documented more than once.
|
||||
* @ignore
|
||||
* @typedef {import("./types.js").designSet} designSet
|
||||
* Imports the 'designSet' type from the "types.js" module
|
||||
* @typedef {import("./types.js").Geo} Geo
|
||||
* Imports the 'Geo' type from the "types.js" module
|
||||
*/
|
||||
/**
|
||||
* Provides a layer on top of the raw jCal object for manipulating a single property, with its
|
||||
* parameters and value.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Property {
|
||||
/**
|
||||
* Create an {@link ICAL.Property} by parsing the passed iCalendar string.
|
||||
*
|
||||
* @param {String} str The iCalendar string to parse
|
||||
* @param {designSet=} designSet The design data to use for this property
|
||||
* @return {Property} The created iCalendar property
|
||||
*/
|
||||
static fromString(str: string, designSet?: designSet | undefined): Property;
|
||||
/**
|
||||
* Creates a new ICAL.Property instance.
|
||||
*
|
||||
* It is important to note that mutations done in the wrapper directly mutate the jCal object used
|
||||
* to initialize.
|
||||
*
|
||||
* Can also be used to create new properties by passing the name of the property (as a String).
|
||||
*
|
||||
* @param {Array|String} jCal Raw jCal representation OR the new name of the property
|
||||
* @param {Component=} parent Parent component
|
||||
*/
|
||||
constructor(jCal: any[] | string, parent?: Component | undefined);
|
||||
_parent: Component;
|
||||
jCal: any[];
|
||||
/**
|
||||
* The value type for this property
|
||||
* @type {String}
|
||||
*/
|
||||
get type(): string;
|
||||
/**
|
||||
* The name of this property, in lowercase.
|
||||
* @type {String}
|
||||
*/
|
||||
get name(): string;
|
||||
set parent(p: Component);
|
||||
/**
|
||||
* The parent component for this property.
|
||||
* @type {Component}
|
||||
*/
|
||||
get parent(): Component;
|
||||
/**
|
||||
* The design set for this property, e.g. icalendar vs vcard
|
||||
*
|
||||
* @type {designSet}
|
||||
* @private
|
||||
*/
|
||||
private get _designSet();
|
||||
/**
|
||||
* Updates the type metadata from the current jCal type and design set.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
private _updateType;
|
||||
isDecorated: boolean;
|
||||
isMultiValue: boolean;
|
||||
isStructuredValue: boolean;
|
||||
/**
|
||||
* Hydrate a single value. The act of hydrating means turning the raw jCal
|
||||
* value into a potentially wrapped object, for example {@link ICAL.Time}.
|
||||
*
|
||||
* @private
|
||||
* @param {Number} index The index of the value to hydrate
|
||||
* @return {?Object} The decorated value.
|
||||
*/
|
||||
private _hydrateValue;
|
||||
_values: any[];
|
||||
/**
|
||||
* Decorate a single value, returning its wrapped object. This is used by
|
||||
* the hydrate function to actually wrap the value.
|
||||
*
|
||||
* @private
|
||||
* @param {?} value The value to decorate
|
||||
* @return {Object} The decorated value
|
||||
*/
|
||||
private _decorate;
|
||||
/**
|
||||
* Undecorate a single value, returning its raw jCal data.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} value The value to undecorate
|
||||
* @return {?} The undecorated value
|
||||
*/
|
||||
private _undecorate;
|
||||
/**
|
||||
* Sets the value at the given index while also hydrating it. The passed
|
||||
* value can either be a decorated or undecorated value.
|
||||
*
|
||||
* @private
|
||||
* @param {?} value The value to set
|
||||
* @param {Number} index The index to set it at
|
||||
*/
|
||||
private _setDecoratedValue;
|
||||
/**
|
||||
* Gets a parameter on the property.
|
||||
*
|
||||
* @param {String} name Parameter name (lowercase)
|
||||
* @return {Array|String} Parameter value
|
||||
*/
|
||||
getParameter(name: string): any[] | string;
|
||||
/**
|
||||
* Gets first parameter on the property.
|
||||
*
|
||||
* @param {String} name Parameter name (lowercase)
|
||||
* @return {String} Parameter value
|
||||
*/
|
||||
getFirstParameter(name: string): string;
|
||||
/**
|
||||
* Sets a parameter on the property.
|
||||
*
|
||||
* @param {String} name The parameter name
|
||||
* @param {Array|String} value The parameter value
|
||||
*/
|
||||
setParameter(name: string, value: any[] | string): void;
|
||||
/**
|
||||
* Removes a parameter
|
||||
*
|
||||
* @param {String} name The parameter name
|
||||
*/
|
||||
removeParameter(name: string): void;
|
||||
/**
|
||||
* Get the default type based on this property's name.
|
||||
*
|
||||
* @return {String} The default type for this property
|
||||
*/
|
||||
getDefaultType(): string;
|
||||
/**
|
||||
* Sets type of property and clears out any existing values of the current
|
||||
* type.
|
||||
*
|
||||
* @param {String} type New iCAL type (see design.*.values)
|
||||
*/
|
||||
resetType(type: string): void;
|
||||
/**
|
||||
* Finds the first property value.
|
||||
*
|
||||
* @return {Binary | Duration | Period |
|
||||
* Recur | Time | UtcOffset | Geo | string | null} First property value
|
||||
*/
|
||||
getFirstValue(): Binary | Duration | Period | Recur | Time | UtcOffset | import("./types.js").Geo | string | null;
|
||||
/**
|
||||
* Gets all values on the property.
|
||||
*
|
||||
* NOTE: this creates an array during each call.
|
||||
*
|
||||
* @return {Array} List of values
|
||||
*/
|
||||
getValues(): any[];
|
||||
/**
|
||||
* Removes all values from this property
|
||||
*/
|
||||
removeAllValues(): void;
|
||||
/**
|
||||
* Sets the values of the property. Will overwrite the existing values.
|
||||
* This can only be used for multi-value properties.
|
||||
*
|
||||
* @param {Array} values An array of values
|
||||
*/
|
||||
setValues(values: any[]): void;
|
||||
/**
|
||||
* Sets the current value of the property. If this is a multi-value
|
||||
* property, all other values will be removed.
|
||||
*
|
||||
* @param {String|Object} value New property value.
|
||||
*/
|
||||
setValue(value: string | any): void;
|
||||
/**
|
||||
* Returns the Object representation of this component. The returned object
|
||||
* is a live jCal object and should be cloned if modified.
|
||||
* @return {Object}
|
||||
*/
|
||||
toJSON(): any;
|
||||
/**
|
||||
* The string representation of this component.
|
||||
* @return {String}
|
||||
*/
|
||||
toICALString(): string;
|
||||
}
|
||||
import Component from "./component.js";
|
||||
import Binary from "./binary.js";
|
||||
import Duration from "./duration.js";
|
||||
import Period from "./period.js";
|
||||
import Recur from "./recur.js";
|
||||
import Time from "./time.js";
|
||||
import UtcOffset from "./utc_offset.js";
|
||||
//# sourceMappingURL=property.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../lib/ical/property.js"],"names":[],"mappings":";;;;wBAyCa,OAAO,YAAY,EAAE,SAAS;;;;kBAE9B,OAAO,YAAY,EAAE,GAAG;AAPrC;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH;IACE;;;;;;OAMG;IACH,2CAHW,SAAS,eACR,QAAQ,CAInB;IAED;;;;;;;;;;OAUG;IACH,kBAHW,cAAY,WACZ,SAAS,cAanB;IAVC,mBAA6B;IAI3B,YAA0C;IAQ9C;;;OAGG;IACH,mBAEC;IAED;;;OAGG;IACH,mBAEC;IAUD,yBAWC;IAnBD;;;OAGG;IACH,wBAEC;IAeD;;;;;OAKG;IACH,yBAEC;IAED;;;;OAIG;IACH,oBAeC;IAVK,qBAAuB;IAMvB,sBAAmE;IACnE,2BAA6E;IAKnF;;;;;;;OAOG;IACH,sBAoBC;IARK,eAAiB;IAUvB;;;;;;;OAOG;IACH,kBAEC;IAED;;;;;;OAMG;IACH,oBAEC;IAED;;;;;;;OAOG;IACH,2BAcC;IAED;;;;;OAKG;IACH,4BAFY,cAAY,CAQvB;IAED;;;;;OAKG;IACH,wCAQC;IAED;;;;;OAKG;IACH,kCAFW,cAAY,QAUtB;IAED;;;;OAIG;IACH,oCAEC;IAED;;;;OAIG;IACH,yBAWC;IAED;;;;;OAKG;IACH,8BAIC;IAED;;;;;OAKG;IACH,iBAHY,MAAM,GAAG,QAAQ,GAAG,MAAM,GACrC,KAAO,GAAG,IAAI,GAAG,SAAS,8BAAS,MAAM,GAAG,IAAI,CAIhD;IAED;;;;;;OAMG;IACH,mBAgBC;IAED;;OAEG;IACH,wBAKC;IAED;;;;;OAKG;IACH,+BA2BC;IAED;;;;;OAKG;IACH,gBAFW,YAAa,QAavB;IAED;;;;OAIG;IACH,cAEC;IAED;;;OAGG;IACH,uBAIC;CACF;sBAraqB,gBAAgB;mBASnB,aAAa;qBANX,eAAe;mBASjB,aAAa;kBAGd,YAAY;iBAGb,WAAW;sBAZN,iBAAiB"}
|
||||
+348
@@ -0,0 +1,348 @@
|
||||
export default Recur;
|
||||
/**
|
||||
* Imports the 'weekDay' type from the "types.js" module
|
||||
*/
|
||||
export type weekDay = import("./types.js").weekDay;
|
||||
/**
|
||||
* Imports the 'frequencyValues' type from the "types.js" module
|
||||
*/
|
||||
export type frequencyValues = import("./types.js").frequencyValues;
|
||||
/**
|
||||
* This class represents the "recur" value type, used for example by RRULE. It provides methods to
|
||||
* calculate occurrences among others.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Recur {
|
||||
/**
|
||||
* Creates a new {@link ICAL.Recur} instance from the passed string.
|
||||
*
|
||||
* @param {String} string The string to parse
|
||||
* @return {Recur} The created recurrence instance
|
||||
*/
|
||||
static fromString(string: string): Recur;
|
||||
/**
|
||||
* Creates a new {@link ICAL.Recur} instance using members from the passed
|
||||
* data object.
|
||||
*
|
||||
* @param {Object} aData An object with members of the recurrence
|
||||
* @param {frequencyValues=} aData.freq The frequency value
|
||||
* @param {Number=} aData.interval The INTERVAL value
|
||||
* @param {weekDay=} aData.wkst The week start value
|
||||
* @param {Time=} aData.until The end of the recurrence set
|
||||
* @param {Number=} aData.count The number of occurrences
|
||||
* @param {Array.<Number>=} aData.bysecond The seconds for the BYSECOND part
|
||||
* @param {Array.<Number>=} aData.byminute The minutes for the BYMINUTE part
|
||||
* @param {Array.<Number>=} aData.byhour The hours for the BYHOUR part
|
||||
* @param {Array.<String>=} aData.byday The BYDAY values
|
||||
* @param {Array.<Number>=} aData.bymonthday The days for the BYMONTHDAY part
|
||||
* @param {Array.<Number>=} aData.byyearday The days for the BYYEARDAY part
|
||||
* @param {Array.<Number>=} aData.byweekno The weeks for the BYWEEKNO part
|
||||
* @param {Array.<Number>=} aData.bymonth The month for the BYMONTH part
|
||||
* @param {Array.<Number>=} aData.bysetpos The positionals for the BYSETPOS part
|
||||
*/
|
||||
static fromData(aData: {
|
||||
freq?: frequencyValues | undefined;
|
||||
interval?: number | undefined;
|
||||
wkst?: weekDay | undefined;
|
||||
until?: Time | undefined;
|
||||
count?: number | undefined;
|
||||
bysecond?: Array<number> | undefined;
|
||||
byminute?: Array<number> | undefined;
|
||||
byhour?: Array<number> | undefined;
|
||||
byday?: Array<string> | undefined;
|
||||
bymonthday?: Array<number> | undefined;
|
||||
byyearday?: Array<number> | undefined;
|
||||
byweekno?: Array<number> | undefined;
|
||||
bymonth?: Array<number> | undefined;
|
||||
bysetpos?: Array<number> | undefined;
|
||||
}): Recur;
|
||||
/**
|
||||
* Converts a recurrence string to a data object, suitable for the fromData
|
||||
* method.
|
||||
*
|
||||
* @private
|
||||
* @param {String} string The string to parse
|
||||
* @param {Boolean} fmtIcal If true, the string is considered to be an
|
||||
* iCalendar string
|
||||
* @return {Recur} The recurrence instance
|
||||
*/
|
||||
private static _stringToData;
|
||||
/**
|
||||
* Convert an ical representation of a day (SU, MO, etc..)
|
||||
* into a numeric value of that day.
|
||||
*
|
||||
* @param {String} string The iCalendar day name
|
||||
* @param {weekDay=} aWeekStart
|
||||
* The week start weekday, defaults to SUNDAY
|
||||
* @return {Number} Numeric value of given day
|
||||
*/
|
||||
static icalDayToNumericDay(string: string, aWeekStart?: weekDay | undefined): number;
|
||||
/**
|
||||
* Convert a numeric day value into its ical representation (SU, MO, etc..)
|
||||
*
|
||||
* @param {Number} num Numeric value of given day
|
||||
* @param {weekDay=} aWeekStart
|
||||
* The week start weekday, defaults to SUNDAY
|
||||
* @return {String} The ICAL day value, e.g SU,MO,...
|
||||
*/
|
||||
static numericDayToIcalDay(num: number, aWeekStart?: weekDay | undefined): string;
|
||||
/**
|
||||
* Create a new instance of the Recur class.
|
||||
*
|
||||
* @param {Object} data An object with members of the recurrence
|
||||
* @param {frequencyValues=} data.freq The frequency value
|
||||
* @param {Number=} data.interval The INTERVAL value
|
||||
* @param {weekDay=} data.wkst The week start value
|
||||
* @param {Time=} data.until The end of the recurrence set
|
||||
* @param {Number=} data.count The number of occurrences
|
||||
* @param {Array.<Number>=} data.bysecond The seconds for the BYSECOND part
|
||||
* @param {Array.<Number>=} data.byminute The minutes for the BYMINUTE part
|
||||
* @param {Array.<Number>=} data.byhour The hours for the BYHOUR part
|
||||
* @param {Array.<String>=} data.byday The BYDAY values
|
||||
* @param {Array.<Number>=} data.bymonthday The days for the BYMONTHDAY part
|
||||
* @param {Array.<Number>=} data.byyearday The days for the BYYEARDAY part
|
||||
* @param {Array.<Number>=} data.byweekno The weeks for the BYWEEKNO part
|
||||
* @param {Array.<Number>=} data.bymonth The month for the BYMONTH part
|
||||
* @param {Array.<Number>=} data.bysetpos The positionals for the BYSETPOS part
|
||||
*/
|
||||
constructor(data: {
|
||||
freq?: frequencyValues | undefined;
|
||||
interval?: number | undefined;
|
||||
wkst?: weekDay | undefined;
|
||||
until?: Time | undefined;
|
||||
count?: number | undefined;
|
||||
bysecond?: Array<number> | undefined;
|
||||
byminute?: Array<number> | undefined;
|
||||
byhour?: Array<number> | undefined;
|
||||
byday?: Array<string> | undefined;
|
||||
bymonthday?: Array<number> | undefined;
|
||||
byyearday?: Array<number> | undefined;
|
||||
byweekno?: Array<number> | undefined;
|
||||
bymonth?: Array<number> | undefined;
|
||||
bysetpos?: Array<number> | undefined;
|
||||
});
|
||||
wrappedJSObject: this;
|
||||
/**
|
||||
* An object holding the BY-parts of the recurrence rule
|
||||
* @memberof ICAL.Recur
|
||||
* @typedef {Object} byParts
|
||||
* @property {Array.<Number>=} BYSECOND The seconds for the BYSECOND part
|
||||
* @property {Array.<Number>=} BYMINUTE The minutes for the BYMINUTE part
|
||||
* @property {Array.<Number>=} BYHOUR The hours for the BYHOUR part
|
||||
* @property {Array.<String>=} BYDAY The BYDAY values
|
||||
* @property {Array.<Number>=} BYMONTHDAY The days for the BYMONTHDAY part
|
||||
* @property {Array.<Number>=} BYYEARDAY The days for the BYYEARDAY part
|
||||
* @property {Array.<Number>=} BYWEEKNO The weeks for the BYWEEKNO part
|
||||
* @property {Array.<Number>=} BYMONTH The month for the BYMONTH part
|
||||
* @property {Array.<Number>=} BYSETPOS The positionals for the BYSETPOS part
|
||||
*/
|
||||
/**
|
||||
* An object holding the BY-parts of the recurrence rule
|
||||
* @type {byParts}
|
||||
*/
|
||||
parts: {
|
||||
/**
|
||||
* The seconds for the BYSECOND part
|
||||
*/
|
||||
BYSECOND?: Array<number> | undefined;
|
||||
/**
|
||||
* The minutes for the BYMINUTE part
|
||||
*/
|
||||
BYMINUTE?: Array<number> | undefined;
|
||||
/**
|
||||
* The hours for the BYHOUR part
|
||||
*/
|
||||
BYHOUR?: Array<number> | undefined;
|
||||
/**
|
||||
* The BYDAY values
|
||||
*/
|
||||
BYDAY?: Array<string> | undefined;
|
||||
/**
|
||||
* The days for the BYMONTHDAY part
|
||||
*/
|
||||
BYMONTHDAY?: Array<number> | undefined;
|
||||
/**
|
||||
* The days for the BYYEARDAY part
|
||||
*/
|
||||
BYYEARDAY?: Array<number> | undefined;
|
||||
/**
|
||||
* The weeks for the BYWEEKNO part
|
||||
*/
|
||||
BYWEEKNO?: Array<number> | undefined;
|
||||
/**
|
||||
* The month for the BYMONTH part
|
||||
*/
|
||||
BYMONTH?: Array<number> | undefined;
|
||||
/**
|
||||
* The positionals for the BYSETPOS part
|
||||
*/
|
||||
BYSETPOS?: Array<number> | undefined;
|
||||
};
|
||||
/**
|
||||
* The interval value for the recurrence rule.
|
||||
* @type {Number}
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* The week start day
|
||||
*
|
||||
* @type {weekDay}
|
||||
* @default ICAL.Time.MONDAY
|
||||
*/
|
||||
wkst: weekDay;
|
||||
/**
|
||||
* The end of the recurrence
|
||||
* @type {?Time}
|
||||
*/
|
||||
until: Time | null;
|
||||
/**
|
||||
* The maximum number of occurrences
|
||||
* @type {?Number}
|
||||
*/
|
||||
count: number | null;
|
||||
/**
|
||||
* The frequency value.
|
||||
* @type {frequencyValues}
|
||||
*/
|
||||
freq: frequencyValues;
|
||||
/**
|
||||
* The class identifier.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "icalrecur"
|
||||
*/
|
||||
icalclass: string;
|
||||
/**
|
||||
* The type name, to be used in the jCal object.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "recur"
|
||||
*/
|
||||
icaltype: string;
|
||||
/**
|
||||
* Create a new iterator for this recurrence rule. The passed start date
|
||||
* must be the start date of the event, not the start of the range to
|
||||
* search in.
|
||||
*
|
||||
* @example
|
||||
* let recur = comp.getFirstPropertyValue('rrule');
|
||||
* let dtstart = comp.getFirstPropertyValue('dtstart');
|
||||
* let iter = recur.iterator(dtstart);
|
||||
* for (let next = iter.next(); next; next = iter.next()) {
|
||||
* if (next.compare(rangeStart) < 0) {
|
||||
* continue;
|
||||
* }
|
||||
* console.log(next.toString());
|
||||
* }
|
||||
*
|
||||
* @param {Time} aStart The item's start date
|
||||
* @return {RecurIterator} The recurrence iterator
|
||||
*/
|
||||
iterator(aStart: Time): RecurIterator;
|
||||
/**
|
||||
* Returns a clone of the recurrence object.
|
||||
*
|
||||
* @return {Recur} The cloned object
|
||||
*/
|
||||
clone(): Recur;
|
||||
/**
|
||||
* Checks if the current rule is finite, i.e. has a count or until part.
|
||||
*
|
||||
* @return {Boolean} True, if the rule is finite
|
||||
*/
|
||||
isFinite(): boolean;
|
||||
/**
|
||||
* Checks if the current rule has a count part, and not limited by an until
|
||||
* part.
|
||||
*
|
||||
* @return {Boolean} True, if the rule is by count
|
||||
*/
|
||||
isByCount(): boolean;
|
||||
/**
|
||||
* Adds a component (part) to the recurrence rule. This is not a component
|
||||
* in the sense of {@link ICAL.Component}, but a part of the recurrence
|
||||
* rule, i.e. BYMONTH.
|
||||
*
|
||||
* @param {String} aType The name of the component part
|
||||
* @param {Array|String} aValue The component value
|
||||
*/
|
||||
addComponent(aType: string, aValue: any[] | string): void;
|
||||
/**
|
||||
* Sets the component value for the given by-part.
|
||||
*
|
||||
* @param {String} aType The component part name
|
||||
* @param {Array} aValues The component values
|
||||
*/
|
||||
setComponent(aType: string, aValues: any[]): void;
|
||||
/**
|
||||
* Gets (a copy) of the requested component value.
|
||||
*
|
||||
* @param {String} aType The component part name
|
||||
* @return {Array} The component part value
|
||||
*/
|
||||
getComponent(aType: string): any[];
|
||||
/**
|
||||
* Retrieves the next occurrence after the given recurrence id. See the
|
||||
* guide on {@tutorial terminology} for more details.
|
||||
*
|
||||
* NOTE: Currently, this method iterates all occurrences from the start
|
||||
* date. It should not be called in a loop for performance reasons. If you
|
||||
* would like to get more than one occurrence, you can iterate the
|
||||
* occurrences manually, see the example on the
|
||||
* {@link ICAL.Recur#iterator iterator} method.
|
||||
*
|
||||
* @param {Time} aStartTime The start of the event series
|
||||
* @param {Time} aRecurrenceId The date of the last occurrence
|
||||
* @return {Time} The next occurrence after
|
||||
*/
|
||||
getNextOccurrence(aStartTime: Time, aRecurrenceId: Time): Time;
|
||||
/**
|
||||
* Sets up the current instance using members from the passed data object.
|
||||
*
|
||||
* @param {Object} data An object with members of the recurrence
|
||||
* @param {frequencyValues=} data.freq The frequency value
|
||||
* @param {Number=} data.interval The INTERVAL value
|
||||
* @param {weekDay=} data.wkst The week start value
|
||||
* @param {Time=} data.until The end of the recurrence set
|
||||
* @param {Number=} data.count The number of occurrences
|
||||
* @param {Array.<Number>=} data.bysecond The seconds for the BYSECOND part
|
||||
* @param {Array.<Number>=} data.byminute The minutes for the BYMINUTE part
|
||||
* @param {Array.<Number>=} data.byhour The hours for the BYHOUR part
|
||||
* @param {Array.<String>=} data.byday The BYDAY values
|
||||
* @param {Array.<Number>=} data.bymonthday The days for the BYMONTHDAY part
|
||||
* @param {Array.<Number>=} data.byyearday The days for the BYYEARDAY part
|
||||
* @param {Array.<Number>=} data.byweekno The weeks for the BYWEEKNO part
|
||||
* @param {Array.<Number>=} data.bymonth The month for the BYMONTH part
|
||||
* @param {Array.<Number>=} data.bysetpos The positionals for the BYSETPOS part
|
||||
*/
|
||||
fromData(data: {
|
||||
freq?: frequencyValues | undefined;
|
||||
interval?: number | undefined;
|
||||
wkst?: weekDay | undefined;
|
||||
until?: Time | undefined;
|
||||
count?: number | undefined;
|
||||
bysecond?: Array<number> | undefined;
|
||||
byminute?: Array<number> | undefined;
|
||||
byhour?: Array<number> | undefined;
|
||||
byday?: Array<string> | undefined;
|
||||
bymonthday?: Array<number> | undefined;
|
||||
byyearday?: Array<number> | undefined;
|
||||
byweekno?: Array<number> | undefined;
|
||||
bymonth?: Array<number> | undefined;
|
||||
bysetpos?: Array<number> | undefined;
|
||||
}): void;
|
||||
/**
|
||||
* The jCal representation of this recurrence type.
|
||||
* @return {Object}
|
||||
*/
|
||||
toJSON(): any;
|
||||
/**
|
||||
* The string representation of this recurrence rule.
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
import Time from "./time.js";
|
||||
import RecurIterator from "./recur_iterator.js";
|
||||
//# sourceMappingURL=recur.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"recur.d.ts","sourceRoot":"","sources":["../../lib/ical/recur.js"],"names":[],"mappings":";;;;sBAgBa,OAAO,YAAY,EAAE,OAAO;;;;8BAE5B,OAAO,YAAY,EAAE,eAAe;AAqBjD;;;;;GAKG;AACH;IACE;;;;;OAKG;IACH,mCAFY,KAAK,CAKhB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH;QAfmC,IAAI,GAA5B,eAAe;QACA,QAAQ;QACP,IAAI,GAApB,OAAO;QACM,KAAK,GAAlB,IAAI;QACW,KAAK;QACG,QAAQ,GAA/B,aAAc;QACS,QAAQ,GAA/B,aAAc;QACS,MAAM,GAA7B,aAAc;QACS,KAAK,GAA5B,aAAc;QACS,UAAU,GAAjC,aAAc;QACS,SAAS,GAAhC,aAAc;QACS,QAAQ,GAA/B,aAAc;QACS,OAAO,GAA9B,aAAc;QACS,QAAQ,GAA/B,aAAc;cAIxB;IAED;;;;;;;;;OASG;IACH,6BAkCC;IAED;;;;;;;;OAQG;IACH,wDAJW,OAAO,sBASjB;IAED;;;;;;;OAOG;IACH,qDAJW,OAAO,sBAcjB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH;QAfkC,IAAI,GAA3B,eAAe;QACD,QAAQ;QACP,IAAI,GAAnB,OAAO;QACK,KAAK,GAAjB,IAAI;QACU,KAAK;QACG,QAAQ,GAA9B,aAAc;QACQ,QAAQ,GAA9B,aAAc;QACQ,MAAM,GAA5B,aAAc;QACQ,KAAK,GAA3B,aAAc;QACQ,UAAU,GAAhC,aAAc;QACQ,SAAS,GAA/B,aAAc;QACQ,QAAQ,GAA9B,aAAc;QACQ,OAAO,GAA7B,aAAc;QACQ,QAAQ,GAA9B,aAAc;OASxB;IANC,sBAA2B;IAQ7B;;;;;;;;;;;;;OAaG;IAEH;;;OAGG;IACH;;;;mBAfc,aAAc;;;;mBACd,aAAc;;;;iBACd,aAAc;;;;gBACd,aAAc;;;;qBACd,aAAc;;;;oBACd,aAAc;;;;mBACd,aAAc;;;;kBACd,aAAc;;;;mBACd,aAAc;MAOf;IAEb;;;OAGG;IACH,iBAAa;IAEb;;;;;OAKG;IACH,MAHU,OAAO,CAGE;IAEnB;;;OAGG;IACH,OAFW,IAAI,QAEF;IAEb;;;OAGG;IACH,qBAAa;IAEb;;;OAGG;IACH,MAFU,eAAe,CAEb;IAEZ;;;;;OAKG;IACH,kBAAwB;IAExB;;;;;OAKG;IACH,iBAAmB;IAEnB;;;;;;;;;;;;;;;;;;OAkBG;IACH,iBAHW,IAAI,GACH,aAAa,CAOxB;IAED;;;;OAIG;IACH,SAFY,KAAK,CAIhB;IAED;;;;OAIG;IACH,oBAEC;IAED;;;;;OAKG;IACH,qBAEC;IAED;;;;;;;OAOG;IACH,oCAFW,cAAY,QAStB;IAED;;;;;OAKG;IACH,kDAEC;IAED;;;;;OAKG;IACH,mCAGC;IAED;;;;;;;;;;;;;OAaG;IACH,8BAJW,IAAI,iBACJ,IAAI,GACH,IAAI,CAef;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH;QAfkC,IAAI,GAA3B,eAAe;QACD,QAAQ;QACP,IAAI,GAAnB,OAAO;QACK,KAAK,GAAjB,IAAI;QACU,KAAK;QACG,QAAQ,GAA9B,aAAc;QACQ,QAAQ,GAA9B,aAAc;QACQ,MAAM,GAA5B,aAAc;QACQ,KAAK,GAA3B,aAAc;QACQ,UAAU,GAAhC,aAAc;QACQ,SAAS,GAA/B,aAAc;QACQ,QAAQ,GAA9B,aAAc;QACQ,OAAO,GAA7B,aAAc;QACQ,QAAQ,GAA9B,aAAc;aA4BxB;IAED;;;OAGG;IACH,cA2BC;IAED;;;OAGG;IACH,mBAmBC;CACF;iBA/dgB,WAAW;0BADF,qBAAqB"}
|
||||
+199
@@ -0,0 +1,199 @@
|
||||
export default RecurExpansion;
|
||||
/**
|
||||
* Primary class for expanding recurring rules. Can take multiple rrules, rdates, exdate(s) and
|
||||
* iterate (in order) over each next occurrence.
|
||||
*
|
||||
* Once initialized this class can also be serialized saved and continue iteration from the last
|
||||
* point.
|
||||
*
|
||||
* NOTE: it is intended that this class is to be used with {@link ICAL.Event} which handles recurrence
|
||||
* exceptions.
|
||||
*
|
||||
* @example
|
||||
* // assuming event is a parsed ical component
|
||||
* var event;
|
||||
*
|
||||
* var expand = new ICAL.RecurExpansion({
|
||||
* component: event,
|
||||
* dtstart: event.getFirstPropertyValue('dtstart')
|
||||
* });
|
||||
*
|
||||
* // remember there are infinite rules so it is a good idea to limit the scope of the iterations
|
||||
* // then resume later on.
|
||||
*
|
||||
* // next is always an ICAL.Time or null
|
||||
* var next;
|
||||
*
|
||||
* while (someCondition && (next = expand.next())) {
|
||||
* // do something with next
|
||||
* }
|
||||
*
|
||||
* // save instance for later
|
||||
* var json = JSON.stringify(expand);
|
||||
*
|
||||
* //...
|
||||
*
|
||||
* // NOTE: if the component's properties have changed you will need to rebuild the class and start
|
||||
* // over. This only works when the component's recurrence info is the same.
|
||||
* var expand = new ICAL.RecurExpansion(JSON.parse(json));
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class RecurExpansion {
|
||||
/**
|
||||
* Creates a new ICAL.RecurExpansion instance.
|
||||
*
|
||||
* The options object can be filled with the specified initial values. It can also contain
|
||||
* additional members, as a result of serializing a previous expansion state, as shown in the
|
||||
* example.
|
||||
*
|
||||
* @param {Object} options
|
||||
* Recurrence expansion options
|
||||
* @param {Time} options.dtstart
|
||||
* Start time of the event
|
||||
* @param {Component=} options.component
|
||||
* Component for expansion, required if not resuming.
|
||||
*/
|
||||
constructor(options: {
|
||||
dtstart: Time;
|
||||
component?: Component | undefined;
|
||||
});
|
||||
/**
|
||||
* Array of rdate instances.
|
||||
*
|
||||
* @type {Time[]}
|
||||
* @private
|
||||
*/
|
||||
private ruleDates;
|
||||
/**
|
||||
* Array of exdate instances.
|
||||
*
|
||||
* @type {Time[]}
|
||||
* @private
|
||||
*/
|
||||
private exDates;
|
||||
/**
|
||||
* True when iteration is fully completed.
|
||||
* @type {Boolean}
|
||||
*/
|
||||
complete: boolean;
|
||||
/**
|
||||
* Array of rrule iterators.
|
||||
*
|
||||
* @type {RecurIterator[]}
|
||||
* @private
|
||||
*/
|
||||
private ruleIterators;
|
||||
/**
|
||||
* Current position in ruleDates array.
|
||||
* @type {Number}
|
||||
* @private
|
||||
*/
|
||||
private ruleDateInc;
|
||||
/**
|
||||
* Current position in exDates array
|
||||
* @type {Number}
|
||||
* @private
|
||||
*/
|
||||
private exDateInc;
|
||||
/**
|
||||
* Current negative date.
|
||||
*
|
||||
* @type {Time}
|
||||
* @private
|
||||
*/
|
||||
private exDate;
|
||||
/**
|
||||
* Current additional date.
|
||||
*
|
||||
* @type {Time}
|
||||
* @private
|
||||
*/
|
||||
private ruleDate;
|
||||
/**
|
||||
* Start date of recurring rules.
|
||||
*
|
||||
* @type {Time}
|
||||
*/
|
||||
dtstart: Time;
|
||||
/**
|
||||
* Last expanded time
|
||||
*
|
||||
* @type {Time}
|
||||
*/
|
||||
last: Time;
|
||||
/**
|
||||
* Initialize the recurrence expansion from the data object. The options
|
||||
* object may also contain additional members, see the
|
||||
* {@link ICAL.RecurExpansion constructor} for more details.
|
||||
*
|
||||
* @param {Object} options
|
||||
* Recurrence expansion options
|
||||
* @param {Time} options.dtstart
|
||||
* Start time of the event
|
||||
* @param {Component=} options.component
|
||||
* Component for expansion, required if not resuming.
|
||||
*/
|
||||
fromData(options: {
|
||||
dtstart: Time;
|
||||
component?: Component | undefined;
|
||||
}): void;
|
||||
/**
|
||||
* Compare two ICAL.Time objects. When the second parameter is a DATE and the first parameter is
|
||||
* DATE-TIME, strip the time and compare only the days.
|
||||
*
|
||||
* @private
|
||||
* @param {Time} a The one object to compare
|
||||
* @param {Time} b The other object to compare
|
||||
*/
|
||||
private _compare_special;
|
||||
/**
|
||||
* Retrieve the next occurrence in the series.
|
||||
* @return {Time}
|
||||
*/
|
||||
next(): Time;
|
||||
/**
|
||||
* Converts object into a serialize-able format. This format can be passed
|
||||
* back into the expansion to resume iteration.
|
||||
* @return {Object}
|
||||
*/
|
||||
toJSON(): any;
|
||||
/**
|
||||
* Extract all dates from the properties in the given component. The
|
||||
* properties will be filtered by the property name.
|
||||
*
|
||||
* @private
|
||||
* @param {Component} component The component to search in
|
||||
* @param {String} propertyName The property name to search for
|
||||
* @return {Time[]} The extracted dates.
|
||||
*/
|
||||
private _extractDates;
|
||||
/**
|
||||
* Initialize the recurrence expansion.
|
||||
*
|
||||
* @private
|
||||
* @param {Component} component The component to initialize from.
|
||||
*/
|
||||
private _init;
|
||||
/**
|
||||
* Advance to the next exdate
|
||||
* @private
|
||||
*/
|
||||
private _nextExDay;
|
||||
/**
|
||||
* Advance to the next rule date
|
||||
* @private
|
||||
*/
|
||||
private _nextRuleDay;
|
||||
/**
|
||||
* Find and return the recurrence rule with the most recent event and
|
||||
* return it.
|
||||
*
|
||||
* @private
|
||||
* @return {?RecurIterator} Found iterator.
|
||||
*/
|
||||
private _nextRecurrenceIter;
|
||||
}
|
||||
import Time from "./time.js";
|
||||
import Component from "./component.js";
|
||||
//# sourceMappingURL=recur_expansion.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"recur_expansion.d.ts","sourceRoot":"","sources":["../../lib/ical/recur_expansion.js"],"names":[],"mappings":";AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IACE;;;;;;;;;;;;;OAaG;IACH;QALyB,OAAO,EAArB,IAAI;QAEgB,SAAS,GAA7B,SAAS;OAOnB;IAgBD;;;;;OAKG;IACH,kBAAiB;IAEjB;;;;;OAKG;IACH,gBAAe;IA5Bf;;;OAGG;IACH,kBAAiB;IAEjB;;;;;OAKG;IACH,sBAAqB;IAkBrB;;;;OAIG;IACH,oBAAgB;IAEhB;;;;OAIG;IACH,kBAAc;IAEd;;;;;OAKG;IACH,eAAc;IAEd;;;;;OAKG;IACH,iBAAgB;IAEhB;;;;OAIG;IACH,SAFU,IAAI,CAEC;IAEf;;;;OAIG;IACH,MAFU,IAAI,CAEF;IAEZ;;;;;;;;;;;OAWG;IACH;QALyB,OAAO,EAArB,IAAI;QAEgB,SAAS,GAA7B,SAAS;aA0CnB;IAED;;;;;;;OAOG;IACH,yBAIC;IAED;;;OAGG;IACH,QAFY,IAAI,CAqEf;IAED;;;;OAIG;IACH,cAuBC;IAED;;;;;;;;OAQG;IACH,sBAkBC;IAED;;;;;OAKG;IACH,cAwEC;IAED;;;OAGG;IACH,mBAEC;IAED;;;OAGG;IACH,qBAEC;IAED;;;;;;OAMG;IACH,4BAwCC;CACF;iBAregB,WAAW;sBAIN,gBAAgB"}
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
export default RecurIterator;
|
||||
/**
|
||||
* Imports the 'weekDay' type from the "types.js" module
|
||||
*/
|
||||
export type weekDay = import("./types.js").weekDay;
|
||||
/**
|
||||
* This lets typescript resolve our custom types in the
|
||||
* generated d.ts files (jsdoc typedefs are converted to typescript types).
|
||||
* Ignore prevents the typedefs from being documented more than once.
|
||||
*
|
||||
* @ignore
|
||||
* @typedef {import("./types.js").weekDay} weekDay
|
||||
* Imports the 'weekDay' type from the "types.js" module
|
||||
*/
|
||||
/**
|
||||
* An iterator for a single recurrence rule. This class usually doesn't have to be instanciated
|
||||
* directly, the convenience method {@link ICAL.Recur#iterator} can be used.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class RecurIterator {
|
||||
static _indexMap: {
|
||||
BYSECOND: number;
|
||||
BYMINUTE: number;
|
||||
BYHOUR: number;
|
||||
BYDAY: number;
|
||||
BYMONTHDAY: number;
|
||||
BYYEARDAY: number;
|
||||
BYWEEKNO: number;
|
||||
BYMONTH: number;
|
||||
BYSETPOS: number;
|
||||
};
|
||||
static _expandMap: {
|
||||
SECONDLY: number[];
|
||||
MINUTELY: number[];
|
||||
HOURLY: number[];
|
||||
DAILY: number[];
|
||||
WEEKLY: number[];
|
||||
MONTHLY: number[];
|
||||
YEARLY: number[];
|
||||
};
|
||||
static UNKNOWN: number;
|
||||
static CONTRACT: number;
|
||||
static EXPAND: number;
|
||||
static ILLEGAL: number;
|
||||
/**
|
||||
* Creates a new ICAL.RecurIterator instance. The options object may contain additional members
|
||||
* when resuming iteration from a previous run.
|
||||
*
|
||||
* @param {Object} options The iterator options
|
||||
* @param {Recur} options.rule The rule to iterate.
|
||||
* @param {Time} options.dtstart The start date of the event.
|
||||
* @param {Boolean=} options.initialized When true, assume that options are
|
||||
* from a previously constructed iterator. Initialization will not be
|
||||
* repeated.
|
||||
*/
|
||||
constructor(options: {
|
||||
rule: Recur;
|
||||
dtstart: Time;
|
||||
initialized?: boolean | undefined;
|
||||
});
|
||||
/**
|
||||
* True when iteration is finished.
|
||||
* @type {Boolean}
|
||||
*/
|
||||
completed: boolean;
|
||||
/**
|
||||
* The rule that is being iterated
|
||||
* @type {Recur}
|
||||
*/
|
||||
rule: Recur;
|
||||
/**
|
||||
* The start date of the event being iterated.
|
||||
* @type {Time}
|
||||
*/
|
||||
dtstart: Time;
|
||||
/**
|
||||
* The last occurrence that was returned from the
|
||||
* {@link RecurIterator#next} method.
|
||||
* @type {Time}
|
||||
*/
|
||||
last: Time;
|
||||
/**
|
||||
* The sequence number from the occurrence
|
||||
* @type {Number}
|
||||
*/
|
||||
occurrence_number: number;
|
||||
/**
|
||||
* The indices used for the {@link ICAL.RecurIterator#by_data} object.
|
||||
* @type {Object}
|
||||
* @private
|
||||
*/
|
||||
private by_indices;
|
||||
/**
|
||||
* If true, the iterator has already been initialized
|
||||
* @type {Boolean}
|
||||
* @private
|
||||
*/
|
||||
private initialized;
|
||||
/**
|
||||
* The initializd by-data.
|
||||
* @type {Object}
|
||||
* @private
|
||||
*/
|
||||
private by_data;
|
||||
/**
|
||||
* The expanded yeardays
|
||||
* @type {Array}
|
||||
* @private
|
||||
*/
|
||||
private days;
|
||||
/**
|
||||
* The index in the {@link ICAL.RecurIterator#days} array.
|
||||
* @type {Number}
|
||||
* @private
|
||||
*/
|
||||
private days_index;
|
||||
/**
|
||||
* Initialize the recurrence iterator from the passed data object. This
|
||||
* method is usually not called directly, you can initialize the iterator
|
||||
* through the constructor.
|
||||
*
|
||||
* @param {Object} options The iterator options
|
||||
* @param {Recur} options.rule The rule to iterate.
|
||||
* @param {Time} options.dtstart The start date of the event.
|
||||
* @param {Boolean=} options.initialized When true, assume that options are
|
||||
* from a previously constructed iterator. Initialization will not be
|
||||
* repeated.
|
||||
*/
|
||||
fromData(options: {
|
||||
rule: Recur;
|
||||
dtstart: Time;
|
||||
initialized?: boolean | undefined;
|
||||
}): void;
|
||||
/**
|
||||
* Initialize the iterator
|
||||
* @private
|
||||
*/
|
||||
private init;
|
||||
/**
|
||||
* Retrieve the next occurrence from the iterator.
|
||||
* @return {Time}
|
||||
*/
|
||||
next(again?: boolean): Time;
|
||||
next_second(): number;
|
||||
increment_second(inc: any): void;
|
||||
next_minute(): number;
|
||||
increment_minute(inc: any): void;
|
||||
next_hour(): number;
|
||||
increment_hour(inc: any): void;
|
||||
next_day(): number;
|
||||
next_week(): number;
|
||||
/**
|
||||
* Normalize each by day rule for a given year/month.
|
||||
* Takes into account ordering and negative rules
|
||||
*
|
||||
* @private
|
||||
* @param {Number} year Current year.
|
||||
* @param {Number} month Current month.
|
||||
* @param {Array} rules Array of rules.
|
||||
*
|
||||
* @return {Array} sorted and normalized rules.
|
||||
* Negative rules will be expanded to their
|
||||
* correct positive values for easier processing.
|
||||
*/
|
||||
private normalizeByMonthDayRules;
|
||||
/**
|
||||
* NOTES:
|
||||
* We are given a list of dates in the month (BYMONTHDAY) (23, etc..)
|
||||
* Also we are given a list of days (BYDAY) (MO, 2SU, etc..) when
|
||||
* both conditions match a given date (this.last.day) iteration stops.
|
||||
*
|
||||
* @private
|
||||
* @param {Boolean=} isInit When given true will not increment the
|
||||
* current day (this.last).
|
||||
*/
|
||||
private _byDayAndMonthDay;
|
||||
next_month(): number;
|
||||
next_weekday_by_week(): number;
|
||||
next_year(): 0 | 1;
|
||||
_nextByYearDay(): 0 | 1;
|
||||
/**
|
||||
* @param dow (eg: '1TU', '-1MO')
|
||||
* @param {weekDay=} aWeekStart The week start weekday
|
||||
* @return [pos, numericDow] (eg: [1, 3]) numericDow is relative to aWeekStart
|
||||
*/
|
||||
ruleDayOfWeek(dow: any, aWeekStart?: weekDay | undefined): any[];
|
||||
next_generic(aRuleType: any, aInterval: any, aDateAttr: any, aFollowingAttr: any, aPreviousIncr: any): number;
|
||||
increment_monthday(inc: any): void;
|
||||
increment_month(): void;
|
||||
increment_year(inc: any): void;
|
||||
increment_generic(inc: any, aDateAttr: any, aFactor: any, aNextIncrement: any): void;
|
||||
has_by_data(aRuleType: any): boolean;
|
||||
expand_year_days(aYear: any): number;
|
||||
expand_by_day(aYear: any): number[];
|
||||
is_day_in_byday(tt: any): 0 | 1;
|
||||
/**
|
||||
* Checks if given value is in BYSETPOS.
|
||||
*
|
||||
* @private
|
||||
* @param {Numeric} aPos position to check for.
|
||||
* @return {Boolean} false unless BYSETPOS rules exist
|
||||
* and the given value is present in rules.
|
||||
*/
|
||||
private check_set_position;
|
||||
sort_byday_rules(aRules: any): void;
|
||||
check_contract_restriction(aRuleType: any, v: any): boolean;
|
||||
check_contracting_rules(): boolean;
|
||||
setup_defaults(aRuleType: any, req: any, deftime: any): any;
|
||||
/**
|
||||
* Convert iterator into a serialize-able object. Will preserve current
|
||||
* iteration sequence to ensure the seamless continuation of the recurrence
|
||||
* rule.
|
||||
* @return {Object}
|
||||
*/
|
||||
toJSON(): any;
|
||||
}
|
||||
import Recur from "./recur.js";
|
||||
import Time from "./time.js";
|
||||
//# sourceMappingURL=recur_iterator.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"recur_iterator.d.ts","sourceRoot":"","sources":["../../lib/ical/recur_iterator.js"],"names":[],"mappings":";;;;sBAea,OAAO,YAAY,EAAE,OAAO;AANzC;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH;IACE;;;;;;;;;;MAUE;IAEF;;;;;;;;MAQE;IAEF,uBAAmB;IACnB,wBAAoB;IACpB,sBAAkB;IAClB,uBAAmB;IAEnB;;;;;;;;;;OAUG;IACH;QAN0B,IAAI,EAAnB,KAAK;QACS,OAAO,EAArB,IAAI;QACc,WAAW;OAMvC;IAED;;;OAGG;IACH,mBAAkB;IAElB;;;OAGG;IACH,MAFU,KAAK,CAEH;IAEZ;;;OAGG;IACH,SAFU,IAAI,CAEC;IAEf;;;;OAIG;IACH,MAFU,IAAI,CAEF;IAEZ;;;OAGG;IACH,0BAAsB;IAEtB;;;;OAIG;IACH,mBAAkB;IAElB;;;;OAIG;IACH,oBAAoB;IAEpB;;;;OAIG;IACH,gBAAe;IAEf;;;;OAIG;IACH,aAAY;IAEZ;;;;OAIG;IACH,mBAAe;IAEf;;;;;;;;;;;OAWG;IACH;QAN0B,IAAI,EAAnB,KAAK;QACS,OAAO,EAArB,IAAI;QACc,WAAW;aA8DvC;IAED;;;OAGG;IACH,aAyKC;IAED;;;OAGG;IACH,uBAFY,IAAI,CAqFf;IAED,sBAEC;IAED,iCAEC;IAED,sBAGC;IAED,iCAEC;IAED,oBAGC;IAED,+BAEC;IAED,mBAcC;IAED,oBAgCC;IAED;;;;;;;;;;;;OAYG;IACH,iCA2CC;IAED;;;;;;;;;OASG;IACH,0BAmIC;IAED,qBA2FC;IAED,+BAwDC;IAED,mBAsBC;IAED,wBAqBC;IAED;;;;OAIG;IACH,qCAHW,OAAO,qBAYjB;IAED,8GA2BC;IAED,mCAUC;IAED,wBAmCC;IAED,+BAIC;IAED,qFAOC;IAED,qCAEC;IAED,qCAmOC;IAED,oCAsDC;IAED,gCAgBC;IAED;;;;;;;OAOG;IACH,2BAOC;IAED,oCAaC;IAED,4DAqBC;IAED,mCAaC;IAED,4DAaC;IAED;;;;;OAKG;IACH,cAaC;CACF;kBAp7CiB,YAAY;iBACb,WAAW"}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Convert a full jCal/jCard array into a iCalendar/vCard string.
|
||||
*
|
||||
* @function ICAL.stringify
|
||||
* @variation function
|
||||
* @param {Array} jCal The jCal/jCard document
|
||||
* @return {String} The stringified iCalendar/vCard document
|
||||
*/
|
||||
declare function stringify(jCal: any[]): string;
|
||||
declare namespace stringify {
|
||||
/**
|
||||
* Converts an jCal component array into a ICAL string.
|
||||
* Recursive will resolve sub-components.
|
||||
*
|
||||
* Exact component/property order is not saved all
|
||||
* properties will come before subcomponents.
|
||||
*
|
||||
* @function ICAL.stringify.component
|
||||
* @param {Array} component
|
||||
* jCal/jCard fragment of a component
|
||||
* @param {designSet} designSet
|
||||
* The design data to use for this component
|
||||
* @return {String} The iCalendar/vCard string
|
||||
*/
|
||||
function component(component: any[], designSet: import("./types.js").designSet): string;
|
||||
/**
|
||||
* Converts a single jCal/jCard property to a iCalendar/vCard string.
|
||||
*
|
||||
* @function ICAL.stringify.property
|
||||
* @param {Array} property
|
||||
* jCal/jCard property array
|
||||
* @param {designSet} designSet
|
||||
* The design data to use for this property
|
||||
* @param {Boolean} noFold
|
||||
* If true, the line is not folded
|
||||
* @return {String} The iCalendar/vCard string
|
||||
*/
|
||||
function property(property: any[], designSet: import("./types.js").designSet, noFold: boolean): string;
|
||||
/**
|
||||
* Handles escaping of property values that may contain:
|
||||
*
|
||||
* COLON (:), SEMICOLON (;), or COMMA (,)
|
||||
*
|
||||
* If any of the above are present the result is wrapped
|
||||
* in double quotes.
|
||||
*
|
||||
* @function ICAL.stringify.paramPropertyValue
|
||||
* @param {String} value Raw property value
|
||||
* @param {boolean} force If value should be escaped even when unnecessary
|
||||
* @return {String} Given or escaped value when needed
|
||||
*/
|
||||
function paramPropertyValue(value: string, force: boolean): string;
|
||||
/**
|
||||
* Converts an array of ical values into a single
|
||||
* string based on a type and a delimiter value (like ",").
|
||||
*
|
||||
* @function ICAL.stringify.multiValue
|
||||
* @param {Array} values List of values to convert
|
||||
* @param {String} delim Used to join the values (",", ";", ":")
|
||||
* @param {String} type Lowecase ical value type
|
||||
* (like boolean, date-time, etc..)
|
||||
* @param {?String} innerMulti If set, each value will again be processed
|
||||
* Used for structured values
|
||||
* @param {designSet} designSet
|
||||
* The design data to use for this property
|
||||
*
|
||||
* @return {String} iCalendar/vCard string for value
|
||||
*/
|
||||
function multiValue(values: any[], delim: string, type: string, innerMulti: string, designSet: import("./types.js").designSet, structuredValue: any): string;
|
||||
/**
|
||||
* Processes a single ical value runs the associated "toICAL" method from the
|
||||
* design value type if available to convert the value.
|
||||
*
|
||||
* @function ICAL.stringify.value
|
||||
* @param {String|Number} value A formatted value
|
||||
* @param {String} type Lowercase iCalendar/vCard value type
|
||||
* (like boolean, date-time, etc..)
|
||||
* @return {String} iCalendar/vCard value for single value
|
||||
*/
|
||||
function value(value: string | number, type: string, designSet: any, structuredValue: any): string;
|
||||
/**
|
||||
* Internal helper for rfc6868. Exposing this on ICAL.stringify so that
|
||||
* hackers can disable the rfc6868 parsing if the really need to.
|
||||
*
|
||||
* @param {String} val The value to unescape
|
||||
* @return {String} The escaped value
|
||||
*/
|
||||
function _rfc6868Unescape(val: string): string;
|
||||
}
|
||||
export default stringify;
|
||||
/**
|
||||
* Imports the 'designSet' type from the "types.js" module
|
||||
*/
|
||||
export type designSet = import("./types.js").designSet;
|
||||
//# sourceMappingURL=stringify.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../lib/ical/stringify.js"],"names":[],"mappings":"AAsBA;;;;;;;GAOG;AACH,gDAeC;;IAED;;;;;;;;;;;;;OAaG;IACH,wFAgCC;IAED;;;;;;;;;;;OAWG;IACH,uGAuGC;IAED;;;;;;;;;;;;OAYG;IACH,mEAUC;IAED;;;;;;;;;;;;;;;OAeG;IACH,6JAkBC;IAED;;;;;;;;;OASG;IACH,mGAKC;IAED;;;;;;OAMG;IACH,+CAIC;;;;;;wBA/RY,OAAO,YAAY,EAAE,SAAS"}
|
||||
+542
@@ -0,0 +1,542 @@
|
||||
export default Time;
|
||||
/**
|
||||
* Imports the 'weekDay' type from the "types.js" module
|
||||
*/
|
||||
export type weekDay = import("./types.js").weekDay;
|
||||
/**
|
||||
* Imports the 'timeInit' type from the "types.js" module
|
||||
*/
|
||||
export type timeInit = import("./types.js").timeInit;
|
||||
/**
|
||||
* This lets typescript resolve our custom types in the
|
||||
* generated d.ts files (jsdoc typedefs are converted to typescript types).
|
||||
* Ignore prevents the typedefs from being documented more than once.
|
||||
*
|
||||
* @ignore
|
||||
* @typedef {import("./types.js").weekDay} weekDay
|
||||
* Imports the 'weekDay' type from the "types.js" module
|
||||
*
|
||||
* @ignore
|
||||
* @typedef {import("./types.js").timeInit} timeInit
|
||||
* Imports the 'timeInit' type from the "types.js" module
|
||||
*/
|
||||
/**
|
||||
* @classdesc
|
||||
* iCalendar Time representation (similar to JS Date object). Fully
|
||||
* independent of system (OS) timezone / time. Unlike JS Date, the month
|
||||
* January is 1, not zero.
|
||||
*
|
||||
* @example
|
||||
* var time = new ICAL.Time({
|
||||
* year: 2012,
|
||||
* month: 10,
|
||||
* day: 11
|
||||
* minute: 0,
|
||||
* second: 0,
|
||||
* isDate: false
|
||||
* });
|
||||
*
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Time {
|
||||
static _dowCache: {};
|
||||
static _wnCache: {};
|
||||
/**
|
||||
* Returns the days in the given month
|
||||
*
|
||||
* @param {Number} month The month to check
|
||||
* @param {Number} year The year to check
|
||||
* @return {Number} The number of days in the month
|
||||
*/
|
||||
static daysInMonth(month: number, year: number): number;
|
||||
/**
|
||||
* Checks if the year is a leap year
|
||||
*
|
||||
* @param {Number} year The year to check
|
||||
* @return {Boolean} True, if the year is a leap year
|
||||
*/
|
||||
static isLeapYear(year: number): boolean;
|
||||
/**
|
||||
* Create a new ICAL.Time from the day of year and year. The date is returned
|
||||
* in floating timezone.
|
||||
*
|
||||
* @param {Number} aDayOfYear The day of year
|
||||
* @param {Number} aYear The year to create the instance in
|
||||
* @return {Time} The created instance with the calculated date
|
||||
*/
|
||||
static fromDayOfYear(aDayOfYear: number, aYear: number): Time;
|
||||
/**
|
||||
* Returns a new ICAL.Time instance from a date string, e.g 2015-01-02.
|
||||
*
|
||||
* @deprecated Use {@link ICAL.Time.fromDateString} instead
|
||||
* @param {String} str The string to create from
|
||||
* @return {Time} The date/time instance
|
||||
*/
|
||||
static fromStringv2(str: string): Time;
|
||||
/**
|
||||
* Returns a new ICAL.Time instance from a date string, e.g 2015-01-02.
|
||||
*
|
||||
* @param {String} aValue The string to create from
|
||||
* @return {Time} The date/time instance
|
||||
*/
|
||||
static fromDateString(aValue: string): Time;
|
||||
/**
|
||||
* Returns a new ICAL.Time instance from a date-time string, e.g
|
||||
* 2015-01-02T03:04:05. If a property is specified, the timezone is set up
|
||||
* from the property's TZID parameter.
|
||||
*
|
||||
* @param {String} aValue The string to create from
|
||||
* @param {Property=} prop The property the date belongs to
|
||||
* @return {Time} The date/time instance
|
||||
*/
|
||||
static fromDateTimeString(aValue: string, prop?: Property | undefined): Time;
|
||||
/**
|
||||
* Returns a new ICAL.Time instance from a date or date-time string,
|
||||
*
|
||||
* @param {String} aValue The string to create from
|
||||
* @param {Property=} prop The property the date belongs to
|
||||
* @return {Time} The date/time instance
|
||||
*/
|
||||
static fromString(aValue: string, aProperty: any): Time;
|
||||
/**
|
||||
* Creates a new ICAL.Time instance from the given Javascript Date.
|
||||
*
|
||||
* @param {?Date} aDate The Javascript Date to read, or null to reset
|
||||
* @param {Boolean} [useUTC=false] If true, the UTC values of the date will be used
|
||||
*/
|
||||
static fromJSDate(aDate: Date | null, useUTC?: boolean): Time;
|
||||
/**
|
||||
* Creates a new ICAL.Time instance from the the passed data object.
|
||||
*
|
||||
* @param {timeInit} aData Time initialization
|
||||
* @param {Timezone=} aZone Timezone this position occurs in
|
||||
*/
|
||||
static fromData: (aData: timeInit, aZone?: Timezone | undefined) => Time;
|
||||
/**
|
||||
* Creates a new ICAL.Time instance from the current moment.
|
||||
* The instance is “floating” - has no timezone relation.
|
||||
* To create an instance considering the time zone, call
|
||||
* ICAL.Time.fromJSDate(new Date(), true)
|
||||
* @return {Time}
|
||||
*/
|
||||
static now(): Time;
|
||||
/**
|
||||
* Returns the date on which ISO week number 1 starts.
|
||||
*
|
||||
* @see Time#weekNumber
|
||||
* @param {Number} aYear The year to search in
|
||||
* @param {weekDay=} aWeekStart The week start weekday, used for calculation.
|
||||
* @return {Time} The date on which week number 1 starts
|
||||
*/
|
||||
static weekOneStarts(aYear: number, aWeekStart?: weekDay | undefined): Time;
|
||||
/**
|
||||
* Get the dominical letter for the given year. Letters range from A - G for
|
||||
* common years, and AG to GF for leap years.
|
||||
*
|
||||
* @param {Number} yr The year to retrieve the letter for
|
||||
* @return {String} The dominical letter.
|
||||
*/
|
||||
static getDominicalLetter(yr: number): string;
|
||||
static "__#1@#epochTime": any;
|
||||
/**
|
||||
* January 1st, 1970 as an ICAL.Time.
|
||||
* @type {Time}
|
||||
* @constant
|
||||
* @instance
|
||||
*/
|
||||
static get epochTime(): Time;
|
||||
static _cmp_attr(a: any, b: any, attr: any): 0 | 1 | -1;
|
||||
/**
|
||||
* The days that have passed in the year after a given month. The array has
|
||||
* two members, one being an array of passed days for non-leap years, the
|
||||
* other analog for leap years.
|
||||
* @example
|
||||
* var isLeapYear = ICAL.Time.isLeapYear(year);
|
||||
* var passedDays = ICAL.Time.daysInYearPassedMonth[isLeapYear][month];
|
||||
* @type {Array.<Array.<Number>>}
|
||||
*/
|
||||
static daysInYearPassedMonth: Array<Array<number>>;
|
||||
static SUNDAY: number;
|
||||
static MONDAY: number;
|
||||
static TUESDAY: number;
|
||||
static WEDNESDAY: number;
|
||||
static THURSDAY: number;
|
||||
static FRIDAY: number;
|
||||
static SATURDAY: number;
|
||||
/**
|
||||
* The default weekday for the WKST part.
|
||||
* @constant
|
||||
* @default ICAL.Time.MONDAY
|
||||
*/
|
||||
static DEFAULT_WEEK_START: number;
|
||||
/**
|
||||
* Creates a new ICAL.Time instance.
|
||||
*
|
||||
* @param {timeInit} data Time initialization
|
||||
* @param {Timezone} zone timezone this position occurs in
|
||||
*/
|
||||
constructor(data: timeInit, zone: Timezone);
|
||||
wrappedJSObject: this;
|
||||
/**
|
||||
* @type {timeInit}
|
||||
* @private
|
||||
*/
|
||||
private _time;
|
||||
/**
|
||||
* The class identifier.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "icaltime"
|
||||
*/
|
||||
icalclass: string;
|
||||
_cachedUnixTime: any;
|
||||
/**
|
||||
* The type name, to be used in the jCal object. This value may change and
|
||||
* is strictly defined by the {@link ICAL.Time#isDate isDate} member.
|
||||
* @type {String}
|
||||
* @default "date-time"
|
||||
*/
|
||||
get icaltype(): string;
|
||||
/**
|
||||
* The timezone for this time.
|
||||
* @type {Timezone}
|
||||
*/
|
||||
zone: Timezone;
|
||||
/**
|
||||
* Internal uses to indicate that a change has been made and the next read
|
||||
* operation must attempt to normalize the value (for example changing the
|
||||
* day to 33).
|
||||
*
|
||||
* @type {Boolean}
|
||||
* @private
|
||||
*/
|
||||
private _pendingNormalization;
|
||||
set year(val: number);
|
||||
/**
|
||||
* The year of this date.
|
||||
* @type {Number}
|
||||
*/
|
||||
get year(): number;
|
||||
set month(val: number);
|
||||
/**
|
||||
* The month of this date.
|
||||
* @type {Number}
|
||||
*/
|
||||
get month(): number;
|
||||
set day(val: number);
|
||||
/**
|
||||
* The day of this date.
|
||||
* @type {Number}
|
||||
*/
|
||||
get day(): number;
|
||||
set hour(val: number);
|
||||
/**
|
||||
* The hour of this date-time.
|
||||
* @type {Number}
|
||||
*/
|
||||
get hour(): number;
|
||||
set minute(val: number);
|
||||
/**
|
||||
* The minute of this date-time.
|
||||
* @type {Number}
|
||||
*/
|
||||
get minute(): number;
|
||||
set second(val: number);
|
||||
/**
|
||||
* The second of this date-time.
|
||||
* @type {Number}
|
||||
*/
|
||||
get second(): number;
|
||||
set isDate(val: boolean);
|
||||
/**
|
||||
* If true, the instance represents a date (as opposed to a date-time)
|
||||
* @type {Boolean}
|
||||
*/
|
||||
get isDate(): boolean;
|
||||
/**
|
||||
* @private
|
||||
* @param {String} attr Attribute to get (one of: year, month,
|
||||
* day, hour, minute, second, isDate)
|
||||
* @return {Number|Boolean} Current value for the attribute
|
||||
*/
|
||||
private _getTimeAttr;
|
||||
/**
|
||||
* @private
|
||||
* @param {String} attr Attribute to set (one of: year, month,
|
||||
* day, hour, minute, second, isDate)
|
||||
* @param {Number|Boolean} val New value for the attribute
|
||||
*/
|
||||
private _setTimeAttr;
|
||||
/**
|
||||
* Returns a clone of the time object.
|
||||
*
|
||||
* @return {Time} The cloned object
|
||||
*/
|
||||
clone(): Time;
|
||||
/**
|
||||
* Reset the time instance to epoch time
|
||||
*/
|
||||
reset(): void;
|
||||
/**
|
||||
* Reset the time instance to the given date/time values.
|
||||
*
|
||||
* @param {Number} year The year to set
|
||||
* @param {Number} month The month to set
|
||||
* @param {Number} day The day to set
|
||||
* @param {Number} hour The hour to set
|
||||
* @param {Number} minute The minute to set
|
||||
* @param {Number} second The second to set
|
||||
* @param {Timezone} timezone The timezone to set
|
||||
*/
|
||||
resetTo(year: number, month: number, day: number, hour: number, minute: number, second: number, timezone: Timezone): void;
|
||||
/**
|
||||
* Set up the current instance from the Javascript date value.
|
||||
*
|
||||
* @param {?Date} aDate The Javascript Date to read, or null to reset
|
||||
* @param {Boolean} [useUTC=false] If true, the UTC values of the date will be used
|
||||
*/
|
||||
fromJSDate(aDate: Date | null, useUTC?: boolean): this;
|
||||
/**
|
||||
* Sets up the current instance using members from the passed data object.
|
||||
*
|
||||
* @param {timeInit} aData Time initialization
|
||||
* @param {Timezone=} aZone Timezone this position occurs in
|
||||
*/
|
||||
fromData(aData: timeInit, aZone?: Timezone | undefined): this;
|
||||
/**
|
||||
* Calculate the day of week.
|
||||
* @param {weekDay=} aWeekStart
|
||||
* The week start weekday, defaults to SUNDAY
|
||||
* @return {weekDay}
|
||||
*/
|
||||
dayOfWeek(aWeekStart?: weekDay | undefined): weekDay;
|
||||
/**
|
||||
* Calculate the day of year.
|
||||
* @return {Number}
|
||||
*/
|
||||
dayOfYear(): number;
|
||||
/**
|
||||
* Returns a copy of the current date/time, rewound to the start of the
|
||||
* week. The resulting ICAL.Time instance is of icaltype date, even if this
|
||||
* is a date-time.
|
||||
*
|
||||
* @param {weekDay=} aWeekStart
|
||||
* The week start weekday, defaults to SUNDAY
|
||||
* @return {Time} The start of the week (cloned)
|
||||
*/
|
||||
startOfWeek(aWeekStart?: weekDay | undefined): Time;
|
||||
/**
|
||||
* Returns a copy of the current date/time, shifted to the end of the week.
|
||||
* The resulting ICAL.Time instance is of icaltype date, even if this is a
|
||||
* date-time.
|
||||
*
|
||||
* @param {weekDay=} aWeekStart
|
||||
* The week start weekday, defaults to SUNDAY
|
||||
* @return {Time} The end of the week (cloned)
|
||||
*/
|
||||
endOfWeek(aWeekStart?: weekDay | undefined): Time;
|
||||
/**
|
||||
* Returns a copy of the current date/time, rewound to the start of the
|
||||
* month. The resulting ICAL.Time instance is of icaltype date, even if
|
||||
* this is a date-time.
|
||||
*
|
||||
* @return {Time} The start of the month (cloned)
|
||||
*/
|
||||
startOfMonth(): Time;
|
||||
/**
|
||||
* Returns a copy of the current date/time, shifted to the end of the
|
||||
* month. The resulting ICAL.Time instance is of icaltype date, even if
|
||||
* this is a date-time.
|
||||
*
|
||||
* @return {Time} The end of the month (cloned)
|
||||
*/
|
||||
endOfMonth(): Time;
|
||||
/**
|
||||
* Returns a copy of the current date/time, rewound to the start of the
|
||||
* year. The resulting ICAL.Time instance is of icaltype date, even if
|
||||
* this is a date-time.
|
||||
*
|
||||
* @return {Time} The start of the year (cloned)
|
||||
*/
|
||||
startOfYear(): Time;
|
||||
/**
|
||||
* Returns a copy of the current date/time, shifted to the end of the
|
||||
* year. The resulting ICAL.Time instance is of icaltype date, even if
|
||||
* this is a date-time.
|
||||
*
|
||||
* @return {Time} The end of the year (cloned)
|
||||
*/
|
||||
endOfYear(): Time;
|
||||
/**
|
||||
* First calculates the start of the week, then returns the day of year for
|
||||
* this date. If the day falls into the previous year, the day is zero or negative.
|
||||
*
|
||||
* @param {weekDay=} aFirstDayOfWeek
|
||||
* The week start weekday, defaults to SUNDAY
|
||||
* @return {Number} The calculated day of year
|
||||
*/
|
||||
startDoyWeek(aFirstDayOfWeek?: weekDay | undefined): number;
|
||||
/**
|
||||
* Get the dominical letter for the current year. Letters range from A - G
|
||||
* for common years, and AG to GF for leap years.
|
||||
*
|
||||
* @param {Number} yr The year to retrieve the letter for
|
||||
* @return {String} The dominical letter.
|
||||
*/
|
||||
getDominicalLetter(): string;
|
||||
/**
|
||||
* Finds the nthWeekDay relative to the current month (not day). The
|
||||
* returned value is a day relative the month that this month belongs to so
|
||||
* 1 would indicate the first of the month and 40 would indicate a day in
|
||||
* the following month.
|
||||
*
|
||||
* @param {Number} aDayOfWeek Day of the week see the day name constants
|
||||
* @param {Number} aPos Nth occurrence of a given week day values
|
||||
* of 1 and 0 both indicate the first weekday of that type. aPos may
|
||||
* be either positive or negative
|
||||
*
|
||||
* @return {Number} numeric value indicating a day relative
|
||||
* to the current month of this time object
|
||||
*/
|
||||
nthWeekDay(aDayOfWeek: number, aPos: number): number;
|
||||
/**
|
||||
* Checks if current time is the nth weekday, relative to the current
|
||||
* month. Will always return false when rule resolves outside of current
|
||||
* month.
|
||||
*
|
||||
* @param {weekDay} aDayOfWeek Day of week to check
|
||||
* @param {Number} aPos Relative position
|
||||
* @return {Boolean} True, if it is the nth weekday
|
||||
*/
|
||||
isNthWeekDay(aDayOfWeek: weekDay, aPos: number): boolean;
|
||||
/**
|
||||
* Calculates the ISO 8601 week number. The first week of a year is the
|
||||
* week that contains the first Thursday. The year can have 53 weeks, if
|
||||
* January 1st is a Friday.
|
||||
*
|
||||
* Note there are regions where the first week of the year is the one that
|
||||
* starts on January 1st, which may offset the week number. Also, if a
|
||||
* different week start is specified, this will also affect the week
|
||||
* number.
|
||||
*
|
||||
* @see Time.weekOneStarts
|
||||
* @param {weekDay} aWeekStart The weekday the week starts with
|
||||
* @return {Number} The ISO week number
|
||||
*/
|
||||
weekNumber(aWeekStart: weekDay): number;
|
||||
/**
|
||||
* Adds the duration to the current time. The instance is modified in
|
||||
* place.
|
||||
*
|
||||
* @param {Duration} aDuration The duration to add
|
||||
*/
|
||||
addDuration(aDuration: Duration): void;
|
||||
/**
|
||||
* Subtract the date details (_excluding_ timezone). Useful for finding
|
||||
* the relative difference between two time objects excluding their
|
||||
* timezone differences.
|
||||
*
|
||||
* @param {Time} aDate The date to subtract
|
||||
* @return {Duration} The difference as a duration
|
||||
*/
|
||||
subtractDate(aDate: Time): Duration;
|
||||
/**
|
||||
* Subtract the date details, taking timezones into account.
|
||||
*
|
||||
* @param {Time} aDate The date to subtract
|
||||
* @return {Duration} The difference in duration
|
||||
*/
|
||||
subtractDateTz(aDate: Time): Duration;
|
||||
/**
|
||||
* Compares the ICAL.Time instance with another one, or a period.
|
||||
*
|
||||
* @param {Time|Period} aOther The instance to compare with
|
||||
* @return {Number} -1, 0 or 1 for less/equal/greater
|
||||
*/
|
||||
compare(other: any): number;
|
||||
/**
|
||||
* Compares only the date part of this instance with another one.
|
||||
*
|
||||
* @param {Time} other The instance to compare with
|
||||
* @param {Timezone} tz The timezone to compare in
|
||||
* @return {Number} -1, 0 or 1 for less/equal/greater
|
||||
*/
|
||||
compareDateOnlyTz(other: Time, tz: Timezone): number;
|
||||
/**
|
||||
* Convert the instance into another timezone. The returned ICAL.Time
|
||||
* instance is always a copy.
|
||||
*
|
||||
* @param {Timezone} zone The zone to convert to
|
||||
* @return {Time} The copy, converted to the zone
|
||||
*/
|
||||
convertToZone(zone: Timezone): Time;
|
||||
/**
|
||||
* Calculates the UTC offset of the current date/time in the timezone it is
|
||||
* in.
|
||||
*
|
||||
* @return {Number} UTC offset in seconds
|
||||
*/
|
||||
utcOffset(): number;
|
||||
/**
|
||||
* Returns an RFC 5545 compliant ical representation of this object.
|
||||
*
|
||||
* @return {String} ical date/date-time
|
||||
*/
|
||||
toICALString(): string;
|
||||
/**
|
||||
* The string representation of this date/time, in jCal form
|
||||
* (including : and - separators).
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Converts the current instance to a Javascript date
|
||||
* @return {Date}
|
||||
*/
|
||||
toJSDate(): Date;
|
||||
_normalize(): this;
|
||||
/**
|
||||
* Adjust the date/time by the given offset
|
||||
*
|
||||
* @param {Number} aExtraDays The extra amount of days
|
||||
* @param {Number} aExtraHours The extra amount of hours
|
||||
* @param {Number} aExtraMinutes The extra amount of minutes
|
||||
* @param {Number} aExtraSeconds The extra amount of seconds
|
||||
* @param {Number=} aTime The time to adjust, defaults to the
|
||||
* current instance.
|
||||
*/
|
||||
adjust(aExtraDays: number, aExtraHours: number, aExtraMinutes: number, aExtraSeconds: number, aTime?: number | undefined): this;
|
||||
/**
|
||||
* Sets up the current instance from unix time, the number of seconds since
|
||||
* January 1st, 1970.
|
||||
*
|
||||
* @param {Number} seconds The seconds to set up with
|
||||
*/
|
||||
fromUnixTime(seconds: number): void;
|
||||
/**
|
||||
* Converts the current instance to seconds since January 1st 1970.
|
||||
*
|
||||
* @return {Number} Seconds since 1970
|
||||
*/
|
||||
toUnixTime(): number;
|
||||
/**
|
||||
* Converts time to into Object which can be serialized then re-created
|
||||
* using the constructor.
|
||||
*
|
||||
* @example
|
||||
* // toJSON will automatically be called
|
||||
* var json = JSON.stringify(mytime);
|
||||
*
|
||||
* var deserialized = JSON.parse(json);
|
||||
*
|
||||
* var time = new ICAL.Time(deserialized);
|
||||
*
|
||||
* @return {Object}
|
||||
*/
|
||||
toJSON(): any;
|
||||
}
|
||||
import Timezone from "./timezone.js";
|
||||
import Duration from "./duration.js";
|
||||
import Property from "./property.js";
|
||||
//# sourceMappingURL=time.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../lib/ical/time.js"],"names":[],"mappings":";;;;sBAqBa,OAAO,YAAY,EAAE,OAAO;;;;uBAI5B,OAAO,YAAY,EAAE,QAAQ;AAV1C;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;EAkBE;AACF;IACE,qBAAsB;IACtB,oBAAqB;IAErB;;;;;;OAMG;IACH,wDAaC;IAED;;;;;OAKG;IACH,yCAMC;IAED;;;;;;;OAOG;IACH,yDAFY,IAAI,CAkCf;IAED;;;;;;OAMG;IACH,kCAFY,IAAI,CASf;IAED;;;;;OAKG;IACH,uCAFY,IAAI,CAef;IAED;;;;;;;;OAQG;IACH,iDAHW,QAAQ,eACP,IAAI,CAiDf;IAED;;;;;;OAMG;IACH,mDAFY,IAAI,CAQf;IAED;;;;;OAKG;IACH,yBAHY,IAAI,iCAMf;IAED;;;;;OAKG;IACH,yBAHW,QAAQ,UACR,QAAQ,sBAKjB;IAEF;;;;;;OAMG;IACH,cAFY,IAAI,CAIf;IAED;;;;;;;OAOG;IACH,iDAHW,OAAO,eACN,IAAI,CAsBf;IAED;;;;;;OAMG;IACH,8CASC;IAED,8BAAyB;IACzB;;;;;OAKG;IACH,6BAcC;IAED,wDAIC;IAED;;;;;;;;OAQG;IACH,8BAFU,MAAO,aAAc,CAAC,CAK9B;IAEF,sBAAkB;IAClB,sBAAkB;IAClB,uBAAmB;IACnB,yBAAqB;IACrB,wBAAoB;IACpB,sBAAkB;IAClB,wBAAoB;IAEpB;;;;OAIG;IACH,kCAA8B;IAE9B;;;;;OAKG;IACH,kBAHW,QAAQ,QACR,QAAQ,EAqBlB;IAlBC,sBAA2B;IAE3B;;;OAGG;IACH,cAAgC;IAclC;;;;;OAKG;IACH,kBAAuB;IACvB,qBAAuB;IAEvB;;;;;OAKG;IACH,uBAEC;IAED;;;OAGG;IACH,MAFU,QAAQ,CAEN;IAEZ;;;;;;;OAOG;IACH,8BAA8B;IAU9B,sBAEC;IAVD;;;OAGG;IACH,mBAEC;IAcD,uBAEC;IAVD;;;OAGG;IACH,oBAEC;IAcD,qBAEC;IAVD;;;OAGG;IACH,kBAEC;IAcD,sBAEC;IAVD;;;OAGG;IACH,mBAEC;IAcD,wBAEC;IAVD;;;OAGG;IACH,qBAEC;IAcD,wBAEC;IAVD;;;OAGG;IACH,qBAEC;IAcD,yBAEC;IAVD;;;OAGG;IACH,sBAEC;IAMD;;;;;OAKG;IACH,qBAOC;IAED;;;;;OAKG;IACH,qBAUC;IAED;;;;OAIG;IACH,SAFY,IAAI,CAIf;IAED;;OAEG;IACH,cAGC;IAED;;;;;;;;;;OAUG;IACH,0GAFW,QAAQ,QAYlB;IAED;;;;;OAKG;IACH,kBAHY,IAAI,iCA2Bf;IAED;;;;;OAKG;IACH,gBAHW,QAAQ,UACR,QAAQ,oBAuClB;IAED;;;;;OAKG;IACH,uBAJW,OAAO,eAEN,OAAO,CA0BlB;IAED;;;OAGG;IACH,oBAIC;IAED;;;;;;;;OAQG;IACH,yBAJW,OAAO,eAEN,IAAI,CAWf;IAED;;;;;;;;OAQG;IACH,uBAJW,OAAO,eAEN,IAAI,CAWf;IAED;;;;;;OAMG;IACH,gBAFY,IAAI,CAUf;IAED;;;;;;OAMG;IACH,cAFY,IAAI,CAUf;IAED;;;;;;OAMG;IACH,eAFY,IAAI,CAWf;IAED;;;;;;OAMG;IACH,aAFY,IAAI,CAWf;IAED;;;;;;;OAOG;IACH,+BAJW,OAAO,sBASjB;IAED;;;;;;OAMG;IACH,6BAEC;IAED;;;;;;;;;;;;;OAaG;IACH,qDAuEC;IAED;;;;;;;;OAQG;IACH,yBAJW,OAAO,yBAmBjB;IAED;;;;;;;;;;;;;OAaG;IACH,uBAHW,OAAO,UAmCjB;IAED;;;;;OAKG;IACH,uBAFW,QAAQ,QA0BlB;IAED;;;;;;;OAOG;IACH,oBAHW,IAAI,GACH,QAAQ,CAMnB;IAED;;;;;OAKG;IACH,sBAHW,IAAI,GACH,QAAQ,CAMnB;IAED;;;;;OAKG;IACH,4BAWC;IAED;;;;;;OAMG;IACH,yBAJW,IAAI,MACJ,QAAQ,UAalB;IAED;;;;;;OAMG;IACH,oBAHW,QAAQ,GACP,IAAI,CAYf;IAED;;;;;OAKG;IACH,oBAOC;IAED;;;;OAIG;IACH,uBAQC;IAED;;;;OAIG;IACH,mBAgBC;IAED;;;OAGG;IACH,YAFY,IAAI,CAaf;IAED,mBASC;IAED;;;;;;;;;OASG;IACH,gIAoFC;IAED;;;;;OAKG;IACH,oCAoBC;IAED;;;;OAIG;IACH,qBAoBC;IAED;;;;;;;;;;;;;OAaG;IACH,cA2BC;CACF;qBAt3CoB,eAAe;qBACf,eAAe;qBAKf,eAAe"}
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
export default Timezone;
|
||||
/**
|
||||
* Timezone representation.
|
||||
*
|
||||
* @example
|
||||
* var vcalendar;
|
||||
* var timezoneComp = vcalendar.getFirstSubcomponent('vtimezone');
|
||||
* var tzid = timezoneComp.getFirstPropertyValue('tzid');
|
||||
*
|
||||
* var timezone = new ICAL.Timezone({
|
||||
* component: timezoneComp,
|
||||
* tzid
|
||||
* });
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class Timezone {
|
||||
static _compare_change_fn(a: any, b: any): 0 | 1 | -1;
|
||||
/**
|
||||
* Convert the date/time from one zone to the next.
|
||||
*
|
||||
* @param {Time} tt The time to convert
|
||||
* @param {Timezone} from_zone The source zone to convert from
|
||||
* @param {Timezone} to_zone The target zone to convert to
|
||||
* @return {Time} The converted date/time object
|
||||
*/
|
||||
static convert_time(tt: Time, from_zone: Timezone, to_zone: Timezone): Time;
|
||||
/**
|
||||
* Creates a new ICAL.Timezone instance from the passed data object.
|
||||
*
|
||||
* @param {Component|Object} aData options for class
|
||||
* @param {String|Component} aData.component
|
||||
* If aData is a simple object, then this member can be set to either a
|
||||
* string containing the component data, or an already parsed
|
||||
* ICAL.Component
|
||||
* @param {String} aData.tzid The timezone identifier
|
||||
* @param {String} aData.location The timezone locationw
|
||||
* @param {String} aData.tznames An alternative string representation of the
|
||||
* timezone
|
||||
* @param {Number} aData.latitude The latitude of the timezone
|
||||
* @param {Number} aData.longitude The longitude of the timezone
|
||||
*/
|
||||
static fromData(aData: Component | any): Timezone;
|
||||
/**
|
||||
* The instance describing the UTC timezone
|
||||
* @type {Timezone}
|
||||
* @constant
|
||||
* @instance
|
||||
*/
|
||||
static "__#2@#utcTimezone": Timezone;
|
||||
static get utcTimezone(): Timezone;
|
||||
/**
|
||||
* The instance describing the local timezone
|
||||
* @type {Timezone}
|
||||
* @constant
|
||||
* @instance
|
||||
*/
|
||||
static "__#2@#localTimezone": Timezone;
|
||||
static get localTimezone(): Timezone;
|
||||
/**
|
||||
* Adjust a timezone change object.
|
||||
* @private
|
||||
* @param {Object} change The timezone change object
|
||||
* @param {Number} days The extra amount of days
|
||||
* @param {Number} hours The extra amount of hours
|
||||
* @param {Number} minutes The extra amount of minutes
|
||||
* @param {Number} seconds The extra amount of seconds
|
||||
*/
|
||||
private static adjust_change;
|
||||
static _minimumExpansionYear: number;
|
||||
static EXTRA_COVERAGE: number;
|
||||
/**
|
||||
* Creates a new ICAL.Timezone instance, by passing in a tzid and component.
|
||||
*
|
||||
* @param {Component|Object} data options for class
|
||||
* @param {String|Component} data.component
|
||||
* If data is a simple object, then this member can be set to either a
|
||||
* string containing the component data, or an already parsed
|
||||
* ICAL.Component
|
||||
* @param {String} data.tzid The timezone identifier
|
||||
* @param {String} data.location The timezone locationw
|
||||
* @param {String} data.tznames An alternative string representation of the
|
||||
* timezone
|
||||
* @param {Number} data.latitude The latitude of the timezone
|
||||
* @param {Number} data.longitude The longitude of the timezone
|
||||
*/
|
||||
constructor(data: Component | any);
|
||||
wrappedJSObject: this;
|
||||
/**
|
||||
* Timezone identifier
|
||||
* @type {String}
|
||||
*/
|
||||
tzid: string;
|
||||
/**
|
||||
* Timezone location
|
||||
* @type {String}
|
||||
*/
|
||||
location: string;
|
||||
/**
|
||||
* Alternative timezone name, for the string representation
|
||||
* @type {String}
|
||||
*/
|
||||
tznames: string;
|
||||
/**
|
||||
* The primary latitude for the timezone.
|
||||
* @type {Number}
|
||||
*/
|
||||
latitude: number;
|
||||
/**
|
||||
* The primary longitude for the timezone.
|
||||
* @type {Number}
|
||||
*/
|
||||
longitude: number;
|
||||
/**
|
||||
* The vtimezone component for this timezone.
|
||||
* @type {Component}
|
||||
*/
|
||||
component: Component;
|
||||
/**
|
||||
* The year this timezone has been expanded to. All timezone transition
|
||||
* dates until this year are known and can be used for calculation
|
||||
*
|
||||
* @private
|
||||
* @type {Number}
|
||||
*/
|
||||
private expandedUntilYear;
|
||||
/**
|
||||
* The class identifier.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "icaltimezone"
|
||||
*/
|
||||
icalclass: string;
|
||||
/**
|
||||
* Sets up the current instance using members from the passed data object.
|
||||
*
|
||||
* @param {Component|Object} aData options for class
|
||||
* @param {String|Component} aData.component
|
||||
* If aData is a simple object, then this member can be set to either a
|
||||
* string containing the component data, or an already parsed
|
||||
* ICAL.Component
|
||||
* @param {String} aData.tzid The timezone identifier
|
||||
* @param {String} aData.location The timezone locationw
|
||||
* @param {String} aData.tznames An alternative string representation of the
|
||||
* timezone
|
||||
* @param {Number} aData.latitude The latitude of the timezone
|
||||
* @param {Number} aData.longitude The longitude of the timezone
|
||||
*/
|
||||
fromData(aData: Component | any): this;
|
||||
changes: any[];
|
||||
/**
|
||||
* Finds the utcOffset the given time would occur in this timezone.
|
||||
*
|
||||
* @param {Time} tt The time to check for
|
||||
* @return {Number} utc offset in seconds
|
||||
*/
|
||||
utcOffset(tt: Time): number;
|
||||
_findNearbyChange(change: any): number;
|
||||
_ensureCoverage(aYear: any): void;
|
||||
_expandComponent(aComponent: any, aYear: any, changes: any): any;
|
||||
/**
|
||||
* The string representation of this timezone.
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
import Component from "./component.js";
|
||||
import Time from "./time.js";
|
||||
//# sourceMappingURL=timezone.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../lib/ical/timezone.js"],"names":[],"mappings":";AAYA;;;;;;;;;;;;;;GAcG;AACH;IACE,sDAoBC;IAED;;;;;;;OAOG;IACH,wBALW,IAAI,aACJ,QAAQ,WACR,QAAQ,GACP,IAAI,CAkBf;IAED;;;;;;;;;;;;;;OAcG;IACH,uBAZW,SAAS,MAAO,YAe1B;IAED;;;;;OAKG;IACH,4BAJU,QAAQ,CAIS;IAC3B,mCAOC;IAED;;;;;OAKG;IACH,8BAJU,QAAQ,CAIW;IAC7B,qCAOC;IAED;;;;;;;;OAQG;IACH,6BASC;IAED,qCAAkC;IAClC,8BAA0B;IAE1B;;;;;;;;;;;;;;OAcG;IACH,kBAZW,SAAS,MAAO,EAe1B;IAFC,sBAA2B;IAK7B;;;OAGG;IACH,aAAU;IAEV;;;OAGG;IACH,iBAAc;IAEd;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,iBAAe;IAEf;;;OAGG;IACH,kBAAgB;IAEhB;;;OAGG;IACH,WAFU,SAAS,CAEF;IAEjB;;;;;;OAMG;IACH,0BAAsB;IAEtB;;;;;OAKG;IACH,kBAA2B;IAE3B;;;;;;;;;;;;;;OAcG;IACH,gBAZW,SAAS,MAAO,QAkD1B;IApCC,eAAiB;IAsCnB;;;;;OAKG;IACH,cAHW,IAAI,UAiFd;IAED,uCAaC;IAED,kCA2BC;IAED,iEAyGC;IAED;;;OAGG;IACH,mBAEC;CACF;sBAtgBqB,gBAAgB;iBADrB,WAAW"}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
export default TimezoneService;
|
||||
declare namespace TimezoneService {
|
||||
const count: number;
|
||||
function reset(): void;
|
||||
function _hard_reset(): void;
|
||||
function has(tzid: string): boolean;
|
||||
function get(tzid: string): Timezone;
|
||||
function register(timezone: Timezone | Component, name?: string): void;
|
||||
function remove(tzid: string): Timezone;
|
||||
}
|
||||
import Timezone from "./timezone.js";
|
||||
import Component from "./component.js";
|
||||
//# sourceMappingURL=timezone_service.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timezone_service.d.ts","sourceRoot":"","sources":["../../lib/ical/timezone_service.js"],"names":[],"mappings":";;;IA8BS,uBAON;IACY,6BAEZ;IAQI,oCAMJ;IAQI,qCAMJ;IAYS,uEA+BT;IAQO,wCAMP;;qBAxHkB,eAAe;sBAGd,gBAAgB"}
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
/**
|
||||
* The weekday, 1 = SUNDAY, 7 = SATURDAY. Access via
|
||||
* ICAL.Time.MONDAY, ICAL.Time.TUESDAY, ...
|
||||
*
|
||||
* @typedef {Number} weekDay
|
||||
* @memberof ICAL.Time
|
||||
*/
|
||||
/**
|
||||
* @typedef {Object} timeInit Time initialization
|
||||
* @property {Number=} year The year for this date
|
||||
* @property {Number=} month The month for this date
|
||||
* @property {Number=} day The day for this date
|
||||
* @property {Number=} hour The hour for this date
|
||||
* @property {Number=} minute The minute for this date
|
||||
* @property {Number=} second The second for this date
|
||||
* @property {Boolean=} isDate If true, the instance represents a date
|
||||
* (as opposed to a date-time)
|
||||
* @property {String=} timezone Timezone id if zone is unknown [internal]
|
||||
* @property {Timezone=} zone Resolved timezone object [internal]
|
||||
* @memberof ICAL.Time
|
||||
*/
|
||||
/**
|
||||
* Possible frequency values for the FREQ part
|
||||
* (YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLY)
|
||||
*
|
||||
* @typedef {String} frequencyValues
|
||||
* @memberof ICAL.Recur
|
||||
*/
|
||||
/**
|
||||
* This object is returned by {@link ICAL.Event#getOccurrenceDetails getOccurrenceDetails}
|
||||
* @memberof ICAL.Event
|
||||
* @typedef {Object} occurrenceDetails
|
||||
* @property {Time} recurrenceId The passed in recurrence id
|
||||
* @property {Event} item The occurrence
|
||||
* @property {Time} startDate The start of the occurrence
|
||||
* @property {Time} endDate The end of the occurrence
|
||||
*/
|
||||
/**
|
||||
* The state for parsing content lines from an iCalendar/vCard string.
|
||||
*
|
||||
* @private
|
||||
* @memberof ICAL.parse
|
||||
* @typedef {Object} parserState
|
||||
* @property {designSet} designSet The design set to use for parsing
|
||||
* @property {Component[]} stack The stack of components being processed
|
||||
* @property {Component} component The currently active component
|
||||
*/
|
||||
/**
|
||||
* A jCal component.
|
||||
*
|
||||
* TODO: Properly typedef this when https://github.com/hegemonic/catharsis/pull/70
|
||||
* is merged. Documentation is ignored until this can be documented properly.
|
||||
*
|
||||
* @example
|
||||
* ["vevent", [...properties here...], [...components here...] ]
|
||||
*
|
||||
* @ignore
|
||||
* @typedef {Array} jCalComponent
|
||||
* @property {String} 0 The component name
|
||||
* @property {jCalProperty[]} 1 The properties of this component
|
||||
* @property {jCalComponent[]} 2 The subcomponents of this component
|
||||
*/
|
||||
/**
|
||||
* A designSet describes value, parameter and property data. It is used by
|
||||
* ther parser and stringifier in components and properties to determine they
|
||||
* should be represented.
|
||||
*
|
||||
* @memberof ICAL.design
|
||||
* @typedef {Object} designSet
|
||||
* @property {Object} value Definitions for value types, keys are type names
|
||||
* @property {Object} param Definitions for params, keys are param names
|
||||
* @property {Object} property Definitions for properties, keys are property names
|
||||
* @property {boolean} propertyGroups If content lines may include a group name
|
||||
*/
|
||||
/**
|
||||
* The jCal Geo type. This is a tuple representing a geographical location.
|
||||
* The first element is the Latitude and the second element is the Longitude.
|
||||
*
|
||||
* TODO: Properly typedef this when https://github.com/hegemonic/catharsis/pull/70
|
||||
*
|
||||
* @typedef {Array} Geo
|
||||
* @property {Number} 0 Latitude
|
||||
* @property {Number} 1 Longitude
|
||||
*/
|
||||
export const _: {};
|
||||
/**
|
||||
* The weekday, 1 = SUNDAY, 7 = SATURDAY. Access via
|
||||
* ICAL.Time.MONDAY, ICAL.Time.TUESDAY, ...
|
||||
*/
|
||||
export type weekDay = number;
|
||||
/**
|
||||
* Time initialization
|
||||
*/
|
||||
export type timeInit = {
|
||||
/**
|
||||
* The year for this date
|
||||
*/
|
||||
year?: number | undefined;
|
||||
/**
|
||||
* The month for this date
|
||||
*/
|
||||
month?: number | undefined;
|
||||
/**
|
||||
* The day for this date
|
||||
*/
|
||||
day?: number | undefined;
|
||||
/**
|
||||
* The hour for this date
|
||||
*/
|
||||
hour?: number | undefined;
|
||||
/**
|
||||
* The minute for this date
|
||||
*/
|
||||
minute?: number | undefined;
|
||||
/**
|
||||
* The second for this date
|
||||
*/
|
||||
second?: number | undefined;
|
||||
/**
|
||||
* If true, the instance represents a date
|
||||
* (as opposed to a date-time)
|
||||
*/
|
||||
isDate?: boolean | undefined;
|
||||
/**
|
||||
* Timezone id if zone is unknown [internal]
|
||||
*/
|
||||
timezone?: string | undefined;
|
||||
/**
|
||||
* Resolved timezone object [internal]
|
||||
*/
|
||||
zone?: Timezone | undefined;
|
||||
};
|
||||
/**
|
||||
* Possible frequency values for the FREQ part
|
||||
* (YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLY)
|
||||
*/
|
||||
export type frequencyValues = string;
|
||||
/**
|
||||
* This object is returned by {@link ICAL.EventgetOccurrenceDetails getOccurrenceDetails}
|
||||
*/
|
||||
export type occurrenceDetails = {
|
||||
/**
|
||||
* The passed in recurrence id
|
||||
*/
|
||||
recurrenceId: Time;
|
||||
/**
|
||||
* The occurrence
|
||||
*/
|
||||
item: Event;
|
||||
/**
|
||||
* The start of the occurrence
|
||||
*/
|
||||
startDate: Time;
|
||||
/**
|
||||
* The end of the occurrence
|
||||
*/
|
||||
endDate: Time;
|
||||
};
|
||||
/**
|
||||
* The state for parsing content lines from an iCalendar/vCard string.
|
||||
*/
|
||||
export type parserState = {
|
||||
/**
|
||||
* The design set to use for parsing
|
||||
*/
|
||||
designSet: designSet;
|
||||
/**
|
||||
* The stack of components being processed
|
||||
*/
|
||||
stack: Component[];
|
||||
/**
|
||||
* The currently active component
|
||||
*/
|
||||
component: Component;
|
||||
};
|
||||
/**
|
||||
* A jCal component.
|
||||
*
|
||||
* TODO: Properly typedef this when https://github.com/hegemonic/catharsis/pull/70
|
||||
* is merged. Documentation is ignored until this can be documented properly.
|
||||
*/
|
||||
export type jCalComponent = any[];
|
||||
/**
|
||||
* A designSet describes value, parameter and property data. It is used by
|
||||
* ther parser and stringifier in components and properties to determine they
|
||||
* should be represented.
|
||||
*/
|
||||
export type designSet = {
|
||||
/**
|
||||
* Definitions for value types, keys are type names
|
||||
*/
|
||||
value: any;
|
||||
/**
|
||||
* Definitions for params, keys are param names
|
||||
*/
|
||||
param: any;
|
||||
/**
|
||||
* Definitions for properties, keys are property names
|
||||
*/
|
||||
property: any;
|
||||
/**
|
||||
* If content lines may include a group name
|
||||
*/
|
||||
propertyGroups: boolean;
|
||||
};
|
||||
/**
|
||||
* The jCal Geo type. This is a tuple representing a geographical location.
|
||||
* The first element is the Latitude and the second element is the Longitude.
|
||||
*
|
||||
* TODO: Properly typedef this when https://github.com/hegemonic/catharsis/pull/70
|
||||
*/
|
||||
export type Geo = any[];
|
||||
import Timezone from "./timezone";
|
||||
import Time from "./time";
|
||||
import Event from "./event";
|
||||
import Component from "./component";
|
||||
//# sourceMappingURL=types.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/ical/types.js"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;;;GASG;AAEH,mBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAzEN,QAAQ;;;;;;;;;;;;;;kBAgBR,IAAI;;;;UACJ,KAAK;;;;eACL,IAAI;;;;aACJ,IAAI;;;;;;;;;eASJ,SAAS;;;;WACT,SAAS,EAAE;;;;eACX,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA6BT,OAAO;;;;;;;;;qBAhFA,YAAY;iBADhB,QAAQ;kBADP,SAAS;sBADL,aAAa"}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
export default UtcOffset;
|
||||
/**
|
||||
* This class represents the "utc-offset" value type, with various calculation and manipulation
|
||||
* methods.
|
||||
*
|
||||
* @memberof ICAL
|
||||
*/
|
||||
declare class UtcOffset {
|
||||
/**
|
||||
* Creates a new {@link ICAL.UtcOffset} instance from the passed string.
|
||||
*
|
||||
* @param {String} aString The string to parse
|
||||
* @return {Duration} The created utc-offset instance
|
||||
*/
|
||||
static fromString(aString: string): Duration;
|
||||
/**
|
||||
* Creates a new {@link ICAL.UtcOffset} instance from the passed seconds
|
||||
* value.
|
||||
*
|
||||
* @param {Number} aSeconds The number of seconds to convert
|
||||
*/
|
||||
static fromSeconds(aSeconds: number): UtcOffset;
|
||||
/**
|
||||
* Creates a new ICAL.UtcOffset instance.
|
||||
*
|
||||
* @param {Object} aData An object with members of the utc offset
|
||||
* @param {Number=} aData.hours The hours for the utc offset
|
||||
* @param {Number=} aData.minutes The minutes in the utc offset
|
||||
* @param {Number=} aData.factor The factor for the utc-offset, either -1 or 1
|
||||
*/
|
||||
constructor(aData: {
|
||||
hours?: number | undefined;
|
||||
minutes?: number | undefined;
|
||||
factor?: number | undefined;
|
||||
});
|
||||
/**
|
||||
* The hours in the utc-offset
|
||||
* @type {Number}
|
||||
*/
|
||||
hours: number;
|
||||
/**
|
||||
* The minutes in the utc-offset
|
||||
* @type {Number}
|
||||
*/
|
||||
minutes: number;
|
||||
/**
|
||||
* The sign of the utc offset, 1 for positive offset, -1 for negative
|
||||
* offsets.
|
||||
* @type {Number}
|
||||
*/
|
||||
factor: number;
|
||||
/**
|
||||
* The type name, to be used in the jCal object.
|
||||
* @constant
|
||||
* @type {String}
|
||||
* @default "utc-offset"
|
||||
*/
|
||||
icaltype: string;
|
||||
/**
|
||||
* Returns a clone of the utc offset object.
|
||||
*
|
||||
* @return {UtcOffset} The cloned object
|
||||
*/
|
||||
clone(): UtcOffset;
|
||||
/**
|
||||
* Sets up the current instance using members from the passed data object.
|
||||
*
|
||||
* @param {Object} aData An object with members of the utc offset
|
||||
* @param {Number=} aData.hours The hours for the utc offset
|
||||
* @param {Number=} aData.minutes The minutes in the utc offset
|
||||
* @param {Number=} aData.factor The factor for the utc-offset, either -1 or 1
|
||||
*/
|
||||
fromData(aData: {
|
||||
hours?: number | undefined;
|
||||
minutes?: number | undefined;
|
||||
factor?: number | undefined;
|
||||
}): void;
|
||||
/**
|
||||
* Sets up the current instance from the given seconds value. The seconds
|
||||
* value is truncated to the minute. Offsets are wrapped when the world
|
||||
* ends, the hour after UTC+14:00 is UTC-12:00.
|
||||
*
|
||||
* @param {Number} aSeconds The seconds to convert into an offset
|
||||
*/
|
||||
fromSeconds(aSeconds: number): this;
|
||||
/**
|
||||
* Convert the current offset to a value in seconds
|
||||
*
|
||||
* @return {Number} The offset in seconds
|
||||
*/
|
||||
toSeconds(): number;
|
||||
/**
|
||||
* Compare this utc offset with another one.
|
||||
*
|
||||
* @param {UtcOffset} other The other offset to compare with
|
||||
* @return {Number} -1, 0 or 1 for less/equal/greater
|
||||
*/
|
||||
compare(other: UtcOffset): number;
|
||||
_normalize(): void;
|
||||
/**
|
||||
* The iCalendar string representation of this utc-offset.
|
||||
* @return {String}
|
||||
*/
|
||||
toICALString(): string;
|
||||
/**
|
||||
* The string representation of this utc-offset.
|
||||
* @return {String}
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
import Duration from "./duration.js";
|
||||
//# sourceMappingURL=utc_offset.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utc_offset.d.ts","sourceRoot":"","sources":["../../lib/ical/utc_offset.js"],"names":[],"mappings":";AAWA;;;;;GAKG;AACH;IACE;;;;;OAKG;IACH,oCAFY,QAAQ,CAWnB;IAED;;;;;OAKG;IACH,gDAIC;IAED;;;;;;;OAOG;IACH;QAJ0B,KAAK;QACL,OAAO;QACP,MAAM;OAI/B;IAED;;;OAGG;IACH,cAAU;IAEV;;;OAGG;IACH,gBAAY;IAEZ;;;;OAIG;IACH,eAAW;IAEX;;;;;OAKG;IACH,iBAAwB;IAExB;;;;OAIG;IACH,SAFY,SAAS,CAIpB;IAED;;;;;;;OAOG;IACH;QAJ0B,KAAK;QACL,OAAO;QACP,MAAM;aAS/B;IAED;;;;;;OAMG;IACH,oCASC;IAED;;;;OAIG;IACH,oBAEC;IAED;;;;;OAKG;IACH,eAHW,SAAS,UAOnB;IAED,mBAiBC;IAED;;;OAGG;IACH,uBAEC;IAED;;;OAGG;IACH,mBAEC;CACF;qBAjLoB,eAAe"}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
export default VCardTime;
|
||||
/**
|
||||
* Describes a vCard time, which has slight differences to the ICAL.Time.
|
||||
* Properties can be null if not specified, for example for dates with
|
||||
* reduced accuracy or truncation.
|
||||
*
|
||||
* Note that currently not all methods are correctly re-implemented for
|
||||
* VCardTime. For example, comparison will have undefined results when some
|
||||
* members are null.
|
||||
*
|
||||
* Also, normalization is not yet implemented for this class!
|
||||
*
|
||||
* @memberof ICAL
|
||||
* @extends {Time}
|
||||
*/
|
||||
declare class VCardTime extends Time {
|
||||
/**
|
||||
* Returns a new ICAL.VCardTime instance from a date and/or time string.
|
||||
*
|
||||
* @param {String} aValue The string to create from
|
||||
* @param {String} aIcalType The type for this instance, e.g. date-and-or-time
|
||||
* @return {VCardTime} The date/time instance
|
||||
*/
|
||||
static fromDateAndOrTimeString(aValue: string, aIcalType: string): VCardTime;
|
||||
/**
|
||||
* Creates a new ICAL.VCardTime instance.
|
||||
*
|
||||
* @param {Object} data The data for the time instance
|
||||
* @param {Number=} data.year The year for this date
|
||||
* @param {Number=} data.month The month for this date
|
||||
* @param {Number=} data.day The day for this date
|
||||
* @param {Number=} data.hour The hour for this date
|
||||
* @param {Number=} data.minute The minute for this date
|
||||
* @param {Number=} data.second The second for this date
|
||||
* @param {Timezone|UtcOffset} zone The timezone to use
|
||||
* @param {String} icaltype The type for this date/time object
|
||||
*/
|
||||
constructor(data: {
|
||||
year?: number | undefined;
|
||||
month?: number | undefined;
|
||||
day?: number | undefined;
|
||||
hour?: number | undefined;
|
||||
minute?: number | undefined;
|
||||
second?: number | undefined;
|
||||
}, zone: Timezone | UtcOffset, icaltype: string);
|
||||
/**
|
||||
* The type name, to be used in the jCal object.
|
||||
* @type {String}
|
||||
* @default "date-and-or-time"
|
||||
*/
|
||||
icaltype: string;
|
||||
/**
|
||||
* Returns a clone of the vcard date/time object.
|
||||
*
|
||||
* @return {VCardTime} The cloned object
|
||||
*/
|
||||
clone(): VCardTime;
|
||||
_normalize(): this;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
utcOffset(...args: any[]): any;
|
||||
}
|
||||
import Time from "./time.js";
|
||||
import Timezone from "./timezone.js";
|
||||
import UtcOffset from "./utc_offset.js";
|
||||
//# sourceMappingURL=vcard_time.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"vcard_time.d.ts","sourceRoot":"","sources":["../../lib/ical/vcard_time.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;;;GAaG;AACH;IACE;;;;;;OAMG;IACH,mEAFY,SAAS,CAoCpB;IAGD;;;;;;;;;;;;OAYG;IACH;QATyB,IAAI;QACJ,KAAK;QACL,GAAG;QACH,IAAI;QACJ,MAAM;QACN,MAAM;aACpB,QAAQ,GAAC,SAAS,oBAM5B;IAUD;;;;OAIG;IACH,iBAA8B;IAE9B;;;;OAIG;IACH,SAFY,SAAS,CAIpB;IAED,mBAEC;IAED;;OAEG;IACH,+BAMC;CAwDF;iBA/KgB,WAAW;qBACP,eAAe;sBAFd,iBAAiB"}
|
||||
Reference in New Issue
Block a user