@venite/components 0.16.2 → 0.16.6
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/ion-button_13.cjs.entry.js +1787 -0
- package/dist/cjs/ion-checkbox_3.cjs.entry.js +235 -0
- package/dist/cjs/ion-segment_16.cjs.entry.js +5 -4
- package/dist/cjs/ldf-day-name_5.cjs.entry.js +1 -2
- package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +2 -2
- package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +1 -1
- package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +3 -3
- package/dist/cjs/ldf-editable-metadata.cjs.entry.js +3 -3
- package/dist/cjs/ldf.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{option-a9f12c93.js → option-1ebd4514.js} +6 -2
- package/dist/cjs/{rubric-85fc7418.js → rubric-662d8baa.js} +44 -5
- package/dist/cjs/{specific-class-acf1bb37.js → specific-class-d80d272a.js} +2 -2
- package/dist/collection/components/liturgical-document/dist/liturgical-document.js +6 -1
- package/dist/collection/components/liturgical-document/liturgical-document.js +21 -1
- package/dist/collection/components/option/dist/option.js +318 -0
- package/dist/collection/components/prayers-and-thanksgivings/dist/prayers-and-thanksgivings.js +258 -0
- package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.js +55 -36
- package/dist/collection/components/psalm/dist/psalm.js +0 -1
- package/dist/collection/components/psalm/psalm.js +0 -1
- package/dist/collection/components/string/dist/string.js +0 -1
- package/dist/collection/components/string/string.js +0 -1
- package/dist/collection/components/text/dist/text.js +1 -1
- package/dist/collection/components/text/text.js +1 -1
- package/dist/esm/{app-globals-2b41bd8d.js → app-globals-729b03cf.js} +1 -1
- package/dist/esm/{index-1885f1b8.js → index-734a6b69.js} +1 -1
- package/dist/esm/{index-8b9e221a.js → index-9579282b.js} +3 -3
- package/dist/esm/{index-dcd553ac.js → index-f0f6a379.js} +1 -1
- package/dist/esm/ion-action-sheet.entry.js +3 -3
- package/dist/esm/ion-alert.entry.js +3 -3
- package/dist/esm/ion-app.entry.js +3 -3
- package/dist/esm/ion-avatar.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +2 -2
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-badge.entry.js +2 -2
- package/dist/esm/ion-button_13.entry.js +1771 -0
- package/dist/esm/ion-card-content_6.entry.js +3 -3
- package/dist/esm/ion-card-subtitle.entry.js +2 -2
- package/dist/esm/ion-card_2.entry.js +2 -2
- package/dist/esm/ion-checkbox_3.entry.js +229 -0
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-datetime_2.entry.js +3 -3
- package/dist/esm/ion-fab-button.entry.js +2 -2
- package/dist/esm/ion-fab-list.entry.js +2 -2
- package/dist/esm/ion-fab.entry.js +2 -2
- package/dist/esm/ion-footer.entry.js +2 -2
- package/dist/esm/ion-img.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll-content.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll.entry.js +2 -2
- package/dist/esm/ion-input_2.entry.js +2 -2
- package/dist/esm/ion-item-divider.entry.js +2 -2
- package/dist/esm/ion-item-group.entry.js +2 -2
- package/dist/esm/ion-item-option.entry.js +2 -2
- package/dist/esm/ion-item-options.entry.js +2 -2
- package/dist/esm/ion-item-sliding.entry.js +2 -2
- package/dist/esm/ion-list-header.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu-button.entry.js +4 -4
- package/dist/esm/ion-menu-toggle.entry.js +4 -4
- package/dist/esm/ion-menu.entry.js +3 -3
- package/dist/esm/ion-modal.entry.js +4 -4
- package/dist/esm/ion-nav-link.entry.js +1 -1
- package/dist/esm/ion-nav.entry.js +3 -3
- package/dist/esm/ion-note.entry.js +2 -2
- package/dist/esm/ion-picker-column.entry.js +2 -2
- package/dist/esm/ion-picker.entry.js +3 -3
- package/dist/esm/ion-popover.entry.js +4 -4
- package/dist/esm/ion-progress-bar.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher-content.entry.js +2 -2
- package/dist/esm/ion-refresher.entry.js +2 -2
- package/dist/esm/ion-reorder-group.entry.js +2 -2
- package/dist/esm/ion-reorder.entry.js +2 -2
- package/dist/esm/ion-route-redirect.entry.js +1 -1
- package/dist/esm/ion-route.entry.js +1 -1
- package/dist/esm/ion-router-link.entry.js +2 -2
- package/dist/esm/ion-router-outlet.entry.js +3 -3
- package/dist/esm/ion-router.entry.js +1 -1
- package/dist/esm/ion-segment_16.entry.js +8 -7
- package/dist/esm/ion-select-popover.entry.js +3 -3
- package/dist/esm/ion-select_2.entry.js +3 -3
- package/dist/esm/ion-slide.entry.js +2 -2
- package/dist/esm/ion-slides.entry.js +2 -2
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar.entry.js +2 -2
- package/dist/esm/ion-tab-button.entry.js +2 -2
- package/dist/esm/ion-tab.entry.js +1 -1
- package/dist/esm/ion-tabs.entry.js +1 -1
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-thumbnail.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-virtual-scroll.entry.js +1 -1
- package/dist/esm/{ionic-global-fef4299f.js → ionic-global-ef89a0a5.js} +1 -1
- package/dist/esm/{ios.transition-2460f61e.js → ios.transition-b1be0863.js} +2 -2
- package/dist/esm/ldf-day-name_5.entry.js +4 -5
- package/dist/esm/ldf-editable-add-block-menu.entry.js +3 -3
- 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 +4 -4
- package/dist/esm/ldf-editable-metadata.entry.js +4 -4
- 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 +3 -3
- package/dist/esm/ldf-editable-string-list.entry.js +1 -1
- package/dist/esm/ldf-editor-cursors.entry.js +1 -1
- package/dist/esm/ldf-editor.entry.js +1 -1
- package/dist/esm/ldf.js +4 -4
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-7eb37dd1.js → md.transition-1763f475.js} +2 -2
- package/dist/esm/{menu-toggle-util-d6bed342.js → menu-toggle-util-29e61ff3.js} +1 -1
- package/dist/esm/{option-042c9673.js → option-47d50244.js} +6 -2
- package/dist/esm/{overlays-e1d5aa58.js → overlays-06b43b65.js} +2 -2
- package/dist/esm/{rubric-9c750946.js → rubric-2330a030.js} +44 -5
- package/dist/esm/{specific-class-2df4b72a.js → specific-class-28e26e40.js} +2 -2
- package/dist/esm/{status-tap-900b721a.js → status-tap-7458bd71.js} +1 -1
- package/dist/ldf/ldf.esm.js +1 -1
- package/dist/ldf/{p-a7a10747.entry.js → p-018e57db.entry.js} +1 -1
- package/dist/ldf/p-02ef484e.entry.js +1 -0
- package/dist/ldf/{p-5bfa9969.entry.js → p-04715bf0.entry.js} +1 -1
- package/dist/ldf/{p-8cb241a8.entry.js → p-0651768a.entry.js} +1 -1
- package/dist/ldf/{p-a80bce6a.entry.js → p-07d6d3ad.entry.js} +1 -1
- package/dist/ldf/p-08584ccc.entry.js +1 -0
- package/dist/ldf/{p-d3a17399.entry.js → p-0873a34a.entry.js} +1 -1
- package/dist/ldf/{p-5febfbde.entry.js → p-0f69db87.entry.js} +1 -1
- package/dist/ldf/{p-6b6b9f77.entry.js → p-1504379f.entry.js} +1 -1
- package/dist/ldf/{p-110c6e85.entry.js → p-1a8e2899.entry.js} +1 -1
- package/dist/ldf/p-21e2f0a3.entry.js +1 -0
- package/dist/ldf/{p-6c3d4341.entry.js → p-25a736f1.entry.js} +1 -1
- package/dist/ldf/{p-43d7a734.entry.js → p-2c36a583.entry.js} +1 -1
- package/dist/ldf/{p-4c8f895f.entry.js → p-2fa1c501.entry.js} +1 -1
- package/dist/ldf/{p-a0b9b689.entry.js → p-302dc0d5.entry.js} +1 -1
- package/dist/ldf/{p-54f83929.entry.js → p-327b14ac.entry.js} +1 -1
- package/dist/ldf/{p-4d5b52ad.entry.js → p-32f7ba8e.entry.js} +1 -1
- package/dist/ldf/{p-8a064810.entry.js → p-3545fcdc.entry.js} +1 -1
- package/dist/ldf/{p-8c8bf861.entry.js → p-374118d7.entry.js} +1 -1
- package/dist/ldf/p-37f356a4.entry.js +1 -0
- package/dist/ldf/{p-7f7de09a.entry.js → p-380f8655.entry.js} +1 -1
- package/dist/ldf/{p-7df0687c.entry.js → p-3c9930ff.entry.js} +1 -1
- package/dist/ldf/{p-dbdb2b0a.entry.js → p-3f39c2ad.entry.js} +1 -1
- package/dist/ldf/{p-35680ca6.entry.js → p-430c418a.entry.js} +1 -1
- package/dist/ldf/{p-986921d2.js → p-48e44122.js} +1 -1
- package/dist/ldf/{p-4b154310.entry.js → p-4a4380fa.entry.js} +1 -1
- package/dist/ldf/p-4b80de48.js +1 -0
- package/dist/ldf/{p-06bc76d9.entry.js → p-4d392128.entry.js} +1 -1
- package/dist/ldf/p-4e0b3c0f.entry.js +1 -0
- package/dist/ldf/{p-b631cadf.entry.js → p-52656429.entry.js} +1 -1
- package/dist/ldf/p-53c807a4.js +1 -0
- package/dist/ldf/{p-91969280.js → p-55d797c1.js} +1 -1
- package/dist/ldf/{p-71ed0c0f.entry.js → p-59340423.entry.js} +1 -1
- package/dist/ldf/{p-0c8f1542.entry.js → p-5be7ff17.entry.js} +1 -1
- package/dist/ldf/p-5bf20b51.js +1 -0
- package/dist/ldf/{p-ae3cd06a.entry.js → p-63b5daf6.entry.js} +1 -1
- package/dist/ldf/{p-0afd3d32.entry.js → p-66a7385e.entry.js} +1 -1
- package/dist/ldf/p-698a3399.entry.js +1 -0
- package/dist/ldf/{p-4d92e32b.entry.js → p-69f85ad3.entry.js} +1 -1
- package/dist/ldf/{p-0cb749f6.entry.js → p-6fe24d85.entry.js} +1 -1
- package/dist/ldf/{p-ceb4c199.entry.js → p-70e47f8b.entry.js} +1 -1
- package/dist/ldf/{p-e778bf3c.entry.js → p-73a16936.entry.js} +1 -1
- package/dist/ldf/{p-bacac874.entry.js → p-79a526a1.entry.js} +1 -1
- package/dist/ldf/{p-20f5f7c0.entry.js → p-7abeb82c.entry.js} +1 -1
- package/dist/ldf/{p-79997a72.entry.js → p-7df11f48.entry.js} +1 -1
- package/dist/ldf/{p-91cef52f.entry.js → p-7efa633b.entry.js} +1 -1
- package/dist/ldf/{p-8ed588f7.entry.js → p-84f38db6.entry.js} +1 -1
- package/dist/ldf/{p-5a74ad40.entry.js → p-8767a74e.entry.js} +1 -1
- package/dist/ldf/{p-7fba586d.entry.js → p-8932ec85.entry.js} +1 -1
- package/dist/ldf/{p-74e1596c.entry.js → p-8c2727db.entry.js} +1 -1
- package/dist/ldf/{p-913c92ca.entry.js → p-972e4f2a.entry.js} +1 -1
- package/dist/ldf/{p-0ce10dcd.js → p-978e2c6d.js} +1 -1
- package/dist/ldf/p-9bd5d1d4.entry.js +1 -0
- package/dist/ldf/{p-5fa1dcfb.entry.js → p-9c397c49.entry.js} +1 -1
- package/dist/ldf/p-9e2c172e.entry.js +1 -0
- package/dist/ldf/{p-6b0fab5d.js → p-9e82b403.js} +2 -2
- package/dist/ldf/{p-2b9556d3.entry.js → p-a98c89d1.entry.js} +1 -1
- package/dist/ldf/{p-c3dbb344.entry.js → p-ac7a17ce.entry.js} +1 -1
- package/dist/ldf/{p-3b236b73.js → p-acbbd1ec.js} +1 -1
- package/dist/ldf/p-b1242016.js +1 -0
- package/dist/ldf/{p-50d56c76.entry.js → p-b7388aec.entry.js} +1 -1
- package/dist/ldf/{p-37ead536.entry.js → p-b78336d7.entry.js} +1 -1
- package/dist/ldf/{p-9282f514.entry.js → p-ba021918.entry.js} +1 -1
- package/dist/ldf/{p-65c80b87.entry.js → p-c1bcd0a9.entry.js} +1 -1
- package/dist/ldf/{p-4c825920.entry.js → p-c1df632d.entry.js} +1 -1
- package/dist/ldf/{p-a467efd9.entry.js → p-c3042920.entry.js} +1 -1
- package/dist/ldf/{p-860e2e8c.entry.js → p-c3807857.entry.js} +1 -1
- package/dist/ldf/{p-faf3cb15.entry.js → p-c3841978.entry.js} +1 -1
- package/dist/ldf/{p-b7fe7b29.entry.js → p-c41e055c.entry.js} +1 -1
- package/dist/ldf/{p-5cefe450.entry.js → p-c6163f81.entry.js} +1 -1
- package/dist/ldf/{p-944c44a7.entry.js → p-c6b42618.entry.js} +1 -1
- package/dist/ldf/{p-1d8e06c7.entry.js → p-c74d3fd0.entry.js} +1 -1
- package/dist/ldf/{p-741e1b4e.entry.js → p-c82dd468.entry.js} +1 -1
- package/dist/ldf/{p-342e45c0.entry.js → p-ca698b8f.entry.js} +1 -1
- package/dist/ldf/p-ca7e0de9.entry.js +1 -0
- package/dist/ldf/{p-059fcd05.entry.js → p-cbfbb80c.entry.js} +1 -1
- package/dist/ldf/{p-a8264864.entry.js → p-d195c957.entry.js} +1 -1
- package/dist/ldf/{p-664b2872.js → p-d282d4f9.js} +1 -1
- package/dist/ldf/{p-bc59e89e.entry.js → p-d7966e9b.entry.js} +1 -1
- package/dist/ldf/{p-f562ae50.js → p-d7f8c770.js} +1 -1
- package/dist/ldf/{p-396025ba.entry.js → p-d7fa99cc.entry.js} +1 -1
- package/dist/ldf/{p-ae136041.entry.js → p-db435131.entry.js} +1 -1
- package/dist/ldf/{p-ae287f67.entry.js → p-dc445c36.entry.js} +1 -1
- package/dist/ldf/{p-385a3ecf.entry.js → p-dd99e42a.entry.js} +1 -1
- package/dist/ldf/{p-b8a8f9c8.js → p-de5bb5ad.js} +1 -1
- package/dist/ldf/{p-7e388cb7.entry.js → p-e0e12ae3.entry.js} +1 -1
- package/dist/ldf/{p-128ac9e9.entry.js → p-e215fd02.entry.js} +1 -1
- package/dist/ldf/{p-4b7027b1.entry.js → p-e4be11ad.entry.js} +1 -1
- package/dist/ldf/{p-8d6f1d6b.entry.js → p-ea66c343.entry.js} +1 -1
- package/dist/ldf/{p-ac9a93aa.entry.js → p-ec5eecdc.entry.js} +1 -1
- package/dist/ldf/{p-64c46765.js → p-f2ce126e.js} +1 -1
- package/dist/ldf/{p-186eed18.entry.js → p-fe59a676.entry.js} +1 -1
- package/dist/ldf/p-ff51dbd0.entry.js +1 -0
- package/dist/types/components/liturgical-document/liturgical-document.d.ts +2 -0
- package/dist/types/components/prayers-and-thanksgivings/prayers-and-thanksgivings.d.ts +1 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +2 -2
- package/dist/cjs/ion-button_3.cjs.entry.js +0 -413
- package/dist/cjs/ion-buttons_6.cjs.entry.js +0 -584
- package/dist/cjs/ion-content.cjs.entry.js +0 -303
- package/dist/cjs/ion-item_2.cjs.entry.js +0 -168
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +0 -93
- package/dist/cjs/ion-searchbar.cjs.entry.js +0 -330
- package/dist/cjs/ion-title.cjs.entry.js +0 -48
- package/dist/cjs/ldf-prayers-and-thanksgivings.cjs.entry.js +0 -108
- package/dist/esm/ion-button_3.entry.js +0 -407
- package/dist/esm/ion-buttons_6.entry.js +0 -575
- package/dist/esm/ion-content.entry.js +0 -299
- package/dist/esm/ion-item_2.entry.js +0 -163
- package/dist/esm/ion-ripple-effect.entry.js +0 -89
- package/dist/esm/ion-searchbar.entry.js +0 -326
- package/dist/esm/ion-title.entry.js +0 -44
- package/dist/esm/ldf-prayers-and-thanksgivings.entry.js +0 -104
- package/dist/ldf/p-01655d40.js +0 -1
- package/dist/ldf/p-07e48862.entry.js +0 -1
- package/dist/ldf/p-2471a9c7.entry.js +0 -1
- package/dist/ldf/p-356f9ee6.entry.js +0 -1
- package/dist/ldf/p-68f963c7.entry.js +0 -1
- package/dist/ldf/p-72718314.entry.js +0 -1
- package/dist/ldf/p-78ed7ef0.entry.js +0 -1
- package/dist/ldf/p-7aecb410.js +0 -1
- package/dist/ldf/p-7ccf2257.entry.js +0 -1
- package/dist/ldf/p-867f7c02.js +0 -1
- package/dist/ldf/p-8e1286c3.entry.js +0 -1
- package/dist/ldf/p-92461769.entry.js +0 -1
- package/dist/ldf/p-9382bbe1.entry.js +0 -1
- package/dist/ldf/p-96967103.entry.js +0 -1
- package/dist/ldf/p-accacaed.entry.js +0 -1
- package/dist/ldf/p-bcb82c8e.js +0 -1
- package/dist/ldf/p-c7c0acf1.entry.js +0 -1
- package/dist/ldf/p-cee7604d.entry.js +0 -1
- package/dist/ldf/p-e3ce57d7.entry.js +0 -1
- package/dist/ldf/p-ecb2e631.entry.js +0 -1
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
14
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
17
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18
|
+
};
|
|
19
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
23
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
24
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
25
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
29
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
30
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
31
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
32
|
+
function step(op) {
|
|
33
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
34
|
+
while (_) try {
|
|
35
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
36
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
37
|
+
switch (op[0]) {
|
|
38
|
+
case 0: case 1: t = op; break;
|
|
39
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
40
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
41
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
42
|
+
default:
|
|
43
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
44
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
45
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
46
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
47
|
+
if (t[2]) _.ops.pop();
|
|
48
|
+
_.trys.pop(); continue;
|
|
49
|
+
}
|
|
50
|
+
op = body.call(thisArg, _);
|
|
51
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
52
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.__esModule = true;
|
|
56
|
+
exports.OptionComponent = void 0;
|
|
57
|
+
var core_1 = require("@stencil/core");
|
|
58
|
+
var ldf_1 = require("@venite/ldf");
|
|
59
|
+
var locale_1 = require("../../utils/locale");
|
|
60
|
+
var option_i18n_en_json_1 = require("./option.i18n.en.json");
|
|
61
|
+
var LOCALE = {
|
|
62
|
+
'en': option_i18n_en_json_1["default"]
|
|
63
|
+
};
|
|
64
|
+
var OptionComponent = /** @class */ (function () {
|
|
65
|
+
function OptionComponent() {
|
|
66
|
+
}
|
|
67
|
+
OptionComponent.prototype.docChanged = function (newDoc) {
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
69
|
+
try {
|
|
70
|
+
if (typeof newDoc == 'string') {
|
|
71
|
+
this.obj = new ldf_1.Option(JSON.parse(newDoc));
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.obj = new ldf_1.Option(newDoc);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (e) {
|
|
78
|
+
console.warn(e);
|
|
79
|
+
this.obj = new ldf_1.Option();
|
|
80
|
+
}
|
|
81
|
+
var selected = this.editable
|
|
82
|
+
? (_f = (_c = (_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.editor_selected) !== null && _c !== void 0 ? _c : (_e = (_d = this.obj) === null || _d === void 0 ? void 0 : _d.metadata) === null || _e === void 0 ? void 0 : _e.selected) !== null && _f !== void 0 ? _f : 0 : (_j = (_h = (_g = this.obj) === null || _g === void 0 ? void 0 : _g.metadata) === null || _h === void 0 ? void 0 : _h.selected) !== null && _j !== void 0 ? _j : 0;
|
|
83
|
+
this.select(selected);
|
|
84
|
+
if (!((_k = this.obj) === null || _k === void 0 ? void 0 : _k.value) || !this.obj.value[selected] || !this.obj.value[selected].value) {
|
|
85
|
+
this.selectFirstDefined();
|
|
86
|
+
}
|
|
87
|
+
this.filterOptions();
|
|
88
|
+
};
|
|
89
|
+
// Lifecycle events
|
|
90
|
+
OptionComponent.prototype.componentWillLoad = function () {
|
|
91
|
+
this.docChanged(this.doc);
|
|
92
|
+
this.loadLocaleStrings();
|
|
93
|
+
this.ldfOptionAskForStoredSelection.emit({ el: this.el });
|
|
94
|
+
};
|
|
95
|
+
/** Asynchronously load localization strings */
|
|
96
|
+
OptionComponent.prototype.loadLocaleStrings = function () {
|
|
97
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
98
|
+
return __generator(this, function (_a) {
|
|
99
|
+
try {
|
|
100
|
+
this.localeStrings = LOCALE[locale_1.getComponentClosestLanguage(this.el)];
|
|
101
|
+
}
|
|
102
|
+
catch (e) {
|
|
103
|
+
console.warn(e);
|
|
104
|
+
}
|
|
105
|
+
return [2 /*return*/];
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
/** Display the nth option */
|
|
110
|
+
OptionComponent.prototype.select = function (index, resultedFromUserAction) {
|
|
111
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
112
|
+
if (resultedFromUserAction === void 0) { resultedFromUserAction = false; }
|
|
113
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
114
|
+
var hadMetadata, oldValue;
|
|
115
|
+
return __generator(this, function (_j) {
|
|
116
|
+
if (((_a = this.obj) === null || _a === void 0 ? void 0 : _a.slug) && typeof index === 'number' && resultedFromUserAction) {
|
|
117
|
+
this.ldfOptionMakeSelection.emit({ slug: (_b = this.obj) === null || _b === void 0 ? void 0 : _b.slug, index: index });
|
|
118
|
+
}
|
|
119
|
+
hadMetadata = Boolean((_c = this.obj) === null || _c === void 0 ? void 0 : _c.metadata), oldValue = (_e = (_d = this.obj) === null || _d === void 0 ? void 0 : _d.metadata) === null || _e === void 0 ? void 0 : _e.editor_selected;
|
|
120
|
+
if (Number(index) >= 0) {
|
|
121
|
+
//this.selectedDoc = this.obj.value.filter(child => Boolean(child))[index];
|
|
122
|
+
if ((_f = this.obj) === null || _f === void 0 ? void 0 : _f.metadata) {
|
|
123
|
+
this.obj.metadata.selected = Number(index);
|
|
124
|
+
this.obj.metadata.editor_selected = Number(index);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
this.obj.metadata = { selected: Number(index), editor_selected: Number(index) };
|
|
128
|
+
}
|
|
129
|
+
this.obj = new ldf_1.Option(__assign({}, this.obj));
|
|
130
|
+
// only change the selection at this point if it's not editable
|
|
131
|
+
// if it's editable, the editor will control when it changes
|
|
132
|
+
if (resultedFromUserAction && !this.editable) {
|
|
133
|
+
this.ldfDocShouldChange.emit(new ldf_1.Change({
|
|
134
|
+
path: this.path + "/metadata",
|
|
135
|
+
op: [{
|
|
136
|
+
type: 'set',
|
|
137
|
+
index: 'selected',
|
|
138
|
+
oldValue: oldValue,
|
|
139
|
+
value: Number(index)
|
|
140
|
+
}]
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
if (this.editable) {
|
|
144
|
+
if (hadMetadata && index !== oldValue) {
|
|
145
|
+
this.ldfDocShouldChange.emit(new ldf_1.Change({
|
|
146
|
+
path: this.path + "/metadata",
|
|
147
|
+
op: [{
|
|
148
|
+
type: 'set',
|
|
149
|
+
index: 'editor_selected',
|
|
150
|
+
oldValue: oldValue,
|
|
151
|
+
value: Number(index)
|
|
152
|
+
}]
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
else if (!hadMetadata && index !== oldValue) {
|
|
156
|
+
this.ldfDocShouldChange.emit(new ldf_1.Change({
|
|
157
|
+
path: "" + this.path,
|
|
158
|
+
op: [{
|
|
159
|
+
type: 'set',
|
|
160
|
+
index: 'metadata',
|
|
161
|
+
value: { editor_selected: Number(index) }
|
|
162
|
+
}]
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
// sets metadata.selected to new index, and creates objects along the way if undefined
|
|
167
|
+
// without overriding any other metadata fields
|
|
168
|
+
Object.assign(this.obj, { metadata: __assign(__assign({}, this.obj.metadata), { selected: index }) });
|
|
169
|
+
Object.assign(this.obj, { metadata: __assign(__assign({}, this.obj.metadata), { editor_selected: index }) });
|
|
170
|
+
}
|
|
171
|
+
else if (index === 'add') {
|
|
172
|
+
this.ldfAddOptionToDoc.emit({
|
|
173
|
+
base: this.path,
|
|
174
|
+
index: (_h = (_g = this.obj) === null || _g === void 0 ? void 0 : _g.value) === null || _h === void 0 ? void 0 : _h.length,
|
|
175
|
+
obj: this.obj
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
return [2 /*return*/];
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
// Private methods
|
|
183
|
+
OptionComponent.prototype.onSelectChange = function (ev) {
|
|
184
|
+
var target = ev.target, value = parseInt(target.value);
|
|
185
|
+
this.select(value, true);
|
|
186
|
+
};
|
|
187
|
+
OptionComponent.prototype.selectFirstDefined = function () {
|
|
188
|
+
var first = this.obj.value.find(function (opt) { return (opt === null || opt === void 0 ? void 0 : opt.value) !== undefined; }), index = this.obj.value.filter(function (child) { return Boolean(child); }).indexOf(first);
|
|
189
|
+
this.select(index);
|
|
190
|
+
};
|
|
191
|
+
OptionComponent.prototype.filterOptions = function () {
|
|
192
|
+
var _this = this;
|
|
193
|
+
var _a;
|
|
194
|
+
if (this.obj) {
|
|
195
|
+
this.obj = new ldf_1.Option(__assign(__assign({}, this.obj), { value: (((_a = this.obj) === null || _a === void 0 ? void 0 : _a.value) || []).filter(function (entry) {
|
|
196
|
+
return _this.editable || (Boolean(entry) && (Boolean(entry.value) || Boolean((entry === null || entry === void 0 ? void 0 : entry.type) === "bible-reading" && entry.citation)));
|
|
197
|
+
}) }));
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
// Render helpers
|
|
201
|
+
/** Return an Ionic Select or Segment element if available, otherwise a vanilla HTML Select Element */
|
|
202
|
+
OptionComponent.prototype.selectNode = function () {
|
|
203
|
+
var _this = this;
|
|
204
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
205
|
+
var currentlySelected = this.editable ? (_f = (_c = (_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.editor_selected) !== null && _c !== void 0 ? _c : (_e = (_d = this.obj) === null || _d === void 0 ? void 0 : _d.metadata) === null || _e === void 0 ? void 0 : _e.selected) !== null && _f !== void 0 ? _f : 0 : (_j = (_h = (_g = this.obj) === null || _g === void 0 ? void 0 : _g.metadata) === null || _h === void 0 ? void 0 : _h.selected) !== null && _j !== void 0 ? _j : 0;
|
|
206
|
+
if (((_l = (_k = this.obj) === null || _k === void 0 ? void 0 : _k.value) === null || _l === void 0 ? void 0 : _l.length) > 1 || this.editable) {
|
|
207
|
+
// Ionic available and
|
|
208
|
+
if (customElements && !!customElements.get('ion-select')) {
|
|
209
|
+
var optionsAreLong = (((_m = this.obj) === null || _m === void 0 ? void 0 : _m.value) || [])
|
|
210
|
+
.map(function (option, optionIndex) { var _a; return ((_a = _this.versionLabel(option, optionIndex)) === null || _a === void 0 ? void 0 : _a.length) > 20; })
|
|
211
|
+
.reduce(function (a, b) { return a || b; }, false);
|
|
212
|
+
// <= 3, short options
|
|
213
|
+
if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 3) {
|
|
214
|
+
return (React.createElement("ion-segment", { color: "primary", value: currentlySelected.toString() }, (_p = this.obj) === null || _p === void 0 ? void 0 :
|
|
215
|
+
_p.value.map(function (option, optionIndex) {
|
|
216
|
+
return React.createElement("ion-segment-button", { value: optionIndex.toString(), onClick: function () { return _this.select(optionIndex, true); } },
|
|
217
|
+
React.createElement("ion-label", null, _this.versionLabel(option, optionIndex)));
|
|
218
|
+
}),
|
|
219
|
+
this.editable && React.createElement("ion-segment-button", { value: 'add', "class": 'add', onClick: function () { return _this.select('add', true); } },
|
|
220
|
+
React.createElement("ion-label", null, "+"))));
|
|
221
|
+
}
|
|
222
|
+
// >2 options, or options are longish
|
|
223
|
+
else {
|
|
224
|
+
console.log('>2 or longish');
|
|
225
|
+
return (React.createElement("ion-toolbar", null,
|
|
226
|
+
React.createElement("ion-select", { value: currentlySelected, slot: this.editable ? 'start' : 'end', onIonChange: function (e) { return _this.select(Number(e.detail.value), true); } }, (_q = this.obj) === null || _q === void 0 ? void 0 : _q.value.map(function (option, optionIndex) {
|
|
227
|
+
return React.createElement("ion-select-option", { value: optionIndex },
|
|
228
|
+
React.createElement("ion-label", null, _this.versionLabel(option, optionIndex)));
|
|
229
|
+
})),
|
|
230
|
+
this.editable && React.createElement("ion-buttons", { slot: 'end' },
|
|
231
|
+
React.createElement("ion-button", { onClick: function () { return _this.select('add', true); } },
|
|
232
|
+
React.createElement("ion-icon", { slot: 'icon-only', name: 'add' })))));
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
// Ionic not availabe
|
|
236
|
+
else {
|
|
237
|
+
return (React.createElement("ldf-label-bar", null,
|
|
238
|
+
React.createElement("select", { onInput: function (ev) { return _this.onSelectChange(ev); }, slot: this.editable ? 'start' : 'end' }, (_r = this.obj) === null || _r === void 0 ? void 0 : _r.value.map(function (option, optionIndex) {
|
|
239
|
+
return React.createElement("option", { value: optionIndex, selected: optionIndex == currentlySelected }, _this.versionLabel(option, optionIndex));
|
|
240
|
+
})),
|
|
241
|
+
this.editable && React.createElement("button", { slot: 'end', onClick: function () { return _this.select('add', true); } }, "+")));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
return [];
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
OptionComponent.prototype.versionLabel = function (option, index) {
|
|
249
|
+
try {
|
|
250
|
+
return this.obj.getVersionLabel(option);
|
|
251
|
+
}
|
|
252
|
+
catch (e) {
|
|
253
|
+
console.warn(e);
|
|
254
|
+
return (this.localeStrings || {}).option + " " + (index + 1);
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
// Render
|
|
258
|
+
OptionComponent.prototype.render = function () {
|
|
259
|
+
var _a;
|
|
260
|
+
//console.log('ldf-option (render) ', this.obj?.metadata.selected, this.obj.value, this.selectedDoc)
|
|
261
|
+
var selectedIndex = this.editable ? (_a = this.obj.metadata.editor_selected) !== null && _a !== void 0 ? _a : this.obj.metadata.selected : this.obj.metadata.selected;
|
|
262
|
+
return (React.createElement(core_1.Host, { lang: this.obj.language },
|
|
263
|
+
React.createElement("div", { "class": 'select-control' },
|
|
264
|
+
React.createElement("ldf-label-bar", null, this.selectNode())),
|
|
265
|
+
(this.obj.value || this.editable) && React.createElement("ldf-liturgical-document", { doc: this.obj.value[selectedIndex], path: this.path + "/value/" + this.obj.metadata.selected, base: this.path + "/value", index: selectedIndex, editable: this.editable, parentType: 'option' })));
|
|
266
|
+
};
|
|
267
|
+
__decorate([
|
|
268
|
+
core_1.Element()
|
|
269
|
+
], OptionComponent.prototype, "el");
|
|
270
|
+
__decorate([
|
|
271
|
+
core_1.State()
|
|
272
|
+
], OptionComponent.prototype, "obj");
|
|
273
|
+
__decorate([
|
|
274
|
+
core_1.State()
|
|
275
|
+
], OptionComponent.prototype, "localeStrings");
|
|
276
|
+
__decorate([
|
|
277
|
+
core_1.State()
|
|
278
|
+
], OptionComponent.prototype, "filteredOptions");
|
|
279
|
+
__decorate([
|
|
280
|
+
core_1.Prop()
|
|
281
|
+
], OptionComponent.prototype, "doc");
|
|
282
|
+
__decorate([
|
|
283
|
+
core_1.Watch('doc')
|
|
284
|
+
], OptionComponent.prototype, "docChanged");
|
|
285
|
+
__decorate([
|
|
286
|
+
core_1.Prop({ reflect: true })
|
|
287
|
+
], OptionComponent.prototype, "path");
|
|
288
|
+
__decorate([
|
|
289
|
+
core_1.Prop()
|
|
290
|
+
], OptionComponent.prototype, "editable");
|
|
291
|
+
__decorate([
|
|
292
|
+
core_1.Prop()
|
|
293
|
+
], OptionComponent.prototype, "preview");
|
|
294
|
+
__decorate([
|
|
295
|
+
core_1.Event({ bubbles: true })
|
|
296
|
+
], OptionComponent.prototype, "ldfAddOptionToDoc");
|
|
297
|
+
__decorate([
|
|
298
|
+
core_1.Event({ bubbles: true })
|
|
299
|
+
], OptionComponent.prototype, "ldfDocShouldChange");
|
|
300
|
+
__decorate([
|
|
301
|
+
core_1.Event({ bubbles: true })
|
|
302
|
+
], OptionComponent.prototype, "ldfOptionAskForStoredSelection");
|
|
303
|
+
__decorate([
|
|
304
|
+
core_1.Event({ bubbles: true })
|
|
305
|
+
], OptionComponent.prototype, "ldfOptionMakeSelection");
|
|
306
|
+
__decorate([
|
|
307
|
+
core_1.Method()
|
|
308
|
+
], OptionComponent.prototype, "select");
|
|
309
|
+
OptionComponent = __decorate([
|
|
310
|
+
core_1.Component({
|
|
311
|
+
tag: 'ldf-option',
|
|
312
|
+
styleUrl: 'option.scss',
|
|
313
|
+
scoped: true
|
|
314
|
+
})
|
|
315
|
+
], OptionComponent);
|
|
316
|
+
return OptionComponent;
|
|
317
|
+
}());
|
|
318
|
+
exports.OptionComponent = OptionComponent;
|
package/dist/collection/components/prayers-and-thanksgivings/dist/prayers-and-thanksgivings.js
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
14
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
17
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18
|
+
};
|
|
19
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
23
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
24
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
25
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
29
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
30
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
31
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
32
|
+
function step(op) {
|
|
33
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
34
|
+
while (_) try {
|
|
35
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
36
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
37
|
+
switch (op[0]) {
|
|
38
|
+
case 0: case 1: t = op; break;
|
|
39
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
40
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
41
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
42
|
+
default:
|
|
43
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
44
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
45
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
46
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
47
|
+
if (t[2]) _.ops.pop();
|
|
48
|
+
_.trys.pop(); continue;
|
|
49
|
+
}
|
|
50
|
+
op = body.call(thisArg, _);
|
|
51
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
52
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
56
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
57
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
58
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
59
|
+
r[k] = a[j];
|
|
60
|
+
return r;
|
|
61
|
+
};
|
|
62
|
+
exports.__esModule = true;
|
|
63
|
+
exports.PrayersAndThanksgivingsComponent = void 0;
|
|
64
|
+
var core_1 = require("@ionic/core");
|
|
65
|
+
var core_2 = require("@stencil/core");
|
|
66
|
+
var ldf_1 = require("@venite/ldf");
|
|
67
|
+
var locale_1 = require("../../utils/locale");
|
|
68
|
+
var prayers_and_thanksgivings_i18n_en_json_1 = require("./prayers-and-thanksgivings.i18n.en.json");
|
|
69
|
+
var LOCALE = {
|
|
70
|
+
'en': prayers_and_thanksgivings_i18n_en_json_1["default"]
|
|
71
|
+
};
|
|
72
|
+
var PrayersAndThanksgivingsComponent = /** @class */ (function () {
|
|
73
|
+
function PrayersAndThanksgivingsComponent() {
|
|
74
|
+
this.localeStrings = {};
|
|
75
|
+
this.filter = '';
|
|
76
|
+
}
|
|
77
|
+
PrayersAndThanksgivingsComponent.prototype.optionsChange = function (newOptions) {
|
|
78
|
+
console.log("new options");
|
|
79
|
+
this.currentOptions = newOptions;
|
|
80
|
+
};
|
|
81
|
+
/** Set the list of available prayers */
|
|
82
|
+
PrayersAndThanksgivingsComponent.prototype.setOptions = function (options) {
|
|
83
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
this.optionsChange(options);
|
|
86
|
+
if (this.loading) {
|
|
87
|
+
this.loading.dismiss();
|
|
88
|
+
}
|
|
89
|
+
return [2 /*return*/];
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
// Lifecycle events
|
|
94
|
+
PrayersAndThanksgivingsComponent.prototype.componentWillLoad = function () {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
this.ldfAskForPrayersAndThanksgivings.emit(true);
|
|
98
|
+
this.loadLocaleStrings();
|
|
99
|
+
return [2 /*return*/];
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
// Private methods
|
|
104
|
+
PrayersAndThanksgivingsComponent.prototype.loadLocaleStrings = function () {
|
|
105
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
106
|
+
return __generator(this, function (_a) {
|
|
107
|
+
try {
|
|
108
|
+
this.localeStrings = LOCALE[locale_1.getComponentClosestLanguage(this.element)];
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
console.warn(e);
|
|
112
|
+
}
|
|
113
|
+
return [2 /*return*/];
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
PrayersAndThanksgivingsComponent.prototype.addPrayer = function (value) {
|
|
118
|
+
var _a;
|
|
119
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
120
|
+
var popover;
|
|
121
|
+
return __generator(this, function (_b) {
|
|
122
|
+
switch (_b.label) {
|
|
123
|
+
case 0:
|
|
124
|
+
if (!this.parent) return [3 /*break*/, 1];
|
|
125
|
+
this.parent.ldfDocShouldChange.emit(new ldf_1.Change({
|
|
126
|
+
path: this.base,
|
|
127
|
+
op: [{
|
|
128
|
+
type: 'insertAt',
|
|
129
|
+
index: this.index,
|
|
130
|
+
value: value
|
|
131
|
+
}]
|
|
132
|
+
}));
|
|
133
|
+
(_a = this.modal) === null || _a === void 0 ? void 0 : _a.dismiss();
|
|
134
|
+
return [3 /*break*/, 4];
|
|
135
|
+
case 1: return [4 /*yield*/, core_1.popoverController.create({
|
|
136
|
+
backdropDismiss: true,
|
|
137
|
+
component: "ldf-liturgical-document",
|
|
138
|
+
componentProps: {
|
|
139
|
+
doc: __assign(__assign({}, value), { value: value.value.map(function (line) { return typeof line === "string" ? line.replace(" ", " ") : line; }) }),
|
|
140
|
+
padding: "1em"
|
|
141
|
+
}
|
|
142
|
+
})];
|
|
143
|
+
case 2:
|
|
144
|
+
popover = _b.sent();
|
|
145
|
+
return [4 /*yield*/, popover.present()];
|
|
146
|
+
case 3:
|
|
147
|
+
_b.sent();
|
|
148
|
+
_b.label = 4;
|
|
149
|
+
case 4: return [2 /*return*/];
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
PrayersAndThanksgivingsComponent.prototype.buildTree = function () {
|
|
155
|
+
var _this = this;
|
|
156
|
+
function groupBy(list, keyGetter) {
|
|
157
|
+
var map = new Map();
|
|
158
|
+
list.forEach(function (item) {
|
|
159
|
+
var key = keyGetter(item);
|
|
160
|
+
var collection = map.get(key);
|
|
161
|
+
if (!collection) {
|
|
162
|
+
map.set(key, [item]);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
collection.push(item);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
return map;
|
|
169
|
+
}
|
|
170
|
+
var options = !this.filter ? this.currentOptions || [] :
|
|
171
|
+
(this.currentOptions || []).filter(function (doc) { var _a, _b, _c, _d; return ((_b = (_a = doc.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(_this.filter.toLowerCase())) || ((_d = (_c = (doc.value || [])[0]) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === null || _d === void 0 ? void 0 : _d.includes(_this.filter.toLowerCase())); });
|
|
172
|
+
var categories = Array.from(groupBy(options, function (item) { return (item.category || [])[1]; }));
|
|
173
|
+
var subcategories = categories.map(function (_a) {
|
|
174
|
+
var categoryLabel = _a[0], values = _a[1];
|
|
175
|
+
return [categoryLabel, Array.from(groupBy(values, function (item) { return (item.category || [])[2]; }))];
|
|
176
|
+
});
|
|
177
|
+
return subcategories;
|
|
178
|
+
};
|
|
179
|
+
// Render
|
|
180
|
+
PrayersAndThanksgivingsComponent.prototype.render = function () {
|
|
181
|
+
var _this = this;
|
|
182
|
+
var localeStrings = this.localeStrings || {};
|
|
183
|
+
var tree = this.buildTree(), list = React.createElement("ion-list", null,
|
|
184
|
+
React.createElement("ion-searchbar", { debounce: 100, onIonChange: function (ev) { return _this.filter = ev.detail.value; } }),
|
|
185
|
+
tree.map(function (_a) {
|
|
186
|
+
var category = _a[0], values = _a[1];
|
|
187
|
+
return __spreadArrays([
|
|
188
|
+
React.createElement("h2", { "class": "padded" }, category)
|
|
189
|
+
], values.map(function (_a) {
|
|
190
|
+
var subcategory = _a[0], subvalues = _a[1];
|
|
191
|
+
return __spreadArrays([
|
|
192
|
+
React.createElement("h3", { "class": "padded" }, subcategory)
|
|
193
|
+
], subvalues
|
|
194
|
+
.sort(function (a, b) { var _a, _b; return Number((_a = a.label) === null || _a === void 0 ? void 0 : _a.split('.')[0]) < Number((_b = b.label) === null || _b === void 0 ? void 0 : _b.split('.')[0]) ? -1 : 1; })
|
|
195
|
+
.map(function (option) { return React.createElement("ion-item", { button: true, onClick: function () { return _this.addPrayer(option); } },
|
|
196
|
+
React.createElement("ion-label", null,
|
|
197
|
+
React.createElement("h3", null, option.label),
|
|
198
|
+
React.createElement("p", null, option.value[0].replace(/\*/g, '').replace(" ", " ")))); }));
|
|
199
|
+
}));
|
|
200
|
+
}));
|
|
201
|
+
return this.modal
|
|
202
|
+
? [
|
|
203
|
+
React.createElement("ion-header", null,
|
|
204
|
+
React.createElement("ion-toolbar", null,
|
|
205
|
+
React.createElement("ion-title", null, localeStrings.title),
|
|
206
|
+
React.createElement("ion-buttons", { slot: "end" },
|
|
207
|
+
React.createElement("ion-button", { onClick: function () { return _this.modal.dismiss(); } },
|
|
208
|
+
React.createElement("ion-icon", { slot: "icon-only", name: "close" }))))),
|
|
209
|
+
React.createElement("ion-content", { "class": "ion-padding" }, list)
|
|
210
|
+
]
|
|
211
|
+
: [list];
|
|
212
|
+
};
|
|
213
|
+
__decorate([
|
|
214
|
+
core_2.Element()
|
|
215
|
+
], PrayersAndThanksgivingsComponent.prototype, "element");
|
|
216
|
+
__decorate([
|
|
217
|
+
core_2.State()
|
|
218
|
+
], PrayersAndThanksgivingsComponent.prototype, "localeStrings");
|
|
219
|
+
__decorate([
|
|
220
|
+
core_2.State()
|
|
221
|
+
], PrayersAndThanksgivingsComponent.prototype, "currentOptions");
|
|
222
|
+
__decorate([
|
|
223
|
+
core_2.State()
|
|
224
|
+
], PrayersAndThanksgivingsComponent.prototype, "filter");
|
|
225
|
+
__decorate([
|
|
226
|
+
core_2.Prop({ reflect: true })
|
|
227
|
+
], PrayersAndThanksgivingsComponent.prototype, "base");
|
|
228
|
+
__decorate([
|
|
229
|
+
core_2.Prop({ reflect: true })
|
|
230
|
+
], PrayersAndThanksgivingsComponent.prototype, "index");
|
|
231
|
+
__decorate([
|
|
232
|
+
core_2.Prop()
|
|
233
|
+
], PrayersAndThanksgivingsComponent.prototype, "modal");
|
|
234
|
+
__decorate([
|
|
235
|
+
core_2.Prop()
|
|
236
|
+
], PrayersAndThanksgivingsComponent.prototype, "parent");
|
|
237
|
+
__decorate([
|
|
238
|
+
core_2.Prop()
|
|
239
|
+
], PrayersAndThanksgivingsComponent.prototype, "options");
|
|
240
|
+
__decorate([
|
|
241
|
+
core_2.Watch('options')
|
|
242
|
+
], PrayersAndThanksgivingsComponent.prototype, "optionsChange");
|
|
243
|
+
__decorate([
|
|
244
|
+
core_2.Method()
|
|
245
|
+
], PrayersAndThanksgivingsComponent.prototype, "setOptions");
|
|
246
|
+
__decorate([
|
|
247
|
+
core_2.Event({ bubbles: true })
|
|
248
|
+
], PrayersAndThanksgivingsComponent.prototype, "ldfAskForPrayersAndThanksgivings");
|
|
249
|
+
PrayersAndThanksgivingsComponent = __decorate([
|
|
250
|
+
core_2.Component({
|
|
251
|
+
tag: 'ldf-prayers-and-thanksgivings',
|
|
252
|
+
styleUrl: 'prayers-and-thanksgivings.scss',
|
|
253
|
+
scoped: true
|
|
254
|
+
})
|
|
255
|
+
], PrayersAndThanksgivingsComponent);
|
|
256
|
+
return PrayersAndThanksgivingsComponent;
|
|
257
|
+
}());
|
|
258
|
+
exports.PrayersAndThanksgivingsComponent = PrayersAndThanksgivingsComponent;
|