@venite/components 0.16.47 → 0.16.49
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/index-01fdec29.js +2 -2
- 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 → ion-segment_17.cjs.entry.js} +116 -45
- 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/ldf.cjs.js +1 -1
- package/dist/cjs/loader.cjs.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/collection-manifest.json +1 -0
- package/dist/collection/components/bible-reading/bible-reading.js +5 -4
- package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.js +2 -2
- package/dist/collection/components/liturgical-document/dist/liturgical-document.js +3 -0
- package/dist/collection/components/liturgical-document/liturgical-document.js +3 -0
- package/dist/collection/components/parallel/dist/option.js +318 -0
- package/dist/collection/components/parallel/dist/parallel.js +146 -0
- package/dist/collection/components/parallel/parallel.css +8 -0
- package/dist/collection/components/parallel/parallel.i18n.en.json +3 -0
- package/dist/collection/components/parallel/parallel.js +213 -0
- 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/i18n/parallel.i18n.en.json +3 -0
- 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/index-034add74.js +2 -2
- 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 → ion-segment_17.entry.js} +116 -46
- 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/ldf.js +1 -1
- package/dist/esm/loader.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/i18n/parallel.i18n.en.json +3 -0
- package/dist/ldf/ldf.esm.js +1 -1
- package/dist/ldf/p-07a5654e.js +1 -0
- package/dist/ldf/p-177719a0.entry.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-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/editable-metadata-buttons/editable-metadata-buttons.d.ts +1 -1
- package/dist/types/components/parallel/parallel.d.ts +41 -0
- package/dist/types/components/responsive-prayer/responsive-prayer.d.ts +2 -2
- package/dist/types/components.d.ts +56 -3
- 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
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { Component, Prop, Watch, State, Host, Event, Element, h } from '@stencil/core';
|
|
2
|
+
import { Parallel } from '@venite/ldf';
|
|
3
|
+
import { getComponentClosestLanguage } from '../../utils/locale';
|
|
4
|
+
import EN from './parallel.i18n.en.json';
|
|
5
|
+
const LOCALE = {
|
|
6
|
+
'en': EN
|
|
7
|
+
};
|
|
8
|
+
export class ParallelComponent {
|
|
9
|
+
docChanged(newDoc) {
|
|
10
|
+
try {
|
|
11
|
+
if (typeof newDoc == 'string') {
|
|
12
|
+
this.obj = new Parallel(JSON.parse(newDoc));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
this.obj = new Parallel(newDoc);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
console.warn(e);
|
|
20
|
+
this.obj = new Parallel();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
// Lifecycle events
|
|
24
|
+
componentWillLoad() {
|
|
25
|
+
this.docChanged(this.doc);
|
|
26
|
+
this.loadLocaleStrings();
|
|
27
|
+
this.ldfOptionAskForStoredSelection.emit({ el: this.el });
|
|
28
|
+
}
|
|
29
|
+
/** Asynchronously load localization strings */
|
|
30
|
+
async loadLocaleStrings() {
|
|
31
|
+
try {
|
|
32
|
+
this.localeStrings = LOCALE[getComponentClosestLanguage(this.el)];
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
console.warn(e);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// Render
|
|
39
|
+
render() {
|
|
40
|
+
var _a;
|
|
41
|
+
return (h(Host, { lang: this.obj.language },
|
|
42
|
+
h("tr", null, (((_a = this.obj) === null || _a === void 0 ? void 0 : _a.value) || []).map((obj, ii) => h("td", null,
|
|
43
|
+
h("ldf-liturgical-document", { doc: obj, path: `${this.path}/value/${ii}`, base: `${this.path}/value`, index: ii, editable: this.editable, parentType: 'option' }))))));
|
|
44
|
+
}
|
|
45
|
+
static get is() { return "ldf-parallel"; }
|
|
46
|
+
static get encapsulation() { return "scoped"; }
|
|
47
|
+
static get originalStyleUrls() { return {
|
|
48
|
+
"$": ["parallel.scss"]
|
|
49
|
+
}; }
|
|
50
|
+
static get styleUrls() { return {
|
|
51
|
+
"$": ["parallel.css"]
|
|
52
|
+
}; }
|
|
53
|
+
static get properties() { return {
|
|
54
|
+
"doc": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"mutable": false,
|
|
57
|
+
"complexType": {
|
|
58
|
+
"original": "Parallel | string",
|
|
59
|
+
"resolved": "Parallel | string",
|
|
60
|
+
"references": {
|
|
61
|
+
"Parallel": {
|
|
62
|
+
"location": "import",
|
|
63
|
+
"path": "@venite/ldf"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": "An LDF Option object."
|
|
72
|
+
},
|
|
73
|
+
"attribute": "doc",
|
|
74
|
+
"reflect": false
|
|
75
|
+
},
|
|
76
|
+
"path": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"mutable": false,
|
|
79
|
+
"complexType": {
|
|
80
|
+
"original": "string",
|
|
81
|
+
"resolved": "string",
|
|
82
|
+
"references": {}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": "A JSON Pointer that points to the Option being edited"
|
|
89
|
+
},
|
|
90
|
+
"attribute": "path",
|
|
91
|
+
"reflect": true
|
|
92
|
+
},
|
|
93
|
+
"editable": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "boolean",
|
|
98
|
+
"resolved": "boolean",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": "Whether the object is editable"
|
|
106
|
+
},
|
|
107
|
+
"attribute": "editable",
|
|
108
|
+
"reflect": false
|
|
109
|
+
},
|
|
110
|
+
"preview": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "boolean",
|
|
115
|
+
"resolved": "boolean",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Whether the object is in preview mode"
|
|
123
|
+
},
|
|
124
|
+
"attribute": "preview",
|
|
125
|
+
"reflect": false
|
|
126
|
+
}
|
|
127
|
+
}; }
|
|
128
|
+
static get states() { return {
|
|
129
|
+
"obj": {},
|
|
130
|
+
"localeStrings": {},
|
|
131
|
+
"filteredOptions": {}
|
|
132
|
+
}; }
|
|
133
|
+
static get events() { return [{
|
|
134
|
+
"method": "ldfAddOptionToDoc",
|
|
135
|
+
"name": "ldfAddOptionToDoc",
|
|
136
|
+
"bubbles": true,
|
|
137
|
+
"cancelable": true,
|
|
138
|
+
"composed": true,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": ""
|
|
142
|
+
},
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "AddOptionToDoc",
|
|
145
|
+
"resolved": "AddOptionToDoc",
|
|
146
|
+
"references": {
|
|
147
|
+
"AddOptionToDoc": {
|
|
148
|
+
"location": "import",
|
|
149
|
+
"path": "../../interfaces/add-option-to-doc"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}, {
|
|
154
|
+
"method": "ldfDocShouldChange",
|
|
155
|
+
"name": "ldfDocShouldChange",
|
|
156
|
+
"bubbles": true,
|
|
157
|
+
"cancelable": true,
|
|
158
|
+
"composed": true,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": ""
|
|
162
|
+
},
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "Change",
|
|
165
|
+
"resolved": "Change",
|
|
166
|
+
"references": {
|
|
167
|
+
"Change": {
|
|
168
|
+
"location": "import",
|
|
169
|
+
"path": "@venite/ldf"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}, {
|
|
174
|
+
"method": "ldfOptionAskForStoredSelection",
|
|
175
|
+
"name": "ldfOptionAskForStoredSelection",
|
|
176
|
+
"bubbles": true,
|
|
177
|
+
"cancelable": true,
|
|
178
|
+
"composed": true,
|
|
179
|
+
"docs": {
|
|
180
|
+
"tags": [],
|
|
181
|
+
"text": ""
|
|
182
|
+
},
|
|
183
|
+
"complexType": {
|
|
184
|
+
"original": "{ el: HTMLElement }",
|
|
185
|
+
"resolved": "{ el: HTMLElement; }",
|
|
186
|
+
"references": {
|
|
187
|
+
"HTMLElement": {
|
|
188
|
+
"location": "global"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
"method": "ldfOptionMakeSelection",
|
|
194
|
+
"name": "ldfOptionMakeSelection",
|
|
195
|
+
"bubbles": true,
|
|
196
|
+
"cancelable": true,
|
|
197
|
+
"composed": true,
|
|
198
|
+
"docs": {
|
|
199
|
+
"tags": [],
|
|
200
|
+
"text": ""
|
|
201
|
+
},
|
|
202
|
+
"complexType": {
|
|
203
|
+
"original": "{ slug: string; index: number; }",
|
|
204
|
+
"resolved": "{ slug: string; index: number; }",
|
|
205
|
+
"references": {}
|
|
206
|
+
}
|
|
207
|
+
}]; }
|
|
208
|
+
static get elementRef() { return "el"; }
|
|
209
|
+
static get watchers() { return [{
|
|
210
|
+
"propName": "doc",
|
|
211
|
+
"methodName": "docChanged"
|
|
212
|
+
}]; }
|
|
213
|
+
}
|
|
@@ -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 */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
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
|
+
}
|
|
18
|
+
|
|
19
|
+
export { useDropcap as u };
|
|
@@ -2066,10 +2066,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2066
2066
|
return import(
|
|
2067
2067
|
/* webpackMode: "lazy" */
|
|
2068
2068
|
'./ldf-editable-string-list.entry.js').then(processMod, consoleError);
|
|
2069
|
-
case 'ion-
|
|
2069
|
+
case 'ion-segment_17':
|
|
2070
2070
|
return import(
|
|
2071
2071
|
/* webpackMode: "lazy" */
|
|
2072
|
-
'./ion-
|
|
2072
|
+
'./ion-segment_17.entry.js').then(processMod, consoleError);
|
|
2073
2073
|
case 'ldf-editable-boolean_2':
|
|
2074
2074
|
return import(
|
|
2075
2075
|
/* webpackMode: "lazy" */
|
|
@@ -7,7 +7,7 @@ import { g as getScrollElement, f as findIonContent, p as printIonContentErrorMs
|
|
|
7
7
|
import { c as chevronForward, a as arrowBackSharp, b as closeCircle, d as closeSharp, s as searchOutline, e as searchSharp } from './index-f258b2dd.js';
|
|
8
8
|
import { p as printIonError } from './index-ac6e5d74.js';
|
|
9
9
|
import { p as popoverController } from './overlays-59377e10.js';
|
|
10
|
-
import './book-
|
|
10
|
+
import './book-ffb2b7c9.js';
|
|
11
11
|
import { C as Change } from './change-ea574d32.js';
|
|
12
12
|
import { g as getComponentClosestLanguage } from './locale-de430ca1.js';
|
|
13
13
|
import './hardware-back-button-fa04d6e9.js';
|
|
@@ -2,8 +2,8 @@ import { r as registerInstance, h, H as Host, f as forceUpdate, c as createEvent
|
|
|
2
2
|
import { g as getIonMode } from './ionic-global-24253941.js';
|
|
3
3
|
import { c as createColorClasses } from './theme-7ef00c83.js';
|
|
4
4
|
import { f as alertController } from './overlays-59377e10.js';
|
|
5
|
-
import './book-
|
|
6
|
-
import { R as Refrain } from './refrain-
|
|
5
|
+
import './book-ffb2b7c9.js';
|
|
6
|
+
import { R as Refrain } from './refrain-03edc2dd.js';
|
|
7
7
|
import { C as Change } from './change-ea574d32.js';
|
|
8
8
|
import { g as getComponentClosestLanguage } from './locale-de430ca1.js';
|
|
9
9
|
import './hardware-back-button-fa04d6e9.js';
|
|
@@ -3,7 +3,7 @@ import { g as getIonMode } from './ionic-global-24253941.js';
|
|
|
3
3
|
import { d as debounceEvent, i as inheritAriaAttributes, j as inheritAttributes, p as findItemLabel } from './helpers-af86adf0.js';
|
|
4
4
|
import { c as createColorClasses } from './theme-7ef00c83.js';
|
|
5
5
|
import { D as Debounce } from './index-f08f6130.js';
|
|
6
|
-
import './book-
|
|
6
|
+
import './book-ffb2b7c9.js';
|
|
7
7
|
import { C as Cursor } from './cursor-0e47f111.js';
|
|
8
8
|
import { C as Change } from './change-ea574d32.js';
|
|
9
9
|
import { c as createCommonjsModule } from './_commonjsHelpers-ba3f0406.js';
|