@hebcal/rest-api 6.5.1 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/esm/classic-rest-api.d.ts +55 -4
- package/dist/esm/classic-rest-api.js +28 -14
- package/dist/esm/classic-rest-api.js.map +1 -1
- package/dist/esm/common.d.ts +80 -19
- package/dist/esm/common.js +31 -28
- package/dist/esm/common.js.map +1 -1
- package/dist/esm/countryNames.json.d.ts +2 -0
- package/dist/esm/countryNames.json.js +3 -5
- package/dist/esm/countryNames.json.js.map +1 -1
- package/dist/esm/csv.d.ts +15 -2
- package/dist/esm/csv.js +18 -9
- package/dist/esm/csv.js.map +1 -1
- package/dist/esm/en.po.d.ts +81 -0
- package/dist/esm/en.po.js +3 -5
- package/dist/esm/en.po.js.map +1 -1
- package/dist/esm/he.po.d.ts +78 -0
- package/dist/esm/he.po.js +3 -5
- package/dist/esm/he.po.js.map +1 -1
- package/dist/esm/holiday.d.ts +7 -0
- package/dist/esm/holiday.js +9 -6
- package/dist/esm/holiday.js.map +1 -1
- package/dist/esm/index.d.ts +7 -10
- package/dist/esm/index.js +6 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/location.d.ts +28 -3
- package/dist/esm/location.js +13 -8
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/makeAnchor.js +2 -5
- package/dist/esm/makeAnchor.js.map +1 -1
- package/dist/esm/url.d.ts +24 -1
- package/dist/esm/url.js +27 -8
- package/dist/esm/url.js.map +1 -1
- package/package.json +18 -22
- package/dist/bundle.js +0 -921
- package/dist/bundle.min.js +0 -2
- package/dist/esm/fullcalendar.d.ts +0 -15
- package/dist/esm/fullcalendar.js +0 -64
- package/dist/esm/fullcalendar.js.map +0 -1
- package/dist/esm/memo.d.ts +0 -6
- package/dist/esm/memo.js +0 -65
- package/dist/esm/memo.js.map +0 -1
- package/dist/esm/rss.d.ts +0 -4
- package/dist/esm/rss.js +0 -149
- package/dist/esm/rss.js.map +0 -1
- package/dist/fullcalendar.js +0 -314
- package/dist/fullcalendar.min.js +0 -2
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# @hebcal/rest-api
|
|
2
|
-
Jewish holidays and Hebrew calendar as plain JSON objects
|
|
2
|
+
Jewish holidays and Hebrew calendar as plain JSON objects and CSV export
|
|
3
3
|
|
|
4
4
|
[](https://github.com/hebcal/hebcal-rest-api/actions/workflows/node.js.yml)
|
|
5
5
|
|
|
@@ -1,19 +1,34 @@
|
|
|
1
1
|
import { Event } from '@hebcal/core/dist/esm/event';
|
|
2
2
|
import { TachanunResult } from '@hebcal/core/dist/esm/tachanun';
|
|
3
3
|
import { StringMap } from '@hebcal/leyning/dist/esm/types';
|
|
4
|
-
import { RestApiOptions } from './common';
|
|
5
|
-
import type { LocationPlainObj } from './location';
|
|
4
|
+
import { RestApiOptions } from './common.js';
|
|
5
|
+
import type { LocationPlainObj } from './location.js';
|
|
6
|
+
/**
|
|
7
|
+
* A single event as rendered for the classic Hebcal.com JSON API, as
|
|
8
|
+
* produced by `eventToClassicApiObject()`
|
|
9
|
+
*/
|
|
6
10
|
export type ClassicApiItem = {
|
|
11
|
+
/** rendered event title, e.g. `'Rosh Hashana'` or `'Candle lighting: 7:14pm'` */
|
|
7
12
|
title: string;
|
|
13
|
+
/** ISO 8601 date (or date+time, for timed events) */
|
|
8
14
|
date: string;
|
|
15
|
+
/** Hebrew date rendered as a string, omitted for timed events */
|
|
9
16
|
hdate?: string;
|
|
17
|
+
/** category, e.g. `'holiday'`, `'roshchodesh'`, `'candles'` (see `getEventCategories()`) */
|
|
10
18
|
category: string;
|
|
19
|
+
/** subcategory, e.g. `'major'`, `'minor'` */
|
|
11
20
|
subcat?: string;
|
|
21
|
+
/** `true` if this is a Yom Tov holiday */
|
|
12
22
|
yomtov?: boolean;
|
|
23
|
+
/** original (non-brief) event description, present when it differs from `title` */
|
|
13
24
|
title_orig?: string;
|
|
25
|
+
/** Hebrew rendering of the title (`he-x-NoNikud` locale, no vowel points) */
|
|
14
26
|
hebrew?: string;
|
|
27
|
+
/** Torah/Haftarah readings, when applicable */
|
|
15
28
|
leyning?: StringMap;
|
|
29
|
+
/** URL with tracking parameters appended, for events that have one (see `appendIsraelAndTracking()`) */
|
|
16
30
|
link?: string;
|
|
31
|
+
/** Sefirat HaOmer count details, present only for Omer-count events */
|
|
17
32
|
omer?: {
|
|
18
33
|
count: {
|
|
19
34
|
he: string;
|
|
@@ -28,6 +43,7 @@ export type ClassicApiItem = {
|
|
|
28
43
|
lamnatzeachWord: string;
|
|
29
44
|
lamnatzeachLetter: string;
|
|
30
45
|
};
|
|
46
|
+
/** Molad (new moon) details, present only for Molad announcement events */
|
|
31
47
|
molad?: {
|
|
32
48
|
hy: number;
|
|
33
49
|
hm: string;
|
|
@@ -37,32 +53,67 @@ export type ClassicApiItem = {
|
|
|
37
53
|
chalakim: number;
|
|
38
54
|
instant: string;
|
|
39
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Hebrew date broken into gematriya-rendered parts, present when
|
|
58
|
+
* `RestApiEventOptions.heDateParts` is set (or the event itself is a
|
|
59
|
+
* Hebrew-date event)
|
|
60
|
+
*/
|
|
40
61
|
heDateParts?: {
|
|
41
62
|
y: string;
|
|
42
63
|
m: string;
|
|
43
64
|
d: string;
|
|
44
65
|
};
|
|
66
|
+
/** holiday description or linked-event text, when available */
|
|
45
67
|
memo?: string;
|
|
68
|
+
/** the underlying `Event` object, present only when `RestApiEventOptions.includeEvent` is set */
|
|
46
69
|
ev?: Event;
|
|
47
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* The classic Hebcal.com JSON API response envelope, as produced by
|
|
73
|
+
* `eventsToClassicApiHeader()` and `eventsToClassicApi()`
|
|
74
|
+
*/
|
|
48
75
|
export type ClassicApiResult = {
|
|
76
|
+
/** calendar title, see `getCalendarTitle()` */
|
|
49
77
|
title: string;
|
|
78
|
+
/** ISO 8601 timestamp of when this response was generated */
|
|
50
79
|
date: string;
|
|
80
|
+
/** `@hebcal/core` package version */
|
|
51
81
|
version: string;
|
|
52
82
|
location: LocationPlainObj;
|
|
83
|
+
/** whether Tachanun is recited, present when `RestApiEventOptions.tachanun` is set and the range is a single day */
|
|
53
84
|
tachanun?: TachanunResult;
|
|
85
|
+
/** ISO 8601 start/end dates spanned by `items` */
|
|
54
86
|
range?: {
|
|
55
87
|
start: string;
|
|
56
88
|
end: string;
|
|
57
89
|
};
|
|
90
|
+
/** the events, present when generated via `eventsToClassicApi()` */
|
|
58
91
|
items?: ClassicApiItem[];
|
|
59
92
|
};
|
|
60
93
|
/**
|
|
61
|
-
* Formats a list events for the classic Hebcal.com JSON API response
|
|
94
|
+
* Formats a list of events for the classic Hebcal.com JSON API response,
|
|
95
|
+
* including both the header fields and the `items` array.
|
|
96
|
+
* @param events - the events to render
|
|
97
|
+
* @param options - controls title, location, tracking, and per-item rendering
|
|
98
|
+
* @param leyning - `false` to omit Torah/Haftarah readings from each item
|
|
99
|
+
* @returns the full classic API response object
|
|
62
100
|
*/
|
|
63
101
|
export declare function eventsToClassicApi(events: Event[], options: RestApiOptions, leyning?: boolean): ClassicApiResult;
|
|
102
|
+
/**
|
|
103
|
+
* Builds just the header fields (title, date, version, location, range,
|
|
104
|
+
* tachanun) of the classic Hebcal.com JSON API response, without the
|
|
105
|
+
* `items` array.
|
|
106
|
+
* @param events - the events used to determine title and date range
|
|
107
|
+
* @param options - controls title, location, and tachanun rendering
|
|
108
|
+
* @returns the classic API response object, without `items`
|
|
109
|
+
*/
|
|
64
110
|
export declare function eventsToClassicApiHeader(events: Event[], options: RestApiOptions): ClassicApiResult;
|
|
65
111
|
/**
|
|
66
|
-
* Converts a Hebcal event to a classic Hebcal.com JSON API object
|
|
112
|
+
* Converts a single Hebcal event to a classic Hebcal.com JSON API object
|
|
113
|
+
* @param ev - the event to convert
|
|
114
|
+
* @param options - controls locale, tracking parameters, and which optional
|
|
115
|
+
* fields (`heDateParts`, `ev`) are included
|
|
116
|
+
* @param leyning - `false` to omit Torah/Haftarah readings
|
|
117
|
+
* @returns the rendered API item
|
|
67
118
|
*/
|
|
68
119
|
export declare function eventToClassicApiObject(ev: Event, options: RestApiOptions, leyning?: boolean): ClassicApiItem;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { isoDateString, HDate, gematriya } from '@hebcal/hdate';
|
|
1
|
+
import { HDate, gematriya, isoDateString } from '@hebcal/hdate';
|
|
3
2
|
import { Zmanim } from '@hebcal/core/dist/esm/zmanim';
|
|
4
3
|
import { flags } from '@hebcal/core/dist/esm/event';
|
|
5
4
|
import { version } from '@hebcal/core/dist/esm/pkgVersion';
|
|
@@ -10,24 +9,36 @@ import { formatAliyahWithBook } from '@hebcal/leyning/dist/esm/common';
|
|
|
10
9
|
import { getLeyningForParshaHaShavua } from '@hebcal/leyning/dist/esm/leyning';
|
|
11
10
|
import { makeSummaryFromParts } from '@hebcal/leyning/dist/esm/summary';
|
|
12
11
|
import { getLeyningForHoliday } from '@hebcal/leyning/dist/esm/getLeyningForHoliday';
|
|
13
|
-
import { getEventCategories, shouldRenderBrief,
|
|
12
|
+
import { getCalendarTitle, getEventCategories, shouldRenderBrief, } from './common.js';
|
|
14
13
|
import { appendIsraelAndTracking } from './url.js';
|
|
15
14
|
import { locationToPlainObj } from './location.js';
|
|
16
15
|
import { getHolidayDescription } from './holiday.js';
|
|
17
|
-
import { holidayDesc } from '@hebcal/core/dist/esm/staticHolidays';
|
|
18
|
-
|
|
16
|
+
import { holidayDesc as hdesc } from '@hebcal/core/dist/esm/staticHolidays';
|
|
19
17
|
function eventIsoDate(ev) {
|
|
20
18
|
return isoDateString(ev.greg());
|
|
21
19
|
}
|
|
22
20
|
/**
|
|
23
|
-
* Formats a list events for the classic Hebcal.com JSON API response
|
|
21
|
+
* Formats a list of events for the classic Hebcal.com JSON API response,
|
|
22
|
+
* including both the header fields and the `items` array.
|
|
23
|
+
* @param events - the events to render
|
|
24
|
+
* @param options - controls title, location, tracking, and per-item rendering
|
|
25
|
+
* @param leyning - `false` to omit Torah/Haftarah readings from each item
|
|
26
|
+
* @returns the full classic API response object
|
|
24
27
|
*/
|
|
25
|
-
function eventsToClassicApi(events, options, leyning = true) {
|
|
28
|
+
export function eventsToClassicApi(events, options, leyning = true) {
|
|
26
29
|
const result = eventsToClassicApiHeader(events, options);
|
|
27
30
|
result.items = events.map(ev => eventToClassicApiObject(ev, options, leyning));
|
|
28
31
|
return result;
|
|
29
32
|
}
|
|
30
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Builds just the header fields (title, date, version, location, range,
|
|
35
|
+
* tachanun) of the classic Hebcal.com JSON API response, without the
|
|
36
|
+
* `items` array.
|
|
37
|
+
* @param events - the events used to determine title and date range
|
|
38
|
+
* @param options - controls title, location, and tachanun rendering
|
|
39
|
+
* @returns the classic API response object, without `items`
|
|
40
|
+
*/
|
|
41
|
+
export function eventsToClassicApiHeader(events, options) {
|
|
31
42
|
const result = {
|
|
32
43
|
title: getCalendarTitle(events, options),
|
|
33
44
|
date: new Date().toISOString(),
|
|
@@ -46,9 +57,14 @@ function eventsToClassicApiHeader(events, options) {
|
|
|
46
57
|
return result;
|
|
47
58
|
}
|
|
48
59
|
/**
|
|
49
|
-
* Converts a Hebcal event to a classic Hebcal.com JSON API object
|
|
60
|
+
* Converts a single Hebcal event to a classic Hebcal.com JSON API object
|
|
61
|
+
* @param ev - the event to convert
|
|
62
|
+
* @param options - controls locale, tracking parameters, and which optional
|
|
63
|
+
* fields (`heDateParts`, `ev`) are included
|
|
64
|
+
* @param leyning - `false` to omit Torah/Haftarah readings
|
|
65
|
+
* @returns the rendered API item
|
|
50
66
|
*/
|
|
51
|
-
function eventToClassicApiObject(ev, options, leyning = true) {
|
|
67
|
+
export function eventToClassicApiObject(ev, options, leyning = true) {
|
|
52
68
|
const timedEv = ev;
|
|
53
69
|
const eventTime = timedEv.eventTime;
|
|
54
70
|
const timed = Boolean(eventTime);
|
|
@@ -64,7 +80,7 @@ function eventToClassicApiObject(ev, options, leyning = true) {
|
|
|
64
80
|
? ev.renderBrief(options.locale)
|
|
65
81
|
: ev.render(options.locale);
|
|
66
82
|
const desc = ev.getDesc();
|
|
67
|
-
const candles = desc ===
|
|
83
|
+
const candles = desc === hdesc.HAVDALAH || desc === hdesc.CANDLE_LIGHTING;
|
|
68
84
|
if (candles) {
|
|
69
85
|
const time = reformatTimeStr(timedEv.eventTimeStr, 'pm', options);
|
|
70
86
|
title += ': ' + time;
|
|
@@ -218,6 +234,4 @@ function formatLeyningResult(reading) {
|
|
|
218
234
|
}
|
|
219
235
|
return result;
|
|
220
236
|
}
|
|
221
|
-
|
|
222
|
-
export { eventToClassicApiObject, eventsToClassicApi, eventsToClassicApiHeader };
|
|
223
|
-
//# sourceMappingURL=classic-rest-api.js.map
|
|
237
|
+
//# sourceMappingURL=classic-rest-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classic-rest-api.js","sources":["
|
|
1
|
+
{"version":3,"file":"classic-rest-api.js","sourceRoot":"","sources":["../../src/classic-rest-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAQ,KAAK,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AAKpD,OAAO,EAAC,eAAe,EAAC,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,gCAAgC,CAAC;AAExD,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,2BAA2B,EAAC,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAA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oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACvB,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,50 +1,111 @@
|
|
|
1
1
|
import { Event } from '@hebcal/core/dist/esm/event';
|
|
2
2
|
import { CalOptions } from '@hebcal/core/dist/esm/CalOptions';
|
|
3
|
+
/**
|
|
4
|
+
* A simple string-to-string dictionary
|
|
5
|
+
*/
|
|
3
6
|
export type StringMap = Record<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Options specific to rendering events for the REST API, as opposed to
|
|
9
|
+
* options in `CalOptions` that control which events are generated
|
|
10
|
+
*/
|
|
4
11
|
export type RestApiEventOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* value for the `utm_source` (or hebcal.com-internal `us`) tracking
|
|
14
|
+
* parameter appended to event links
|
|
15
|
+
*/
|
|
5
16
|
utmSource?: string;
|
|
17
|
+
/**
|
|
18
|
+
* value for the `utm_medium` (or hebcal.com-internal `um`) tracking
|
|
19
|
+
* parameter appended to event links (default `'api'`)
|
|
20
|
+
*/
|
|
6
21
|
utmMedium?: string;
|
|
22
|
+
/**
|
|
23
|
+
* value for the `utm_campaign` (or hebcal.com-internal `uc`) tracking
|
|
24
|
+
* parameter appended to event links
|
|
25
|
+
*/
|
|
7
26
|
utmCampaign?: string;
|
|
27
|
+
/**
|
|
28
|
+
* include a `tachanun` field in the classic API response describing
|
|
29
|
+
* whether Tachanun is recited (only applies when the result covers a
|
|
30
|
+
* single day)
|
|
31
|
+
*/
|
|
8
32
|
tachanun?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* append the Hebrew rendering of the event title to the CSV subject line
|
|
35
|
+
*/
|
|
9
36
|
appendHebrewToSubject?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* `true` if this calendar is a Yahrzeit/Anniversary calendar; changes the
|
|
39
|
+
* generated calendar title
|
|
40
|
+
*/
|
|
10
41
|
yahrzeit?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* `true`, `'1'`, or `1` marks this calendar as a recurring subscription
|
|
44
|
+
* (e.g. a webcal feed); suppresses the year from the generated calendar
|
|
45
|
+
* title since the feed is perpetually up to date
|
|
46
|
+
*/
|
|
11
47
|
subscribe?: string | number | boolean;
|
|
48
|
+
/**
|
|
49
|
+
* include a `heDateParts` field (Hebrew year/month/day rendered with
|
|
50
|
+
* `gematriya`) on each classic API event
|
|
51
|
+
*/
|
|
12
52
|
heDateParts?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* include the underlying `Event` object as the `ev` field on each
|
|
55
|
+
* classic API event
|
|
56
|
+
*/
|
|
13
57
|
includeEvent?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* render CSV dates as `DD/MM/YYYY` (European order) instead of the
|
|
60
|
+
* default `MM/DD/YYYY`
|
|
61
|
+
*/
|
|
14
62
|
euro?: boolean;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
selfUrl?: string;
|
|
20
|
-
buildDate?: Date;
|
|
21
|
-
lastBuildDate?: string;
|
|
22
|
-
evPubDate?: boolean;
|
|
23
|
-
lang?: string;
|
|
63
|
+
/**
|
|
64
|
+
* prefer a location's ASCII name over its short display name when
|
|
65
|
+
* generating a calendar title or download filename
|
|
66
|
+
*/
|
|
24
67
|
preferAsciiName?: boolean;
|
|
25
68
|
};
|
|
26
|
-
export type RestApiOptions = CalOptions & RestApiEventOptions;
|
|
27
|
-
export declare function getDownloadFilename(options: RestApiOptions): string;
|
|
28
69
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
70
|
+
* Combines `@hebcal/core`'s `CalOptions` (which control which events are
|
|
71
|
+
* generated) with `RestApiEventOptions` (which control how events are
|
|
72
|
+
* rendered by this package)
|
|
31
73
|
*/
|
|
32
|
-
export
|
|
74
|
+
export type RestApiOptions = CalOptions & RestApiEventOptions;
|
|
33
75
|
/**
|
|
34
|
-
*
|
|
76
|
+
* Generates a base filename (without extension) for a calendar download,
|
|
77
|
+
* incorporating the year, date range, and/or location as available.
|
|
78
|
+
* @param options - the year/date-range/location used to construct the
|
|
79
|
+
* filename; typically the same options passed to the calendar generator
|
|
80
|
+
* @returns a filename like `hebcal_2020` or `hebcal_1993_providence`
|
|
35
81
|
*/
|
|
36
|
-
export declare function
|
|
82
|
+
export declare function getDownloadFilename(options: RestApiOptions): string;
|
|
37
83
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
84
|
+
* Returns a category and subcategory name for an event, e.g.
|
|
85
|
+
* `['holiday', 'major']` or `['roshchodesh']`.
|
|
86
|
+
* @param ev - the event to categorize
|
|
87
|
+
* @returns an array of 1 or 2 category strings
|
|
40
88
|
*/
|
|
41
|
-
export declare function
|
|
89
|
+
export declare function getEventCategories(ev: Event): string[];
|
|
42
90
|
/**
|
|
43
91
|
* Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"
|
|
92
|
+
* @param events - the events in the calendar, used to determine the date
|
|
93
|
+
* range shown in the title
|
|
94
|
+
* @param options - controls location name, `il`/Diaspora, and whether this
|
|
95
|
+
* is a Yahrzeit calendar or a subscription (see `RestApiEventOptions`)
|
|
96
|
+
* @returns the generated calendar title
|
|
44
97
|
*/
|
|
45
98
|
export declare function getCalendarTitle(events: Event[], options: RestApiOptions): string;
|
|
46
99
|
/**
|
|
47
100
|
* Bitmask for learning events (Daf Yomi, Nach Yomi, Mishna Yomi, Daily Learning, Yerushalmi Yomi)
|
|
48
101
|
*/
|
|
49
102
|
export declare const LEARNING_MASK: number;
|
|
103
|
+
/**
|
|
104
|
+
* Determines whether an event's title should be rendered with `Event.renderBrief()`
|
|
105
|
+
* instead of `Event.render()` — for example timed events, non-1st-of-month
|
|
106
|
+
* Hebrew date events, learning-schedule events, Shabbat Mevarchim, and Yom
|
|
107
|
+
* Kippur Katan.
|
|
108
|
+
* @param ev - the event to check
|
|
109
|
+
* @returns `true` if the brief rendering should be used
|
|
110
|
+
*/
|
|
50
111
|
export declare function shouldRenderBrief(ev: Event): boolean;
|
package/dist/esm/common.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
/*! @hebcal/rest-api v6.5.1 */
|
|
2
1
|
import { flags } from '@hebcal/core/dist/esm/event';
|
|
3
|
-
import { HDate
|
|
2
|
+
import { HDate } from '@hebcal/hdate';
|
|
4
3
|
import { makeAnchor } from './makeAnchor.js';
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Generates a base filename (without extension) for a calendar download,
|
|
6
|
+
* incorporating the year, date range, and/or location as available.
|
|
7
|
+
* @param options - the year/date-range/location used to construct the
|
|
8
|
+
* filename; typically the same options passed to the calendar generator
|
|
9
|
+
* @returns a filename like `hebcal_2020` or `hebcal_1993_providence`
|
|
10
|
+
*/
|
|
11
|
+
export function getDownloadFilename(options) {
|
|
7
12
|
let fileName = 'hebcal';
|
|
8
13
|
if (options.year) {
|
|
9
14
|
fileName += '_' + options.year;
|
|
@@ -37,31 +42,18 @@ function getDownloadFilename(options) {
|
|
|
37
42
|
return fileName;
|
|
38
43
|
}
|
|
39
44
|
/**
|
|
40
|
-
* Returns
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return isoDateString(d);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Returns a category and subcategory name
|
|
45
|
+
* Returns a category and subcategory name for an event, e.g.
|
|
46
|
+
* `['holiday', 'major']` or `['roshchodesh']`.
|
|
47
|
+
* @param ev - the event to categorize
|
|
48
|
+
* @returns an array of 1 or 2 category strings
|
|
48
49
|
*/
|
|
49
|
-
function getEventCategories(ev) {
|
|
50
|
+
export function getEventCategories(ev) {
|
|
50
51
|
const s = ev.getDesc();
|
|
51
52
|
if (s === 'Purim' || s === 'Erev Purim' || s.startsWith('Chanukah: ')) {
|
|
52
53
|
return ['holiday', 'major'];
|
|
53
54
|
}
|
|
54
55
|
return ev.getCategories();
|
|
55
56
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Renders the event title in default locale, but strips off time
|
|
58
|
-
* @deprecated
|
|
59
|
-
*/
|
|
60
|
-
function renderTitleWithoutTime(ev, locale) {
|
|
61
|
-
return ev.eventTime === undefined
|
|
62
|
-
? ev.render(locale)
|
|
63
|
-
: ev.renderBrief(locale);
|
|
64
|
-
}
|
|
65
57
|
function shortLocationName(options) {
|
|
66
58
|
const loc = options.location;
|
|
67
59
|
if (!loc) {
|
|
@@ -77,8 +69,13 @@ function shortLocationName(options) {
|
|
|
77
69
|
}
|
|
78
70
|
/**
|
|
79
71
|
* Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"
|
|
72
|
+
* @param events - the events in the calendar, used to determine the date
|
|
73
|
+
* range shown in the title
|
|
74
|
+
* @param options - controls location name, `il`/Diaspora, and whether this
|
|
75
|
+
* is a Yahrzeit calendar or a subscription (see `RestApiEventOptions`)
|
|
76
|
+
* @returns the generated calendar title
|
|
80
77
|
*/
|
|
81
|
-
function getCalendarTitle(events, options) {
|
|
78
|
+
export function getCalendarTitle(events, options) {
|
|
82
79
|
let title = 'Hebcal';
|
|
83
80
|
const locationName = shortLocationName(options);
|
|
84
81
|
if (options.yahrzeit) {
|
|
@@ -120,12 +117,20 @@ function getCalendarTitle(events, options) {
|
|
|
120
117
|
/**
|
|
121
118
|
* Bitmask for learning events (Daf Yomi, Nach Yomi, Mishna Yomi, Daily Learning, Yerushalmi Yomi)
|
|
122
119
|
*/
|
|
123
|
-
const LEARNING_MASK = flags.DAF_YOMI |
|
|
120
|
+
export const LEARNING_MASK = flags.DAF_YOMI |
|
|
124
121
|
flags.NACH_YOMI |
|
|
125
122
|
flags.MISHNA_YOMI |
|
|
126
123
|
flags.DAILY_LEARNING |
|
|
127
124
|
flags.YERUSHALMI_YOMI;
|
|
128
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Determines whether an event's title should be rendered with `Event.renderBrief()`
|
|
127
|
+
* instead of `Event.render()` — for example timed events, non-1st-of-month
|
|
128
|
+
* Hebrew date events, learning-schedule events, Shabbat Mevarchim, and Yom
|
|
129
|
+
* Kippur Katan.
|
|
130
|
+
* @param ev - the event to check
|
|
131
|
+
* @returns `true` if the brief rendering should be used
|
|
132
|
+
*/
|
|
133
|
+
export function shouldRenderBrief(ev) {
|
|
129
134
|
if (ev.eventTime !== undefined) {
|
|
130
135
|
return true;
|
|
131
136
|
}
|
|
@@ -145,6 +150,4 @@ function shouldRenderBrief(ev) {
|
|
|
145
150
|
return false;
|
|
146
151
|
}
|
|
147
152
|
}
|
|
148
|
-
|
|
149
|
-
export { LEARNING_MASK, getCalendarTitle, getDownloadFilename, getEventCategories, renderTitleWithoutTime, shouldRenderBrief, toISOString };
|
|
150
|
-
//# sourceMappingURL=common.js.map
|
|
153
|
+
//# sourceMappingURL=common.js.map
|
package/dist/esm/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sources":["
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAGzD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AACpC,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AA8E3C;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAuB;IACzD,IAAI,QAAQ,GAAG,QAAQ,CAAC;IACxB,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,QAAQ,IAAI,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;Q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GACxB,KAAK,CAAC,QAAQ;IACd,KAAK,CAAC,SAAS;IACf,KAAK,CAAC,WAAW;IACjB,KAAK,CAAC,cAAc;IACpB,KAAK,CAAC,eAAe,CAAC;AAExB;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAS;IACzC,IAAK,EAAiB,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC3B,IAAI,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QAC7B,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;SAAM,IAAI,IAAI,GAAG,CAAC,aAAa,GAAG,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC5D,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IACL,IAAI,GAAG,KAAK,CAAC,UAAU;QACvB,EAAE,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAC3C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { AD, AE, AF, AI, AL, AM, AO, AR, AS, AT, AU, AW, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BM, BN, BO, BR, BS, BT, BW, BY, BZ, CA, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CY, CZ, DE, DK, DM, DO, DZ, EC, EE, EG, ER, ES, ET, FI, FJ, FK, FO, FR, GA, GB, GE, GH, GI, GL, GM, GN, GQ, GR, GT, GW, GY, HK, HN, HR, HT, HU, ID, IE, IL, IM, IN, IQ, IR, IS, IT, JM, JO, JP, KE, KG, KH, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LR, LS, LT, LU, LV, LY, MA, MD, ME, MG, MK, ML, MM, MN, MP, MR, MS, MT, MU, MW, MX, MY, MZ, NA, NC, NE, NG, NI, NL, NO, NP, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PR, PT, PY, QA, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SK, SL, SN, SO, SR, ST, SV, SY, SZ, TC, TD, TG, TH, TJ, TM, TN, TR, TV, TW, TZ, UA, UG, US, UY, UZ, VC, VE, VG, VN, WS, YE, YT, ZA, ZM, ZW, countryNames0 as default };
|
|
5
|
-
//# sourceMappingURL=countryNames.json.js.map
|
|
1
|
+
const data = { "AD": "Andorra", "AE": "United Arab Emirates", "AF": "Afghanistan", "AI": "Anguilla", "AL": "Albania", "AM": "Armenia", "AO": "Angola", "AR": "Argentina", "AS": "American Samoa", "AT": "Austria", "AU": "Australia", "AW": "Aruba", "AZ": "Azerbaijan", "BA": "Bosnia and Herzegovina", "BB": "Barbados", "BD": "Bangladesh", "BE": "Belgium", "BF": "Burkina Faso", "BG": "Bulgaria", "BH": "Bahrain", "BI": "Burundi", "BJ": "Benin", "BM": "Bermuda", "BN": "Brunei", "BO": "Bolivia", "BR": "Brazil", "BS": "Bahamas", "BT": "Bhutan", "BW": "Botswana", "BY": "Belarus", "BZ": "Belize", "CA": "Canada", "CD": "Democratic Republic of the Congo", "CF": "Central African Republic", "CG": "Republic of the Congo", "CH": "Switzerland", "CI": "Ivory Coast", "CK": "Cook Islands", "CL": "Chile", "CM": "Cameroon", "CN": "China", "CO": "Colombia", "CR": "Costa Rica", "CU": "Cuba", "CV": "Cape Verde", "CW": "Curacao", "CY": "Cyprus", "CZ": "Czech Republic", "DE": "Germany", "DK": "Denmark", "DM": "Dominica", "DO": "Dominican Republic", "DZ": "Algeria", "EC": "Ecuador", "EE": "Estonia", "EG": "Egypt", "ER": "Eritrea", "ES": "Spain", "ET": "Ethiopia", "FI": "Finland", "FJ": "Fiji", "FK": "Falkland Islands", "FO": "Faroe Islands", "FR": "France", "GA": "Gabon", "GB": "United Kingdom", "GE": "Georgia", "GH": "Ghana", "GI": "Gibraltar", "GL": "Greenland", "GM": "Gambia", "GN": "Guinea", "GQ": "Equatorial Guinea", "GR": "Greece", "GT": "Guatemala", "GW": "Guinea-Bissau", "GY": "Guyana", "HK": "Hong Kong", "HN": "Honduras", "HR": "Croatia", "HT": "Haiti", "HU": "Hungary", "ID": "Indonesia", "IE": "Ireland", "IL": "Israel", "IM": "Isle of Man", "IN": "India", "IQ": "Iraq", "IR": "Iran", "IS": "Iceland", "IT": "Italy", "JM": "Jamaica", "JO": "Jordan", "JP": "Japan", "KE": "Kenya", "KG": "Kyrgyzstan", "KH": "Cambodia", "KM": "Comoros", "KN": "Saint Kitts and Nevis", "KP": "North Korea", "KR": "South Korea", "KW": "Kuwait", "KY": "Cayman Islands", "KZ": "Kazakhstan", "LA": "Laos", "LB": "Lebanon", "LC": "Saint Lucia", "LI": "Liechtenstein", "LR": "Liberia", "LS": "Lesotho", "LT": "Lithuania", "LU": "Luxembourg", "LV": "Latvia", "LY": "Libya", "MA": "Morocco", "MD": "Moldova", "ME": "Montenegro", "MG": "Madagascar", "MK": "Macedonia", "ML": "Mali", "MM": "Myanmar", "MN": "Mongolia", "MP": "Northern Mariana Islands", "MR": "Mauritania", "MS": "Montserrat", "MT": "Malta", "MU": "Mauritius", "MW": "Malawi", "MX": "Mexico", "MY": "Malaysia", "MZ": "Mozambique", "NA": "Namibia", "NC": "New Caledonia", "NE": "Niger", "NG": "Nigeria", "NI": "Nicaragua", "NL": "Netherlands", "NO": "Norway", "NP": "Nepal", "NU": "Niue", "NZ": "New Zealand", "OM": "Oman", "PA": "Panama", "PE": "Peru", "PF": "French Polynesia", "PG": "Papua New Guinea", "PH": "Philippines", "PK": "Pakistan", "PL": "Poland", "PR": "Puerto Rico", "PT": "Portugal", "PY": "Paraguay", "QA": "Qatar", "RO": "Romania", "RS": "Serbia", "RU": "Russia", "RW": "Rwanda", "SA": "Saudi Arabia", "SB": "Solomon Islands", "SC": "Seychelles", "SD": "Sudan", "SE": "Sweden", "SG": "Singapore", "SH": "Saint Helena", "SI": "Slovenia", "SK": "Slovakia", "SL": "Sierra Leone", "SN": "Senegal", "SO": "Somalia", "SR": "Suriname", "ST": "Sao Tome and Principe", "SV": "El Salvador", "SY": "Syria", "SZ": "Swaziland", "TC": "Turks and Caicos Islands", "TD": "Chad", "TG": "Togo", "TH": "Thailand", "TJ": "Tajikistan", "TM": "Turkmenistan", "TN": "Tunisia", "TR": "Turkey", "TV": "Tuvalu", "TW": "Taiwan", "TZ": "Tanzania", "UA": "Ukraine", "UG": "Uganda", "US": "United States", "UY": "Uruguay", "UZ": "Uzbekistan", "VC": "Saint Vincent and the Grenadines", "VE": "Venezuela", "VG": "British Virgin Islands", "VN": "Vietnam", "WS": "Samoa", "YE": "Yemen", "YT": "Mayotte", "ZA": "South Africa", "ZM": "Zambia", "ZW": "Zimbabwe" };
|
|
2
|
+
export default data;
|
|
3
|
+
//# sourceMappingURL=countryNames.json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countryNames.json.js","
|
|
1
|
+
{"version":3,"file":"countryNames.json.js","sourceRoot":"","sources":["../../src/countryNames.json.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAA2B,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,sBAAsB,EAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,YAAY,EAAC,IAAI,EAAC,wBA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AAU,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,uBAAuB,EAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAC,0BAA0B,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,YAAY,EAAC,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,YAAY,EAAC,IAAI,EAAC,kCAAkC,EAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAC,wBAAwB,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,UAAU,EAAC,CAAC;AACj1G,eAAe,IAAI,CAAC"}
|
package/dist/esm/csv.d.ts
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { Event } from '@hebcal/core/dist/esm/event';
|
|
2
|
-
import { RestApiOptions } from './common';
|
|
2
|
+
import { RestApiOptions } from './common.js';
|
|
3
3
|
/**
|
|
4
|
-
* Renders
|
|
4
|
+
* Renders a single event as one line of Outlook-compatible CSV
|
|
5
|
+
* (no trailing newline).
|
|
6
|
+
* @param ev - the event to render
|
|
7
|
+
* @param options - controls locale, date format (`euro`), and whether to
|
|
8
|
+
* append the Hebrew title (`appendHebrewToSubject`)
|
|
9
|
+
* @returns a CSV row: subject, start/end date/time, all-day flag,
|
|
10
|
+
* description, "show time as", and location
|
|
5
11
|
*/
|
|
6
12
|
export declare function eventToCsv(ev: Event, options: RestApiOptions): string;
|
|
13
|
+
/**
|
|
14
|
+
* Renders a list of events as an Outlook-compatible CSV document, including
|
|
15
|
+
* the header row and a trailing CRLF.
|
|
16
|
+
* @param events - the events to render
|
|
17
|
+
* @param options - see `eventToCsv()`
|
|
18
|
+
* @returns the full CSV document, using CRLF line endings
|
|
19
|
+
*/
|
|
7
20
|
export declare function eventsToCsv(events: Event[], options: RestApiOptions): string;
|