@venite/components 0.16.47 → 0.16.48
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/{book-82e0876b.js → book-6d16fad3.js} +1 -1
- package/dist/cjs/dropcaps-baa79b2d.js +21 -0
- package/dist/cjs/{heading-b7872a4d.js → heading-dff0a6f9.js} +1 -1
- package/dist/cjs/{image-75040cd8.js → image-527d7134.js} +1 -1
- package/dist/cjs/ion-button_14.cjs.entry.js +1 -1
- package/dist/cjs/ion-card-content_6.cjs.entry.js +2 -2
- package/dist/cjs/ion-input_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_16.cjs.entry.js +18 -17
- package/dist/cjs/ldf-day-name_5.cjs.entry.js +5 -7
- package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +7 -7
- package/dist/cjs/ldf-editable-boolean_2.cjs.entry.js +1 -1
- package/dist/cjs/ldf-editable-condition-piece.cjs.entry.js +1 -1
- package/dist/cjs/ldf-editable-condition.cjs.entry.js +1 -1
- package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +2 -2
- package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +7 -7
- package/dist/cjs/ldf-editable-metadata.cjs.entry.js +7 -7
- package/dist/cjs/ldf-editable-preference-option.cjs.entry.js +1 -1
- package/dist/cjs/ldf-editable-preference.cjs.entry.js +1 -1
- package/dist/cjs/ldf-editable-preferences.cjs.entry.js +1 -1
- package/dist/cjs/ldf-editable-string-list.cjs.entry.js +1 -1
- package/dist/cjs/ldf-editor.cjs.entry.js +1 -1
- package/dist/cjs/{option-d7f9785e.js → option-af060fb4.js} +1 -1
- package/dist/cjs/{refrain-dcde813a.js → refrain-f867e88b.js} +1 -1
- package/dist/cjs/{rubric-cd1436af.js → rubric-9851b9bb.js} +1 -1
- package/dist/cjs/{specific-class-c2579d35.js → specific-class-a4d1cc65.js} +5 -5
- package/dist/cjs/{text-d86d8916.js → text-9dd495bb.js} +1 -1
- package/dist/collection/components/bible-reading/bible-reading.js +5 -4
- package/dist/collection/components/psalm/psalm.js +2 -1
- package/dist/collection/components/responsive-prayer/responsive-prayer.js +8 -7
- package/dist/collection/components/text/text.js +3 -5
- package/dist/collection/utils/dropcaps.js +17 -0
- package/dist/esm/{book-30d463e4.js → book-ffb2b7c9.js} +1 -1
- package/dist/esm/dropcaps-9409f9e0.js +19 -0
- package/dist/esm/{heading-3148493f.js → heading-32b75b51.js} +1 -1
- package/dist/esm/{image-72083f34.js → image-b773ce41.js} +1 -1
- package/dist/esm/ion-button_14.entry.js +1 -1
- package/dist/esm/ion-card-content_6.entry.js +2 -2
- package/dist/esm/ion-input_2.entry.js +1 -1
- package/dist/esm/ion-segment_16.entry.js +18 -17
- package/dist/esm/ldf-day-name_5.entry.js +5 -7
- package/dist/esm/ldf-editable-add-block-menu.entry.js +7 -7
- package/dist/esm/ldf-editable-boolean_2.entry.js +1 -1
- package/dist/esm/ldf-editable-condition-piece.entry.js +1 -1
- package/dist/esm/ldf-editable-condition.entry.js +1 -1
- package/dist/esm/ldf-editable-filter-documents.entry.js +2 -2
- package/dist/esm/ldf-editable-lookup_2.entry.js +7 -7
- package/dist/esm/ldf-editable-metadata.entry.js +7 -7
- package/dist/esm/ldf-editable-preference-option.entry.js +1 -1
- package/dist/esm/ldf-editable-preference.entry.js +1 -1
- package/dist/esm/ldf-editable-preferences.entry.js +1 -1
- package/dist/esm/ldf-editable-string-list.entry.js +1 -1
- package/dist/esm/ldf-editor.entry.js +1 -1
- package/dist/esm/{option-6f3f65cd.js → option-f5f45da6.js} +1 -1
- package/dist/esm/{refrain-7bd7ce8a.js → refrain-03edc2dd.js} +1 -1
- package/dist/esm/{rubric-4fcaa326.js → rubric-5e76db3e.js} +1 -1
- package/dist/esm/{specific-class-11a0f046.js → specific-class-19d5b8ae.js} +5 -5
- package/dist/esm/{text-8a1f3c31.js → text-035232e4.js} +1 -1
- package/dist/ldf/ldf.esm.js +1 -1
- package/dist/ldf/p-07a5654e.js +1 -0
- package/dist/ldf/{p-13c95df6.entry.js → p-1e912545.entry.js} +1 -1
- package/dist/ldf/{p-75945b61.entry.js → p-2a52fcd7.entry.js} +1 -1
- package/dist/ldf/{p-4cecd5be.js → p-3f3b5ab1.js} +1 -1
- package/dist/ldf/p-424ff111.entry.js +1 -0
- package/dist/ldf/{p-0275ff97.entry.js → p-4a2d5333.entry.js} +1 -1
- package/dist/ldf/{p-531b0af0.entry.js → p-5547df4c.entry.js} +1 -1
- package/dist/ldf/p-5c897bef.entry.js +1 -0
- package/dist/ldf/{p-809c58d3.js → p-619c1cd7.js} +1 -1
- package/dist/ldf/{p-b5f92da4.entry.js → p-64a75143.entry.js} +1 -1
- package/dist/ldf/{p-a54d398b.entry.js → p-6a61c406.entry.js} +1 -1
- package/dist/ldf/{p-28f67c35.entry.js → p-823625bb.entry.js} +1 -1
- package/dist/ldf/{p-be6a5a82.js → p-8e59a930.js} +1 -1
- package/dist/ldf/p-94095704.js +1 -0
- package/dist/ldf/{p-f51f98ee.entry.js → p-a745950c.entry.js} +1 -1
- package/dist/ldf/p-ae13ac48.js +1 -0
- package/dist/ldf/{p-49297483.js → p-c88be1ca.js} +1 -1
- package/dist/ldf/{p-76b4b747.entry.js → p-c9263178.entry.js} +1 -1
- package/dist/ldf/{p-4346d5f8.js → p-cf9d5530.js} +1 -1
- package/dist/ldf/{p-8bd9886e.entry.js → p-d15ff324.entry.js} +1 -1
- package/dist/ldf/p-d6b725e9.js +1 -0
- package/dist/ldf/{p-3d550f37.entry.js → p-dd824b02.entry.js} +1 -1
- package/dist/ldf/{p-3402f431.entry.js → p-e1f58e08.entry.js} +1 -1
- package/dist/ldf/{p-74080a1b.entry.js → p-e8a53a5e.entry.js} +1 -1
- package/dist/ldf/{p-c8423964.entry.js → p-e8bb8144.entry.js} +1 -1
- package/dist/ldf/{p-248ae134.entry.js → p-ea6696fa.entry.js} +1 -1
- package/dist/types/components/responsive-prayer/responsive-prayer.d.ts +2 -2
- package/dist/types/utils/dropcaps.d.ts +3 -0
- package/package.json +2 -2
- package/dist/ldf/p-705e7fad.js +0 -1
- package/dist/ldf/p-8d817f81.entry.js +0 -1
- package/dist/ldf/p-ce877995.js +0 -1
- package/dist/ldf/p-cf7fede1.entry.js +0 -1
- package/dist/ldf/p-de7668ff.js +0 -1
|
@@ -257,7 +257,7 @@ const TYPES = [
|
|
|
257
257
|
'parallel',
|
|
258
258
|
];
|
|
259
259
|
const LOOKUP_TYPES = ['lectionary', 'canticle', 'category', 'slug', 'collect'];
|
|
260
|
-
const DISPLAY_FORMATS = ['default', 'omit', 'unison', 'abbreviated', 'force_dropcap'];
|
|
260
|
+
const DISPLAY_FORMATS = ['default', 'omit', 'unison', 'abbreviated', 'force_dropcap', 'disable_dropcap'];
|
|
261
261
|
/** Represents a liturgy of any scope and concreteness, from a complete bullletin to a single prayer. */
|
|
262
262
|
class LiturgicalDocument {
|
|
263
263
|
//** Constructor takes a Javascript object containing the class's properties */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function useDropcap(language, display_format, index) {
|
|
4
|
+
if (language == "iu" || language == "he") {
|
|
5
|
+
return "disabled";
|
|
6
|
+
}
|
|
7
|
+
if (display_format === "force_dropcap") {
|
|
8
|
+
return "enabled";
|
|
9
|
+
}
|
|
10
|
+
if (display_format === "disable_dropcap") {
|
|
11
|
+
return "disabled";
|
|
12
|
+
}
|
|
13
|
+
if (index == 0) {
|
|
14
|
+
return "enabled";
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return "disabled";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.useDropcap = useDropcap;
|
|
@@ -11,7 +11,7 @@ const index$1 = require('./index-9c7b27e4.js');
|
|
|
11
11
|
const index$2 = require('./index-b6879fbc.js');
|
|
12
12
|
const index$3 = require('./index-e56e09b8.js');
|
|
13
13
|
const overlays = require('./overlays-240c867b.js');
|
|
14
|
-
require('./book-
|
|
14
|
+
require('./book-6d16fad3.js');
|
|
15
15
|
const change = require('./change-cdb1e8c0.js');
|
|
16
16
|
const locale = require('./locale-13a47c0e.js');
|
|
17
17
|
require('./hardware-back-button-92d97ff8.js');
|
|
@@ -6,8 +6,8 @@ const index = require('./index-01fdec29.js');
|
|
|
6
6
|
const ionicGlobal = require('./ionic-global-bd0aab94.js');
|
|
7
7
|
const theme = require('./theme-b0b295c1.js');
|
|
8
8
|
const overlays = require('./overlays-240c867b.js');
|
|
9
|
-
require('./book-
|
|
10
|
-
const refrain = require('./refrain-
|
|
9
|
+
require('./book-6d16fad3.js');
|
|
10
|
+
const refrain = require('./refrain-f867e88b.js');
|
|
11
11
|
const change = require('./change-cdb1e8c0.js');
|
|
12
12
|
const locale = require('./locale-13a47c0e.js');
|
|
13
13
|
require('./hardware-back-button-92d97ff8.js');
|
|
@@ -7,7 +7,7 @@ const ionicGlobal = require('./ionic-global-bd0aab94.js');
|
|
|
7
7
|
const helpers = require('./helpers-c2496722.js');
|
|
8
8
|
const theme = require('./theme-b0b295c1.js');
|
|
9
9
|
const index$1 = require('./index-7aa21373.js');
|
|
10
|
-
require('./book-
|
|
10
|
+
require('./book-6d16fad3.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');
|
|
@@ -8,15 +8,16 @@ const helpers = require('./helpers-c2496722.js');
|
|
|
8
8
|
const dir = require('./dir-5af5259a.js');
|
|
9
9
|
const theme = require('./theme-b0b295c1.js');
|
|
10
10
|
const overlays = require('./overlays-240c867b.js');
|
|
11
|
-
const book$2 = require('./book-
|
|
12
|
-
const rubric = require('./rubric-
|
|
13
|
-
const heading$1 = require('./heading-
|
|
14
|
-
const option$1 = require('./option-
|
|
11
|
+
const book$2 = require('./book-6d16fad3.js');
|
|
12
|
+
const rubric = require('./rubric-9851b9bb.js');
|
|
13
|
+
const heading$1 = require('./heading-dff0a6f9.js');
|
|
14
|
+
const option$1 = require('./option-af060fb4.js');
|
|
15
15
|
const change = require('./change-cdb1e8c0.js');
|
|
16
16
|
const locale = require('./locale-13a47c0e.js');
|
|
17
|
-
const
|
|
17
|
+
const dropcaps = require('./dropcaps-baa79b2d.js');
|
|
18
|
+
const image = require('./image-527d7134.js');
|
|
18
19
|
const index$1 = require('./index-7aa21373.js');
|
|
19
|
-
const refrain = require('./refrain-
|
|
20
|
+
const refrain = require('./refrain-f867e88b.js');
|
|
20
21
|
require('./hardware-back-button-92d97ff8.js');
|
|
21
22
|
require('./_commonjsHelpers-bcc1208a.js');
|
|
22
23
|
|
|
@@ -768,22 +769,22 @@ const BibleReadingComponent = class {
|
|
|
768
769
|
_o.response);
|
|
769
770
|
}
|
|
770
771
|
return (index.h(index.Host, null, ((_p = this.obj) === null || _p === void 0 ? void 0 : _p.label) && index.h("ldf-heading", { doc: new heading$1.Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label] }) }), index.h("div", { lang: (_q = this.obj) === null || _q === void 0 ? void 0 : _q.language, class: `bible-reading ${((_r = this.obj) === null || _r === void 0 ? void 0 : _r.display_format) || 'default'}` }, index.h("p", null, this.verses.map((verse, verseIndex) => {
|
|
771
|
-
var _a;
|
|
772
|
+
var _a, _b;
|
|
772
773
|
return verse.hasOwnProperty('type') && verse.type === 'heading'
|
|
773
774
|
? index.h("ldf-heading", { doc: new heading$1.Heading(verse) })
|
|
774
|
-
: index.h("ldf-string", { citation: { book: verse.book, chapter: verse.chapter, verse: verse.verse }, id: this.obj.uid, text: verse.text, fragment: this.path, dropcap: ((_a = this.obj) === null || _a === void 0 ? void 0 : _a.
|
|
775
|
+
: index.h("ldf-string", { citation: { book: verse.book, chapter: verse.chapter, verse: verse.verse }, id: this.obj.uid, text: verse.text, fragment: this.path, dropcap: dropcaps.useDropcap((_a = this.obj) === null || _a === void 0 ? void 0 : _a.language, (_b = this.obj) === null || _b === void 0 ? void 0 : _b.display_format, verseIndex) });
|
|
775
776
|
}), shortResponse && !((_t = (_s = this.obj) === null || _s === void 0 ? void 0 : _s.metadata) === null || _t === void 0 ? void 0 : _t.omit_response) && responseNode, index.h("span", { class: "citation" }, this.obj.citation)), !shortResponse && !((_v = (_u = this.obj) === null || _u === void 0 ? void 0 : _u.metadata) === null || _v === void 0 ? void 0 : _v.omit_response) && index.h("p", null, responseNode))));
|
|
776
777
|
}
|
|
777
778
|
/* `long` render a typical Bible reading in the liturgy */
|
|
778
779
|
else {
|
|
779
780
|
const paragraphs = this.paragraphs();
|
|
780
781
|
return (index.h("div", { lang: (_w = this.obj) === null || _w === void 0 ? void 0 : _w.language, class: `bible-reading ${((_x = this.obj) === null || _x === void 0 ? void 0 : _x.display_format) || 'default'}` }, index.h("ldf-heading", { doc: new heading$1.Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation }) }), ((_z = (_y = this.obj) === null || _y === void 0 ? void 0 : _y.metadata) === null || _z === void 0 ? void 0 : _z.compiled_intro) && index.h("ldf-liturgical-document", { doc: this.obj.metadata.compiled_intro }), paragraphs.map((paragraph, paragraphIndex) => index.h("p", { lang: this.obj.language }, paragraph.map((verse, verseIndex) => {
|
|
781
|
-
var _a;
|
|
782
|
+
var _a, _b;
|
|
782
783
|
return verse.hasOwnProperty('type') && verse.type === 'heading'
|
|
783
784
|
? index.h("ldf-heading", { doc: new heading$1.Heading(verse) })
|
|
784
785
|
: [
|
|
785
786
|
index.h("sup", null, verse.verse),
|
|
786
|
-
index.h("ldf-string", { citation: verse, dropcap:
|
|
787
|
+
index.h("ldf-string", { citation: verse, dropcap: dropcaps.useDropcap((_a = this.obj) === null || _a === void 0 ? void 0 : _a.language, (_b = this.obj) === null || _b === void 0 ? void 0 : _b.display_format, paragraphIndex + verseIndex), id: `${verse.chapter}-${verse.book}-${verse.verse}`, text: verse.text, index: verseIndex, fragment: this.path })
|
|
787
788
|
];
|
|
788
789
|
})))));
|
|
789
790
|
}
|
|
@@ -2427,7 +2428,7 @@ const PsalmComponent = class {
|
|
|
2427
2428
|
// 1st half of verse
|
|
2428
2429
|
nodes.push(index.h("div", { class: 'verse' }, this.editable ?
|
|
2429
2430
|
index.h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-${sectionIndex}-${verseIndex}-verse`, text: verse.verse, path: `${this.path}/value/${sectionIndex}/value/${verseIndex}/verse`, placeholder: 'Lorem ipsum sit dolor amet, *', template: pattern, templateMaker: templateMaker }) :
|
|
2430
|
-
index.h("ldf-string", { text: verse.verse, citation: { label: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.label, book: ((_b = this.obj) === null || _b === void 0 ? void 0 : _b.style) === 'psalm' ? 'Psalm' : undefined, chapter: (_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.metadata) === null || _d === void 0 ? void 0 : _d.number, verse: verse.number }, dropcap: (
|
|
2431
|
+
index.h("ldf-string", { text: verse.verse, citation: { label: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.label, book: ((_b = this.obj) === null || _b === void 0 ? void 0 : _b.style) === 'psalm' ? 'Psalm' : undefined, chapter: (_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.metadata) === null || _d === void 0 ? void 0 : _d.number, verse: verse.number }, dropcap: dropcaps.useDropcap((_e = this.obj) === null || _e === void 0 ? void 0 : _e.language, (_f = this.obj) === null || _f === void 0 ? void 0 : _f.display_format, verseIndex), index: verseIndex, fragment: this.path })));
|
|
2431
2432
|
nodes.push(index.h("br", null));
|
|
2432
2433
|
// 2nd half of verse
|
|
2433
2434
|
nodes.push(index.h("div", { class: 'halfverse' }, this.editable ?
|
|
@@ -2545,8 +2546,8 @@ const ResponsivePrayerComponent = class {
|
|
|
2545
2546
|
return (index.h("ldf-editable-text", { id: `${this.obj.uid}-${index$1}-${part}`, text: line[part], path: `${this.path}/value/${index$1}/${part}`, template: template, templateMaker: templateMaker }));
|
|
2546
2547
|
}
|
|
2547
2548
|
/** renders a `ResponsivePrayerLine` as an `ldf-string` */
|
|
2548
|
-
stringNode(line, index$1, part) {
|
|
2549
|
-
return (index.h("ldf-string", { citation: { label: this.obj.label }, id: `${this.obj.uid}-${index$1}-${part}`, text: line[part], dropcap: index$1
|
|
2549
|
+
stringNode(doc, line, index$1, part) {
|
|
2550
|
+
return (index.h("ldf-string", { citation: { label: this.obj.label }, id: `${this.obj.uid}-${index$1}-${part}`, text: line[part], dropcap: dropcaps.useDropcap(doc.language, doc.display_format, index$1), fragment: this.path }));
|
|
2550
2551
|
}
|
|
2551
2552
|
// Render the `response` in a litany, and handle `[Silence]` value
|
|
2552
2553
|
litanyResponseStringNode(line, index$1) {
|
|
@@ -2571,7 +2572,7 @@ const ResponsivePrayerComponent = class {
|
|
|
2571
2572
|
* V. O Lord, open our lips.
|
|
2572
2573
|
* R. And our mouth shall proclaim thy praise. */
|
|
2573
2574
|
const template = { label: '', text: '' }, templateMaker = (text) => ({ label: '', text });
|
|
2574
|
-
return (index.h(index.Host, { class: this.obj.style, lang: this.obj.language }, index.h("ldf-label-bar", null, index.h("slot", { slot: 'end', name: 'controls' })), !this.editable && needsHeader && index.h("ldf-heading", { doc: new heading$1.Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation, source: this.obj.source }) }), this.editable && needsHeader && this.editableHeader(), index.h("table", { class: "preces" }, this.obj.value.map((line, index$1) => index.h("tr", { class: "row" }, index.h("td", { class: "cell" }, this.editable ? this.editableNode(line, index$1, 'label', template, templateMaker) : this.stringNode(line, index$1, 'label')), index.h("td", { class: index$1 % 2 == 0 ? 'cell' : 'cell response' }, this.editable ? this.editableNode(line, index$1, 'text', template, templateMaker) : this.stringNode(line, index$1, 'text')))))));
|
|
2575
|
+
return (index.h(index.Host, { class: this.obj.style, lang: this.obj.language }, index.h("ldf-label-bar", null, index.h("slot", { slot: 'end', name: 'controls' })), !this.editable && needsHeader && index.h("ldf-heading", { doc: new heading$1.Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation, source: this.obj.source }) }), this.editable && needsHeader && this.editableHeader(), index.h("table", { class: "preces" }, this.obj.value.map((line, index$1) => index.h("tr", { class: "row" }, index.h("td", { class: "cell" }, this.editable ? this.editableNode(line, index$1, 'label', template, templateMaker) : this.stringNode(this.obj, line, index$1, 'label')), index.h("td", { class: index$1 % 2 == 0 ? 'cell' : 'cell response' }, this.editable ? this.editableNode(line, index$1, 'text', template, templateMaker) : this.stringNode(this.obj, line, index$1, 'text')))))));
|
|
2575
2576
|
}
|
|
2576
2577
|
else if (this.obj.style == 'litany') {
|
|
2577
2578
|
/* `litany`type returns prayers and responses with a break between each pair, like
|
|
@@ -2591,7 +2592,7 @@ const ResponsivePrayerComponent = class {
|
|
|
2591
2592
|
// Render the line
|
|
2592
2593
|
return index.h("div", { class: { "line": true, "editable": this.editable } }, index.h("p", { class: classes.join(' ') }, this.editable
|
|
2593
2594
|
? this.editableNode(line, index$1, 'text', template, templateMaker)
|
|
2594
|
-
: this.stringNode(line, index$1, 'text'), line.response && (this.editable ?
|
|
2595
|
+
: this.stringNode(this.obj, line, index$1, 'text'), line.response && (this.editable ?
|
|
2595
2596
|
index.h("span", { class: 'response' }, this.editableNode(line, index$1, 'response', template, templateMaker)) :
|
|
2596
2597
|
[index.h("br", null), this.litanyResponseStringNode(line, index$1)]), (!line.response && ((_a = this.obj.metadata) === null || _a === void 0 ? void 0 : _a.response)) && (this.editable ?
|
|
2597
2598
|
index.h("span", { class: 'response' }, index.h("ldf-editable-text", { id: `${this.obj.uid}-${index$1}-response`, text: this.obj.metadata.response, path: `${this.path}/response` })) :
|
|
@@ -2607,10 +2608,10 @@ const ResponsivePrayerComponent = class {
|
|
|
2607
2608
|
return (index.h(index.Host, { class: this.obj.style, lang: this.obj.language }, !this.editableHeader && needsHeader && index.h("ldf-heading", { doc: new heading$1.Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation, source: this.obj.source }) }), this.editable && needsHeader && this.editableHeader(), index.h("p", { class: 'responsive' }, this.obj.value.map((line, index$1) => [
|
|
2608
2609
|
this.editable ?
|
|
2609
2610
|
index.h("div", null, this.editableNode(line, index$1, 'text', template, templateMaker)) :
|
|
2610
|
-
index.h("div", null, this.stringNode(line, index$1, 'text')),
|
|
2611
|
+
index.h("div", null, this.stringNode(this.obj, line, index$1, 'text')),
|
|
2611
2612
|
this.editable ?
|
|
2612
2613
|
index.h("div", { class: 'response' }, this.editableNode(line, index$1, 'response', template, templateMaker)) :
|
|
2613
|
-
index.h("div", { class: 'response' }, this.stringNode(line, index$1, 'response'))
|
|
2614
|
+
index.h("div", { class: 'response' }, this.stringNode(this.obj, line, index$1, 'response'))
|
|
2614
2615
|
]))));
|
|
2615
2616
|
}
|
|
2616
2617
|
}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
|
-
const book = require('./book-
|
|
7
|
-
const text = require('./text-
|
|
6
|
+
const book = require('./book-6d16fad3.js');
|
|
7
|
+
const text = require('./text-9dd495bb.js');
|
|
8
8
|
const locale = require('./locale-13a47c0e.js');
|
|
9
|
-
const heading = require('./heading-
|
|
9
|
+
const heading = require('./heading-dff0a6f9.js');
|
|
10
10
|
const _commonjsHelpers = require('./_commonjsHelpers-bcc1208a.js');
|
|
11
11
|
const overlays = require('./overlays-240c867b.js');
|
|
12
|
+
const dropcaps = require('./dropcaps-baa79b2d.js');
|
|
12
13
|
require('./ionic-global-bd0aab94.js');
|
|
13
14
|
require('./hardware-back-button-92d97ff8.js');
|
|
14
15
|
require('./helpers-c2496722.js');
|
|
@@ -5864,10 +5865,7 @@ const TextComponent = class {
|
|
|
5864
5865
|
return (index.h("div", { lang: ((_1 = this.obj) === null || _1 === void 0 ? void 0 : _1.language) || 'en', class: `text ${((_2 = this.obj) === null || _2 === void 0 ? void 0 : _2.display_format) || 'default'}` }, ((((_3 = this.obj) === null || _3 === void 0 ? void 0 : _3.label) && !((_5 = (_4 = this.obj) === null || _4 === void 0 ? void 0 : _4.metadata) === null || _5 === void 0 ? void 0 : _5.omit_label)) || ((_6 = this.obj) === null || _6 === void 0 ? void 0 : _6.citation)) && index.h("ldf-heading", { path: this.path, doc: new heading.Heading({ type: 'heading', metadata: { level: 3 }, value: [((_7 = this.obj.metadata) === null || _7 === void 0 ? void 0 : _7.omit_label) ? '' : this.obj.label], citation: this.obj.citation, source: this.obj.source }) }), compiledValue.map((prayer, prayerIndex) => {
|
|
5865
5866
|
var _a, _b, _c, _d;
|
|
5866
5867
|
return index.h("p", { class: "text-body", id: `${this.obj.uid || this.obj.slug}-prayerIndex` }, prayer === null || prayer === void 0 ? void 0 :
|
|
5867
|
-
prayer.map((chunk, chunkIndex) => {
|
|
5868
|
-
var _a;
|
|
5869
|
-
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 }));
|
|
5870
|
-
}), ((_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));
|
|
5868
|
+
prayer.map((chunk, chunkIndex) => index.h("span", { id: `${this.obj.uid || this.obj.slug}-${prayerIndex}-${chunkIndex}` }, index.h("ldf-string", { text: chunk, citation: { label: this.obj.label }, dropcap: dropcaps.useDropcap(this.obj.language, this.obj.display_format, prayerIndex + chunkIndex), index: prayerIndex + chunkIndex, fragment: this.path }))), ((_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));
|
|
5871
5869
|
})));
|
|
5872
5870
|
}
|
|
5873
5871
|
}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
|
-
const book = require('./book-
|
|
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-6d16fad3.js');
|
|
7
|
+
const rubric$1 = require('./rubric-9851b9bb.js');
|
|
8
|
+
const heading$1 = require('./heading-dff0a6f9.js');
|
|
9
|
+
const image$1 = require('./image-527d7134.js');
|
|
10
|
+
const option$1 = require('./option-af060fb4.js');
|
|
11
|
+
const refrain$1 = require('./refrain-f867e88b.js');
|
|
12
|
+
const text$1 = require('./text-9dd495bb.js');
|
|
13
13
|
const locale = require('./locale-13a47c0e.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-01fdec29.js');
|
|
6
|
-
require('./book-
|
|
6
|
+
require('./book-6d16fad3.js');
|
|
7
7
|
const change = require('./change-cdb1e8c0.js');
|
|
8
8
|
const overlays = require('./overlays-240c867b.js');
|
|
9
9
|
const locale = require('./locale-13a47c0e.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
|
-
const book = require('./book-
|
|
6
|
+
const book = require('./book-6d16fad3.js');
|
|
7
7
|
const change = require('./change-cdb1e8c0.js');
|
|
8
8
|
const locale = require('./locale-13a47c0e.js');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
|
-
const book = require('./book-
|
|
6
|
+
const book = require('./book-6d16fad3.js');
|
|
7
7
|
const change = require('./change-cdb1e8c0.js');
|
|
8
8
|
const locale = require('./locale-13a47c0e.js');
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
|
-
const book = require('./book-
|
|
7
|
-
const option = require('./option-
|
|
6
|
+
const book = require('./book-6d16fad3.js');
|
|
7
|
+
const option = require('./option-af060fb4.js');
|
|
8
8
|
const locale = require('./locale-13a47c0e.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-01fdec29.js');
|
|
6
|
-
const book = require('./book-
|
|
6
|
+
const book = require('./book-6d16fad3.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-af060fb4.js');
|
|
9
|
+
const specificClass = require('./specific-class-a4d1cc65.js');
|
|
10
10
|
const locale = require('./locale-13a47c0e.js');
|
|
11
|
-
require('./rubric-
|
|
12
|
-
require('./heading-
|
|
13
|
-
require('./refrain-
|
|
14
|
-
require('./text-
|
|
11
|
+
require('./rubric-9851b9bb.js');
|
|
12
|
+
require('./heading-dff0a6f9.js');
|
|
13
|
+
require('./refrain-f867e88b.js');
|
|
14
|
+
require('./text-9dd495bb.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-01fdec29.js');
|
|
6
|
-
const book = require('./book-
|
|
6
|
+
const book = require('./book-6d16fad3.js');
|
|
7
7
|
const change = require('./change-cdb1e8c0.js');
|
|
8
|
-
const specificClass = require('./specific-class-
|
|
8
|
+
const specificClass = require('./specific-class-a4d1cc65.js');
|
|
9
9
|
const locale = require('./locale-13a47c0e.js');
|
|
10
|
-
require('./rubric-
|
|
11
|
-
require('./heading-
|
|
12
|
-
require('./option-
|
|
13
|
-
require('./refrain-
|
|
14
|
-
require('./text-
|
|
10
|
+
require('./rubric-9851b9bb.js');
|
|
11
|
+
require('./heading-dff0a6f9.js');
|
|
12
|
+
require('./option-af060fb4.js');
|
|
13
|
+
require('./refrain-f867e88b.js');
|
|
14
|
+
require('./text-9dd495bb.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-01fdec29.js');
|
|
6
|
-
require('./book-
|
|
6
|
+
require('./book-6d16fad3.js');
|
|
7
7
|
const preference = require('./preference-a4bd51c4.js');
|
|
8
8
|
const change = require('./change-cdb1e8c0.js');
|
|
9
9
|
const locale = require('./locale-13a47c0e.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
|
-
require('./book-
|
|
6
|
+
require('./book-6d16fad3.js');
|
|
7
7
|
const preference$1 = require('./preference-a4bd51c4.js');
|
|
8
8
|
const change = require('./change-cdb1e8c0.js');
|
|
9
9
|
const locale = require('./locale-13a47c0e.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
6
|
const overlays = require('./overlays-240c867b.js');
|
|
7
|
-
require('./book-
|
|
7
|
+
require('./book-6d16fad3.js');
|
|
8
8
|
const preference = require('./preference-a4bd51c4.js');
|
|
9
9
|
const change = require('./change-cdb1e8c0.js');
|
|
10
10
|
const locale = require('./locale-13a47c0e.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
|
-
require('./book-
|
|
6
|
+
require('./book-6d16fad3.js');
|
|
7
7
|
const change = require('./change-cdb1e8c0.js');
|
|
8
8
|
const locale = require('./locale-13a47c0e.js');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-01fdec29.js');
|
|
6
|
-
const book = require('./book-
|
|
6
|
+
const book = require('./book-6d16fad3.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,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const rubric = require('./rubric-
|
|
4
|
-
const heading = require('./heading-
|
|
5
|
-
const option = require('./option-
|
|
6
|
-
const refrain = require('./refrain-
|
|
7
|
-
const text = require('./text-
|
|
3
|
+
const rubric = require('./rubric-9851b9bb.js');
|
|
4
|
+
const heading = require('./heading-dff0a6f9.js');
|
|
5
|
+
const option = require('./option-af060fb4.js');
|
|
6
|
+
const refrain = require('./refrain-f867e88b.js');
|
|
7
|
+
const text = require('./text-9dd495bb.js');
|
|
8
8
|
|
|
9
9
|
/** Transforms a generic `LiturgicalDocument` (either a class instance or an `Object` that matches the type),
|
|
10
10
|
* into an instance of a more-specific inherited class */
|
|
@@ -5,6 +5,7 @@ import { getComponentClosestLanguage } from '../../utils/locale';
|
|
|
5
5
|
import EN from './bible-reading.i18n.en.json';
|
|
6
6
|
import ES from './bible-reading.i18n.es.json';
|
|
7
7
|
import { fetchReading } from './fetch-reading';
|
|
8
|
+
import { useDropcap } from '../../utils/dropcaps';
|
|
8
9
|
const LOCALE = {
|
|
9
10
|
'en': EN,
|
|
10
11
|
'es': ES
|
|
@@ -181,10 +182,10 @@ export class BibleReadingComponent {
|
|
|
181
182
|
h("div", { lang: (_q = this.obj) === null || _q === void 0 ? void 0 : _q.language, class: `bible-reading ${((_r = this.obj) === null || _r === void 0 ? void 0 : _r.display_format) || 'default'}` },
|
|
182
183
|
h("p", null,
|
|
183
184
|
this.verses.map((verse, verseIndex) => {
|
|
184
|
-
var _a;
|
|
185
|
+
var _a, _b;
|
|
185
186
|
return verse.hasOwnProperty('type') && verse.type === 'heading'
|
|
186
187
|
? h("ldf-heading", { doc: new Heading(verse) })
|
|
187
|
-
: h("ldf-string", { citation: { book: verse.book, chapter: verse.chapter, verse: verse.verse }, id: this.obj.uid, text: verse.text, fragment: this.path, dropcap: ((_a = this.obj) === null || _a === void 0 ? void 0 : _a.
|
|
188
|
+
: h("ldf-string", { citation: { book: verse.book, chapter: verse.chapter, verse: verse.verse }, id: this.obj.uid, text: verse.text, fragment: this.path, dropcap: useDropcap((_a = this.obj) === null || _a === void 0 ? void 0 : _a.language, (_b = this.obj) === null || _b === void 0 ? void 0 : _b.display_format, verseIndex) });
|
|
188
189
|
}),
|
|
189
190
|
shortResponse && !((_t = (_s = this.obj) === null || _s === void 0 ? void 0 : _s.metadata) === null || _t === void 0 ? void 0 : _t.omit_response) && responseNode,
|
|
190
191
|
h("span", { class: "citation" }, this.obj.citation)),
|
|
@@ -197,12 +198,12 @@ export class BibleReadingComponent {
|
|
|
197
198
|
h("ldf-heading", { doc: new Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation }) }),
|
|
198
199
|
((_z = (_y = this.obj) === null || _y === void 0 ? void 0 : _y.metadata) === null || _z === void 0 ? void 0 : _z.compiled_intro) && h("ldf-liturgical-document", { doc: this.obj.metadata.compiled_intro }),
|
|
199
200
|
paragraphs.map((paragraph, paragraphIndex) => h("p", { lang: this.obj.language }, paragraph.map((verse, verseIndex) => {
|
|
200
|
-
var _a;
|
|
201
|
+
var _a, _b;
|
|
201
202
|
return verse.hasOwnProperty('type') && verse.type === 'heading'
|
|
202
203
|
? h("ldf-heading", { doc: new Heading(verse) })
|
|
203
204
|
: [
|
|
204
205
|
h("sup", null, verse.verse),
|
|
205
|
-
h("ldf-string", { citation: verse, dropcap:
|
|
206
|
+
h("ldf-string", { citation: verse, dropcap: useDropcap((_a = this.obj) === null || _a === void 0 ? void 0 : _a.language, (_b = this.obj) === null || _b === void 0 ? void 0 : _b.display_format, paragraphIndex + verseIndex), id: `${verse.chapter}-${verse.book}-${verse.verse}`, text: verse.text, index: verseIndex, fragment: this.path })
|
|
206
207
|
];
|
|
207
208
|
})))));
|
|
208
209
|
}
|
|
@@ -4,6 +4,7 @@ import { Psalm, Refrain, Heading, dateFromYMDString, Change } from '@venite/ldf'
|
|
|
4
4
|
import { getComponentClosestLanguage } from '../../utils/locale';
|
|
5
5
|
import EN from './psalm.i18n.en.json';
|
|
6
6
|
import ES from './psalm.i18n.es.json';
|
|
7
|
+
import { useDropcap } from '../../utils/dropcaps';
|
|
7
8
|
const LOCALE = {
|
|
8
9
|
'en': EN,
|
|
9
10
|
'es': ES
|
|
@@ -219,7 +220,7 @@ export class PsalmComponent {
|
|
|
219
220
|
// 1st half of verse
|
|
220
221
|
nodes.push(h("div", { class: 'verse' }, this.editable ?
|
|
221
222
|
h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-${sectionIndex}-${verseIndex}-verse`, text: verse.verse, path: `${this.path}/value/${sectionIndex}/value/${verseIndex}/verse`, placeholder: 'Lorem ipsum sit dolor amet, *', template: pattern, templateMaker: templateMaker }) :
|
|
222
|
-
h("ldf-string", { text: verse.verse, citation: { label: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.label, book: ((_b = this.obj) === null || _b === void 0 ? void 0 : _b.style) === 'psalm' ? 'Psalm' : undefined, chapter: (_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.metadata) === null || _d === void 0 ? void 0 : _d.number, verse: verse.number }, dropcap: (
|
|
223
|
+
h("ldf-string", { text: verse.verse, citation: { label: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.label, book: ((_b = this.obj) === null || _b === void 0 ? void 0 : _b.style) === 'psalm' ? 'Psalm' : undefined, chapter: (_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.metadata) === null || _d === void 0 ? void 0 : _d.number, verse: verse.number }, dropcap: useDropcap((_e = this.obj) === null || _e === void 0 ? void 0 : _e.language, (_f = this.obj) === null || _f === void 0 ? void 0 : _f.display_format, verseIndex), index: verseIndex, fragment: this.path })));
|
|
223
224
|
nodes.push(h("br", null));
|
|
224
225
|
// 2nd half of verse
|
|
225
226
|
nodes.push(h("div", { class: 'halfverse' }, this.editable ?
|
|
@@ -2,6 +2,7 @@ import { Component, Prop, Watch, State, Element, Host, h } from '@stencil/core';
|
|
|
2
2
|
import { ResponsivePrayer, Heading } from '@venite/ldf';
|
|
3
3
|
import { getComponentClosestLanguage } from '../../utils/locale';
|
|
4
4
|
import EN from './responsive-prayer.i18n.en.json';
|
|
5
|
+
import { useDropcap } from '../../utils/dropcaps';
|
|
5
6
|
const LOCALE = {
|
|
6
7
|
'en': EN,
|
|
7
8
|
};
|
|
@@ -39,8 +40,8 @@ export class ResponsivePrayerComponent {
|
|
|
39
40
|
return (h("ldf-editable-text", { id: `${this.obj.uid}-${index}-${part}`, text: line[part], path: `${this.path}/value/${index}/${part}`, template: template, templateMaker: templateMaker }));
|
|
40
41
|
}
|
|
41
42
|
/** renders a `ResponsivePrayerLine` as an `ldf-string` */
|
|
42
|
-
stringNode(line, index, part) {
|
|
43
|
-
return (h("ldf-string", { citation: { label: this.obj.label }, id: `${this.obj.uid}-${index}-${part}`, text: line[part], dropcap:
|
|
43
|
+
stringNode(doc, line, index, part) {
|
|
44
|
+
return (h("ldf-string", { citation: { label: this.obj.label }, id: `${this.obj.uid}-${index}-${part}`, text: line[part], dropcap: useDropcap(doc.language, doc.display_format, index), fragment: this.path }));
|
|
44
45
|
}
|
|
45
46
|
// Render the `response` in a litany, and handle `[Silence]` value
|
|
46
47
|
litanyResponseStringNode(line, index) {
|
|
@@ -78,8 +79,8 @@ export class ResponsivePrayerComponent {
|
|
|
78
79
|
!this.editable && needsHeader && h("ldf-heading", { doc: new Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation, source: this.obj.source }) }),
|
|
79
80
|
this.editable && needsHeader && this.editableHeader(),
|
|
80
81
|
h("table", { class: "preces" }, this.obj.value.map((line, index) => h("tr", { class: "row" },
|
|
81
|
-
h("td", { class: "cell" }, this.editable ? this.editableNode(line, index, 'label', template, templateMaker) : this.stringNode(line, index, 'label')),
|
|
82
|
-
h("td", { class: index % 2 == 0 ? 'cell' : 'cell response' }, this.editable ? this.editableNode(line, index, 'text', template, templateMaker) : this.stringNode(line, index, 'text')))))));
|
|
82
|
+
h("td", { class: "cell" }, this.editable ? this.editableNode(line, index, 'label', template, templateMaker) : this.stringNode(this.obj, line, index, 'label')),
|
|
83
|
+
h("td", { class: index % 2 == 0 ? 'cell' : 'cell response' }, this.editable ? this.editableNode(line, index, 'text', template, templateMaker) : this.stringNode(this.obj, line, index, 'text')))))));
|
|
83
84
|
}
|
|
84
85
|
else if (this.obj.style == 'litany') {
|
|
85
86
|
/* `litany`type returns prayers and responses with a break between each pair, like
|
|
@@ -106,7 +107,7 @@ export class ResponsivePrayerComponent {
|
|
|
106
107
|
h("p", { class: classes.join(' ') },
|
|
107
108
|
this.editable
|
|
108
109
|
? this.editableNode(line, index, 'text', template, templateMaker)
|
|
109
|
-
: this.stringNode(line, index, 'text'),
|
|
110
|
+
: this.stringNode(this.obj, line, index, 'text'),
|
|
110
111
|
line.response && (this.editable ?
|
|
111
112
|
h("span", { class: 'response' }, this.editableNode(line, index, 'response', template, templateMaker)) :
|
|
112
113
|
[h("br", null), this.litanyResponseStringNode(line, index)]),
|
|
@@ -130,10 +131,10 @@ export class ResponsivePrayerComponent {
|
|
|
130
131
|
h("p", { class: 'responsive' }, this.obj.value.map((line, index) => [
|
|
131
132
|
this.editable ?
|
|
132
133
|
h("div", null, this.editableNode(line, index, 'text', template, templateMaker)) :
|
|
133
|
-
h("div", null, this.stringNode(line, index, 'text')),
|
|
134
|
+
h("div", null, this.stringNode(this.obj, line, index, 'text')),
|
|
134
135
|
this.editable ?
|
|
135
136
|
h("div", { class: 'response' }, this.editableNode(line, index, 'response', template, templateMaker)) :
|
|
136
|
-
h("div", { class: 'response' }, this.stringNode(line, index, 'response'))
|
|
137
|
+
h("div", { class: 'response' }, this.stringNode(this.obj, line, index, 'response'))
|
|
137
138
|
]))));
|
|
138
139
|
}
|
|
139
140
|
}
|
|
@@ -5,6 +5,7 @@ import showdown from 'showdown';
|
|
|
5
5
|
import EN from './text.i18n.en.json';
|
|
6
6
|
import ES from './text.i18n.es.json';
|
|
7
7
|
import { modalController } from '@ionic/core';
|
|
8
|
+
import { useDropcap } from '../../utils/dropcaps';
|
|
8
9
|
const LOCALE = {
|
|
9
10
|
'en': EN,
|
|
10
11
|
'es': ES
|
|
@@ -128,11 +129,8 @@ export class TextComponent {
|
|
|
128
129
|
compiledValue.map((prayer, prayerIndex) => {
|
|
129
130
|
var _a, _b, _c, _d;
|
|
130
131
|
return h("p", { class: "text-body", id: `${this.obj.uid || this.obj.slug}-prayerIndex` }, prayer === null || prayer === void 0 ? void 0 :
|
|
131
|
-
prayer.map((chunk, chunkIndex) => {
|
|
132
|
-
|
|
133
|
-
return h("span", { id: `${this.obj.uid || this.obj.slug}-${prayerIndex}-${chunkIndex}` },
|
|
134
|
-
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 }));
|
|
135
|
-
}),
|
|
132
|
+
prayer.map((chunk, chunkIndex) => h("span", { id: `${this.obj.uid || this.obj.slug}-${prayerIndex}-${chunkIndex}` },
|
|
133
|
+
h("ldf-string", { text: chunk, citation: { label: this.obj.label }, dropcap: useDropcap(this.obj.language, this.obj.display_format, prayerIndex + chunkIndex), index: prayerIndex + chunkIndex, fragment: this.path }))),
|
|
136
134
|
((_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.response) && prayerIndex == compiledValue.length - 1 && h("span", { class: "response" },
|
|
137
135
|
" ",
|
|
138
136
|
this.obj.metadata.response),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function useDropcap(language, display_format, index) {
|
|
2
|
+
if (language == "iu" || language == "he") {
|
|
3
|
+
return "disabled";
|
|
4
|
+
}
|
|
5
|
+
if (display_format === "force_dropcap") {
|
|
6
|
+
return "enabled";
|
|
7
|
+
}
|
|
8
|
+
if (display_format === "disable_dropcap") {
|
|
9
|
+
return "disabled";
|
|
10
|
+
}
|
|
11
|
+
if (index == 0) {
|
|
12
|
+
return "enabled";
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return "disabled";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -255,7 +255,7 @@ const TYPES = [
|
|
|
255
255
|
'parallel',
|
|
256
256
|
];
|
|
257
257
|
const LOOKUP_TYPES = ['lectionary', 'canticle', 'category', 'slug', 'collect'];
|
|
258
|
-
const DISPLAY_FORMATS = ['default', 'omit', 'unison', 'abbreviated', 'force_dropcap'];
|
|
258
|
+
const DISPLAY_FORMATS = ['default', 'omit', 'unison', 'abbreviated', 'force_dropcap', 'disable_dropcap'];
|
|
259
259
|
/** Represents a liturgy of any scope and concreteness, from a complete bullletin to a single prayer. */
|
|
260
260
|
class LiturgicalDocument {
|
|
261
261
|
//** Constructor takes a Javascript object containing the class's properties */
|