@venite/components 0.16.8 → 0.16.14
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/dist/cjs/{index-5e2cc9e9.js → book-1a92678a.js} +1 -92
- package/dist/cjs/{heading-d3809e59.js → heading-5afc2b24.js} +2 -2
- package/dist/cjs/{image-f0ace076.js → image-3bee3e73.js} +2 -2
- package/dist/cjs/ion-button_13.cjs.entry.js +1 -2
- package/dist/cjs/ion-card-content_6.cjs.entry.js +2 -3
- package/dist/cjs/ion-checkbox_3.cjs.entry.js +1 -2
- package/dist/cjs/ion-input_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_16.cjs.entry.js +38 -32
- package/dist/cjs/ldf-day-name_5.cjs.entry.js +69 -66
- package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +9 -10
- package/dist/cjs/ldf-editable-condition-piece.cjs.entry.js +5 -6
- package/dist/cjs/ldf-editable-condition.cjs.entry.js +3 -4
- package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +10 -11
- package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +8 -9
- package/dist/cjs/ldf-editable-metadata.cjs.entry.js +9 -10
- package/dist/cjs/ldf-editable-preference-option.cjs.entry.js +1 -2
- package/dist/cjs/ldf-editable-preference.cjs.entry.js +1 -2
- package/dist/cjs/ldf-editable-preferences.cjs.entry.js +1 -2
- package/dist/cjs/ldf-editable-string-list.cjs.entry.js +1 -2
- package/dist/cjs/ldf-editor.cjs.entry.js +12 -12
- package/dist/cjs/{option-1ebd4514.js → option-24f3d13a.js} +7 -2
- package/dist/cjs/{refrain-a605892e.js → refrain-91fb446b.js} +2 -2
- package/dist/cjs/{rubric-662d8baa.js → rubric-5b467a6a.js} +8 -8
- package/dist/cjs/{specific-class-d80d272a.js → specific-class-a1112e78.js} +5 -5
- package/dist/cjs/{text-c5e8ca0a.js → text-5edb80f3.js} +2 -2
- package/dist/collection/components/bible-reading/bible-reading.js +15 -9
- package/dist/collection/components/bible-reading/dist/bible-reading.js +355 -0
- package/dist/collection/components/psalm/dist/psalm.js +3 -3
- package/dist/collection/components/psalm/psalm.css +8 -1
- package/dist/collection/components/psalm/psalm.js +3 -3
- package/dist/collection/components/text/dist/text.js +2 -1
- package/dist/collection/components/text/text.js +5 -2
- package/dist/esm/{index-f5b9b789.js → book-31b8cdde.js} +1 -92
- package/dist/esm/{heading-c9eb7d89.js → heading-cc5ffa8a.js} +1 -1
- package/dist/esm/{image-f0e35b01.js → image-c6a3f0c5.js} +1 -1
- package/dist/esm/ion-button_13.entry.js +1 -2
- package/dist/esm/ion-card-content_6.entry.js +2 -3
- package/dist/esm/ion-checkbox_3.entry.js +1 -2
- package/dist/esm/ion-input_2.entry.js +1 -1
- package/dist/esm/ion-segment_16.entry.js +25 -19
- package/dist/esm/ldf-day-name_5.entry.js +8 -5
- package/dist/esm/ldf-editable-add-block-menu.entry.js +7 -8
- package/dist/esm/ldf-editable-condition-piece.entry.js +1 -2
- package/dist/esm/ldf-editable-condition.entry.js +1 -2
- package/dist/esm/ldf-editable-filter-documents.entry.js +2 -3
- package/dist/esm/ldf-editable-lookup_2.entry.js +7 -8
- package/dist/esm/ldf-editable-metadata.entry.js +7 -8
- package/dist/esm/ldf-editable-preference-option.entry.js +1 -2
- package/dist/esm/ldf-editable-preference.entry.js +1 -2
- package/dist/esm/ldf-editable-preferences.entry.js +1 -2
- package/dist/esm/ldf-editable-string-list.entry.js +1 -2
- package/dist/esm/ldf-editor.entry.js +1 -1
- package/dist/esm/{option-47d50244.js → option-da8390ad.js} +6 -1
- package/dist/esm/{refrain-810c4de5.js → refrain-75a412cb.js} +1 -1
- package/dist/esm/{rubric-2330a030.js → rubric-91bf7fed.js} +1 -1
- package/dist/esm/{specific-class-28e26e40.js → specific-class-ef83cfb6.js} +5 -5
- package/dist/esm/{text-ce1ed17d.js → text-ed75fbd4.js} +1 -1
- package/dist/ldf/ldf.esm.js +1 -1
- package/dist/ldf/p-03afc8cb.entry.js +1 -0
- package/dist/ldf/p-1902f41e.entry.js +1 -0
- package/dist/ldf/p-1e8c8a66.entry.js +1 -0
- package/dist/ldf/p-1ff665a7.entry.js +1 -0
- package/dist/ldf/{p-db435131.entry.js → p-23af1bc3.entry.js} +1 -1
- package/dist/ldf/p-2ae548b3.entry.js +1 -0
- package/dist/ldf/p-3f8ef67b.entry.js +1 -0
- package/dist/ldf/p-476327d6.js +1 -0
- package/dist/ldf/p-4aa9a6f2.js +1 -0
- package/dist/ldf/p-594fa9d4.entry.js +1 -0
- package/dist/ldf/{p-937ffc85.js → p-5b43e6be.js} +1 -1
- package/dist/ldf/p-5ea6de28.entry.js +1 -0
- package/dist/ldf/p-65563763.entry.js +1 -0
- package/dist/ldf/p-65d26c45.js +1 -0
- package/dist/ldf/p-65ea7ab3.entry.js +1 -0
- package/dist/ldf/p-800a115c.entry.js +1 -0
- package/dist/ldf/{p-9e82b403.js → p-8f67abb8.js} +1 -1
- package/dist/ldf/p-9155f066.js +1 -0
- package/dist/ldf/p-9c1973a6.entry.js +1 -0
- package/dist/ldf/p-a1729dbd.js +1 -0
- package/dist/ldf/p-bdcf2b02.entry.js +1 -0
- package/dist/ldf/p-c60a875b.js +1 -0
- package/dist/ldf/p-e4f0cd91.entry.js +1 -0
- package/dist/ldf/p-f0de7628.entry.js +1 -0
- package/dist/ldf/{p-c1bcd0a9.entry.js → p-fa191f47.entry.js} +1 -1
- package/package.json +2 -2
- package/dist/ldf/p-0651768a.entry.js +0 -1
- package/dist/ldf/p-0f69db87.entry.js +0 -1
- package/dist/ldf/p-1504379f.entry.js +0 -1
- package/dist/ldf/p-2fa1c501.entry.js +0 -1
- package/dist/ldf/p-37f356a4.entry.js +0 -1
- package/dist/ldf/p-4d392128.entry.js +0 -1
- package/dist/ldf/p-53c807a4.js +0 -1
- package/dist/ldf/p-5bf20b51.js +0 -1
- package/dist/ldf/p-698a3399.entry.js +0 -1
- package/dist/ldf/p-73a16936.entry.js +0 -1
- package/dist/ldf/p-7df11f48.entry.js +0 -1
- package/dist/ldf/p-8ee9ccd3.js +0 -1
- package/dist/ldf/p-91b61b55.entry.js +0 -1
- package/dist/ldf/p-972e4f2a.entry.js +0 -1
- package/dist/ldf/p-9cf557f9.js +0 -1
- package/dist/ldf/p-a98c89d1.entry.js +0 -1
- package/dist/ldf/p-b355bfa2.js +0 -1
- package/dist/ldf/p-ca7e0de9.entry.js +0 -1
- package/dist/ldf/p-d49a739d.js +0 -1
- package/dist/ldf/p-d7fa99cc.entry.js +0 -1
- package/dist/ldf/p-ff51dbd0.entry.js +0 -1
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index
|
|
6
|
-
const
|
|
7
|
-
const text = require('./text-
|
|
5
|
+
const index = require('./index-8fe0df8d.js');
|
|
6
|
+
const book = require('./book-1a92678a.js');
|
|
7
|
+
const text = require('./text-5edb80f3.js');
|
|
8
8
|
const locale = require('./locale-d4e925b1.js');
|
|
9
|
-
const heading = require('./heading-
|
|
9
|
+
const heading = require('./heading-5afc2b24.js');
|
|
10
10
|
const _commonjsHelpers = require('./_commonjsHelpers-bcc1208a.js');
|
|
11
11
|
const overlays = require('./overlays-eb464d6d.js');
|
|
12
12
|
require('./ionic-global-581fb4f8.js');
|
|
@@ -25,7 +25,7 @@ class LiturgicalDay {
|
|
|
25
25
|
}
|
|
26
26
|
/** Returns a native Date from the day's date string */
|
|
27
27
|
getDate() {
|
|
28
|
-
return
|
|
28
|
+
return book.dateFromYMDString(this.date);
|
|
29
29
|
}
|
|
30
30
|
/** Given a LiturgicalDay, returns a new LiturgicalDay that includes the feasts passed */
|
|
31
31
|
addHolyDays(holydays) {
|
|
@@ -65,7 +65,7 @@ class LiturgicalDay {
|
|
|
65
65
|
propers = slug;
|
|
66
66
|
}
|
|
67
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.slug : propers, color,
|
|
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
69
|
season,
|
|
70
70
|
octave,
|
|
71
71
|
collect, holy_days: (this.holy_days || new Array()).concat(holydays), holy_day_observed: holy_day_is_observed ? observed : this.holy_day_observed }));
|
|
@@ -82,7 +82,7 @@ class LiturgicalDay {
|
|
|
82
82
|
else {
|
|
83
83
|
// if `day.date` is defined, used it to generate a date
|
|
84
84
|
// otherwise, use the current date
|
|
85
|
-
const date = day.date ?
|
|
85
|
+
const date = day.date ? book.dateFromYMDString(day.date) : book.dateOnly(new Date());
|
|
86
86
|
// Sundays => 4
|
|
87
87
|
if (date.getDay() == 0) {
|
|
88
88
|
return 4;
|
|
@@ -151,7 +151,7 @@ const LOCALE$2 = {
|
|
|
151
151
|
};
|
|
152
152
|
const DayNameComponent = class {
|
|
153
153
|
constructor(hostRef) {
|
|
154
|
-
index
|
|
154
|
+
index.registerInstance(this, hostRef);
|
|
155
155
|
}
|
|
156
156
|
dayChange(newDay) {
|
|
157
157
|
let provisionalObj;
|
|
@@ -188,11 +188,11 @@ const DayNameComponent = class {
|
|
|
188
188
|
// Holy Day => name of day
|
|
189
189
|
if (((_a = day === null || day === void 0 ? void 0 : day.holy_day_observed) === null || _a === void 0 ? void 0 : _a.name) && ((_c = (_b = day === null || day === void 0 ? void 0 : day.holy_day_observed) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.rank) >= 3) {
|
|
190
190
|
return !day.holy_day_observed.bio
|
|
191
|
-
? [index
|
|
192
|
-
: index
|
|
191
|
+
? [index.h("p", { class: "holy-day-name" }, (_d = day === null || day === void 0 ? void 0 : day.holy_day_observed) === null || _d === void 0 ? void 0 : _d.name), ((_e = day === null || day === void 0 ? void 0 : day.holy_day_observed) === null || _e === void 0 ? void 0 : _e.subtitle) ? index.h("p", { class: "holy-day-subtitle" }, day.holy_day_observed.subtitle) : undefined]
|
|
192
|
+
: index.h("details", null, index.h("summary", null, day.holy_day_observed.name), index.h("ldf-text", { doc: new text.Text({ type: "text", style: "text", value: day.holy_day_observed.bio }) }));
|
|
193
193
|
}
|
|
194
194
|
else {
|
|
195
|
-
const date =
|
|
195
|
+
const date = book.dateFromYMDString(day === null || day === void 0 ? void 0 : day.date), locale = ((_g = (_f = this.el) === null || _f === void 0 ? void 0 : _f.closest('[lang]')) === null || _g === void 0 ? void 0 : _g.lang) || 'en';
|
|
196
196
|
// Sunday => name of week
|
|
197
197
|
if (date.getDay() == 0) {
|
|
198
198
|
const the = localeStrings.the || ' the ';
|
|
@@ -216,16 +216,16 @@ const DayNameComponent = class {
|
|
|
216
216
|
render() {
|
|
217
217
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
218
218
|
const image = (typeof ((_a = this.obj) === null || _a === void 0 ? void 0 : _a.color) !== 'string' && ((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.color) === null || _c === void 0 ? void 0 : _c.image)) || this.obj.image || ((_d = this.obj.holy_day_observed) === null || _d === void 0 ? void 0 : _d.image), imageUrl = (typeof ((_e = this.obj) === null || _e === void 0 ? void 0 : _e.color) !== 'string' && ((_g = (_f = this.obj) === null || _f === void 0 ? void 0 : _f.color) === null || _g === void 0 ? void 0 : _g.imageUrl)) || this.obj.imageURL || this.obj['imageUrl'];
|
|
219
|
-
return (index
|
|
219
|
+
return (index.h(index.Host, null, this.localeStrings && this.dayToNodes(this.obj, this.localeStrings), image && imageUrl && index.h("a", { href: imageUrl, target: "_system" }, index.h("img", { class: "icon", src: image })), image && !imageUrl && index.h("img", { class: "icon", src: image })));
|
|
220
220
|
}
|
|
221
|
-
get el() { return index
|
|
221
|
+
get el() { return index.getElement(this); }
|
|
222
222
|
static get watchers() { return {
|
|
223
223
|
"day": ["dayChange"]
|
|
224
224
|
}; }
|
|
225
225
|
};
|
|
226
226
|
DayNameComponent.style = dayNameCss;
|
|
227
227
|
|
|
228
|
-
const EditableNode = ({ uidOrSlug, path, text, index, bodyText }) => index
|
|
228
|
+
const EditableNode = ({ uidOrSlug, path, text, index: index$1, bodyText }) => index.h("ldf-editable-text", { class: { 'body-text': bodyText }, id: `${uidOrSlug}-heading-${index$1}`, text: text, path: `${path}/value/${index$1}`, short: true, inputType: "text" });
|
|
229
229
|
|
|
230
230
|
const date = "The Date of the Liturgy";
|
|
231
231
|
const day = "The Name of the Liturgical Day";
|
|
@@ -241,7 +241,7 @@ const LOCALE$1 = {
|
|
|
241
241
|
};
|
|
242
242
|
const HeadingComponent = class {
|
|
243
243
|
constructor(hostRef) {
|
|
244
|
-
index
|
|
244
|
+
index.registerInstance(this, hostRef);
|
|
245
245
|
}
|
|
246
246
|
docChanged(newDoc) {
|
|
247
247
|
try {
|
|
@@ -275,52 +275,52 @@ const HeadingComponent = class {
|
|
|
275
275
|
let node;
|
|
276
276
|
switch (level) {
|
|
277
277
|
case 1:
|
|
278
|
-
node = index
|
|
278
|
+
node = index.h("h1", null, contentNode);
|
|
279
279
|
break;
|
|
280
280
|
case 2:
|
|
281
|
-
node = index
|
|
281
|
+
node = index.h("h2", null, contentNode);
|
|
282
282
|
break;
|
|
283
283
|
case 3:
|
|
284
|
-
node = index
|
|
284
|
+
node = index.h("h3", { slot: 'start' }, contentNode);
|
|
285
285
|
break;
|
|
286
286
|
case 4:
|
|
287
|
-
node = index
|
|
287
|
+
node = index.h("h4", { slot: 'start' }, contentNode);
|
|
288
288
|
break;
|
|
289
289
|
case 5:
|
|
290
|
-
node = index
|
|
290
|
+
node = index.h("h5", { slot: 'start' }, contentNode);
|
|
291
291
|
break;
|
|
292
292
|
default:
|
|
293
|
-
node = index
|
|
293
|
+
node = index.h("h6", null, contentNode);
|
|
294
294
|
}
|
|
295
295
|
return display && node;
|
|
296
296
|
}
|
|
297
|
-
textNode(text, index, bodyText) {
|
|
297
|
+
textNode(text, index$1, bodyText) {
|
|
298
298
|
return this.editable
|
|
299
|
-
? index
|
|
300
|
-
: index
|
|
299
|
+
? index.h(EditableNode, { uidOrSlug: this.obj.uid || this.obj.slug || '', path: this.path, text: text, index: index$1, bodyText: Boolean(bodyText) })
|
|
300
|
+
: index.h("ldf-string", { text: text, fragment: this.path });
|
|
301
301
|
}
|
|
302
302
|
dateNode() {
|
|
303
303
|
var _a, _b, _c, _d, _e, _f;
|
|
304
304
|
const hasDate = !!((_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.day) === null || _b === void 0 ? void 0 : _b.date);
|
|
305
305
|
if (hasDate) {
|
|
306
|
-
const date =
|
|
307
|
-
return index
|
|
306
|
+
const date = book.dateFromYMDString((_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.day) === null || _d === void 0 ? void 0 : _d.date), locale = ((_f = (_e = this.element) === null || _e === void 0 ? void 0 : _e.closest('[lang]')) === null || _f === void 0 ? void 0 : _f.lang) || 'en';
|
|
307
|
+
return index.h("div", { class: "date" }, date.toLocaleDateString(locale, { year: 'numeric', month: 'long', day: 'numeric' }));
|
|
308
308
|
}
|
|
309
309
|
else {
|
|
310
310
|
return [];
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
citationNode(c, slot = 'end') {
|
|
314
|
-
return (index
|
|
315
|
-
index
|
|
314
|
+
return (index.h("div", { class: 'citation', slot: slot }, this.editable ?
|
|
315
|
+
index.h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-citation`, text: c, path: `${this.path}/citation` }) :
|
|
316
316
|
c));
|
|
317
317
|
}
|
|
318
318
|
sourceNode(c) {
|
|
319
319
|
const text = new Citation(c).toString().replace('bcp1979', 'BCP');
|
|
320
|
-
return (index
|
|
320
|
+
return (index.h("div", { slot: 'end', class: 'source' }, this.editable ?
|
|
321
321
|
[
|
|
322
|
-
index
|
|
323
|
-
index
|
|
322
|
+
index.h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-source-source`, text: c === null || c === void 0 ? void 0 : c.source, path: `${this.path}/source/source` }),
|
|
323
|
+
index.h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-source-citation`, text: c === null || c === void 0 ? void 0 : c.citation, path: `${this.path}/source/citation` }),
|
|
324
324
|
] :
|
|
325
325
|
text));
|
|
326
326
|
}
|
|
@@ -330,13 +330,13 @@ const HeadingComponent = class {
|
|
|
330
330
|
const localeStrings = this.localeStrings || {};
|
|
331
331
|
const level = this.obj.metadata ? this.obj.metadata.level : 4, hasCitation = Boolean((_a = this.obj) === null || _a === void 0 ? void 0 : _a.citation), hasSource = Boolean((_b = this.obj) === null || _b === void 0 ? void 0 : _b.source), isDate = ((_c = this.obj) === null || _c === void 0 ? void 0 : _c.style) == 'date', isDay = ((_d = this.obj) === null || _d === void 0 ? void 0 : _d.style) == 'day', isText = ((_e = this.obj) === null || _e === void 0 ? void 0 : _e.style) == undefined || ((_f = this.obj) === null || _f === void 0 ? void 0 : _f.style) == 'text' || (!isDate && !isDay);
|
|
332
332
|
// Render
|
|
333
|
-
return (index
|
|
333
|
+
return (index.h(index.Host, { lang: ((_g = this.obj) === null || _g === void 0 ? void 0 : _g.language) || 'en' }, this.editable && index.h("ldf-label-bar", null, index.h("slot", { slot: 'end', name: 'controls' })), index.h("ldf-label-bar", { center: ((_j = (_h = this.obj) === null || _h === void 0 ? void 0 : _h.metadata) === null || _j === void 0 ? void 0 : _j.level) <= 2, class: {
|
|
334
334
|
'text': isText && (((_k = this === null || this === void 0 ? void 0 : this.obj) === null || _k === void 0 ? void 0 : _k.value) || []).filter(n => Boolean(n)).length > 0
|
|
335
|
-
} }, isText && ((_m = (_l = this.obj) === null || _l === void 0 ? void 0 : _l.value) === null || _m === void 0 ? void 0 : _m.length) > 0 && this.headerNode(level, this.textNode(this.obj.value[0], 0), true), isDate && !this.editable && this.dateNode(), isDate && this.editable && index
|
|
336
|
-
? index
|
|
337
|
-
: index
|
|
335
|
+
} }, isText && ((_m = (_l = this.obj) === null || _l === void 0 ? void 0 : _l.value) === null || _m === void 0 ? void 0 : _m.length) > 0 && this.headerNode(level, this.textNode(this.obj.value[0], 0), true), isDate && !this.editable && this.dateNode(), isDate && this.editable && index.h("code", { class: "lookup" }, localeStrings.date), isDay && !this.editable && index.h("div", { class: "date" }, index.h("ldf-day-name", { day: (_o = this.obj) === null || _o === void 0 ? void 0 : _o.day })), isDay && !this.editable && ((_r = (_q = (_p = this.obj) === null || _p === void 0 ? void 0 : _p.day) === null || _q === void 0 ? void 0 : _q.holy_days) === null || _r === void 0 ? void 0 : _r.length) > 0 && index.h("ul", { class: "holy-days" }, (_t = (_s = this.obj) === null || _s === void 0 ? void 0 : _s.day) === null || _t === void 0 ? void 0 : _t.holy_days.filter(day => { var _a; return ((_a = day.type) === null || _a === void 0 ? void 0 : _a.rank) < 3; }).map(day => day.bio
|
|
336
|
+
? index.h("li", { class: "holy-day" }, index.h("details", null, index.h("summary", null, day.name), index.h("ldf-text", { doc: new text.Text({ type: "text", style: "text", value: day.bio }) })))
|
|
337
|
+
: index.h("li", { class: "holy-day" }, day.name))), isDay && this.editable && index.h("code", { class: "lookup" }, localeStrings.day), ((_v = (_u = this.obj) === null || _u === void 0 ? void 0 : _u.value) === null || _v === void 0 ? void 0 : _v.length) > 1 && this.textNode(this.obj.value[1], 1), index.h("slot", { name: 'additional' }), index.h("slot", { name: 'citation', slot: 'end' }, hasSource && this.sourceNode(this.obj.source), hasCitation && !hasSource && this.obj.citation !== this.obj.label && this.obj.citation !== this.obj.value[0] && this.citationNode(this.obj.citation))), index.h("div", null, hasSource && hasCitation && this.obj.citation !== this.obj.label && this.citationNode(this.obj.citation, 'none')), ((_x = (_w = this.obj) === null || _w === void 0 ? void 0 : _w.value) === null || _x === void 0 ? void 0 : _x.length) > 2 && this.obj.value.slice(2, this.obj.value.length).map((text, index) => this.textNode(text, index + 2, true))));
|
|
338
338
|
}
|
|
339
|
-
get element() { return index
|
|
339
|
+
get element() { return index.getElement(this); }
|
|
340
340
|
static get watchers() { return {
|
|
341
341
|
"doc": ["docChanged"]
|
|
342
342
|
}; }
|
|
@@ -347,16 +347,16 @@ const labelBarCss = ".label-bar{display:flex;flex-direction:row;flex-wrap:wrap;a
|
|
|
347
347
|
|
|
348
348
|
const LabelBarComponent = class {
|
|
349
349
|
constructor(hostRef) {
|
|
350
|
-
index
|
|
350
|
+
index.registerInstance(this, hostRef);
|
|
351
351
|
this.center = false;
|
|
352
352
|
}
|
|
353
353
|
// Render
|
|
354
354
|
render() {
|
|
355
355
|
if (this.center) {
|
|
356
|
-
return (index
|
|
356
|
+
return (index.h("div", { class: 'label-bar center' }, index.h("slot", { name: 'start' }), index.h("slot", null), index.h("slot", { name: 'end' })));
|
|
357
357
|
}
|
|
358
358
|
else {
|
|
359
|
-
return (index
|
|
359
|
+
return (index.h("div", { class: 'label-bar left' }, index.h("slot", { name: 'start' }), index.h("slot", null), index.h("slot", { name: 'end' })));
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
};
|
|
@@ -366,8 +366,8 @@ const stringCss = "span.sc-ldf-string{font-family:var(--ldf-font-face);font-weig
|
|
|
366
366
|
|
|
367
367
|
const StringComponent = class {
|
|
368
368
|
constructor(hostRef) {
|
|
369
|
-
index
|
|
370
|
-
this.ldfStringClicked = index
|
|
369
|
+
index.registerInstance(this, hostRef);
|
|
370
|
+
this.ldfStringClicked = index.createEvent(this, "ldfStringClicked", 7);
|
|
371
371
|
/**
|
|
372
372
|
* Enable, disable, or force dropcap on the first letter of the text.
|
|
373
373
|
*/
|
|
@@ -418,14 +418,14 @@ const StringComponent = class {
|
|
|
418
418
|
return '';
|
|
419
419
|
}
|
|
420
420
|
else if ((node.startsWith('*') && node.endsWith('*')) || node.startsWith('%') && node.endsWith('%')) {
|
|
421
|
-
return index
|
|
421
|
+
return index.h("em", null, node.slice(1, node.length - 1));
|
|
422
422
|
}
|
|
423
423
|
else if (node.startsWith('^') && node.endsWith('^')) {
|
|
424
424
|
if (this.maintainCasing(node)) {
|
|
425
425
|
return node.replace(/\^/g, '');
|
|
426
426
|
}
|
|
427
427
|
else {
|
|
428
|
-
return index
|
|
428
|
+
return index.h("span", { class: "sc" }, node[1], node.slice(2, node.length - 1).toLowerCase());
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
else {
|
|
@@ -437,20 +437,20 @@ const StringComponent = class {
|
|
|
437
437
|
processTetragrammaton(s) {
|
|
438
438
|
if (s) {
|
|
439
439
|
const replacements = {
|
|
440
|
-
'\n': () => index
|
|
440
|
+
'\n': () => index.h("br", null),
|
|
441
441
|
'’S': () => '’s',
|
|
442
442
|
'\'S': () => '’s',
|
|
443
443
|
'LORD’S': () => 'LORD’s',
|
|
444
444
|
"LORD'S": () => 'LORD’s',
|
|
445
|
-
'LORD': () => index
|
|
446
|
-
'Lord GOD': () => index
|
|
447
|
-
'GOD': () => index
|
|
448
|
-
'YHWH': () => index
|
|
449
|
-
'Yhwh': () => index
|
|
450
|
-
'YAHWEH': () => index
|
|
451
|
-
'Yahweh': () => index
|
|
452
|
-
'\t': () => index
|
|
453
|
-
' ': () => index
|
|
445
|
+
'LORD': () => index.h("span", { class: "sc" }, "Lord"),
|
|
446
|
+
'Lord GOD': () => index.h("span", null, "Lord ", index.h("span", { class: "sc" }, "God")),
|
|
447
|
+
'GOD': () => index.h("span", { class: "sc" }, "God"),
|
|
448
|
+
'YHWH': () => index.h("span", { class: "sc" }, "Yhwh"),
|
|
449
|
+
'Yhwh': () => index.h("span", { class: "sc" }, "Yhwh"),
|
|
450
|
+
'YAHWEH': () => index.h("span", { class: "sc" }, "Yhwh"),
|
|
451
|
+
'Yahweh': () => index.h("span", { class: "sc" }, "Yhwh"),
|
|
452
|
+
'\t': () => index.h("span", { class: 'tab' }, "\u00A0"),
|
|
453
|
+
' ': () => index.h("span", { class: 'half-tab' }, "\u00A0")
|
|
454
454
|
};
|
|
455
455
|
const split = s.split(/(( )|\n|LORD[\'’]S|[\'’]S|LORD|Lord GOD|GOD|YHWH|YAHWEH|Yhwh|Yahweh|\t)/g);
|
|
456
456
|
return split.map(phrase => replacements.hasOwnProperty(phrase) ? replacements[phrase]() : phrase);
|
|
@@ -484,7 +484,7 @@ const StringComponent = class {
|
|
|
484
484
|
: /^ ?([\"\'“”‘’\!\?\[\]\(\)\,\w\u0590-\u05ff\u0370-\u03ff])([\w\u0590-\u05ff\u0370-\u03ff\,]*[\s.!?]*[\w\u0590-\u05ff\u0370-\u03ff]*)/, reIncludingPunctuation = ((_a = firstWord[0]) === null || _a === void 0 ? void 0 : _a.match(/[\"\'“”‘’\!\?\[\]\(\)]/))
|
|
485
485
|
? /^ ?([\"\'“”‘’\!\?\[\]\(\)\,\w\u0590-\u05ff\u0370-\u03ff]{2})\s*([\w\u0590-\u05ff\u0370-\u03ff]*)/
|
|
486
486
|
: re, buffer = firstWord.length == 1, split = firstChunk.split(reIncludingPunctuation).filter(s => s !== ''), [match1, match2, nextWord] = split;
|
|
487
|
-
final = new Array(index
|
|
487
|
+
final = new Array(index.h("span", { class: 'firstword' }, index.h("span", { class: buffer ? `drop buffered-drop drop-${match1}` : `drop drop-${match1}` }, match1), this.maintainCasing(match2) ? match2 : match2 === null || match2 === void 0 ? void 0 : match2.toLowerCase()))
|
|
488
488
|
.concat(nextWord)
|
|
489
489
|
.concat(processed.slice(1));
|
|
490
490
|
}
|
|
@@ -496,9 +496,9 @@ const StringComponent = class {
|
|
|
496
496
|
}
|
|
497
497
|
// Render
|
|
498
498
|
render() {
|
|
499
|
-
return this.text && index
|
|
499
|
+
return this.text && index.h("span", { onClick: () => this.ldfStringClicked.emit({ target: this.element, text: this.text, citation: this.citation, fragment: this.fragment }) }, this.processedString);
|
|
500
500
|
}
|
|
501
|
-
get element() { return index
|
|
501
|
+
get element() { return index.getElement(this); }
|
|
502
502
|
static get watchers() { return {
|
|
503
503
|
"text": ["textChanged"]
|
|
504
504
|
}; }
|
|
@@ -5572,8 +5572,8 @@ const LOCALE = {
|
|
|
5572
5572
|
};
|
|
5573
5573
|
const TextComponent = class {
|
|
5574
5574
|
constructor(hostRef) {
|
|
5575
|
-
index
|
|
5576
|
-
this.ldfDocShouldChange = index
|
|
5575
|
+
index.registerInstance(this, hostRef);
|
|
5576
|
+
this.ldfDocShouldChange = index.createEvent(this, "ldfDocShouldChange", 7);
|
|
5577
5577
|
}
|
|
5578
5578
|
docChanged(newDoc) {
|
|
5579
5579
|
try {
|
|
@@ -5630,8 +5630,8 @@ const TextComponent = class {
|
|
|
5630
5630
|
const localeStrings = this.localeStrings || {};
|
|
5631
5631
|
/** `authorized-prayer` type */
|
|
5632
5632
|
if (((_a = this.obj) === null || _a === void 0 ? void 0 : _a.style) === 'authorized-prayers') {
|
|
5633
|
-
const splits = this.path.split('/'), index = Number(splits[splits.length - 1]), base = splits.slice(0, splits.length - 1).join('/');
|
|
5634
|
-
return index
|
|
5633
|
+
const splits = this.path.split('/'), index$1 = Number(splits[splits.length - 1]), base = splits.slice(0, splits.length - 1).join('/');
|
|
5634
|
+
return index.h("ldf-label-bar", null, index.h("ion-button", { onClick: () => this.addPAndT(base, index$1), fill: "clear" }, localeStrings.authorized_prayers));
|
|
5635
5635
|
}
|
|
5636
5636
|
else {
|
|
5637
5637
|
let value = ((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.rollup)
|
|
@@ -5646,26 +5646,29 @@ const TextComponent = class {
|
|
|
5646
5646
|
compiledValue = [[firstChunk], [lastChunk]];
|
|
5647
5647
|
}
|
|
5648
5648
|
if (this.editable) {
|
|
5649
|
-
return (index
|
|
5649
|
+
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, !((_h = (_g = this.obj) === null || _g === void 0 ? void 0 : _g.metadata) === null || _h === void 0 ? void 0 : _h.omit_label) && index.h("h3", { class: "editable-label", slot: "start" }, index.h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-label`, text: (_j = this.obj) === null || _j === void 0 ? void 0 : _j.label, placeholder: localeStrings.label, path: `${this.path}/label` })), index.h("ldf-editable-text", { slot: "end", id: "source-source", text: (_l = (_k = this.obj) === null || _k === void 0 ? void 0 : _k.source) === null || _l === void 0 ? void 0 : _l.source, path: `${this.path}/source/source`, placeholder: (_m = this.localeStrings) === null || _m === void 0 ? void 0 : _m.source }), index.h("ldf-editable-text", { slot: "end", id: "source-citation", text: (_p = (_o = this.obj) === null || _o === void 0 ? void 0 : _o.source) === null || _p === void 0 ? void 0 : _p.citation, path: `${this.path}/source/citation`, placeholder: (_q = this.localeStrings) === null || _q === void 0 ? void 0 : _q.source_citation })), index.h("div", { class: `text ${this.editable ? 'editable' : ''} ${((_r = this.obj) === null || _r === void 0 ? void 0 : _r.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}` })), (((_s = this.obj) === null || _s === void 0 ? void 0 : _s.style) === 'prayer' || (((_u = (_t = this.obj) === null || _t === void 0 ? void 0 : _t.metadata) === null || _u === void 0 ? void 0 : _u.response) && !((_w = (_v = this.obj) === null || _v === void 0 ? void 0 : _v.metadata) === null || _w === void 0 ? void 0 : _w.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 })))));
|
|
5650
5650
|
}
|
|
5651
5651
|
else {
|
|
5652
5652
|
/** `markdown` types */
|
|
5653
5653
|
if (((_x = this.obj) === null || _x === void 0 ? void 0 : _x.style) === 'markdown') {
|
|
5654
5654
|
const converter = new showdown.Converter();
|
|
5655
|
-
return (((_y = this.obj) === null || _y === void 0 ? void 0 : _y.value) || []).map(value => index
|
|
5655
|
+
return (((_y = this.obj) === null || _y === void 0 ? void 0 : _y.value) || []).map(value => index.h("div", { innerHTML: converter.makeHtml(value) }));
|
|
5656
5656
|
}
|
|
5657
5657
|
/** `text` and `prayer` types */
|
|
5658
5658
|
else {
|
|
5659
|
-
return (index
|
|
5659
|
+
return (index.h("div", { lang: ((_z = this.obj) === null || _z === void 0 ? void 0 : _z.language) || 'en', class: `text ${((_0 = this.obj) === null || _0 === void 0 ? void 0 : _0.display_format) || 'default'}` }, ((((_1 = this.obj) === null || _1 === void 0 ? void 0 : _1.label) && !((_3 = (_2 = this.obj) === null || _2 === void 0 ? void 0 : _2.metadata) === null || _3 === void 0 ? void 0 : _3.omit_label)) || ((_4 = this.obj) === null || _4 === void 0 ? void 0 : _4.citation)) && index.h("ldf-heading", { path: this.path, doc: new heading.Heading({ type: 'heading', metadata: { level: 3 }, value: [((_5 = this.obj.metadata) === null || _5 === void 0 ? void 0 : _5.omit_label) ? '' : this.obj.label], citation: this.obj.citation, source: this.obj.source }) }), compiledValue.map((prayer, prayerIndex) => {
|
|
5660
5660
|
var _a, _b, _c, _d;
|
|
5661
|
-
return index
|
|
5662
|
-
prayer.map((chunk, chunkIndex) =>
|
|
5661
|
+
return index.h("p", { class: "text-body", id: `${this.obj.uid || this.obj.slug}-prayerIndex` }, prayer === null || prayer === void 0 ? void 0 :
|
|
5662
|
+
prayer.map((chunk, chunkIndex) => {
|
|
5663
|
+
var _a;
|
|
5664
|
+
return index.h("span", { id: `${this.obj.uid || this.obj.slug}-${prayerIndex}-${chunkIndex}` }, index.h("ldf-string", { text: chunk, citation: { label: this.obj.label }, dropcap: ((_a = this.obj) === null || _a === void 0 ? void 0 : _a.display_format) == "force_dropcap" && prayerIndex === 0 && chunkIndex === 0 ? "force" : (prayerIndex === 0 && chunkIndex <= 1 ? "enabled" : "disabled"), index: prayerIndex + chunkIndex, fragment: this.path }));
|
|
5665
|
+
}), ((_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.response) && prayerIndex == compiledValue.length - 1 && index.h("span", { class: "response" }, " ", this.obj.metadata.response), !((_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.metadata) === null || _d === void 0 ? void 0 : _d.response) && this.obj.style == 'prayer' && prayerIndex == compiledValue.length - 1 && index.h("span", { class: "response" }, " ", localeStrings.amen));
|
|
5663
5666
|
})));
|
|
5664
5667
|
}
|
|
5665
5668
|
}
|
|
5666
5669
|
}
|
|
5667
5670
|
}
|
|
5668
|
-
get element() { return index
|
|
5671
|
+
get element() { return index.getElement(this); }
|
|
5669
5672
|
static get watchers() { return {
|
|
5670
5673
|
"doc": ["docChanged"]
|
|
5671
5674
|
}; }
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-8fe0df8d.js');
|
|
6
|
-
const
|
|
7
|
-
const rubric$1 = require('./rubric-
|
|
8
|
-
const heading$1 = require('./heading-
|
|
9
|
-
const image$1 = require('./image-
|
|
10
|
-
const option$1 = require('./option-
|
|
11
|
-
const refrain$1 = require('./refrain-
|
|
12
|
-
const text$1 = require('./text-
|
|
6
|
+
const book = require('./book-1a92678a.js');
|
|
7
|
+
const rubric$1 = require('./rubric-5b467a6a.js');
|
|
8
|
+
const heading$1 = require('./heading-5afc2b24.js');
|
|
9
|
+
const image$1 = require('./image-3bee3e73.js');
|
|
10
|
+
const option$1 = require('./option-24f3d13a.js');
|
|
11
|
+
const refrain$1 = require('./refrain-91fb446b.js');
|
|
12
|
+
const text$1 = require('./text-5edb80f3.js');
|
|
13
13
|
const locale = require('./locale-d4e925b1.js');
|
|
14
|
-
require('./_commonjsHelpers-bcc1208a.js');
|
|
15
14
|
|
|
16
15
|
const MENU = [
|
|
17
16
|
{
|
|
@@ -336,7 +335,7 @@ const MENU = [
|
|
|
336
335
|
/* SVG is Font Awesome 'fa-praying-hands' */
|
|
337
336
|
icon: () => (index.h("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "praying-hands", class: "svg-inline--fa fa-praying-hands fa-w-20", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 512" },
|
|
338
337
|
index.h("path", { fill: "currentColor", d: "M272 191.91c-17.6 0-32 14.4-32 32v80c0 8.84-7.16 16-16 16s-16-7.16-16-16v-76.55c0-17.39 4.72-34.47 13.69-49.39l77.75-129.59c9.09-15.16 4.19-34.81-10.97-43.91-14.45-8.67-32.72-4.3-42.3 9.21-.2.23-.62.21-.79.48l-117.26 175.9C117.56 205.9 112 224.31 112 243.29v80.23l-90.12 30.04A31.974 31.974 0 0 0 0 383.91v96c0 10.82 8.52 32 32 32 2.69 0 5.41-.34 8.06-1.03l179.19-46.62C269.16 449.99 304 403.8 304 351.91v-128c0-17.6-14.4-32-32-32zm346.12 161.73L528 323.6v-80.23c0-18.98-5.56-37.39-16.12-53.23L394.62 14.25c-.18-.27-.59-.24-.79-.48-9.58-13.51-27.85-17.88-42.3-9.21-15.16 9.09-20.06 28.75-10.97 43.91l77.75 129.59c8.97 14.92 13.69 32 13.69 49.39V304c0 8.84-7.16 16-16 16s-16-7.16-16-16v-80c0-17.6-14.4-32-32-32s-32 14.4-32 32v128c0 51.89 34.84 98.08 84.75 112.34l179.19 46.62c2.66.69 5.38 1.03 8.06 1.03 23.48 0 32-21.18 32-32v-96c0-13.77-8.81-25.99-21.88-30.35z" }))),
|
|
339
|
-
template: [new
|
|
338
|
+
template: [new book.LiturgicalDocument({ type: 'text', style: 'prayer', value: [''] })]
|
|
340
339
|
},
|
|
341
340
|
{
|
|
342
341
|
label: 'authorized-prayers',
|
|
@@ -344,7 +343,7 @@ const MENU = [
|
|
|
344
343
|
/* SVG is Font Awesome 'fa-praying-hands' */
|
|
345
344
|
icon: () => (index.h("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "praying-hands", class: "svg-inline--fa fa-praying-hands fa-w-20", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 512" },
|
|
346
345
|
index.h("path", { fill: "currentColor", d: "M272 191.91c-17.6 0-32 14.4-32 32v80c0 8.84-7.16 16-16 16s-16-7.16-16-16v-76.55c0-17.39 4.72-34.47 13.69-49.39l77.75-129.59c9.09-15.16 4.19-34.81-10.97-43.91-14.45-8.67-32.72-4.3-42.3 9.21-.2.23-.62.21-.79.48l-117.26 175.9C117.56 205.9 112 224.31 112 243.29v80.23l-90.12 30.04A31.974 31.974 0 0 0 0 383.91v96c0 10.82 8.52 32 32 32 2.69 0 5.41-.34 8.06-1.03l179.19-46.62C269.16 449.99 304 403.8 304 351.91v-128c0-17.6-14.4-32-32-32zm346.12 161.73L528 323.6v-80.23c0-18.98-5.56-37.39-16.12-53.23L394.62 14.25c-.18-.27-.59-.24-.79-.48-9.58-13.51-27.85-17.88-42.3-9.21-15.16 9.09-20.06 28.75-10.97 43.91l77.75 129.59c8.97 14.92 13.69 32 13.69 49.39V304c0 8.84-7.16 16-16 16s-16-7.16-16-16v-80c0-17.6-14.4-32-32-32s-32 14.4-32 32v128c0 51.89 34.84 98.08 84.75 112.34l179.19 46.62c2.66.69 5.38 1.03 8.06 1.03 23.48 0 32-21.18 32-32v-96c0-13.77-8.81-25.99-21.88-30.35z" }))),
|
|
347
|
-
template: [new
|
|
346
|
+
template: [new book.LiturgicalDocument({ type: 'text', style: 'authorized-prayers' })]
|
|
348
347
|
},
|
|
349
348
|
{
|
|
350
349
|
label: 'preces',
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-8fe0df8d.js');
|
|
6
|
-
const
|
|
6
|
+
const book = require('./book-1a92678a.js');
|
|
7
7
|
const change = require('./change-cdb1e8c0.js');
|
|
8
8
|
const locale = require('./locale-d4e925b1.js');
|
|
9
|
-
require('./_commonjsHelpers-bcc1208a.js');
|
|
10
9
|
|
|
11
10
|
//import { PROPERS } from './propers';
|
|
12
11
|
const WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
@@ -129,7 +128,7 @@ const EditableConditionComponent = class {
|
|
|
129
128
|
// Sets or clears one of the `Condition.___` fields (`season`, `day`, etc.)
|
|
130
129
|
toggleSubcondition(subcondition, active, template) {
|
|
131
130
|
if (active && this.workingCondition[subcondition] == undefined) {
|
|
132
|
-
this.workingCondition = new
|
|
131
|
+
this.workingCondition = new book.Condition(Object.assign(Object.assign({}, this.workingCondition), { [subcondition]: template }));
|
|
133
132
|
this.ldfDocShouldChange.emit(new change.Change({
|
|
134
133
|
path: `${this.path}/${subcondition}`,
|
|
135
134
|
op: [{
|
|
@@ -148,7 +147,7 @@ const EditableConditionComponent = class {
|
|
|
148
147
|
}]
|
|
149
148
|
}));
|
|
150
149
|
this.workingCondition[subcondition] = undefined;
|
|
151
|
-
this.workingCondition = new
|
|
150
|
+
this.workingCondition = new book.Condition(this.workingCondition);
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
153
|
toggleExceptOnly(field, subfield, value) {
|
|
@@ -176,7 +175,7 @@ const EditableConditionComponent = class {
|
|
|
176
175
|
}]
|
|
177
176
|
}));
|
|
178
177
|
}
|
|
179
|
-
this.workingCondition = new
|
|
178
|
+
this.workingCondition = new book.Condition(Object.assign({}, this.workingCondition));
|
|
180
179
|
}
|
|
181
180
|
setDateField(field, dateString) {
|
|
182
181
|
var _a;
|
|
@@ -193,7 +192,7 @@ const EditableConditionComponent = class {
|
|
|
193
192
|
preferenceIs(value) {
|
|
194
193
|
var _a, _b;
|
|
195
194
|
const oldValue = (_b = (_a = this.workingCondition) === null || _a === void 0 ? void 0 : _a.preference) === null || _b === void 0 ? void 0 : _b.is;
|
|
196
|
-
this.workingCondition = new
|
|
195
|
+
this.workingCondition = new book.Condition(Object.assign(Object.assign({}, this.workingCondition), { preference: Object.assign(Object.assign({}, this.workingCondition.preference), { is: value }) }));
|
|
197
196
|
this.ldfDocShouldChange.emit(new change.Change({
|
|
198
197
|
path: `${this.path}/preference`,
|
|
199
198
|
op: [{
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-8fe0df8d.js');
|
|
6
|
-
const
|
|
6
|
+
const book = require('./book-1a92678a.js');
|
|
7
7
|
const change = require('./change-cdb1e8c0.js');
|
|
8
8
|
const locale = require('./locale-d4e925b1.js');
|
|
9
|
-
require('./_commonjsHelpers-bcc1208a.js');
|
|
10
9
|
|
|
11
10
|
const addCondition = "Add a Condition";
|
|
12
11
|
const and = "All of the following are true";
|
|
@@ -81,11 +80,11 @@ const EditableConditionComponent = class {
|
|
|
81
80
|
}));
|
|
82
81
|
}
|
|
83
82
|
// add to the array
|
|
84
|
-
this.currentCondition = Object.assign(Object.assign({}, this.currentCondition), { conditions: this.currentCondition.conditions.concat(new
|
|
83
|
+
this.currentCondition = Object.assign(Object.assign({}, this.currentCondition), { conditions: this.currentCondition.conditions.concat(new book.Condition()) });
|
|
85
84
|
const index = this.currentCondition.conditions.length - 1;
|
|
86
85
|
this.ldfDocShouldChange.emit(new change.Change({
|
|
87
86
|
path: `${this.path}/conditions`,
|
|
88
|
-
op: [{ type: 'insertAt', index: index < 0 ? 0 : index, value: new
|
|
87
|
+
op: [{ type: 'insertAt', index: index < 0 ? 0 : index, value: new book.Condition() }]
|
|
89
88
|
}));
|
|
90
89
|
}
|
|
91
90
|
render() {
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index
|
|
6
|
-
const
|
|
7
|
-
const option = require('./option-
|
|
5
|
+
const index = require('./index-8fe0df8d.js');
|
|
6
|
+
const book = require('./book-1a92678a.js');
|
|
7
|
+
const option = require('./option-24f3d13a.js');
|
|
8
8
|
const locale = require('./locale-d4e925b1.js');
|
|
9
|
-
require('./_commonjsHelpers-bcc1208a.js');
|
|
10
9
|
|
|
11
10
|
/* Converts a list of documents into a single document showing options in parallel */
|
|
12
11
|
function docsToOption(d, versions = undefined) {
|
|
13
12
|
if (Array.isArray(d)) {
|
|
14
13
|
// remove duplicates if literally same JSON
|
|
15
|
-
const docs = Array.from(new Set(d.map((doc) => JSON.stringify(doc)))).map((doc) => new
|
|
14
|
+
const docs = Array.from(new Set(d.map((doc) => JSON.stringify(doc)))).map((doc) => new book.LiturgicalDocument(JSON.parse(doc)));
|
|
16
15
|
// sort by preferred version
|
|
17
16
|
let sorted;
|
|
18
17
|
if (versions !== undefined && versions.length > 0) {
|
|
@@ -60,8 +59,8 @@ const LOCALE = {
|
|
|
60
59
|
};
|
|
61
60
|
const EditableFilterDocumentsComponent = class {
|
|
62
61
|
constructor(hostRef) {
|
|
63
|
-
index
|
|
64
|
-
this.ldfDocumentSelected = index
|
|
62
|
+
index.registerInstance(this, hostRef);
|
|
63
|
+
this.ldfDocumentSelected = index.createEvent(this, "ldfDocumentSelected", 7);
|
|
65
64
|
this.filteredOptions = [];
|
|
66
65
|
/** Whether to include a `LiturgicalDocument.version` field with the selection */
|
|
67
66
|
this.versions = {};
|
|
@@ -134,14 +133,14 @@ const EditableFilterDocumentsComponent = class {
|
|
|
134
133
|
}
|
|
135
134
|
render() {
|
|
136
135
|
const localeStrings = this.localeStrings || {};
|
|
137
|
-
return (index
|
|
136
|
+
return (index.h(index.Host, null, this.modal && index.h("ion-header", null, index.h("ion-toolbar", null, index.h("ion-buttons", { slot: "end" }, index.h("ion-button", { onClick: () => this.modal.dismiss() }, index.h("ion-icon", { name: "close", slot: "icon-only" }))))), index.h("ion-content", null, index.h("form", null, index.h("ion-list", null, index.h("ion-button", { fill: "clear", onClick: () => { this.chooseDoc(docsToOption(this.filteredOptions)); this.choose(); } }, index.h("ion-label", null, localeStrings.includeAll)), this.versions && index.h("ion-item", null, index.h("ion-label", null, localeStrings.version), index.h("ion-select", { value: this.version, onIonChange: (ev) => this.chooseVersion(ev.detail.value) }, Object.entries(this.versions)
|
|
138
137
|
.sort((a, b) => a[0] > b[0] ? 1 : -1)
|
|
139
|
-
.map(([versionKey, versionLabel]) => index
|
|
138
|
+
.map(([versionKey, versionLabel]) => index.h("ion-select-option", { value: versionKey }, versionLabel)))), index.h("ion-searchbar", { onIonChange: (ev) => this.filter(ev.detail.value) }), this.filteredOptions && this.filteredOptions.map(doc => {
|
|
140
139
|
var _a, _b, _c, _d;
|
|
141
|
-
return index
|
|
140
|
+
return index.h("ion-item", { button: true, onClick: () => { this.chooseDoc(doc); this.choose(); }, color: doc == this.doc ? 'primary' : undefined }, (_b = (_a = doc.label) !== null && _a !== void 0 ? _a : doc.version_label) !== null && _b !== void 0 ? _b : `${(_d = (_c = (((doc.value || [])[0] || {}).text)) !== null && _c !== void 0 ? _c : (doc.value || [])[0]) !== null && _d !== void 0 ? _d : ''}${doc.citation ? ` (${doc.citation})` : ''}`);
|
|
142
141
|
}))))));
|
|
143
142
|
}
|
|
144
|
-
get element() { return index
|
|
143
|
+
get element() { return index.getElement(this); }
|
|
145
144
|
static get watchers() { return {
|
|
146
145
|
"version": ["versionChange"],
|
|
147
146
|
"versions": ["versionsChange"],
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-8fe0df8d.js');
|
|
6
|
-
const
|
|
6
|
+
const book = require('./book-1a92678a.js');
|
|
7
7
|
const change = require('./change-cdb1e8c0.js');
|
|
8
|
-
const option = require('./option-
|
|
9
|
-
const specificClass = require('./specific-class-
|
|
8
|
+
const option = require('./option-24f3d13a.js');
|
|
9
|
+
const specificClass = require('./specific-class-a1112e78.js');
|
|
10
10
|
const locale = require('./locale-d4e925b1.js');
|
|
11
|
-
require('./
|
|
12
|
-
require('./
|
|
13
|
-
require('./
|
|
14
|
-
require('./
|
|
15
|
-
require('./text-c5e8ca0a.js');
|
|
11
|
+
require('./rubric-5b467a6a.js');
|
|
12
|
+
require('./heading-5afc2b24.js');
|
|
13
|
+
require('./refrain-91fb446b.js');
|
|
14
|
+
require('./text-5edb80f3.js');
|
|
16
15
|
|
|
17
16
|
const LOCALE_STRINGS = {
|
|
18
17
|
"allowMultiple": "Allow multiple options",
|
|
@@ -262,7 +261,7 @@ const EditableMetadataMetadataFieldsComponent = class {
|
|
|
262
261
|
}
|
|
263
262
|
catch (e) {
|
|
264
263
|
console.warn(e);
|
|
265
|
-
this.obj = new
|
|
264
|
+
this.obj = new book.LiturgicalDocument();
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
267
|
introsChanged() {
|