@venite/components 0.16.29 → 0.16.32

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.
Files changed (90) hide show
  1. package/dist/cjs/{book-1a92678a.js → book-b04f6553.js} +115 -3
  2. package/dist/cjs/{heading-5afc2b24.js → heading-1243cde5.js} +1 -1
  3. package/dist/cjs/{image-3bee3e73.js → image-7ff56371.js} +1 -1
  4. package/dist/cjs/ion-button_13.cjs.entry.js +1 -1
  5. package/dist/cjs/ion-card-content_6.cjs.entry.js +2 -2
  6. package/dist/cjs/ion-checkbox_3.cjs.entry.js +1 -1
  7. package/dist/cjs/ion-input_2.cjs.entry.js +1 -1
  8. package/dist/cjs/ion-segment_16.cjs.entry.js +6 -6
  9. package/dist/cjs/ldf-day-name_5.cjs.entry.js +14 -124
  10. package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +7 -7
  11. package/dist/cjs/ldf-editable-condition-piece.cjs.entry.js +1 -1
  12. package/dist/cjs/ldf-editable-condition.cjs.entry.js +1 -1
  13. package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +2 -2
  14. package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +7 -7
  15. package/dist/cjs/ldf-editable-metadata.cjs.entry.js +7 -7
  16. package/dist/cjs/ldf-editable-preference-option.cjs.entry.js +1 -1
  17. package/dist/cjs/ldf-editable-preference.cjs.entry.js +1 -1
  18. package/dist/cjs/ldf-editable-preferences.cjs.entry.js +1 -1
  19. package/dist/cjs/ldf-editable-string-list.cjs.entry.js +1 -1
  20. package/dist/cjs/ldf-editor.cjs.entry.js +1 -1
  21. package/dist/cjs/{option-a078d432.js → option-491b2cc7.js} +5 -1
  22. package/dist/cjs/{refrain-91fb446b.js → refrain-2089062b.js} +1 -1
  23. package/dist/cjs/{rubric-0afbe4c0.js → rubric-3ef36eea.js} +1 -1
  24. package/dist/cjs/{specific-class-76b4d343.js → specific-class-3e56392a.js} +5 -5
  25. package/dist/cjs/{text-5edb80f3.js → text-67a354ff.js} +1 -1
  26. package/dist/collection/components/text/dist/text.js +6 -4
  27. package/dist/collection/components/text/text.css +5 -0
  28. package/dist/collection/components/text/text.js +7 -5
  29. package/dist/esm/{book-31b8cdde.js → book-4795ea34.js} +115 -3
  30. package/dist/esm/{heading-cc5ffa8a.js → heading-dedd87c7.js} +1 -1
  31. package/dist/esm/{image-c6a3f0c5.js → image-374f5ed7.js} +1 -1
  32. package/dist/esm/ion-button_13.entry.js +1 -1
  33. package/dist/esm/ion-card-content_6.entry.js +2 -2
  34. package/dist/esm/ion-checkbox_3.entry.js +1 -1
  35. package/dist/esm/ion-input_2.entry.js +1 -1
  36. package/dist/esm/ion-segment_16.entry.js +6 -6
  37. package/dist/esm/ldf-day-name_5.entry.js +10 -120
  38. package/dist/esm/ldf-editable-add-block-menu.entry.js +7 -7
  39. package/dist/esm/ldf-editable-condition-piece.entry.js +1 -1
  40. package/dist/esm/ldf-editable-condition.entry.js +1 -1
  41. package/dist/esm/ldf-editable-filter-documents.entry.js +2 -2
  42. package/dist/esm/ldf-editable-lookup_2.entry.js +7 -7
  43. package/dist/esm/ldf-editable-metadata.entry.js +7 -7
  44. package/dist/esm/ldf-editable-preference-option.entry.js +1 -1
  45. package/dist/esm/ldf-editable-preference.entry.js +1 -1
  46. package/dist/esm/ldf-editable-preferences.entry.js +1 -1
  47. package/dist/esm/ldf-editable-string-list.entry.js +1 -1
  48. package/dist/esm/ldf-editor.entry.js +1 -1
  49. package/dist/esm/{option-c16af13a.js → option-4e49f550.js} +5 -1
  50. package/dist/esm/{refrain-75a412cb.js → refrain-984f9410.js} +1 -1
  51. package/dist/esm/{rubric-f779c469.js → rubric-5c072ba1.js} +1 -1
  52. package/dist/esm/{specific-class-09c98625.js → specific-class-23168094.js} +5 -5
  53. package/dist/esm/{text-ed75fbd4.js → text-2ec5b6b3.js} +1 -1
  54. package/dist/ldf/ldf.esm.js +1 -1
  55. package/dist/ldf/{p-f0de7628.entry.js → p-068e9f88.entry.js} +1 -1
  56. package/dist/ldf/{p-23af1bc3.entry.js → p-1411d9f8.entry.js} +1 -1
  57. package/dist/ldf/{p-7a9ab85c.entry.js → p-30ffc0cd.entry.js} +1 -1
  58. package/dist/ldf/{p-2ae548b3.entry.js → p-35bfe3eb.entry.js} +1 -1
  59. package/dist/ldf/{p-d56dff05.js → p-47600061.js} +1 -1
  60. package/dist/ldf/p-49174004.js +1 -0
  61. package/dist/ldf/{p-594fa9d4.entry.js → p-5642949a.entry.js} +1 -1
  62. package/dist/ldf/{p-005ad01b.entry.js → p-79eb1b06.entry.js} +1 -1
  63. package/dist/ldf/p-97ada7f4.js +1 -0
  64. package/dist/ldf/{p-9c1973a6.entry.js → p-9d849fad.entry.js} +1 -1
  65. package/dist/ldf/p-a2e30644.js +1 -0
  66. package/dist/ldf/p-a3b9dc24.entry.js +1 -0
  67. package/dist/ldf/{p-03afc8cb.entry.js → p-a6a44bf6.entry.js} +1 -1
  68. package/dist/ldf/p-a97ca6c2.js +1 -0
  69. package/dist/ldf/p-aea73748.entry.js +1 -0
  70. package/dist/ldf/{p-5b43e6be.js → p-b0ceb153.js} +1 -1
  71. package/dist/ldf/{p-468d36d0.entry.js → p-b923eab2.entry.js} +1 -1
  72. package/dist/ldf/{p-fa191f47.entry.js → p-b971af53.entry.js} +1 -1
  73. package/dist/ldf/{p-65ea7ab3.entry.js → p-c3279ab4.entry.js} +1 -1
  74. package/dist/ldf/{p-c0ef6296.entry.js → p-c8389a67.entry.js} +1 -1
  75. package/dist/ldf/p-cb1922dc.js +1 -0
  76. package/dist/ldf/{p-c1a86b14.entry.js → p-cd2e39ca.entry.js} +1 -1
  77. package/dist/ldf/p-d9994330.js +1 -0
  78. package/dist/ldf/{p-94949614.entry.js → p-f43df90f.entry.js} +1 -1
  79. package/dist/ldf/{p-2c39ce94.entry.js → p-f6afaa8f.entry.js} +1 -1
  80. package/dist/types/components/text/text.d.ts +2 -2
  81. package/dist/types/components.d.ts +1 -1
  82. package/package.json +2 -2
  83. package/dist/ldf/p-00e5ee6b.js +0 -1
  84. package/dist/ldf/p-476327d6.js +0 -1
  85. package/dist/ldf/p-4aa9a6f2.js +0 -1
  86. package/dist/ldf/p-60fc0157.entry.js +0 -1
  87. package/dist/ldf/p-65d26c45.js +0 -1
  88. package/dist/ldf/p-800a115c.entry.js +0 -1
  89. package/dist/ldf/p-a1729dbd.js +0 -1
  90. package/dist/ldf/p-e7a449d7.js +0 -1
@@ -26,6 +26,118 @@ function dateFromYMDString(ymd) {
26
26
  return dateFromYMD(y, m, d);
27
27
  }
28
28
 
29
+ /**
30
+ * LiturgicalDay represents a particular moment in the liturgical calendar,
31
+ * like "Monday in Holy Week" or "The Eve of the Epiphany."
32
+ */
33
+ class LiturgicalDay {
34
+ //** Constructor takes a Javascript object containing the class's properties */
35
+ constructor(data = {}) {
36
+ /** True if this moment is the evening. Used to indicate the eve of feasts. */
37
+ this.evening = false;
38
+ Object.assign(this, data);
39
+ }
40
+ /** Returns a native Date from the day's date string */
41
+ getDate() {
42
+ return dateFromYMDString(this.date);
43
+ }
44
+ /** Given a LiturgicalDay, returns a new LiturgicalDay that includes the feasts passed */
45
+ addHolyDays(holydays) {
46
+ var _a, _b, _c, _d;
47
+ const day = this;
48
+ holydays = holydays
49
+ // filter out eves if it's not evening
50
+ .filter((feast) => !feast.eve || this.evening)
51
+ // filter out days that are supposed to stop after a certain Sunday
52
+ // viz., the 1979 daily lectionary for January 8, 9, 10, 11, etc., stops at the 1st Sunday after the Epiphany
53
+ .filter((feast) => feast.stops_at_sunday !== day.week.slug)
54
+ .map((feast) => {
55
+ // if a feast has an `evening` field and it's evening, use that
56
+ if (feast.hasOwnProperty('evening') && this.evening == true) {
57
+ return feast.evening;
58
+ }
59
+ // if a feast has a `morning` field and it's morning, use that
60
+ else if (feast.hasOwnProperty('morning') && this.evening == false) {
61
+ return feast.morning;
62
+ }
63
+ // if a feast is the eve of something and it's evening, use that feast
64
+ else if (feast && feast.eve && this.evening == true) {
65
+ return feast;
66
+ }
67
+ // if none of these, just return the feast
68
+ else {
69
+ return feast;
70
+ }
71
+ })
72
+ .filter((feast) => !!feast);
73
+ // Determine whether a holy day takes precedence over the ordinary day
74
+ const observed = this.observedDay(this, (this.holy_days || new Array()).concat(holydays));
75
+ // overwrite the day's slug with the observed day's slug if they differ
76
+ const holy_day_rank = Number((_b = (_a = observed) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.rank), holy_day_is_observed = (observed === null || observed === void 0 ? void 0 : observed.slug) && ((observed === null || observed === void 0 ? void 0 : observed.slug) !== day.slug || holy_day_rank > 2), slug = holy_day_is_observed && holy_day_rank > 2 ? observed.slug : day.slug;
77
+ let propers = this.propers;
78
+ if (slug !== this.slug) {
79
+ propers = slug;
80
+ }
81
+ const color = observed.color || this.color, collect = observed.collect || this.collect, season = observed.season || this.season, octave = (_d = (_c = (this.holy_days || [])) === null || _c === void 0 ? void 0 : _c.concat(holydays)) === null || _d === void 0 ? void 0 : _d.map((holyday) => holyday.octave).filter((octave) => Boolean(octave)).reduce((acc, curr) => (acc ? acc : curr || acc), undefined);
82
+ return new LiturgicalDay(Object.assign(Object.assign({}, this), { slug, propers: holy_day_is_observed && holy_day_rank > 2 ? (observed === null || observed === void 0 ? void 0 : observed.propers) || (observed === null || observed === void 0 ? void 0 : observed.slug) : propers, color,
83
+ season,
84
+ octave,
85
+ collect, holy_days: (this.holy_days || new Array()).concat(holydays), holy_day_observed: holy_day_is_observed ? observed : this.holy_day_observed }));
86
+ }
87
+ /** Given a `LiturgicalDay` and a set of `HolyDay`s, it returns whichever option takes precedence */
88
+ observedDay(day, holydays) {
89
+ // rank: Principal Feast (5), Sunday (4), Holy Day (3), random other days (2), ferial weekday (1)
90
+ function getRank(item, type) {
91
+ var _a;
92
+ // ranked items => go with rank
93
+ if (type == 'holyday') {
94
+ return ((_a = item === null || item === void 0 ? void 0 : item.type) === null || _a === void 0 ? void 0 : _a.rank) || 2;
95
+ }
96
+ else {
97
+ // if `day.date` is defined, used it to generate a date
98
+ // otherwise, use the current date
99
+ const date = day.date ? dateFromYMDString(day.date) : dateOnly(new Date());
100
+ // Sundays => 4
101
+ if (date.getDay() == 0) {
102
+ return 4;
103
+ }
104
+ // weekdays => 1
105
+ else {
106
+ return 1;
107
+ }
108
+ }
109
+ }
110
+ const sorted = holydays
111
+ .map((holyday) => ({ rank: getRank(holyday, 'holyday'), obj: holyday }))
112
+ .concat({ rank: getRank(day, 'weekday'), obj: day })
113
+ .sort((a, b) => {
114
+ // equal rank => choose earlier feast (probably )
115
+ if (a.rank === b.rank && a.obj.mmdd && b.obj.mmdd) {
116
+ const [bMM, bDD] = b.obj.mmdd.split('/'), [aMM, aDD] = a.obj.mmdd.split('/'), bDate = new Date(), aDate = new Date();
117
+ bDate.setMonth(parseInt(bMM) - 1);
118
+ bDate.setDate(parseInt(bDD));
119
+ aDate.setMonth(parseInt(aMM) - 1);
120
+ aDate.setDate(parseInt(aDD));
121
+ return a.obj.mmdd === b.obj.mmdd && a.obj.kalendar !== b.obj.kalendar
122
+ ? a.obj.kalendar === day.kalendar
123
+ ? -1
124
+ : 1
125
+ : aDate.getTime() - bDate.getTime();
126
+ }
127
+ else {
128
+ return b.rank - a.rank;
129
+ }
130
+ });
131
+ return Object.assign({}, sorted[0].obj);
132
+ }
133
+ // whether this day is ranked as a Major Feast
134
+ isFeast() {
135
+ var _a, _b, _c, _d, _e, _f, _g, _h;
136
+ const isSunday = this.getDate().getDay() === 0, hasRank = (((_b = (_a = this.holy_day_observed) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.rank) || 1) >= 3, holyWeek = ((_c = this.slug) === null || _c === void 0 ? void 0 : _c.includes('holy-week')) || ((_d = this.slug) === null || _d === void 0 ? void 0 : _d.includes('palm-sunday')), ashWednesdayWeek = (_e = this.slug) === null || _e === void 0 ? void 0 : _e.includes('last-epiphany'), ascensionWeek = (_f = this.slug) === null || _f === void 0 ? void 0 : _f.includes('6th-easter'), easterWeek = (_g = this.slug) === null || _g === void 0 ? void 0 : _g.includes('easter'), ember = (_h = this.season) === null || _h === void 0 ? void 0 : _h.includes('Ember');
137
+ return isSunday || (hasRank && !holyWeek && !easterWeek && !ashWednesdayWeek && !ascensionWeek && !ember);
138
+ }
139
+ }
140
+
29
141
  class Condition {
30
142
  //** Constructor takes a Javascript object containing the class's properties */
31
143
  constructor(data = {}) {
@@ -57,11 +169,11 @@ class Condition {
57
169
  }
58
170
  // `feastDay`
59
171
  if (this.hasOwnProperty('feastDay') && this.feastDay !== undefined) {
60
- const highestFeastRank = Math.max(
172
+ Math.max(
61
173
  // highest rank of holy days given
62
174
  ...(day.holy_days || [])
63
175
  .filter((a) => !!a) // exclude any null or undefined from array
64
- .map((a) => (a && a.type && a.type.rank ? a.type.rank : 3))), isSunday = dateFromYMDString(day.date).getDay() == 0, isFeast = highestFeastRank >= 3 || isSunday;
176
+ .map((a) => (a && a.type && a.type.rank ? a.type.rank : 3))); dateFromYMDString(day.date).getDay() == 0; const isFeast = new LiturgicalDay(day).isFeast();
65
177
  evaluatedConditions.push(isFeast == this.feastDay);
66
178
  }
67
179
  // `date`
@@ -282,6 +394,6 @@ var Book;
282
394
  })(Book || (Book = {}));
283
395
 
284
396
  exports.Condition = Condition;
397
+ exports.LiturgicalDay = LiturgicalDay;
285
398
  exports.LiturgicalDocument = LiturgicalDocument;
286
399
  exports.dateFromYMDString = dateFromYMDString;
287
- exports.dateOnly = dateOnly;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const book = require('./book-1a92678a.js');
3
+ const book = require('./book-b04f6553.js');
4
4
 
5
5
  const STYLES = ['text', 'day', 'date'];
6
6
  class Heading extends book.LiturgicalDocument {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const book = require('./book-1a92678a.js');
3
+ const book = require('./book-b04f6553.js');
4
4
 
5
5
  const STYLES = ['normal', 'slideshow', 'carousel'];
6
6
  /** Refrain represents a short text like the Gloria Patri, Hail Mary, or an Antiphon */
@@ -7,7 +7,7 @@ const ionicGlobal = require('./ionic-global-581fb4f8.js');
7
7
  const helpers = require('./helpers-41dfb43a.js');
8
8
  const theme = require('./theme-81caa5b0.js');
9
9
  const overlays = require('./overlays-eb464d6d.js');
10
- require('./book-1a92678a.js');
10
+ require('./book-b04f6553.js');
11
11
  const change = require('./change-cdb1e8c0.js');
12
12
  const locale = require('./locale-d4e925b1.js');
13
13
  require('./hardware-back-button-8c2f48d2.js');
@@ -6,8 +6,8 @@ const index = require('./index-8fe0df8d.js');
6
6
  const ionicGlobal = require('./ionic-global-581fb4f8.js');
7
7
  const theme = require('./theme-81caa5b0.js');
8
8
  const overlays = require('./overlays-eb464d6d.js');
9
- require('./book-1a92678a.js');
10
- const refrain = require('./refrain-91fb446b.js');
9
+ require('./book-b04f6553.js');
10
+ const refrain = require('./refrain-2089062b.js');
11
11
  const change = require('./change-cdb1e8c0.js');
12
12
  const locale = require('./locale-d4e925b1.js');
13
13
  require('./hardware-back-button-8c2f48d2.js');
@@ -6,7 +6,7 @@ const index = require('./index-8fe0df8d.js');
6
6
  const ionicGlobal = require('./ionic-global-581fb4f8.js');
7
7
  const helpers = require('./helpers-41dfb43a.js');
8
8
  const theme = require('./theme-81caa5b0.js');
9
- require('./book-1a92678a.js');
9
+ require('./book-b04f6553.js');
10
10
  const change = require('./change-cdb1e8c0.js');
11
11
  const overlays = require('./overlays-eb464d6d.js');
12
12
  const locale = require('./locale-d4e925b1.js');
@@ -7,7 +7,7 @@ const ionicGlobal = require('./ionic-global-581fb4f8.js');
7
7
  const helpers = require('./helpers-41dfb43a.js');
8
8
  const theme = require('./theme-81caa5b0.js');
9
9
  const index$1 = require('./index-7aa21373.js');
10
- require('./book-1a92678a.js');
10
+ require('./book-b04f6553.js');
11
11
  const cursor = require('./cursor-81bfd01e.js');
12
12
  const change = require('./change-cdb1e8c0.js');
13
13
  const _commonjsHelpers = require('./_commonjsHelpers-bcc1208a.js');
@@ -7,15 +7,15 @@ const ionicGlobal = require('./ionic-global-581fb4f8.js');
7
7
  const helpers = require('./helpers-41dfb43a.js');
8
8
  const theme = require('./theme-81caa5b0.js');
9
9
  const overlays = require('./overlays-eb464d6d.js');
10
- const book$2 = require('./book-1a92678a.js');
11
- const rubric = require('./rubric-0afbe4c0.js');
12
- const heading$1 = require('./heading-5afc2b24.js');
13
- const option$1 = require('./option-a078d432.js');
10
+ const book$2 = require('./book-b04f6553.js');
11
+ const rubric = require('./rubric-3ef36eea.js');
12
+ const heading$1 = require('./heading-1243cde5.js');
13
+ const option$1 = require('./option-491b2cc7.js');
14
14
  const change = require('./change-cdb1e8c0.js');
15
15
  const locale = require('./locale-d4e925b1.js');
16
- const image = require('./image-3bee3e73.js');
16
+ const image = require('./image-7ff56371.js');
17
17
  const index$1 = require('./index-7aa21373.js');
18
- const refrain = require('./refrain-91fb446b.js');
18
+ const refrain = require('./refrain-2089062b.js');
19
19
  require('./hardware-back-button-8c2f48d2.js');
20
20
  require('./_commonjsHelpers-bcc1208a.js');
21
21
 
@@ -3,127 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- const book = require('./book-1a92678a.js');
7
- const text = require('./text-5edb80f3.js');
6
+ const book = require('./book-b04f6553.js');
7
+ const text = require('./text-67a354ff.js');
8
8
  const locale = require('./locale-d4e925b1.js');
9
- const heading = require('./heading-5afc2b24.js');
9
+ const heading = require('./heading-1243cde5.js');
10
10
  const _commonjsHelpers = require('./_commonjsHelpers-bcc1208a.js');
11
11
  const overlays = require('./overlays-eb464d6d.js');
12
12
  require('./ionic-global-581fb4f8.js');
13
13
  require('./hardware-back-button-8c2f48d2.js');
14
14
 
15
- /**
16
- * LiturgicalDay represents a particular moment in the liturgical calendar,
17
- * like "Monday in Holy Week" or "The Eve of the Epiphany."
18
- */
19
- class LiturgicalDay {
20
- //** Constructor takes a Javascript object containing the class's properties */
21
- constructor(data = {}) {
22
- /** True if this moment is the evening. Used to indicate the eve of feasts. */
23
- this.evening = false;
24
- Object.assign(this, data);
25
- }
26
- /** Returns a native Date from the day's date string */
27
- getDate() {
28
- return book.dateFromYMDString(this.date);
29
- }
30
- /** Given a LiturgicalDay, returns a new LiturgicalDay that includes the feasts passed */
31
- addHolyDays(holydays) {
32
- var _a, _b, _c, _d;
33
- const day = this;
34
- holydays = holydays
35
- // filter out eves if it's not evening
36
- .filter((feast) => !feast.eve || this.evening)
37
- // filter out days that are supposed to stop after a certain Sunday
38
- // viz., the 1979 daily lectionary for January 8, 9, 10, 11, etc., stops at the 1st Sunday after the Epiphany
39
- .filter((feast) => feast.stops_at_sunday !== day.week.slug)
40
- .map((feast) => {
41
- // if a feast has an `evening` field and it's evening, use that
42
- if (feast.hasOwnProperty('evening') && this.evening == true) {
43
- return feast.evening;
44
- }
45
- // if a feast has a `morning` field and it's morning, use that
46
- else if (feast.hasOwnProperty('morning') && this.evening == false) {
47
- return feast.morning;
48
- }
49
- // if a feast is the eve of something and it's evening, use that feast
50
- else if (feast && feast.eve && this.evening == true) {
51
- return feast;
52
- }
53
- // if none of these, just return the feast
54
- else {
55
- return feast;
56
- }
57
- })
58
- .filter((feast) => !!feast);
59
- // Determine whether a holy day takes precedence over the ordinary day
60
- const observed = this.observedDay(this, (this.holy_days || new Array()).concat(holydays));
61
- // overwrite the day's slug with the observed day's slug if they differ
62
- const holy_day_rank = Number((_b = (_a = observed) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.rank), holy_day_is_observed = (observed === null || observed === void 0 ? void 0 : observed.slug) && ((observed === null || observed === void 0 ? void 0 : observed.slug) !== day.slug || holy_day_rank > 2), slug = holy_day_is_observed && holy_day_rank > 2 ? observed.slug : day.slug;
63
- let propers = this.propers;
64
- if (slug !== this.slug) {
65
- propers = slug;
66
- }
67
- const color = observed.color || this.color, collect = observed.collect || this.collect, season = observed.season || this.season, octave = (_d = (_c = (this.holy_days || [])) === null || _c === void 0 ? void 0 : _c.concat(holydays)) === null || _d === void 0 ? void 0 : _d.map((holyday) => holyday.octave).filter((octave) => Boolean(octave)).reduce((acc, curr) => (acc ? acc : curr || acc), undefined);
68
- return new LiturgicalDay(Object.assign(Object.assign({}, this), { slug, propers: holy_day_is_observed && holy_day_rank > 2 ? (observed === null || observed === void 0 ? void 0 : observed.propers) || (observed === null || observed === void 0 ? void 0 : observed.slug) : propers, color,
69
- season,
70
- octave,
71
- collect, holy_days: (this.holy_days || new Array()).concat(holydays), holy_day_observed: holy_day_is_observed ? observed : this.holy_day_observed }));
72
- }
73
- /** Given a `LiturgicalDay` and a set of `HolyDay`s, it returns whichever option takes precedence */
74
- observedDay(day, holydays) {
75
- // rank: Principal Feast (5), Sunday (4), Holy Day (3), random other days (2), ferial weekday (1)
76
- function getRank(item, type) {
77
- var _a;
78
- // ranked items => go with rank
79
- if (type == 'holyday') {
80
- return ((_a = item === null || item === void 0 ? void 0 : item.type) === null || _a === void 0 ? void 0 : _a.rank) || 2;
81
- }
82
- else {
83
- // if `day.date` is defined, used it to generate a date
84
- // otherwise, use the current date
85
- const date = day.date ? book.dateFromYMDString(day.date) : book.dateOnly(new Date());
86
- // Sundays => 4
87
- if (date.getDay() == 0) {
88
- return 4;
89
- }
90
- // weekdays => 1
91
- else {
92
- return 1;
93
- }
94
- }
95
- }
96
- const sorted = holydays
97
- .map((holyday) => ({ rank: getRank(holyday, 'holyday'), obj: holyday }))
98
- .concat({ rank: getRank(day, 'weekday'), obj: day })
99
- .sort((a, b) => {
100
- // equal rank => choose earlier feast (probably )
101
- if (a.rank === b.rank && a.obj.mmdd && b.obj.mmdd) {
102
- const [bMM, bDD] = b.obj.mmdd.split('/'), [aMM, aDD] = a.obj.mmdd.split('/'), bDate = new Date(), aDate = new Date();
103
- bDate.setMonth(parseInt(bMM) - 1);
104
- bDate.setDate(parseInt(bDD));
105
- aDate.setMonth(parseInt(aMM) - 1);
106
- aDate.setDate(parseInt(aDD));
107
- return a.obj.mmdd === b.obj.mmdd && a.obj.kalendar !== b.obj.kalendar
108
- ? a.obj.kalendar === day.kalendar
109
- ? -1
110
- : 1
111
- : aDate.getTime() - bDate.getTime();
112
- }
113
- else {
114
- return b.rank - a.rank;
115
- }
116
- });
117
- return Object.assign({}, sorted[0].obj);
118
- }
119
- // whether this day is ranked as a Major Feast
120
- isFeast() {
121
- var _a, _b, _c, _d;
122
- const isSunday = this.getDate().getDay() === 0, hasRank = (((_b = (_a = this.holy_day_observed) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.rank) || 1) >= 3, holyWeek = (_c = this.slug) === null || _c === void 0 ? void 0 : _c.includes('holy-week'), easterWeek = ((_d = this.week) === null || _d === void 0 ? void 0 : _d.slug) === 'easter';
123
- return isSunday || (hasRank && !holyWeek && !easterWeek);
124
- }
125
- }
126
-
127
15
  class Citation {
128
16
  //** Constructor takes a Javascript object containing the class's properties */
129
17
  constructor(data = {}) {
@@ -157,17 +45,17 @@ const DayNameComponent = class {
157
45
  let provisionalObj;
158
46
  try {
159
47
  if (typeof newDay == 'string') {
160
- provisionalObj = new LiturgicalDay(JSON.parse(newDay));
48
+ provisionalObj = new book.LiturgicalDay(JSON.parse(newDay));
161
49
  }
162
50
  else {
163
- provisionalObj = new LiturgicalDay(newDay);
51
+ provisionalObj = new book.LiturgicalDay(newDay);
164
52
  }
165
53
  }
166
54
  catch (e) {
167
55
  console.warn('(ldf-day-name)', e);
168
- provisionalObj = new LiturgicalDay();
56
+ provisionalObj = new book.LiturgicalDay();
169
57
  }
170
- this.obj = provisionalObj || new LiturgicalDay();
58
+ this.obj = provisionalObj || new book.LiturgicalDay();
171
59
  }
172
60
  // Lifecycle events
173
61
  componentWillLoad() {
@@ -5574,7 +5462,7 @@ const ES = {
5574
5462
  "prayer-list": "Prayer List"
5575
5463
  };
5576
5464
 
5577
- const textCss = "ldf-label-bar.sc-ldf-text{min-height:0}p.sc-ldf-text{font-family:var(--ldf-font-face);text-align:var(--ldf-text-align);text-justify:inter-character}li.sc-ldf-text,h1.sc-ldf-text,h2.sc-ldf-text,h3.sc-ldf-text,h4.sc-ldf-text,h5.sc-ldf-text,h6.sc-ldf-text,ol.sc-ldf-text,span.sc-ldf-text,em.sc-ldf-text,strong.sc-ldf-text{font-family:var(--ldf-font-face)}.response.sc-ldf-text{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.text.omit.sc-ldf-text .text-body.sc-ldf-text{display:none}.text.editable.omit.sc-ldf-text .text-body.sc-ldf-text{display:block}.text.unison.sc-ldf-text .text-body.sc-ldf-text{font-weight:var(--ldf-unison-font-weight);font-style:var(--ldf-unison-font-style)}h3.editable-label.sc-ldf-text{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.prayer-list.sc-ldf-text{display:block;margin:0;padding:0;text-align:center}.prayer-list.sc-ldf-text li.sc-ldf-text{list-style-type:none;text-align:center;margin:0.5em 0;padding:0}";
5465
+ const textCss = "ldf-label-bar.sc-ldf-text{min-height:0}p.sc-ldf-text{font-family:var(--ldf-font-face);text-align:var(--ldf-text-align);text-justify:inter-character}li.sc-ldf-text,h1.sc-ldf-text,h2.sc-ldf-text,h3.sc-ldf-text,h4.sc-ldf-text,h5.sc-ldf-text,h6.sc-ldf-text,ol.sc-ldf-text,span.sc-ldf-text,em.sc-ldf-text,strong.sc-ldf-text{font-family:var(--ldf-font-face)}.response.sc-ldf-text{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.text.omit.sc-ldf-text .text-body.sc-ldf-text{display:none}.text.editable.omit.sc-ldf-text .text-body.sc-ldf-text{display:block}.text.unison.sc-ldf-text .text-body.sc-ldf-text{font-weight:var(--ldf-unison-font-weight);font-style:var(--ldf-unison-font-style)}h3.editable-label.sc-ldf-text{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.prayer-list.sc-ldf-text{display:block;margin:0;padding:0;text-align:center}.prayer-list.formatted.sc-ldf-text{text-align:left;white-space:pre-wrap}.prayer-list.sc-ldf-text li.sc-ldf-text{list-style-type:none;text-align:center;margin:0.5em 0;padding:0}";
5578
5466
 
5579
5467
  const LOCALE = {
5580
5468
  'en': EN,
@@ -5586,10 +5474,9 @@ const TextComponent = class {
5586
5474
  this.ldfDocShouldChange = index.createEvent(this, "ldfDocShouldChange", 7);
5587
5475
  this.ldfAskForPrayerList = index.createEvent(this, "ldfAskForPrayerList", 7);
5588
5476
  // prayer list for authorized prayers
5589
- this.intentions = [];
5477
+ this.intentions = "";
5590
5478
  }
5591
5479
  async setPrayerList(intentions) {
5592
- console.log("(PrayerList) setPrayerList", intentions);
5593
5480
  this.intentions = intentions;
5594
5481
  }
5595
5482
  docChanged(newDoc) {
@@ -5653,20 +5540,23 @@ const TextComponent = class {
5653
5540
  /** `authorized-prayer` type */
5654
5541
  if (((_a = this.obj) === null || _a === void 0 ? void 0 : _a.style) === 'authorized-prayers') {
5655
5542
  const splits = this.path.split('/'), index$1 = Number(splits[splits.length - 1]), base = splits.slice(0, splits.length - 1).join('/');
5656
- return index.h(index.Host, null, index.h("ldf-label-bar", null, index.h("ion-button", { onClick: () => this.addPAndT(base, index$1), fill: "clear" }, localeStrings.authorized_prayers)), (_c = ((_b = this.intentions) === null || _b === void 0 ? void 0 : _b.length) > 0) !== null && _c !== void 0 ? _c : index.h("strong", { class: "prayer-list" }, localeStrings['prayer-list']), index.h("ul", { class: "prayer-list" }, (this.intentions || []).map(intention => index.h("li", null, intention))));
5543
+ return index.h(index.Host, null, index.h("ldf-label-bar", null, index.h("ion-button", { onClick: () => this.addPAndT(base, index$1), fill: "clear" }, localeStrings.authorized_prayers)), (_c = ((_b = this.intentions) === null || _b === void 0 ? void 0 : _b.length) > 0) !== null && _c !== void 0 ? _c : index.h("strong", { class: "prayer-list" }, localeStrings['prayer-list']), Array.isArray(this.intentions)
5544
+ ? index.h("ul", { class: "prayer-list" }, this.intentions.map(intention => index.h("li", null, intention)))
5545
+ : index.h("p", { class: "prayer-list formatted" }, this.intentions));
5657
5546
  }
5658
5547
  else {
5659
5548
  let value = ((_e = (_d = this.obj) === null || _d === void 0 ? void 0 : _d.metadata) === null || _e === void 0 ? void 0 : _e.rollup)
5660
5549
  ? (((_f = this.obj) === null || _f === void 0 ? void 0 : _f.value) || []).map(s => s.replace(/\s+/g, ' '))
5661
5550
  : (((_g = this.obj) === null || _g === void 0 ? void 0 : _g.value) || []);
5662
5551
  let compiledValue = value.map(s => {
5663
- return s.split(/([\*\w\n\s,:;\.\-–—'“☩✠”‘’\!\?”\[\]\%\(\)\/\u0041-\u024F]+([^\*\w\n\s,;:\.'“”☩✠‘’”\-–—\!\?\[\]\%\(\)\/\u0041-\u024F]))/g);
5552
+ return s.split(/([\*\w\n\s,:;\.\-–—'“☩✠”‘’\!\?”\[\]\%\(\)\/\u0041-\u024F\u1400-\u167f]+([^\*\w\n\s,;:\.'“”☩✠‘’”\-–—\!\?\[\]\%\(\)\/\u0041-\u024F\u1400-\u167f]))/g);
5664
5553
  });
5665
5554
  if (!this.editable && ((_h = this.obj) === null || _h === void 0 ? void 0 : _h.display_format) === 'abbreviated') {
5666
5555
  const firstSection = compiledValue[0], lastSection = compiledValue[compiledValue.length - 1];
5667
5556
  const firstChunk = this.truncate(firstSection[0]), lastChunk = this.truncate(lastSection[lastSection.length - 1], true);
5668
5557
  compiledValue = [[firstChunk], [lastChunk]];
5669
5558
  }
5559
+ console.log("compiledValue = ", compiledValue);
5670
5560
  if (this.editable) {
5671
5561
  return (index.h(index.Host, { lang: this.obj.language }, index.h("ldf-label-bar", null, index.h("slot", { slot: 'end', name: 'controls' })), !this.editable && index.h("ldf-heading", { path: `${this.path}/label`, doc: new heading.Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation, source: this.obj.source }) }), this.editable && index.h("ldf-label-bar", null, !((_k = (_j = this.obj) === null || _j === void 0 ? void 0 : _j.metadata) === null || _k === void 0 ? void 0 : _k.omit_label) && index.h("h3", { class: "editable-label", slot: "start" }, index.h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-label`, text: (_l = this.obj) === null || _l === void 0 ? void 0 : _l.label, placeholder: localeStrings.label, path: `${this.path}/label` })), index.h("ldf-editable-text", { slot: "end", id: "source-source", text: (_o = (_m = this.obj) === null || _m === void 0 ? void 0 : _m.source) === null || _o === void 0 ? void 0 : _o.source, path: `${this.path}/source/source`, placeholder: (_p = this.localeStrings) === null || _p === void 0 ? void 0 : _p.source }), index.h("ldf-editable-text", { slot: "end", id: "source-citation", text: (_r = (_q = this.obj) === null || _q === void 0 ? void 0 : _q.source) === null || _r === void 0 ? void 0 : _r.citation, path: `${this.path}/source/citation`, placeholder: (_s = this.localeStrings) === null || _s === void 0 ? void 0 : _s.source_citation })), index.h("div", { class: `text ${this.editable ? 'editable' : ''} ${((_t = this.obj) === null || _t === void 0 ? void 0 : _t.display_format) || 'default'}` }, this.obj.value.map((prayer, prayerIndex) => index.h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-${prayerIndex}`, text: prayer, path: `${this.path}/value/${prayerIndex}` })), (((_u = this.obj) === null || _u === void 0 ? void 0 : _u.style) === 'prayer' || (((_w = (_v = this.obj) === null || _v === void 0 ? void 0 : _v.metadata) === null || _w === void 0 ? void 0 : _w.response) && !((_y = (_x = this.obj) === null || _x === void 0 ? void 0 : _x.metadata) === null || _y === void 0 ? void 0 : _y.omit_response))) && index.h("span", { class: 'response' }, index.h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-response`, text: this.obj.metadata && this.obj.metadata.response, path: `${this.path}/response`, placeholder: localeStrings.amen })))));
5672
5562
  }
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- const book = require('./book-1a92678a.js');
7
- const rubric$1 = require('./rubric-0afbe4c0.js');
8
- const heading$1 = require('./heading-5afc2b24.js');
9
- const image$1 = require('./image-3bee3e73.js');
10
- const option$1 = require('./option-a078d432.js');
11
- const refrain$1 = require('./refrain-91fb446b.js');
12
- const text$1 = require('./text-5edb80f3.js');
6
+ const book = require('./book-b04f6553.js');
7
+ const rubric$1 = require('./rubric-3ef36eea.js');
8
+ const heading$1 = require('./heading-1243cde5.js');
9
+ const image$1 = require('./image-7ff56371.js');
10
+ const option$1 = require('./option-491b2cc7.js');
11
+ const refrain$1 = require('./refrain-2089062b.js');
12
+ const text$1 = require('./text-67a354ff.js');
13
13
  const locale = require('./locale-d4e925b1.js');
14
14
 
15
15
  const MENU = [
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- const book = require('./book-1a92678a.js');
6
+ const book = require('./book-b04f6553.js');
7
7
  const change = require('./change-cdb1e8c0.js');
8
8
  const locale = require('./locale-d4e925b1.js');
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- const book = require('./book-1a92678a.js');
6
+ const book = require('./book-b04f6553.js');
7
7
  const change = require('./change-cdb1e8c0.js');
8
8
  const locale = require('./locale-d4e925b1.js');
9
9
 
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- const book = require('./book-1a92678a.js');
7
- const option = require('./option-a078d432.js');
6
+ const book = require('./book-b04f6553.js');
7
+ const option = require('./option-491b2cc7.js');
8
8
  const locale = require('./locale-d4e925b1.js');
9
9
 
10
10
  /* Converts a list of documents into a single document showing options in parallel */
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- const book = require('./book-1a92678a.js');
6
+ const book = require('./book-b04f6553.js');
7
7
  const change = require('./change-cdb1e8c0.js');
8
- const option = require('./option-a078d432.js');
9
- const specificClass = require('./specific-class-76b4d343.js');
8
+ const option = require('./option-491b2cc7.js');
9
+ const specificClass = require('./specific-class-3e56392a.js');
10
10
  const locale = require('./locale-d4e925b1.js');
11
- require('./rubric-0afbe4c0.js');
12
- require('./heading-5afc2b24.js');
13
- require('./refrain-91fb446b.js');
14
- require('./text-5edb80f3.js');
11
+ require('./rubric-3ef36eea.js');
12
+ require('./heading-1243cde5.js');
13
+ require('./refrain-2089062b.js');
14
+ require('./text-67a354ff.js');
15
15
 
16
16
  const LOCALE_STRINGS = {
17
17
  "allowMultiple": "Allow multiple options",
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- const book = require('./book-1a92678a.js');
6
+ const book = require('./book-b04f6553.js');
7
7
  const change = require('./change-cdb1e8c0.js');
8
- const specificClass = require('./specific-class-76b4d343.js');
8
+ const specificClass = require('./specific-class-3e56392a.js');
9
9
  const locale = require('./locale-d4e925b1.js');
10
- require('./rubric-0afbe4c0.js');
11
- require('./heading-5afc2b24.js');
12
- require('./option-a078d432.js');
13
- require('./refrain-91fb446b.js');
14
- require('./text-5edb80f3.js');
10
+ require('./rubric-3ef36eea.js');
11
+ require('./heading-1243cde5.js');
12
+ require('./option-491b2cc7.js');
13
+ require('./refrain-2089062b.js');
14
+ require('./text-67a354ff.js');
15
15
 
16
16
  const abbreviated = "Abbreviated";
17
17
  const advanced = "Advanced Settings";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- require('./book-1a92678a.js');
6
+ require('./book-b04f6553.js');
7
7
  const preference = require('./preference-a4bd51c4.js');
8
8
  const change = require('./change-cdb1e8c0.js');
9
9
  const locale = require('./locale-d4e925b1.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- require('./book-1a92678a.js');
6
+ require('./book-b04f6553.js');
7
7
  const preference$1 = require('./preference-a4bd51c4.js');
8
8
  const change = require('./change-cdb1e8c0.js');
9
9
  const locale = require('./locale-d4e925b1.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
6
  const overlays = require('./overlays-eb464d6d.js');
7
- require('./book-1a92678a.js');
7
+ require('./book-b04f6553.js');
8
8
  const preference = require('./preference-a4bd51c4.js');
9
9
  const change = require('./change-cdb1e8c0.js');
10
10
  const locale = require('./locale-d4e925b1.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- require('./book-1a92678a.js');
6
+ require('./book-b04f6553.js');
7
7
  const change = require('./change-cdb1e8c0.js');
8
8
  const locale = require('./locale-d4e925b1.js');
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-8fe0df8d.js');
6
- const book = require('./book-1a92678a.js');
6
+ const book = require('./book-b04f6553.js');
7
7
  const cursor = require('./cursor-81bfd01e.js');
8
8
  const change = require('./change-cdb1e8c0.js');
9
9
  const index$1 = require('./index-de13bd01.js');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const book = require('./book-1a92678a.js');
3
+ const book = require('./book-b04f6553.js');
4
4
 
5
5
  function versionToString(version) {
6
6
  if (typeof version === 'string') {
@@ -20,6 +20,10 @@ const VERSIONS = {
20
20
  rite_i: 'Rite I',
21
21
  bhs: 'Hebrew',
22
22
  hebrew: 'Hebrew',
23
+ EAIB: 'EAIB',
24
+ BCP: 'BCP',
25
+ eaib: 'EAIB',
26
+ bcp: 'BCP',
23
27
  };
24
28
  function modifiedVersion(option) {
25
29
  return option.type === 'psalm' && option.style === 'psalm' && option.version === 'bcp1979'
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const book = require('./book-1a92678a.js');
3
+ const book = require('./book-b04f6553.js');
4
4
 
5
5
  const STYLES = ['normal', 'antiphon', 'gloria'];
6
6
  /** Refrain represents a short text like the Gloria Patri, Hail Mary, or an Antiphon */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const book = require('./book-1a92678a.js');
3
+ const book = require('./book-b04f6553.js');
4
4
 
5
5
  const BIBLE_BOOK_ABBREVIATIONS = [
6
6
  {