@venite/components 0.16.7 → 0.16.13
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/_commonjsHelpers-bcc1208a.js +25 -0
- package/dist/cjs/animation-34a434a2.js +957 -0
- package/dist/cjs/app-globals-60a4f972.js +7 -0
- package/dist/cjs/book-1a92678a.js +287 -0
- package/dist/cjs/change-cdb1e8c0.js +16 -0
- package/dist/cjs/cubic-bezier-f3b34d27.js +91 -0
- package/dist/cjs/cursor-81bfd01e.js +12 -0
- package/dist/cjs/focus-visible-5621d6b1.js +45 -0
- package/dist/cjs/framework-delegate-84d33ff0.js +37 -0
- package/dist/cjs/gesture-controller-5bd9d825.js +193 -0
- package/dist/cjs/haptic-88c261ab.js +49 -0
- package/dist/cjs/hardware-back-button-8c2f48d2.js +59 -0
- package/dist/cjs/heading-5afc2b24.js +21 -0
- package/dist/cjs/helpers-41dfb43a.js +110 -0
- package/dist/cjs/image-3bee3e73.js +21 -0
- package/dist/cjs/index-1a73a70c.js +211 -0
- package/dist/cjs/index-4b7e4228.js +135 -0
- package/dist/cjs/index-7aa21373.js +92 -0
- package/dist/cjs/index-8197bb45.js +441 -0
- package/dist/{ldf/index-ea7a35b9.js → cjs/index-8fe0df8d.js} +213 -1242
- package/dist/cjs/index-c5bdf2bc.js +167 -0
- package/dist/cjs/index-de13bd01.js +463 -0
- package/dist/cjs/index-e4c51e4d.js +307 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/input-shims-9c2d56bd.js +357 -0
- package/dist/cjs/ion-action-sheet.cjs.entry.js +230 -0
- package/dist/cjs/ion-alert.cjs.entry.js +386 -0
- package/dist/cjs/ion-app.cjs.entry.js +60 -0
- package/dist/cjs/ion-avatar.cjs.entry.js +25 -0
- package/dist/cjs/ion-back-button.cjs.entry.js +79 -0
- package/dist/cjs/ion-backdrop.cjs.entry.js +67 -0
- package/dist/cjs/ion-badge.cjs.entry.js +27 -0
- package/dist/cjs/ion-button_13.cjs.entry.js +1786 -0
- package/dist/cjs/ion-card-content_6.cjs.entry.js +405 -0
- package/dist/cjs/ion-card-subtitle.cjs.entry.js +27 -0
- package/dist/cjs/ion-card_2.cjs.entry.js +91 -0
- package/dist/cjs/ion-checkbox_3.cjs.entry.js +234 -0
- package/dist/cjs/ion-chip.cjs.entry.js +31 -0
- package/dist/cjs/ion-datetime_2.cjs.entry.js +1125 -0
- package/dist/cjs/ion-fab-button.cjs.entry.js +74 -0
- package/dist/cjs/ion-fab-list.cjs.entry.js +45 -0
- package/dist/cjs/ion-fab.cjs.entry.js +74 -0
- package/dist/cjs/ion-footer.cjs.entry.js +43 -0
- package/dist/cjs/ion-img.cjs.entry.js +72 -0
- package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +37 -0
- package/dist/cjs/ion-infinite-scroll.cjs.entry.js +206 -0
- package/dist/cjs/ion-input_2.cjs.entry.js +2645 -0
- package/dist/cjs/ion-item-divider.cjs.entry.js +36 -0
- package/dist/cjs/ion-item-group.cjs.entry.js +31 -0
- package/dist/cjs/ion-item-option.cjs.entry.js +55 -0
- package/dist/cjs/ion-item-options.cjs.entry.js +47 -0
- package/dist/cjs/ion-item-sliding.cjs.entry.js +359 -0
- package/dist/cjs/ion-list-header.cjs.entry.js +28 -0
- package/dist/cjs/ion-loading.cjs.entry.js +213 -0
- package/dist/cjs/ion-menu-button.cjs.entry.js +61 -0
- package/dist/cjs/ion-menu-toggle.cjs.entry.js +47 -0
- package/dist/cjs/ion-menu.cjs.entry.js +456 -0
- package/dist/cjs/ion-modal.cjs.entry.js +488 -0
- package/dist/cjs/ion-nav-link.cjs.entry.js +44 -0
- package/dist/cjs/ion-nav.cjs.entry.js +812 -0
- package/dist/cjs/ion-note.cjs.entry.js +27 -0
- package/dist/cjs/ion-picker-column.cjs.entry.js +327 -0
- package/dist/cjs/ion-picker.cjs.entry.js +214 -0
- package/dist/cjs/ion-popover.cjs.entry.js +363 -0
- package/dist/cjs/ion-progress-bar.cjs.entry.js +67 -0
- package/dist/cjs/ion-radio_2.cjs.entry.js +149 -0
- package/dist/cjs/ion-range.cjs.entry.js +395 -0
- package/dist/cjs/ion-refresher-content.cjs.entry.js +40 -0
- package/dist/cjs/ion-refresher.cjs.entry.js +832 -0
- package/dist/cjs/ion-reorder-group.cjs.entry.js +281 -0
- package/dist/cjs/ion-reorder.cjs.entry.js +31 -0
- package/dist/cjs/ion-route-redirect.cjs.entry.js +24 -0
- package/dist/cjs/ion-route.cjs.entry.js +49 -0
- package/dist/cjs/ion-router-link.cjs.entry.js +35 -0
- package/dist/cjs/ion-router-outlet.cjs.entry.js +160 -0
- package/dist/cjs/ion-router.cjs.entry.js +631 -0
- package/dist/cjs/ion-segment_16.cjs.entry.js +2507 -0
- package/dist/cjs/ion-select-popover.cjs.entry.js +33 -0
- package/dist/cjs/ion-select_2.cjs.entry.js +444 -0
- package/dist/cjs/ion-slide.cjs.entry.js +25 -0
- package/dist/cjs/ion-slides.cjs.entry.js +404 -0
- package/dist/cjs/ion-spinner.cjs.entry.js +60 -0
- package/dist/cjs/ion-split-pane.cjs.entry.js +150 -0
- package/dist/cjs/ion-tab-bar.cjs.entry.js +58 -0
- package/dist/cjs/ion-tab-button.cjs.entry.js +99 -0
- package/dist/cjs/ion-tab.cjs.entry.js +58 -0
- package/dist/cjs/ion-tabs.cjs.entry.js +155 -0
- package/dist/cjs/ion-text.cjs.entry.js +22 -0
- package/dist/cjs/ion-textarea.cjs.entry.js +217 -0
- package/dist/cjs/ion-thumbnail.cjs.entry.js +20 -0
- package/dist/cjs/ion-toast.cjs.entry.js +280 -0
- package/dist/cjs/ion-virtual-scroll.cjs.entry.js +544 -0
- package/dist/cjs/ionic-global-581fb4f8.js +204 -0
- package/dist/cjs/ios.transition-7244ac4e.js +459 -0
- package/dist/cjs/ldf-day-name_5.cjs.entry.js +5682 -0
- package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +573 -0
- package/dist/cjs/ldf-editable-condition-piece.cjs.entry.js +220 -0
- package/dist/cjs/ldf-editable-condition.cjs.entry.js +106 -0
- package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +152 -0
- package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +496 -0
- package/dist/cjs/ldf-editable-metadata.cjs.entry.js +186 -0
- package/dist/cjs/ldf-editable-preference-option.cjs.entry.js +72 -0
- package/dist/cjs/ldf-editable-preference.cjs.entry.js +89 -0
- package/dist/cjs/ldf-editable-preferences.cjs.entry.js +200 -0
- package/dist/cjs/ldf-editable-string-list.cjs.entry.js +134 -0
- package/dist/cjs/ldf-editor-cursors.cjs.entry.js +276 -0
- package/dist/cjs/ldf-editor.cjs.entry.js +238 -0
- package/dist/cjs/ldf.cjs.js +22 -0
- package/dist/cjs/loader.cjs.js +24 -0
- package/dist/cjs/locale-d4e925b1.js +8 -0
- package/dist/cjs/md.transition-d86b1ef0.js +62 -0
- package/dist/cjs/menu-toggle-util-293e388b.js +11 -0
- package/dist/cjs/option-24f3d13a.js +167 -0
- package/dist/cjs/overlays-eb464d6d.js +228 -0
- package/dist/cjs/preference-a4bd51c4.js +23 -0
- package/dist/cjs/refrain-91fb446b.js +21 -0
- package/dist/cjs/rubric-5b467a6a.js +1220 -0
- package/dist/cjs/specific-class-a1112e78.js +38 -0
- package/dist/cjs/spinner-configs-b0bec093.js +112 -0
- package/dist/cjs/status-tap-7afb25f5.js +25 -0
- package/dist/cjs/swipe-back-f887168e.js +52 -0
- package/dist/cjs/swiper.bundle-cb0f61f7.js +6246 -0
- package/dist/cjs/tap-click-e0af5237.js +169 -0
- package/dist/cjs/text-5edb80f3.js +18 -0
- package/dist/cjs/theme-81caa5b0.js +47 -0
- package/dist/collection/collection-manifest.json +146 -0
- package/dist/collection/components/bible-reading/bible-reading.css +84 -0
- package/dist/collection/components/bible-reading/bible-reading.i18n.en.json +13 -0
- package/dist/collection/components/bible-reading/bible-reading.i18n.es.json +4 -0
- package/dist/collection/components/bible-reading/bible-reading.js +328 -0
- package/dist/collection/components/bible-reading/dist/bible-reading.js +354 -0
- package/dist/collection/components/bible-reading/fetch-reading.js +17 -0
- package/dist/collection/components/day-name/day-name.css +18 -0
- package/dist/collection/components/day-name/day-name.i18n.en.json +4 -0
- package/dist/{ldf/ldf-day-name.entry.js → collection/components/day-name/day-name.js} +54 -27
- package/dist/collection/components/editable-add-block/editable-add-block.css +93 -0
- package/dist/collection/components/editable-add-block/editable-add-block.i18n.en.json +5 -0
- package/dist/collection/components/editable-add-block/editable-add-block.js +135 -0
- package/dist/collection/components/editable-add-block-menu/dist/menu-options.js +230 -0
- package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.css +33 -0
- package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.i18n.en.json +48 -0
- package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.js +101 -0
- package/dist/collection/components/editable-add-block-menu/menu-options.js +423 -0
- package/dist/collection/components/editable-antiphon-field/editable-antiphon-field.i18n.en.json +11 -0
- package/dist/collection/components/editable-antiphon-field/editable-antiphon-field.js +332 -0
- package/dist/collection/components/editable-antiphon-field/ldf-editable-antiphon-field.css +7 -0
- package/dist/collection/components/editable-boolean/editable-boolean.js +117 -0
- package/dist/collection/components/editable-condition/editable-condition.i18n.en.json +7 -0
- package/dist/collection/components/editable-condition/editable-condition.js +192 -0
- package/dist/collection/components/editable-condition-piece/dist/editable-condition-piece.js +257 -0
- package/dist/collection/components/editable-condition-piece/editable-condition-piece.css +34 -0
- package/dist/collection/components/editable-condition-piece/editable-condition-piece.i18n.en.json +21 -0
- package/dist/collection/components/editable-condition-piece/editable-condition-piece.js +233 -0
- package/dist/collection/components/editable-condition-piece/except-only-strings.js +12 -0
- package/dist/collection/components/editable-condition-piece/except-only.js +20 -0
- package/dist/collection/components/editable-delete/editable-delete.i18n.en.json +6 -0
- package/dist/collection/components/editable-delete/editable-delete.js +175 -0
- package/dist/collection/components/editable-filter-documents/dist/editable-filter-documents.js +242 -0
- package/dist/collection/components/editable-filter-documents/editable-filter-documents.css +11 -0
- package/dist/collection/components/editable-filter-documents/editable-filter-documents.i18n.en.json +9 -0
- package/dist/collection/components/editable-filter-documents/editable-filter-documents.js +294 -0
- package/dist/collection/components/editable-lookup/editable-lookup.js +210 -0
- package/dist/collection/components/editable-metadata/editable-metadata.css +44 -0
- package/dist/collection/components/editable-metadata/editable-metadata.i18n.en.json +51 -0
- package/dist/collection/components/editable-metadata/editable-metadata.js +261 -0
- package/dist/collection/components/editable-metadata-buttons/dist/editable-metadata-buttons.js +444 -0
- package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.css +37 -0
- package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.i18n.en.json +31 -0
- package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.js +433 -0
- package/dist/collection/components/editable-metadata-metadata-fields/dist/editable-metadata-metadata-fields.js +399 -0
- package/dist/collection/components/editable-metadata-metadata-fields/editable-metadata-metadata-fields.i18n.en.json +48 -0
- package/dist/collection/components/editable-metadata-metadata-fields/editable-metadata-metadata-fields.js +438 -0
- package/dist/collection/components/editable-preference/editable-preference.i18n.en.json +8 -0
- package/dist/collection/components/editable-preference/editable-preference.js +166 -0
- package/dist/collection/components/editable-preference-option/editable-preference-option.i18n.en.json +9 -0
- package/dist/collection/components/editable-preference-option/editable-preference-option.js +128 -0
- package/dist/collection/components/editable-preferences/dist/editable-preferences.js +281 -0
- package/dist/collection/components/editable-preferences/editable-preferences.css +3 -0
- package/dist/collection/components/editable-preferences/editable-preferences.i18n.en.json +10 -0
- package/dist/collection/components/editable-preferences/editable-preferences.js +230 -0
- package/dist/collection/components/editable-preferences/preference-tree.js +24 -0
- package/dist/collection/components/editable-select/dist/editable-select.js +69 -0
- package/dist/collection/components/editable-select/editable-select.css +0 -0
- package/dist/collection/components/editable-select/editable-select.js +157 -0
- package/dist/collection/components/editable-string-list/dist/editable-string-list.js +207 -0
- package/dist/collection/components/editable-string-list/editable-string-list.css +21 -0
- package/dist/collection/components/editable-string-list/editable-string-list.i18n.en.json +18 -0
- package/dist/collection/components/editable-string-list/editable-string-list.js +194 -0
- package/dist/collection/components/editable-text/dist/editable-text.js +300 -0
- package/dist/collection/components/editable-text/dist/handle-input.js +52 -0
- package/dist/collection/components/editable-text/editable-text.css +53 -0
- package/dist/collection/components/editable-text/editable-text.i18n.en.json +3 -0
- package/dist/collection/components/editable-text/editable-text.js +473 -0
- package/dist/collection/components/editable-text/handle-input.js +47 -0
- package/dist/collection/components/editor/dist/editor.js +403 -0
- package/dist/collection/components/editor/editor.css +41 -0
- package/dist/collection/components/editor/editor.js +579 -0
- package/dist/collection/components/editor-cursors/editor-cursors.css +43 -0
- package/dist/collection/components/editor-cursors/editor-cursors.js +228 -0
- package/dist/collection/components/heading/dist/heading.js +210 -0
- package/dist/collection/components/heading/editable-node.js +2 -0
- package/dist/collection/components/heading/heading.css +96 -0
- package/dist/collection/components/heading/heading.i18n.en.json +4 -0
- package/dist/collection/components/heading/heading.js +198 -0
- package/dist/collection/components/image/image.css +75 -0
- package/dist/collection/components/image/image.i18n.en.json +4 -0
- package/dist/collection/components/image/image.js +303 -0
- package/dist/collection/components/label-bar/label-bar.css +40 -0
- package/dist/collection/components/label-bar/label-bar.js +49 -0
- package/dist/collection/components/liturgical-document/condition-node.js +86 -0
- package/dist/collection/components/liturgical-document/dist/liturgical-document.js +341 -0
- package/dist/collection/components/liturgical-document/liturgical-document.css +73 -0
- package/dist/collection/components/liturgical-document/liturgical-document.i18n.en.json +45 -0
- package/dist/collection/components/liturgical-document/liturgical-document.js +465 -0
- package/dist/collection/components/liturgical-document/lookup-node.js +80 -0
- package/dist/collection/components/liturgy/liturgy.js +138 -0
- package/dist/collection/components/meditation/dist/meditation.js +345 -0
- package/dist/collection/components/meditation/meditation.css +63 -0
- package/dist/collection/components/meditation/meditation.i18n.en.json +8 -0
- package/dist/collection/components/meditation/meditation.js +409 -0
- package/dist/collection/components/option/dist/option.js +318 -0
- package/dist/collection/components/option/option.css +8 -0
- package/dist/collection/components/option/option.i18n.en.json +3 -0
- package/dist/{ldf/ldf-option.entry.js → collection/components/option/option.js} +214 -31
- package/dist/collection/components/prayers-and-thanksgivings/dist/prayers-and-thanksgivings.js +258 -0
- package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.css +3 -0
- package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.i18n.en.json +3 -0
- package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.js +265 -0
- package/dist/collection/components/psalm/dist/psalm.js +383 -0
- package/dist/collection/components/psalm/psalm.css +152 -0
- package/dist/collection/components/psalm/psalm.i18n.en.json +10 -0
- package/dist/collection/components/psalm/psalm.js +361 -0
- package/dist/collection/components/refrain/refrain.css +42 -0
- package/dist/collection/components/refrain/refrain.js +105 -0
- package/dist/collection/components/responsive-prayer/responsive-prayer.css +83 -0
- package/dist/collection/components/responsive-prayer/responsive-prayer.i18n.en.json +7 -0
- package/dist/collection/components/responsive-prayer/responsive-prayer.js +215 -0
- package/dist/collection/components/rubric/rubric.css +9 -0
- package/dist/collection/components/rubric/rubric.js +104 -0
- package/dist/collection/components/string/dist/string.js +194 -0
- package/dist/collection/components/string/string.css +60 -0
- package/dist/{ldf/ldf-string.entry.js → collection/components/string/string.js} +179 -18
- package/dist/collection/components/text/dist/text.js +234 -0
- package/dist/collection/components/text/text.css +52 -0
- package/dist/collection/components/text/text.i18n.en.json +7 -0
- package/dist/collection/components/text/text.i18n.es.json +3 -0
- package/dist/collection/components/text/text.js +224 -0
- package/dist/collection/i18n/bible-reading.i18n.en.json +13 -0
- package/dist/collection/i18n/bible-reading.i18n.es.json +4 -0
- package/dist/collection/i18n/day-name.i18n.en.json +4 -0
- package/dist/collection/i18n/editable-add-block-menu.i18n.en.json +48 -0
- package/dist/collection/i18n/editable-add-block.i18n.en.json +5 -0
- package/dist/collection/i18n/editable-antiphon-field.i18n.en.json +11 -0
- package/dist/collection/i18n/editable-condition-piece.i18n.en.json +21 -0
- package/dist/collection/i18n/editable-condition.i18n.en.json +7 -0
- package/dist/collection/i18n/editable-delete.i18n.en.json +6 -0
- package/dist/collection/i18n/editable-filter-documents.i18n.en.json +9 -0
- package/dist/collection/i18n/editable-metadata-buttons.i18n.en.json +31 -0
- package/dist/collection/i18n/editable-metadata-metadata-fields.i18n.en.json +48 -0
- package/dist/collection/i18n/editable-metadata.i18n.en.json +51 -0
- package/dist/collection/i18n/editable-preference-option.i18n.en.json +9 -0
- package/dist/collection/i18n/editable-preference.i18n.en.json +8 -0
- package/dist/collection/i18n/editable-preferences.i18n.en.json +10 -0
- package/dist/collection/i18n/editable-string-list.i18n.en.json +18 -0
- package/dist/collection/i18n/editable-text.i18n.en.json +3 -0
- package/dist/collection/i18n/heading.i18n.en.json +4 -0
- package/dist/collection/i18n/image.i18n.en.json +4 -0
- package/dist/collection/i18n/liturgical-document.i18n.en.json +45 -0
- package/dist/collection/i18n/meditation.i18n.en.json +8 -0
- package/dist/collection/i18n/option.i18n.en.json +3 -0
- package/dist/collection/i18n/prayers-and-thanksgivings.i18n.en.json +3 -0
- package/dist/collection/i18n/psalm.i18n.en.json +10 -0
- package/dist/collection/i18n/responsive-prayer.i18n.en.json +7 -0
- package/dist/collection/i18n/text.i18n.en.json +7 -0
- package/dist/collection/i18n/text.i18n.es.json +3 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/interfaces/add-option-to-doc.js +1 -0
- package/dist/collection/interfaces/dist/menu-option.js +9 -0
- package/dist/collection/interfaces/index.js +2 -0
- package/dist/collection/interfaces/menu-option.js +2 -0
- package/dist/collection/utils/element-from-path.js +14 -0
- package/dist/{ldf/locale-d595f8f6.js → collection/utils/locale.js} +2 -4
- package/dist/esm/_commonjsHelpers-ba3f0406.js +21 -0
- package/dist/{ldf/animation-6b850b6a.js → esm/animation-7a1025d0.js} +1 -1
- package/dist/{ldf/app-globals-d4376e8c.js → esm/app-globals-729b03cf.js} +1 -1
- package/dist/esm/book-31b8cdde.js +282 -0
- package/dist/esm/change-ea574d32.js +14 -0
- package/dist/{ldf → esm}/cubic-bezier-89113939.js +0 -0
- package/dist/esm/cursor-0e47f111.js +10 -0
- package/dist/{ldf → esm}/focus-visible-571e113e.js +0 -0
- package/dist/{ldf → esm}/framework-delegate-7af2c551.js +0 -0
- package/dist/esm/gesture-controller-5bf8565e.js +191 -0
- package/dist/{ldf/haptic-0d102c16.js → esm/haptic-fc16a4d8.js} +0 -24
- package/dist/{ldf → esm}/hardware-back-button-b3b61715.js +0 -0
- package/dist/esm/heading-cc5ffa8a.js +19 -0
- package/dist/{ldf/helpers-e9bf4204.js → esm/helpers-8c93393b.js} +0 -3
- package/dist/esm/image-c6a3f0c5.js +19 -0
- package/dist/{ldf/index-dd274afe.js → esm/index-1bf6d100.js} +3 -31
- package/dist/{ldf/index-4505cc02.js → esm/index-734a6b69.js} +2 -2
- package/dist/{ldf/index-9b41fcc6.js → esm/index-82044e24.js} +3 -190
- package/dist/{ldf → esm}/index-86d5f3ab.js +0 -0
- package/dist/{ldf/index-fc8c2f30.js → esm/index-9579282b.js} +3 -3
- package/dist/{ldf → esm}/index-c7ecbd63.js +0 -0
- package/dist/{ldf/index-7845c707.js → esm/index-f08f6130.js} +1 -6
- package/dist/esm/index-f0f6a379.js +1765 -0
- package/dist/esm/index.js +4 -0
- package/dist/{ldf/input-shims-b58afc2a.js → esm/input-shims-a4ad2743.js} +5 -7
- package/dist/{ldf → esm}/ion-action-sheet.entry.js +5 -5
- package/dist/{ldf → esm}/ion-alert.entry.js +5 -5
- package/dist/{ldf → esm}/ion-app.entry.js +6 -6
- package/dist/{ldf → esm}/ion-avatar.entry.js +2 -2
- package/dist/{ldf → esm}/ion-back-button.entry.js +2 -2
- package/dist/{ldf → esm}/ion-backdrop.entry.js +3 -3
- package/dist/{ldf → esm}/ion-badge.entry.js +2 -2
- package/dist/esm/ion-button_13.entry.js +1770 -0
- package/dist/esm/ion-card-content_6.entry.js +396 -0
- package/dist/{ldf → esm}/ion-card-subtitle.entry.js +2 -2
- package/dist/{ldf/ion-card.entry.js → esm/ion-card_2.entry.js} +27 -3
- package/dist/{ldf/ion-checkbox.entry.js → esm/ion-checkbox_3.entry.js} +123 -4
- package/dist/{ldf → esm}/ion-chip.entry.js +2 -2
- package/dist/{ldf/ion-datetime.entry.js → esm/ion-datetime_2.entry.js} +152 -6
- package/dist/{ldf → esm}/ion-fab-button.entry.js +3 -3
- package/dist/{ldf → esm}/ion-fab-list.entry.js +2 -2
- package/dist/{ldf → esm}/ion-fab.entry.js +2 -2
- package/dist/{ldf → esm}/ion-footer.entry.js +2 -2
- package/dist/{ldf → esm}/ion-img.entry.js +2 -2
- package/dist/{ldf → esm}/ion-infinite-scroll-content.entry.js +2 -2
- package/dist/{ldf → esm}/ion-infinite-scroll.entry.js +2 -2
- package/dist/{ldf/ldf-editable-text.entry.js → esm/ion-input_2.entry.js} +222 -12
- package/dist/{ldf → esm}/ion-item-divider.entry.js +2 -2
- package/dist/{ldf → esm}/ion-item-group.entry.js +2 -2
- package/dist/{ldf → esm}/ion-item-option.entry.js +2 -2
- package/dist/{ldf → esm}/ion-item-options.entry.js +3 -3
- package/dist/{ldf → esm}/ion-item-sliding.entry.js +4 -4
- package/dist/{ldf → esm}/ion-list-header.entry.js +2 -2
- package/dist/{ldf → esm}/ion-loading.entry.js +5 -5
- package/dist/{ldf → esm}/ion-menu-button.entry.js +6 -6
- package/dist/{ldf → esm}/ion-menu-toggle.entry.js +6 -6
- package/dist/{ldf → esm}/ion-menu.entry.js +7 -11
- package/dist/{ldf → esm}/ion-modal.entry.js +8 -7
- package/dist/{ldf → esm}/ion-nav-link.entry.js +1 -1
- package/dist/{ldf → esm}/ion-nav.entry.js +5 -9
- package/dist/{ldf → esm}/ion-note.entry.js +2 -2
- package/dist/{ldf → esm}/ion-picker-column.entry.js +5 -5
- package/dist/{ldf → esm}/ion-picker.entry.js +5 -5
- package/dist/{ldf → esm}/ion-popover.entry.js +6 -6
- package/dist/{ldf → esm}/ion-progress-bar.entry.js +3 -3
- package/dist/{ldf/ion-radio.entry.js → esm/ion-radio_2.entry.js} +57 -4
- package/dist/{ldf → esm}/ion-range.entry.js +4 -4
- package/dist/{ldf → esm}/ion-refresher-content.entry.js +2 -2
- package/dist/{ldf → esm}/ion-refresher.entry.js +7 -57
- package/dist/{ldf → esm}/ion-reorder-group.entry.js +4 -4
- package/dist/{ldf → esm}/ion-reorder.entry.js +2 -2
- package/dist/{ldf → esm}/ion-route-redirect.entry.js +1 -1
- package/dist/{ldf → esm}/ion-route.entry.js +1 -1
- package/dist/{ldf → esm}/ion-router-link.entry.js +2 -2
- package/dist/{ldf → esm}/ion-router-outlet.entry.js +4 -4
- package/dist/{ldf → esm}/ion-router.entry.js +2 -2
- package/dist/esm/ion-segment_16.entry.js +2488 -0
- package/dist/{ldf → esm}/ion-select-popover.entry.js +3 -3
- package/dist/{ldf/ion-select.entry.js → esm/ion-select_2.entry.js} +24 -5
- package/dist/{ldf → esm}/ion-slide.entry.js +2 -2
- package/dist/{ldf → esm}/ion-slides.entry.js +3 -3
- package/dist/{ldf → esm}/ion-spinner.entry.js +2 -2
- package/dist/{ldf → esm}/ion-split-pane.entry.js +2 -8
- package/dist/{ldf → esm}/ion-tab-bar.entry.js +2 -2
- package/dist/{ldf → esm}/ion-tab-button.entry.js +2 -2
- package/dist/{ldf → esm}/ion-tab.entry.js +1 -9
- package/dist/{ldf → esm}/ion-tabs.entry.js +1 -1
- package/dist/{ldf → esm}/ion-text.entry.js +2 -2
- package/dist/{ldf → esm}/ion-textarea.entry.js +5 -5
- package/dist/{ldf → esm}/ion-thumbnail.entry.js +2 -2
- package/dist/{ldf → esm}/ion-toast.entry.js +5 -5
- package/dist/{ldf → esm}/ion-virtual-scroll.entry.js +1 -1
- package/dist/{ldf/ionic-global-98eeb119.js → esm/ionic-global-ef89a0a5.js} +1 -2
- package/dist/{ldf/ios.transition-1d534d59.js → esm/ios.transition-b1be0863.js} +4 -4
- package/dist/{ldf/ldf-text.entry.js → esm/ldf-day-name_5.entry.js} +508 -126
- package/dist/{ldf → esm}/ldf-editable-add-block-menu.entry.js +9 -4
- package/dist/{ldf → esm}/ldf-editable-condition-piece.entry.js +24 -4
- package/dist/{ldf → esm}/ldf-editable-condition.entry.js +4 -4
- package/dist/{ldf → esm}/ldf-editable-filter-documents.entry.js +32 -4
- package/dist/{ldf/ldf-editable-metadata-metadata-fields.entry.js → esm/ldf-editable-lookup_2.entry.js} +121 -5
- package/dist/{ldf → esm}/ldf-editable-metadata.entry.js +10 -4
- package/dist/{ldf → esm}/ldf-editable-preference-option.entry.js +5 -4
- package/dist/{ldf → esm}/ldf-editable-preference.entry.js +5 -4
- package/dist/{ldf → esm}/ldf-editable-preferences.entry.js +20 -17
- package/dist/{ldf → esm}/ldf-editable-string-list.entry.js +4 -4
- package/dist/{ldf → esm}/ldf-editor-cursors.entry.js +5 -9
- package/dist/{ldf → esm}/ldf-editor.entry.js +6 -4
- package/dist/esm/ldf.js +20 -0
- package/dist/esm/loader.js +20 -0
- package/dist/esm/locale-ec8e14e6.js +6 -0
- package/dist/{ldf/md.transition-a8cd439c.js → esm/md.transition-1763f475.js} +4 -4
- package/dist/{ldf/menu-toggle-util-9f807d31.js → esm/menu-toggle-util-29e61ff3.js} +1 -1
- package/dist/esm/option-da8390ad.js +164 -0
- package/dist/{ldf/overlays-10805282.js → esm/overlays-06b43b65.js} +2 -2
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/preference-d070d4cb.js +20 -0
- package/dist/esm/refrain-75a412cb.js +19 -0
- package/dist/esm/rubric-91bf7fed.js +1213 -0
- package/dist/esm/specific-class-ef83cfb6.js +36 -0
- package/dist/{ldf → esm}/spinner-configs-5dd6891e.js +0 -0
- package/dist/{ldf/status-tap-b8afd87d.js → esm/status-tap-7458bd71.js} +1 -1
- package/dist/{ldf/swipe-back-2b2f4e51.js → esm/swipe-back-762284df.js} +3 -2
- package/dist/{ldf/swiper.bundle-49d79db9.js → esm/swiper.bundle-13b9da83.js} +2 -2
- package/dist/{ldf/tap-click-fccc5499.js → esm/tap-click-9b3d603b.js} +1 -1
- package/dist/esm/text-ed75fbd4.js +16 -0
- package/dist/{ldf → esm}/theme-74c22054.js +0 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/ldf/index.esm.js +1 -4
- package/dist/ldf/ldf.css +3 -122
- package/dist/ldf/ldf.esm.js +1 -123
- package/dist/ldf/p-018e57db.entry.js +1 -0
- package/dist/ldf/p-03389897.js +1 -0
- package/dist/ldf/p-03afc8cb.entry.js +1 -0
- package/dist/ldf/p-04715bf0.entry.js +1 -0
- package/dist/ldf/p-0491d1d2.js +1 -0
- package/dist/ldf/p-07d6d3ad.entry.js +1 -0
- package/dist/ldf/p-08584ccc.entry.js +1 -0
- package/dist/ldf/p-0873a34a.entry.js +1 -0
- package/dist/ldf/p-0ab55cf6.js +1 -0
- package/dist/ldf/p-1482a707.js +1 -0
- package/dist/ldf/p-177ede88.js +1 -0
- package/dist/ldf/p-1902f41e.entry.js +1 -0
- package/dist/ldf/p-1a8e2899.entry.js +1 -0
- package/dist/ldf/p-1c8cc5bf.entry.js +1 -0
- package/dist/ldf/p-1ff665a7.entry.js +1 -0
- package/dist/ldf/p-21e2f0a3.entry.js +1 -0
- package/dist/ldf/p-23af1bc3.entry.js +1 -0
- package/dist/ldf/p-25a736f1.entry.js +1 -0
- package/dist/ldf/p-2ae548b3.entry.js +1 -0
- package/dist/ldf/p-2c36a583.entry.js +1 -0
- package/dist/ldf/p-302dc0d5.entry.js +1 -0
- package/dist/ldf/p-327b14ac.entry.js +1 -0
- package/dist/ldf/p-32f7ba8e.entry.js +1 -0
- package/dist/ldf/p-3545fcdc.entry.js +1 -0
- package/dist/ldf/p-374118d7.entry.js +1 -0
- package/dist/ldf/p-380f8655.entry.js +1 -0
- package/dist/ldf/p-3c9930ff.entry.js +1 -0
- package/dist/ldf/p-3ca74c80.js +8 -0
- package/dist/ldf/p-3e8ff66b.js +1 -0
- package/dist/ldf/p-3f39c2ad.entry.js +1 -0
- package/dist/ldf/p-3f8ef67b.entry.js +1 -0
- package/dist/ldf/p-402c811f.js +1 -0
- package/dist/ldf/p-430c418a.entry.js +1 -0
- package/dist/ldf/p-476327d6.js +1 -0
- package/dist/ldf/p-48e44122.js +1 -0
- package/dist/ldf/p-4a4380fa.entry.js +1 -0
- package/dist/ldf/p-4aa9a6f2.js +1 -0
- package/dist/ldf/p-4b80de48.js +1 -0
- package/dist/ldf/p-4e0b3c0f.entry.js +1 -0
- package/dist/ldf/p-5066eaa5.js +1 -0
- package/dist/ldf/p-52656429.entry.js +1 -0
- package/dist/ldf/p-55d797c1.js +1 -0
- package/dist/ldf/p-59340423.entry.js +1 -0
- package/dist/ldf/p-594fa9d4.entry.js +1 -0
- package/dist/ldf/p-5b43e6be.js +1 -0
- package/dist/ldf/p-5b51185b.js +1 -0
- package/dist/ldf/p-5be7ff17.entry.js +1 -0
- package/dist/ldf/p-5ea6de28.entry.js +1 -0
- package/dist/ldf/p-63b5daf6.entry.js +1 -0
- package/dist/ldf/p-65563763.entry.js +1 -0
- package/dist/ldf/p-65d26c45.js +1 -0
- package/dist/ldf/p-65ea7ab3.entry.js +1 -0
- package/dist/ldf/p-66a7385e.entry.js +1 -0
- package/dist/ldf/p-6857574d.js +1 -0
- package/dist/ldf/p-69f85ad3.entry.js +1 -0
- package/dist/ldf/p-6fe24d85.entry.js +1 -0
- package/dist/ldf/p-70e47f8b.entry.js +1 -0
- package/dist/ldf/p-714cf0b2.js +1 -0
- package/dist/ldf/p-718ae824.js +1 -0
- package/dist/ldf/p-78da8fe1.js +1 -0
- package/dist/ldf/p-79a526a1.entry.js +1 -0
- package/dist/ldf/p-7abeb82c.entry.js +1 -0
- package/dist/ldf/p-7efa633b.entry.js +1 -0
- package/dist/ldf/p-800a115c.entry.js +1 -0
- package/dist/ldf/p-84f38db6.entry.js +1 -0
- package/dist/ldf/p-8767a74e.entry.js +1 -0
- package/dist/ldf/p-88dbd8b6.js +1 -0
- package/dist/ldf/p-8932ec85.entry.js +1 -0
- package/dist/ldf/p-8c2727db.entry.js +1 -0
- package/dist/ldf/p-8ec26587.js +1 -0
- package/dist/ldf/p-8f67abb8.js +3 -0
- package/dist/ldf/p-9155f066.js +1 -0
- package/dist/ldf/p-978e2c6d.js +1 -0
- package/dist/ldf/p-991c0877.js +1 -0
- package/dist/ldf/p-9bd5d1d4.entry.js +1 -0
- package/dist/ldf/p-9c1973a6.entry.js +1 -0
- package/dist/ldf/p-9c397c49.entry.js +1 -0
- package/dist/ldf/p-9e2c172e.entry.js +1 -0
- package/dist/ldf/p-a1729dbd.js +1 -0
- package/dist/ldf/p-ac7a17ce.entry.js +1 -0
- package/dist/ldf/p-acbbd1ec.js +1 -0
- package/dist/ldf/p-afc1a02c.js +1 -0
- package/dist/ldf/p-b1242016.js +1 -0
- package/dist/ldf/p-b62e8f49.js +1 -0
- package/dist/ldf/p-b7388aec.entry.js +1 -0
- package/dist/ldf/p-b78336d7.entry.js +1 -0
- package/dist/ldf/p-ba021918.entry.js +1 -0
- package/dist/ldf/p-bdcf2b02.entry.js +1 -0
- package/dist/ldf/p-c1df632d.entry.js +1 -0
- package/dist/ldf/p-c3042920.entry.js +1 -0
- package/dist/ldf/p-c3807857.entry.js +1 -0
- package/dist/ldf/p-c3841978.entry.js +1 -0
- package/dist/ldf/p-c41e055c.entry.js +1 -0
- package/dist/ldf/p-c60a875b.js +1 -0
- package/dist/ldf/p-c6163f81.entry.js +1 -0
- package/dist/ldf/p-c6a8f4aa.js +1 -0
- package/dist/ldf/p-c6b42618.entry.js +1 -0
- package/dist/ldf/p-c74d3fd0.entry.js +1 -0
- package/dist/ldf/p-c82dd468.entry.js +1 -0
- package/dist/ldf/p-ca698b8f.entry.js +1 -0
- package/dist/ldf/p-cbfbb80c.entry.js +1 -0
- package/dist/ldf/p-d195c957.entry.js +1 -0
- package/dist/ldf/p-d282d4f9.js +1 -0
- package/dist/ldf/p-d7966e9b.entry.js +1 -0
- package/dist/ldf/p-d7f8c770.js +1 -0
- package/dist/ldf/p-d9c1c1f6.js +1 -0
- package/dist/ldf/p-dc445c36.entry.js +1 -0
- package/dist/ldf/p-dd99e42a.entry.js +1 -0
- package/dist/ldf/p-de5bb5ad.js +1 -0
- package/dist/ldf/p-e0e12ae3.entry.js +1 -0
- package/dist/ldf/p-e215fd02.entry.js +1 -0
- package/dist/ldf/p-e4be11ad.entry.js +1 -0
- package/dist/ldf/p-e4f0cd91.entry.js +1 -0
- package/dist/ldf/p-e911e60d.js +1 -0
- package/dist/ldf/p-ea66c343.entry.js +1 -0
- package/dist/ldf/p-ec5eecdc.entry.js +1 -0
- package/dist/ldf/p-ed3327fa.js +1 -0
- package/dist/ldf/p-f0de7628.entry.js +1 -0
- package/dist/ldf/p-f2ce126e.js +1 -0
- package/dist/ldf/p-f3a0c163.js +1 -0
- package/dist/ldf/p-fa191f47.entry.js +1 -0
- package/dist/ldf/p-fe59a676.entry.js +1 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +363 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +285 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +483 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +501 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +7 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +22 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +22 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +277 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +305 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +26 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +26 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +58 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +62 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +440 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +428 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +128 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +151 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +101 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +95 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +61 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +63 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +37 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +35 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +28 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +26 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +27 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +27 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +147 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +150 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +194 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +194 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +108 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +167 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +106 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +106 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +61 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +324 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +293 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +116 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +33 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +37 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +151 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +92 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +40 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +54 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +54 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +172 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +172 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +563 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +630 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +204 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +297 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +186 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +180 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +88 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +85 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +42 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +152 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +163 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +91 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +114 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +118 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +94 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +113 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +104 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +131 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +127 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +175 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +178 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +158 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +104 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +10 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +16 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +17 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +216 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +203 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +122 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +123 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +117 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +82 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +191 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +191 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +151 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +152 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +275 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +320 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +177 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +210 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +15 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +15 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +33 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +58 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +29 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/route-outlet.css +10 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +4 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +348 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +279 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +64 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +35 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +442 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +424 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +123 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +123 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.css +14 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +53 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/slide/slide.css +31 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.ios.css +764 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.md.css +764 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +154 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +108 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +108 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +96 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +81 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +308 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +331 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +19 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +142 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +146 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +21 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +110 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +55 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +249 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +282 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +214 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +211 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +174 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +167 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/virtual-scroll/virtual-scroll.css +21 -0
- package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +101 -0
- package/package.json +2 -2
- package/dist/ldf/_commonjsHelpers-8fe71198.js +0 -44
- package/dist/ldf/css-shim-5630fd5e.js +0 -4
- package/dist/ldf/dom-bd0bf1dc.js +0 -73
- package/dist/ldf/index-f441adec.js +0 -2901
- package/dist/ldf/index-f4e3260e.js +0 -36
- package/dist/ldf/ion-button.entry.js +0 -109
- package/dist/ldf/ion-buttons.entry.js +0 -38
- package/dist/ldf/ion-card-content.entry.js +0 -26
- package/dist/ldf/ion-card-header.entry.js +0 -29
- package/dist/ldf/ion-card-title.entry.js +0 -23
- package/dist/ldf/ion-col.entry.js +0 -114
- package/dist/ldf/ion-content.entry.js +0 -299
- package/dist/ldf/ion-grid.entry.js +0 -24
- package/dist/ldf/ion-header.entry.js +0 -255
- package/dist/ldf/ion-icon.entry.js +0 -172
- package/dist/ldf/ion-input.entry.js +0 -216
- package/dist/ldf/ion-item.entry.js +0 -119
- package/dist/ldf/ion-label.entry.js +0 -51
- package/dist/ldf/ion-list.entry.js +0 -48
- package/dist/ldf/ion-radio-group.entry.js +0 -57
- package/dist/ldf/ion-ripple-effect.entry.js +0 -89
- package/dist/ldf/ion-row.entry.js +0 -16
- package/dist/ldf/ion-searchbar.entry.js +0 -326
- package/dist/ldf/ion-segment-button.entry.js +0 -88
- package/dist/ldf/ion-segment.entry.js +0 -296
- package/dist/ldf/ion-select-option.entry.js +0 -23
- package/dist/ldf/ion-skeleton-text.entry.js +0 -29
- package/dist/ldf/ion-title.entry.js +0 -44
- package/dist/ldf/ion-toggle.entry.js +0 -152
- package/dist/ldf/ion-toolbar.entry.js +0 -67
- package/dist/ldf/ldf-bible-reading.entry.js +0 -252
- package/dist/ldf/ldf-editable-add-block.entry.js +0 -49
- package/dist/ldf/ldf-editable-antiphon-field.entry.js +0 -223
- package/dist/ldf/ldf-editable-boolean.entry.js +0 -42
- package/dist/ldf/ldf-editable-delete.entry.js +0 -97
- package/dist/ldf/ldf-editable-lookup.entry.js +0 -115
- package/dist/ldf/ldf-editable-metadata-buttons.entry.js +0 -293
- package/dist/ldf/ldf-editable-select.entry.js +0 -33
- package/dist/ldf/ldf-heading.entry.js +0 -124
- package/dist/ldf/ldf-image.entry.js +0 -195
- package/dist/ldf/ldf-label-bar.entry.js +0 -22
- package/dist/ldf/ldf-liturgical-document.entry.js +0 -462
- package/dist/ldf/ldf-liturgy.entry.js +0 -49
- package/dist/ldf/ldf-meditation.entry.js +0 -180
- package/dist/ldf/ldf-prayers-and-thanksgivings.entry.js +0 -136
- package/dist/ldf/ldf-psalm.entry.js +0 -267
- package/dist/ldf/ldf-refrain.entry.js +0 -42
- package/dist/ldf/ldf-responsive-prayer.entry.js +0 -137
- package/dist/ldf/ldf-rubric.entry.js +0 -41
- package/dist/ldf/shadow-css-10669ec3.js +0 -383
- package/dist/ldf/utils-8d15f916.js +0 -91
|
@@ -0,0 +1,2488 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, w as writeTask, h, H as Host, a as getElement } from './index-f0f6a379.js';
|
|
2
|
+
import { c as config, g as getIonMode } from './ionic-global-ef89a0a5.js';
|
|
3
|
+
import { p as pointerCoord } from './helpers-8c93393b.js';
|
|
4
|
+
import { c as createColorClasses, h as hostContext } from './theme-74c22054.js';
|
|
5
|
+
import { f as alertController, l as loadingController, m as modalController, t as toastController } from './overlays-06b43b65.js';
|
|
6
|
+
import { R as Responsive, L as LiturgicalDocument, d as dateFromYMDString } from './book-31b8cdde.js';
|
|
7
|
+
import { B as BibleReading, L as Liturgy, M as Meditation, P as Psalm, R as ResponsivePrayer, a as Rubric } from './rubric-91bf7fed.js';
|
|
8
|
+
import { H as Heading } from './heading-cc5ffa8a.js';
|
|
9
|
+
import { v as versionToString, O as Option } from './option-da8390ad.js';
|
|
10
|
+
import { C as Change } from './change-ea574d32.js';
|
|
11
|
+
import { g as getComponentClosestLanguage } from './locale-ec8e14e6.js';
|
|
12
|
+
import { I as Image } from './image-c6a3f0c5.js';
|
|
13
|
+
import { D as Debounce } from './index-f08f6130.js';
|
|
14
|
+
import { R as Refrain } from './refrain-75a412cb.js';
|
|
15
|
+
import './hardware-back-button-b3b61715.js';
|
|
16
|
+
import './_commonjsHelpers-ba3f0406.js';
|
|
17
|
+
|
|
18
|
+
const segmentIosCss = ":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:stretch;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint}:host(.segment-scrollable){justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.065);border-radius:8px;overflow:hidden;z-index:0}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.065)}:host(.in-toolbar){margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;width:auto}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-toolbar){margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host(.in-toolbar:not(.ion-color)){background:var(--ion-toolbar-segment-background, var(--background))}:host(.in-toolbar-color:not(.ion-color)){background:rgba(var(--ion-color-contrast-rgb), 0.11)}";
|
|
19
|
+
|
|
20
|
+
const segmentMdCss = ":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:stretch;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint}:host(.segment-scrollable){justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:transparent}:host(.segment-scrollable) ::slotted(ion-segment-button){min-width:auto}";
|
|
21
|
+
|
|
22
|
+
const Segment = class {
|
|
23
|
+
constructor(hostRef) {
|
|
24
|
+
registerInstance(this, hostRef);
|
|
25
|
+
this.ionChange = createEvent(this, "ionChange", 7);
|
|
26
|
+
this.ionSelect = createEvent(this, "ionSelect", 7);
|
|
27
|
+
this.ionStyle = createEvent(this, "ionStyle", 7);
|
|
28
|
+
this.didInit = false;
|
|
29
|
+
this.activated = false;
|
|
30
|
+
/**
|
|
31
|
+
* If `true`, the user cannot interact with the segment.
|
|
32
|
+
*/
|
|
33
|
+
this.disabled = false;
|
|
34
|
+
/**
|
|
35
|
+
* If `true`, the segment buttons will overflow and the user can swipe to see them.
|
|
36
|
+
* In addition, this will disable the gesture to drag the indicator between the buttons
|
|
37
|
+
* in order to swipe to see hidden buttons.
|
|
38
|
+
*/
|
|
39
|
+
this.scrollable = false;
|
|
40
|
+
this.onClick = (ev) => {
|
|
41
|
+
const current = ev.target;
|
|
42
|
+
const previous = this.checked;
|
|
43
|
+
this.value = current.value;
|
|
44
|
+
if (previous && this.scrollable) {
|
|
45
|
+
this.checkButton(previous, current);
|
|
46
|
+
}
|
|
47
|
+
this.checked = current;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
valueChanged(value, oldValue) {
|
|
51
|
+
this.ionSelect.emit({ value });
|
|
52
|
+
if (oldValue !== '' || this.didInit) {
|
|
53
|
+
if (!this.activated) {
|
|
54
|
+
this.ionChange.emit({ value });
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.valueAfterGesture = value;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
disabledChanged() {
|
|
62
|
+
this.gestureChanged();
|
|
63
|
+
const buttons = this.getButtons();
|
|
64
|
+
for (const button of buttons) {
|
|
65
|
+
button.disabled = this.disabled;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
gestureChanged() {
|
|
69
|
+
if (this.gesture && !this.scrollable) {
|
|
70
|
+
this.gesture.enable(!this.disabled);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
connectedCallback() {
|
|
74
|
+
this.emitStyle();
|
|
75
|
+
}
|
|
76
|
+
componentWillLoad() {
|
|
77
|
+
this.emitStyle();
|
|
78
|
+
}
|
|
79
|
+
async componentDidLoad() {
|
|
80
|
+
this.setCheckedClasses();
|
|
81
|
+
this.gesture = (await import('./index-82044e24.js')).createGesture({
|
|
82
|
+
el: this.el,
|
|
83
|
+
gestureName: 'segment',
|
|
84
|
+
gesturePriority: 100,
|
|
85
|
+
threshold: 0,
|
|
86
|
+
passive: false,
|
|
87
|
+
onStart: ev => this.onStart(ev),
|
|
88
|
+
onMove: ev => this.onMove(ev),
|
|
89
|
+
onEnd: ev => this.onEnd(ev),
|
|
90
|
+
});
|
|
91
|
+
this.gesture.enable(!this.scrollable);
|
|
92
|
+
this.gestureChanged();
|
|
93
|
+
if (this.disabled) {
|
|
94
|
+
this.disabledChanged();
|
|
95
|
+
}
|
|
96
|
+
this.didInit = true;
|
|
97
|
+
}
|
|
98
|
+
onStart(detail) {
|
|
99
|
+
this.activate(detail);
|
|
100
|
+
}
|
|
101
|
+
onMove(detail) {
|
|
102
|
+
this.setNextIndex(detail);
|
|
103
|
+
}
|
|
104
|
+
onEnd(detail) {
|
|
105
|
+
this.setActivated(false);
|
|
106
|
+
const checkedValidButton = this.setNextIndex(detail, true);
|
|
107
|
+
detail.event.stopImmediatePropagation();
|
|
108
|
+
if (checkedValidButton) {
|
|
109
|
+
this.addRipple(detail);
|
|
110
|
+
}
|
|
111
|
+
const value = this.valueAfterGesture;
|
|
112
|
+
if (value !== undefined) {
|
|
113
|
+
this.ionChange.emit({ value });
|
|
114
|
+
this.valueAfterGesture = undefined;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
getButtons() {
|
|
118
|
+
return Array.from(this.el.querySelectorAll('ion-segment-button'));
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The gesture blocks the segment button ripple. This
|
|
122
|
+
* function adds the ripple based on the checked segment
|
|
123
|
+
* and where the cursor ended.
|
|
124
|
+
*/
|
|
125
|
+
addRipple(detail) {
|
|
126
|
+
const useRippleEffect = config.getBoolean('animated', true) && config.getBoolean('rippleEffect', true);
|
|
127
|
+
if (!useRippleEffect) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const buttons = this.getButtons();
|
|
131
|
+
const checked = buttons.find(button => button.value === this.value);
|
|
132
|
+
const root = checked.shadowRoot || checked;
|
|
133
|
+
const ripple = root.querySelector('ion-ripple-effect');
|
|
134
|
+
if (!ripple) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const { x, y } = pointerCoord(detail.event);
|
|
138
|
+
ripple.addRipple(x, y).then(remove => remove());
|
|
139
|
+
}
|
|
140
|
+
/*
|
|
141
|
+
* Activate both the segment and the buttons
|
|
142
|
+
* due to a bug with ::slotted in Safari
|
|
143
|
+
*/
|
|
144
|
+
setActivated(activated) {
|
|
145
|
+
const buttons = this.getButtons();
|
|
146
|
+
buttons.forEach(button => {
|
|
147
|
+
if (activated) {
|
|
148
|
+
button.classList.add('segment-button-activated');
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
button.classList.remove('segment-button-activated');
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
this.activated = activated;
|
|
155
|
+
}
|
|
156
|
+
activate(detail) {
|
|
157
|
+
const clicked = detail.event.target;
|
|
158
|
+
const buttons = this.getButtons();
|
|
159
|
+
const checked = buttons.find(button => button.value === this.value);
|
|
160
|
+
// Make sure we are only checking for activation on a segment button
|
|
161
|
+
// since disabled buttons will get the click on the segment
|
|
162
|
+
if (clicked.tagName !== 'ION-SEGMENT-BUTTON') {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
// If there are no checked buttons, set the current button to checked
|
|
166
|
+
if (!checked) {
|
|
167
|
+
this.value = clicked.value;
|
|
168
|
+
}
|
|
169
|
+
// If the gesture began on the clicked button with the indicator
|
|
170
|
+
// then we should activate the indicator
|
|
171
|
+
if (this.value === clicked.value) {
|
|
172
|
+
this.setActivated(true);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
getIndicator(button) {
|
|
176
|
+
const root = button.shadowRoot || button;
|
|
177
|
+
return root.querySelector('.segment-button-indicator');
|
|
178
|
+
}
|
|
179
|
+
checkButton(previous, current) {
|
|
180
|
+
const previousIndicator = this.getIndicator(previous);
|
|
181
|
+
const currentIndicator = this.getIndicator(current);
|
|
182
|
+
if (previousIndicator === null || currentIndicator === null) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const previousClientRect = previousIndicator.getBoundingClientRect();
|
|
186
|
+
const currentClientRect = currentIndicator.getBoundingClientRect();
|
|
187
|
+
const widthDelta = previousClientRect.width / currentClientRect.width;
|
|
188
|
+
const xPosition = previousClientRect.left - currentClientRect.left;
|
|
189
|
+
// Scale the indicator width to match the previous indicator width
|
|
190
|
+
// and translate it on top of the previous indicator
|
|
191
|
+
const transform = `translate3d(${xPosition}px, 0, 0) scaleX(${widthDelta})`;
|
|
192
|
+
writeTask(() => {
|
|
193
|
+
// Remove the transition before positioning on top of the previous indicator
|
|
194
|
+
currentIndicator.classList.remove('segment-button-indicator-animated');
|
|
195
|
+
currentIndicator.style.setProperty('transform', transform);
|
|
196
|
+
// Force a repaint to ensure the transform happens
|
|
197
|
+
currentIndicator.getBoundingClientRect();
|
|
198
|
+
// Add the transition to move the indicator into place
|
|
199
|
+
currentIndicator.classList.add('segment-button-indicator-animated');
|
|
200
|
+
// Remove the transform to slide the indicator back to the button clicked
|
|
201
|
+
currentIndicator.style.setProperty('transform', '');
|
|
202
|
+
});
|
|
203
|
+
this.value = current.value;
|
|
204
|
+
this.setCheckedClasses();
|
|
205
|
+
}
|
|
206
|
+
setCheckedClasses() {
|
|
207
|
+
const buttons = this.getButtons();
|
|
208
|
+
const index = buttons.findIndex(button => button.value === this.value);
|
|
209
|
+
const next = index + 1;
|
|
210
|
+
// Keep track of the currently checked button
|
|
211
|
+
this.checked = buttons.find(button => button.value === this.value);
|
|
212
|
+
for (const button of buttons) {
|
|
213
|
+
button.classList.remove('segment-button-after-checked');
|
|
214
|
+
}
|
|
215
|
+
if (next < buttons.length) {
|
|
216
|
+
buttons[next].classList.add('segment-button-after-checked');
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
setNextIndex(detail, isEnd = false) {
|
|
220
|
+
const isRTL = document.dir === 'rtl';
|
|
221
|
+
const activated = this.activated;
|
|
222
|
+
const buttons = this.getButtons();
|
|
223
|
+
const index = buttons.findIndex(button => button.value === this.value);
|
|
224
|
+
const previous = buttons[index];
|
|
225
|
+
let current;
|
|
226
|
+
let nextIndex;
|
|
227
|
+
if (index === -1) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
// Get the element that the touch event started on in case
|
|
231
|
+
// it was the checked button, then we will move the indicator
|
|
232
|
+
const rect = previous.getBoundingClientRect();
|
|
233
|
+
const left = rect.left;
|
|
234
|
+
const width = rect.width;
|
|
235
|
+
// Get the element that the gesture is on top of based on the currentX of the
|
|
236
|
+
// gesture event and the Y coordinate of the starting element, since the gesture
|
|
237
|
+
// can move up and down off of the segment
|
|
238
|
+
const currentX = detail.currentX;
|
|
239
|
+
const previousY = rect.top + (rect.height / 2);
|
|
240
|
+
const nextEl = document.elementFromPoint(currentX, previousY);
|
|
241
|
+
const decreaseIndex = isRTL ? currentX > (left + width) : currentX < left;
|
|
242
|
+
const increaseIndex = isRTL ? currentX < left : currentX > (left + width);
|
|
243
|
+
// If the indicator is currently activated then we have started the gesture
|
|
244
|
+
// on top of the checked button so we need to slide the indicator
|
|
245
|
+
// by checking the button next to it as we move
|
|
246
|
+
if (activated && !isEnd) {
|
|
247
|
+
// Decrease index, move left in LTR & right in RTL
|
|
248
|
+
if (decreaseIndex) {
|
|
249
|
+
const newIndex = index - 1;
|
|
250
|
+
if (newIndex >= 0) {
|
|
251
|
+
nextIndex = newIndex;
|
|
252
|
+
}
|
|
253
|
+
// Increase index, moves right in LTR & left in RTL
|
|
254
|
+
}
|
|
255
|
+
else if (increaseIndex) {
|
|
256
|
+
if (activated && !isEnd) {
|
|
257
|
+
const newIndex = index + 1;
|
|
258
|
+
if (newIndex < buttons.length) {
|
|
259
|
+
nextIndex = newIndex;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (nextIndex !== undefined && !buttons[nextIndex].disabled) {
|
|
264
|
+
current = buttons[nextIndex];
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
// If the indicator is not activated then we will just set the indicator
|
|
268
|
+
// to the element where the gesture ended
|
|
269
|
+
if (!activated && isEnd) {
|
|
270
|
+
current = nextEl;
|
|
271
|
+
}
|
|
272
|
+
/* tslint:disable-next-line */
|
|
273
|
+
if (current != null) {
|
|
274
|
+
/**
|
|
275
|
+
* If current element is ion-segment then that means
|
|
276
|
+
* user tried to select a disabled ion-segment-button,
|
|
277
|
+
* and we should not update the ripple.
|
|
278
|
+
*/
|
|
279
|
+
if (current.tagName === 'ION-SEGMENT') {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
if (previous !== current) {
|
|
283
|
+
this.checkButton(previous, current);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
emitStyle() {
|
|
289
|
+
this.ionStyle.emit({
|
|
290
|
+
'segment': true
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
render() {
|
|
294
|
+
const mode = getIonMode(this);
|
|
295
|
+
return (h(Host, { onClick: this.onClick, class: Object.assign(Object.assign({}, createColorClasses(this.color)), { [mode]: true, 'in-toolbar': hostContext('ion-toolbar', this.el), 'in-toolbar-color': hostContext('ion-toolbar[color]', this.el), 'segment-activated': this.activated, 'segment-disabled': this.disabled, 'segment-scrollable': this.scrollable }) }, h("slot", null)));
|
|
296
|
+
}
|
|
297
|
+
get el() { return getElement(this); }
|
|
298
|
+
static get watchers() { return {
|
|
299
|
+
"value": ["valueChanged"],
|
|
300
|
+
"disabled": ["disabledChanged"]
|
|
301
|
+
}; }
|
|
302
|
+
};
|
|
303
|
+
Segment.style = {
|
|
304
|
+
ios: segmentIosCss,
|
|
305
|
+
md: segmentMdCss
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
const segmentButtonIosCss = ":host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:flex;position:relative;flex:1 1 auto;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-kerning:none;cursor:pointer}.button-native{border-radius:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:var(--margin-start);margin-right:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);transform:translate3d(0, 0, 0);display:flex;position:relative;flex-direction:inherit;flex-grow:1;align-items:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{margin-left:unset;margin-right:unset;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end)}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.button-inner{display:flex;position:relative;flex-flow:inherit;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){flex-shrink:0;order:-1;pointer-events:none}::slotted(ion-label){display:block;align-self:center;line-height:22px;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{transform-origin:left;position:absolute;opacity:0;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);transform:var(--indicator-transform);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{transform:none}.segment-button-indicator-animated{transition:none}}:host{--background:none;--background-checked:none;--background-hover:none;--background-hover-opacity:0;--background-focused:none;--background-focused-opacity:0;--border-radius:7px;--border-width:1px;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.12);--border-style:solid;--indicator-box-shadow:0 0 5px rgba(0, 0, 0, 0.16);--indicator-color:var(--ion-color-step-350, var(--ion-background-color, #fff));--indicator-height:100%;--indicator-transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--transition:100ms all linear;--padding-top:0;--padding-end:13px;--padding-bottom:0;--padding-start:13px;margin-top:2px;margin-bottom:2px;position:relative;flex-basis:0;flex-direction:row;min-width:70px;min-height:28px;transform:translate3d(0, 0, 0);font-size:13px;font-weight:450;line-height:37px}:host::before{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;transition:160ms opacity ease-in-out;transition-delay:100ms;border-left:var(--border-width) var(--border-style) var(--border-color);content:\"\";opacity:1;will-change:opacity}:host(:first-of-type)::before{border-left-color:transparent}:host(.segment-button-disabled){opacity:0.3}::slotted(ion-icon){font-size:24px}:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:2px;margin-right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:0;margin-inline-end:0}}:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:0;margin-right:2px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:2px;margin-inline-end:2px}}.segment-button-indicator{padding-left:2px;padding-right:2px;left:0;right:0;top:0;bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.segment-button-indicator{padding-left:unset;padding-right:unset;-webkit-padding-start:2px;padding-inline-start:2px;-webkit-padding-end:2px;padding-inline-end:2px}}.segment-button-indicator-background{border-radius:var(--border-radius);background:var(--indicator-color)}.segment-button-indicator-background{transition:var(--indicator-transition)}:host(.segment-button-checked)::before,:host(.segment-button-after-checked)::before{opacity:0}:host(.segment-button-checked){z-index:-1}:host(.segment-button-activated){--indicator-transform:scale(0.95)}:host(.ion-focused) .button-native{opacity:0.7}@media (any-hover: hover){:host(:hover) .button-native{opacity:0.5}:host(.segment-button-checked:hover) .button-native{opacity:1}}:host(.in-segment-color){background:none;color:var(--ion-text-color, #000)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-step-350, var(--ion-background-color, #fff))}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native,:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-text-color, #000)}}:host(.in-toolbar:not(.in-segment-color)){--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, var(--ion-toolbar-color), initial);--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-toolbar-color), initial);--indicator-color:var(--ion-toolbar-segment-indicator-color, var(--ion-color-step-350, var(--ion-background-color, #fff)))}:host(.in-toolbar-color) .segment-button-indicator-background{background:#fff}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color):hover) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color):hover) .button-native{color:var(--ion-color-base)}}";
|
|
309
|
+
|
|
310
|
+
const segmentButtonMdCss = ":host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:flex;position:relative;flex:1 1 auto;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-kerning:none;cursor:pointer}.button-native{border-radius:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:var(--margin-start);margin-right:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);transform:translate3d(0, 0, 0);display:flex;position:relative;flex-direction:inherit;flex-grow:1;align-items:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{margin-left:unset;margin-right:unset;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end)}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.button-inner{display:flex;position:relative;flex-flow:inherit;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){flex-shrink:0;order:-1;pointer-events:none}::slotted(ion-label){display:block;align-self:center;line-height:22px;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{transform-origin:left;position:absolute;opacity:0;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);transform:var(--indicator-transform);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{transform:none}.segment-button-indicator-animated{transition:none}}:host{--background:none;--background-checked:none;--background-hover:var(--color-checked);--background-focused:var(--color-checked);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04;--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #3880ff);--indicator-box-shadow:none;--indicator-color:var(--color-checked);--indicator-height:2px;--indicator-transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--padding-top:0;--padding-end:16px;--padding-bottom:0;--padding-start:16px;--transition:color 0.15s linear 0s, opacity 0.15s linear 0s;min-width:90px;max-width:360px;min-height:48px;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);font-size:14px;font-weight:500;letter-spacing:0.06em;line-height:40px;text-transform:uppercase}.button-native{min-width:90px}:host(.segment-button-disabled){opacity:0.3}:host(.in-segment-color){background:none;color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color) ion-ripple-effect{color:var(--ion-color-base)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked) .button-native{color:var(--ion-color-base)}:host(.in-segment-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native{color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color:hover) .button-native::after{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-segment-color)){--background:var(--ion-toolbar-segment-background, none);--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6));--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-color-primary, #3880ff));--indicator-color:var(--ion-toolbar-segment-color-checked, var(--color-checked))}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:rgba(var(--ion-color-contrast-rgb), 0.6)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color)) .button-native::after{background:var(--ion-color-contrast)}}::slotted(ion-icon){margin-top:12px;margin-bottom:12px;font-size:24px}::slotted(ion-label){margin-top:12px;margin-bottom:12px}:host(.segment-button-layout-icon-top) ::slotted(ion-label),:host(.segment-button-layout-icon-bottom) ::slotted(ion-icon){margin-top:0}:host(.segment-button-layout-icon-top) ::slotted(ion-icon),:host(.segment-button-layout-icon-bottom) ::slotted(ion-label){margin-bottom:0}:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:8px;margin-right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:0;margin-inline-end:0}}:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:0;margin-right:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}:host(.segment-button-has-icon-only) ::slotted(ion-icon){margin-top:12px;margin-bottom:12px}:host(.segment-button-has-label-only) ::slotted(ion-label){margin-top:12px;margin-bottom:12px}.segment-button-indicator{left:0;right:0;bottom:0}.segment-button-indicator-background{background:var(--indicator-color)}:host(.in-toolbar:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-toolbar-segment-indicator-color, var(--indicator-color))}:host(.in-toolbar-color:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-color-contrast)}";
|
|
311
|
+
|
|
312
|
+
let ids = 0;
|
|
313
|
+
const SegmentButton = class {
|
|
314
|
+
constructor(hostRef) {
|
|
315
|
+
registerInstance(this, hostRef);
|
|
316
|
+
this.segmentEl = null;
|
|
317
|
+
this.checked = false;
|
|
318
|
+
/**
|
|
319
|
+
* If `true`, the user cannot interact with the segment button.
|
|
320
|
+
*/
|
|
321
|
+
this.disabled = false;
|
|
322
|
+
/**
|
|
323
|
+
* Set the layout of the text and icon in the segment.
|
|
324
|
+
*/
|
|
325
|
+
this.layout = 'icon-top';
|
|
326
|
+
/**
|
|
327
|
+
* The type of the button.
|
|
328
|
+
*/
|
|
329
|
+
this.type = 'button';
|
|
330
|
+
/**
|
|
331
|
+
* The value of the segment button.
|
|
332
|
+
*/
|
|
333
|
+
this.value = 'ion-sb-' + (ids++);
|
|
334
|
+
this.updateState = () => {
|
|
335
|
+
if (this.segmentEl) {
|
|
336
|
+
this.checked = this.segmentEl.value === this.value;
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
connectedCallback() {
|
|
341
|
+
const segmentEl = this.segmentEl = this.el.closest('ion-segment');
|
|
342
|
+
if (segmentEl) {
|
|
343
|
+
this.updateState();
|
|
344
|
+
segmentEl.addEventListener('ionSelect', this.updateState);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
disconnectedCallback() {
|
|
348
|
+
const segmentEl = this.segmentEl;
|
|
349
|
+
if (segmentEl) {
|
|
350
|
+
segmentEl.removeEventListener('ionSelect', this.updateState);
|
|
351
|
+
this.segmentEl = null;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
get hasLabel() {
|
|
355
|
+
return !!this.el.querySelector('ion-label');
|
|
356
|
+
}
|
|
357
|
+
get hasIcon() {
|
|
358
|
+
return !!this.el.querySelector('ion-icon');
|
|
359
|
+
}
|
|
360
|
+
render() {
|
|
361
|
+
const { checked, type, disabled, hasIcon, hasLabel, layout } = this;
|
|
362
|
+
const mode = getIonMode(this);
|
|
363
|
+
return (h(Host, { "aria-disabled": disabled ? 'true' : null, class: {
|
|
364
|
+
[mode]: true,
|
|
365
|
+
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
366
|
+
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
367
|
+
'in-segment': hostContext('ion-segment', this.el),
|
|
368
|
+
'in-segment-color': hostContext('ion-segment[color]', this.el),
|
|
369
|
+
'segment-button-has-label': hasLabel,
|
|
370
|
+
'segment-button-has-icon': hasIcon,
|
|
371
|
+
'segment-button-has-label-only': hasLabel && !hasIcon,
|
|
372
|
+
'segment-button-has-icon-only': hasIcon && !hasLabel,
|
|
373
|
+
'segment-button-disabled': disabled,
|
|
374
|
+
'segment-button-checked': checked,
|
|
375
|
+
[`segment-button-layout-${layout}`]: true,
|
|
376
|
+
'ion-activatable': true,
|
|
377
|
+
'ion-activatable-instant': true,
|
|
378
|
+
'ion-focusable': true,
|
|
379
|
+
} }, h("button", { type: type, "aria-pressed": checked ? 'true' : null, class: "button-native", disabled: disabled }, h("span", { class: "button-inner" }, h("slot", null)), mode === 'md' && h("ion-ripple-effect", null)), h("div", { part: "indicator", class: {
|
|
380
|
+
'segment-button-indicator': true,
|
|
381
|
+
'segment-button-indicator-animated': true
|
|
382
|
+
} }, h("div", { part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
383
|
+
}
|
|
384
|
+
get el() { return getElement(this); }
|
|
385
|
+
};
|
|
386
|
+
SegmentButton.style = {
|
|
387
|
+
ios: segmentButtonIosCss,
|
|
388
|
+
md: segmentButtonMdCss
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
const skeletonTextCss = ":host{--background:rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065);border-radius:var(--border-radius, inherit);display:block;width:100%;height:inherit;margin-top:4px;margin-bottom:4px;background:var(--background);line-height:10px;user-select:none;pointer-events:none}span{display:inline-block}:host(.in-media){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;height:100%}:host(.skeleton-text-animated){position:relative;background:linear-gradient(to right, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 8%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.135) 18%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 33%);background-size:800px 104px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear}@keyframes shimmer{0%{background-position:-468px 0}100%{background-position:468px 0}}";
|
|
392
|
+
|
|
393
|
+
const SkeletonText = class {
|
|
394
|
+
constructor(hostRef) {
|
|
395
|
+
registerInstance(this, hostRef);
|
|
396
|
+
/**
|
|
397
|
+
* If `true`, the skeleton text will animate.
|
|
398
|
+
*/
|
|
399
|
+
this.animated = false;
|
|
400
|
+
}
|
|
401
|
+
render() {
|
|
402
|
+
const animated = this.animated && config.getBoolean('animated', true);
|
|
403
|
+
const inMedia = hostContext('ion-avatar', this.el) || hostContext('ion-thumbnail', this.el);
|
|
404
|
+
const mode = getIonMode(this);
|
|
405
|
+
return (h(Host, { class: {
|
|
406
|
+
[mode]: true,
|
|
407
|
+
'skeleton-text-animated': animated,
|
|
408
|
+
'in-media': inMedia
|
|
409
|
+
} }, h("span", null, "\u00A0")));
|
|
410
|
+
}
|
|
411
|
+
get el() { return getElement(this); }
|
|
412
|
+
};
|
|
413
|
+
SkeletonText.style = skeletonTextCss;
|
|
414
|
+
|
|
415
|
+
const amen$1 = "Amen.";
|
|
416
|
+
const book = "Book";
|
|
417
|
+
const chapter = "Chapter";
|
|
418
|
+
const citation$3 = "Citation (e.g., John 1:1)";
|
|
419
|
+
const label$3 = "Label";
|
|
420
|
+
const loading$1 = "Loading...";
|
|
421
|
+
const verse = "Verse";
|
|
422
|
+
const changeReading = "Change Reading";
|
|
423
|
+
const newCitation = "Biblical citation.";
|
|
424
|
+
const cancel$1 = "Cancel";
|
|
425
|
+
const ok$1 = "OK";
|
|
426
|
+
const EN$8 = {
|
|
427
|
+
amen: amen$1,
|
|
428
|
+
book: book,
|
|
429
|
+
chapter: chapter,
|
|
430
|
+
citation: citation$3,
|
|
431
|
+
label: label$3,
|
|
432
|
+
loading: loading$1,
|
|
433
|
+
verse: verse,
|
|
434
|
+
changeReading: changeReading,
|
|
435
|
+
newCitation: newCitation,
|
|
436
|
+
cancel: cancel$1,
|
|
437
|
+
ok: ok$1
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
const amen = "Amén.";
|
|
441
|
+
const loading = "Se está cargando...";
|
|
442
|
+
const ES = {
|
|
443
|
+
amen: amen,
|
|
444
|
+
loading: loading
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
async function fetchReading(citation, version = 'NRSV', api = 'https://us-central1-venite-2.cloudfunctions.net') {
|
|
448
|
+
const findURL = new URL(`${api}/bible`);
|
|
449
|
+
findURL.searchParams.append('citation', citation);
|
|
450
|
+
if (!['NRSV', 'NRSVAE', 'ESV', 'CEB', 'KJV'].includes(version)) {
|
|
451
|
+
findURL.searchParams.append('version', 'NRSV');
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
findURL.searchParams.append('version', version);
|
|
455
|
+
}
|
|
456
|
+
const response = await fetch(findURL.toString()), body = await response.text();
|
|
457
|
+
try {
|
|
458
|
+
return JSON.parse(body);
|
|
459
|
+
}
|
|
460
|
+
catch (_a) {
|
|
461
|
+
throw new Error(body);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
const bibleReadingCss = "ldf-bible-reading.sc-ldf-bible-reading,.sc-ldf-bible-reading-h{font-family:var(--ldf-font-face);text-align:var(--ldf-text-align)}.bible-reading[lang=he].sc-ldf-bible-reading{text-align:right;direction:rtl;font-size:1.5em;font-family:\"Times New Roman\" !important}.bible-reading[lang=he].sc-ldf-bible-reading .drop.sc-ldf-bible-reading{float:right !important;font-family:\"Times New Roman\" !important}.bible-reading.omit.sc-ldf-bible-reading .verses.sc-ldf-bible-reading{display:none}.editable.bible-reading.sc-ldf-bible-reading .verses.sc-ldf-bible-reading{display:block;color:var(--ldf-greyed-out-text-color)}sup.sc-ldf-bible-reading{display:var(--ldf-bible-reading-verse-number-display);margin-left:0;margin-right:0.25em}.citation.sc-ldf-bible-reading{font-size:80%;font-style:italic;margin-left:1em;float:var(--ldf-bible-reading-citation-float)}.response.sc-ldf-bible-reading{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.verses.sc-ldf-bible-reading .verse.sc-ldf-bible-reading{display:flex;flex-direction:row}sup.sc-ldf-bible-reading:first-of-type{display:var(--ldf-drop-early-verses-display)}.editable-verse.sc-ldf-bible-reading{display:inline}.editable-citation.sc-ldf-bible-reading{display:inline;width:100%}.editable-citation.sc-ldf-bible-reading ldf-editable-text.sc-ldf-bible-reading{display:inline-block;width:25px}.editable-citation.sc-ldf-bible-reading ldf-editable-text.book.sc-ldf-bible-reading{width:75px}h3.editable-label.sc-ldf-bible-reading{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.citation-button.sc-ldf-bible-reading{background:none;border:0;font-family:var(--ldf-font-face);font-size:inherit}";
|
|
466
|
+
|
|
467
|
+
const LOCALE$8 = {
|
|
468
|
+
'en': EN$8,
|
|
469
|
+
'es': ES
|
|
470
|
+
};
|
|
471
|
+
const BibleReadingComponent = class {
|
|
472
|
+
constructor(hostRef) {
|
|
473
|
+
registerInstance(this, hostRef);
|
|
474
|
+
this.ldfDocShouldChange = createEvent(this, "ldfDocShouldChange", 7);
|
|
475
|
+
}
|
|
476
|
+
docChanged(newDoc) {
|
|
477
|
+
try {
|
|
478
|
+
if (typeof newDoc == 'string') {
|
|
479
|
+
this.obj = new BibleReading(JSON.parse(newDoc));
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
this.obj = new BibleReading(newDoc);
|
|
483
|
+
}
|
|
484
|
+
this.processIntro();
|
|
485
|
+
}
|
|
486
|
+
catch (e) {
|
|
487
|
+
console.warn(e);
|
|
488
|
+
this.obj = new BibleReading();
|
|
489
|
+
}
|
|
490
|
+
this.loadVerses();
|
|
491
|
+
}
|
|
492
|
+
// Lifecycle events
|
|
493
|
+
async componentWillLoad() {
|
|
494
|
+
this.docChanged(this.doc);
|
|
495
|
+
this.loadLocaleStrings();
|
|
496
|
+
this.loadVerses();
|
|
497
|
+
this.processIntro();
|
|
498
|
+
}
|
|
499
|
+
processIntro() {
|
|
500
|
+
var _a, _b;
|
|
501
|
+
// process intro
|
|
502
|
+
if ((_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.intro) {
|
|
503
|
+
try {
|
|
504
|
+
this.obj.compileIntro();
|
|
505
|
+
this.obj = new BibleReading(Object.assign({}, this.obj));
|
|
506
|
+
}
|
|
507
|
+
catch (e) {
|
|
508
|
+
console.warn(e);
|
|
509
|
+
console.warn(this.obj);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
// Private methods
|
|
514
|
+
async loadLocaleStrings() {
|
|
515
|
+
try {
|
|
516
|
+
this.localeStrings = LOCALE$8[getComponentClosestLanguage(this.element)];
|
|
517
|
+
}
|
|
518
|
+
catch (e) {
|
|
519
|
+
console.warn(e);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
async changeReading() {
|
|
523
|
+
var _a;
|
|
524
|
+
const localeStrings = this.localeStrings || {};
|
|
525
|
+
const alert = await alertController.create({
|
|
526
|
+
header: localeStrings.changeReading,
|
|
527
|
+
inputs: [
|
|
528
|
+
{
|
|
529
|
+
name: 'citation',
|
|
530
|
+
type: 'text',
|
|
531
|
+
value: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.citation,
|
|
532
|
+
placeholder: localeStrings.newCitation
|
|
533
|
+
},
|
|
534
|
+
],
|
|
535
|
+
buttons: [
|
|
536
|
+
{
|
|
537
|
+
text: localeStrings.cancel,
|
|
538
|
+
role: 'cancel',
|
|
539
|
+
cssClass: 'secondary'
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
text: localeStrings.ok,
|
|
543
|
+
handler: async (data) => {
|
|
544
|
+
var _a, _b, _c;
|
|
545
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
546
|
+
path: this.path,
|
|
547
|
+
op: [
|
|
548
|
+
{
|
|
549
|
+
type: 'set',
|
|
550
|
+
index: 'citation',
|
|
551
|
+
oldValue: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.citation,
|
|
552
|
+
value: data === null || data === void 0 ? void 0 : data.citation
|
|
553
|
+
}
|
|
554
|
+
]
|
|
555
|
+
}));
|
|
556
|
+
const loading = await loadingController.create({
|
|
557
|
+
message: localeStrings.loading
|
|
558
|
+
});
|
|
559
|
+
await loading.present();
|
|
560
|
+
const newReading = await fetchReading(data.citation, versionToString((_b = this.obj) === null || _b === void 0 ? void 0 : _b.version));
|
|
561
|
+
await loading.dismiss();
|
|
562
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
563
|
+
path: this.path,
|
|
564
|
+
op: [{
|
|
565
|
+
type: 'set',
|
|
566
|
+
index: 'value',
|
|
567
|
+
oldValue: (_c = this.obj) === null || _c === void 0 ? void 0 : _c.value,
|
|
568
|
+
value: (newReading === null || newReading === void 0 ? void 0 : newReading.value) || []
|
|
569
|
+
}]
|
|
570
|
+
}));
|
|
571
|
+
this.obj = new BibleReading(Object.assign(Object.assign({}, this.obj), { citation: data === null || data === void 0 ? void 0 : data.citation, value: (newReading === null || newReading === void 0 ? void 0 : newReading.value) || [] }));
|
|
572
|
+
this.loadVerses();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
]
|
|
576
|
+
});
|
|
577
|
+
await alert.present();
|
|
578
|
+
}
|
|
579
|
+
loadVerses() {
|
|
580
|
+
this.verses = this.obj.value || [];
|
|
581
|
+
}
|
|
582
|
+
paragraphs() {
|
|
583
|
+
const paragraphs = new Array();
|
|
584
|
+
let currentParagraph = new Array();
|
|
585
|
+
this.verses.forEach(verse => {
|
|
586
|
+
if (verse.hasOwnProperty('type') && verse.type === 'heading') {
|
|
587
|
+
paragraphs.push(currentParagraph);
|
|
588
|
+
currentParagraph = new Array();
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
currentParagraph.push(verse);
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
paragraphs.push(currentParagraph);
|
|
595
|
+
return paragraphs;
|
|
596
|
+
}
|
|
597
|
+
// Render
|
|
598
|
+
render() {
|
|
599
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
600
|
+
const localeStrings = this.localeStrings || {};
|
|
601
|
+
if (this.verses) {
|
|
602
|
+
/* Editable version */
|
|
603
|
+
if (this.editable) {
|
|
604
|
+
const template = Object.assign(Object.assign({}, this.verses[0]), { text: '' }), templateMaker = (text) => (Object.assign(Object.assign({}, template), { text }));
|
|
605
|
+
return (h("div", { lang: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.language, class: `editable bible-reading ${((_b = this.obj) === null || _b === void 0 ? void 0 : _b.display_format) || 'default'}` }, this.editable && h("ldf-label-bar", null, h("slot", { slot: 'end', name: 'controls' }, h("ion-buttons", null, h("ion-button", { onClick: () => this.changeReading() }, h("ion-icon", { name: "swap-horizontal", slot: "start" }), h("ion-label", null, localeStrings.changeReading))))), h("ldf-label-bar", null, h("h3", { class: "editable-label", slot: "start" }, h("ldf-editable-text", { id: "label", text: (_c = this.obj) === null || _c === void 0 ? void 0 : _c.label, path: `${this.path}/label`, placeholder: localeStrings.label })), ((_d = this.obj) === null || _d === void 0 ? void 0 : _d.citation) && h("button", { class: "citation-button", slot: "end", onClick: () => this.changeReading() }, this.obj.citation)), ((_f = (_e = this.obj) === null || _e === void 0 ? void 0 : _e.metadata) === null || _f === void 0 ? void 0 : _f.compiled_intro) && h("ldf-liturgical-document", { editable: true, doc: this.obj.metadata.intro, path: `${this.path}/metadata/intro` }), h("section", { class: "verses" }, this.verses.map((verse, verseIndex) => [
|
|
606
|
+
verse.hasOwnProperty('type') && verse.type === 'heading'
|
|
607
|
+
? h("ldf-heading", { editable: true, doc: verse, path: `${this.path}/value/${verseIndex}` })
|
|
608
|
+
: h("div", { class: "editable-verse" }, h("div", { class: "editable-citation" }, h("ldf-editable-text", { class: "book", id: `verse-${verseIndex}-book`, text: verse.book, path: `${this.path}/value/${verseIndex}/book`, placeholder: localeStrings.book, short: true }), h("ldf-editable-text", { id: `verse-${verseIndex}-chapter`, text: verse.chapter, path: `${this.path}/value/${verseIndex}/chapter`, placeholder: localeStrings.chapter, short: true }), " :", h("ldf-editable-text", { id: `verse-${verseIndex}-verse`, text: verse.verse, path: `${this.path}/value/${verseIndex}/verse`, placeholder: localeStrings.verse, short: true })), h("ldf-editable-text", { id: `verse-${verseIndex}-text`, text: verse.text, path: `${this.path}/value/${verseIndex}/text`, placeholder: localeStrings.text, short: false, template: template, templateMaker: templateMaker }))
|
|
609
|
+
]))));
|
|
610
|
+
}
|
|
611
|
+
/* `short` renders a few verses, with a response and citation. */
|
|
612
|
+
else if (this.obj.style == 'short') {
|
|
613
|
+
const shortResponse = (((_h = (_g = this.obj) === null || _g === void 0 ? void 0 : _g.metadata) === null || _h === void 0 ? void 0 : _h.response) || localeStrings.amen).length <= 5;
|
|
614
|
+
let responseNode;
|
|
615
|
+
if (!((_k = (_j = this.obj) === null || _j === void 0 ? void 0 : _j.metadata) === null || _k === void 0 ? void 0 : _k.response)) {
|
|
616
|
+
responseNode = h("span", { class: "response" }, " ", localeStrings.amen);
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
responseNode = h("span", { class: "response" }, " ", this.obj.metadata.response);
|
|
620
|
+
}
|
|
621
|
+
return (h(Host, null, ((_l = this.obj) === null || _l === void 0 ? void 0 : _l.label) && h("ldf-heading", { doc: new Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label] }) }), h("div", { lang: (_m = this.obj) === null || _m === void 0 ? void 0 : _m.language, class: `bible-reading ${((_o = this.obj) === null || _o === void 0 ? void 0 : _o.display_format) || 'default'}` }, h("p", null, this.verses.map((verse, verseIndex) => {
|
|
622
|
+
var _a;
|
|
623
|
+
return verse.hasOwnProperty('type') && verse.type === 'heading'
|
|
624
|
+
? h("ldf-heading", { doc: new Heading(verse) })
|
|
625
|
+
: 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.display_format) == "force_dropcap" && verseIndex === 0 ? "force" : "disabled" });
|
|
626
|
+
}), shortResponse && !((_q = (_p = this.obj) === null || _p === void 0 ? void 0 : _p.metadata) === null || _q === void 0 ? void 0 : _q.omit_response) && responseNode, h("span", { class: "citation" }, this.obj.citation)), !shortResponse && !((_s = (_r = this.obj) === null || _r === void 0 ? void 0 : _r.metadata) === null || _s === void 0 ? void 0 : _s.omit_response) && h("p", null, responseNode))));
|
|
627
|
+
}
|
|
628
|
+
/* `long` render a typical Bible reading in the liturgy */
|
|
629
|
+
else {
|
|
630
|
+
const paragraphs = this.paragraphs();
|
|
631
|
+
return (h("div", { lang: (_t = this.obj) === null || _t === void 0 ? void 0 : _t.language, class: `bible-reading ${((_u = this.obj) === null || _u === void 0 ? void 0 : _u.display_format) || 'default'}` }, h("ldf-heading", { doc: new Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation }) }), ((_w = (_v = this.obj) === null || _v === void 0 ? void 0 : _v.metadata) === null || _w === void 0 ? void 0 : _w.compiled_intro) && h("ldf-liturgical-document", { doc: this.obj.metadata.compiled_intro }), paragraphs.map((paragraph, paragraphIndex) => h("p", { lang: this.obj.language }, paragraph.map((verse, verseIndex) => verse.hasOwnProperty('type') && verse.type === 'heading'
|
|
632
|
+
? h("ldf-heading", { doc: new Heading(verse) })
|
|
633
|
+
: [
|
|
634
|
+
h("sup", null, verse.verse),
|
|
635
|
+
h("ldf-string", { citation: verse, dropcap: paragraphIndex == 0 && verseIndex == 0 ? 'force' : 'disabled', id: `${verse.chapter}-${verse.book}-${verse.verse}`, text: verse.text, index: verseIndex, fragment: this.path })
|
|
636
|
+
])))));
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
return this.loadingError ? h("pre", null, this.loadingError) : h("p", null, localeStrings.loading);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
get element() { return getElement(this); }
|
|
644
|
+
static get watchers() { return {
|
|
645
|
+
"doc": ["docChanged"]
|
|
646
|
+
}; }
|
|
647
|
+
};
|
|
648
|
+
BibleReadingComponent.style = bibleReadingCss;
|
|
649
|
+
|
|
650
|
+
const add = "Add";
|
|
651
|
+
const label$2 = "Label";
|
|
652
|
+
const citation$2 = "Citation";
|
|
653
|
+
const EN$7 = {
|
|
654
|
+
add: add,
|
|
655
|
+
label: label$2,
|
|
656
|
+
citation: citation$2
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
const editableAddBlockCss = ".sc-ldf-editable-add-block-h{display:flex;flex-direction:column;align-items:center;width:100%}.sc-ldf-editable-add-block-h .button-container.sc-ldf-editable-add-block{display:flex;align-items:center;height:0;justify-content:center;width:100%}.sc-ldf-editable-add-block-h button.sc-ldf-editable-add-block{background-color:var(--ldf-background-color);color:var(--ldf-color);font-family:var(--ldf-controls-font-family);font-weight:lighter}.sc-ldf-editable-add-block-h button.sc-ldf-editable-add-block:hover{cursor:pointer}.sc-ldf-editable-add-block-h .visible.sc-ldf-editable-add-block{height:0;opacity:1;transition:0.25s}.sc-ldf-editable-add-block-h .hidden.sc-ldf-editable-add-block{height:0;opacity:0;transition:2s}.sc-ldf-editable-add-block-h .underlying.sc-ldf-editable-add-block{width:100%;border-top:1px solid #a0a0a0;border-bottom:1px solid #a0a0a0;min-height:1em;position:relative;bottom:0.5em;z-index:-1}.sc-ldf-editable-add-block-h .underlying.visible.sc-ldf-editable-add-block{opacity:0.5;transition:0.25s}.sc-ldf-editable-add-block-h .underlying.visible.expanded.sc-ldf-editable-add-block{z-index:1}.sc-ldf-editable-add-block-h .underlying.collapsed.sc-ldf-editable-add-block{height:1em}.sc-ldf-editable-add-block-h .underlying.hidden.sc-ldf-editable-add-block{opacity:0;transition:1s}.sc-ldf-editable-add-block-h .underlying.hidden.sc-ldf-editable-add-block button.sc-ldf-editable-add-block{z-index:-1}.sc-ldf-editable-add-block-h .visually-hidden.sc-ldf-editable-add-block{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);white-space:nowrap}.button.sc-ldf-editable-add-block{position:absolute;display:flex;flex-direction:row;align-items:center;justify-content:center;opacity:1;transition:all 0.25s}.hidden.sc-ldf-editable-add-block{display:none;height:0;opacity:0;transition:all 0.25s}";
|
|
660
|
+
|
|
661
|
+
const LOCALE$7 = {
|
|
662
|
+
'en': EN$7
|
|
663
|
+
};
|
|
664
|
+
const EditableAddBlockComponent = class {
|
|
665
|
+
constructor(hostRef) {
|
|
666
|
+
registerInstance(this, hostRef);
|
|
667
|
+
this.ldfDocShouldChange = createEvent(this, "ldfDocShouldChange", 7);
|
|
668
|
+
this.ldfDocShouldAdd = createEvent(this, "ldfDocShouldAdd", 7);
|
|
669
|
+
}
|
|
670
|
+
// Lifecycle events
|
|
671
|
+
async componentWillLoad() {
|
|
672
|
+
this.loadLocaleStrings();
|
|
673
|
+
}
|
|
674
|
+
// Methods
|
|
675
|
+
async loadLocaleStrings() {
|
|
676
|
+
try {
|
|
677
|
+
this.localeStrings = LOCALE$7[getComponentClosestLanguage(this.element)];
|
|
678
|
+
}
|
|
679
|
+
catch (e) {
|
|
680
|
+
console.warn(e);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
// Render
|
|
684
|
+
render() {
|
|
685
|
+
const localeStrings = this.localeStrings || {};
|
|
686
|
+
return (h(Host, null, h("div", { class: {
|
|
687
|
+
button: true,
|
|
688
|
+
hidden: !this.visible,
|
|
689
|
+
} }, h("ion-button", { "aria-role": "button", fill: "outline", onClick: () => this.ldfDocShouldAdd.emit({ base: this.base, index: this.index }) }, h("ion-icon", { name: "add", slot: "icon-only" }), h("ion-label", { class: "visually-hidden" }, localeStrings.add)))));
|
|
690
|
+
}
|
|
691
|
+
get element() { return getElement(this); }
|
|
692
|
+
};
|
|
693
|
+
EditableAddBlockComponent.style = editableAddBlockCss;
|
|
694
|
+
|
|
695
|
+
const abbreviated = "Abbreviated";
|
|
696
|
+
const addOption = "Add an Option";
|
|
697
|
+
const cancel = "Cancel";
|
|
698
|
+
const condition$1 = "Conditions";
|
|
699
|
+
const copy = "Copy";
|
|
700
|
+
const copied = "Copied to Clipboard";
|
|
701
|
+
const displayFormat = "Display";
|
|
702
|
+
const halfverse = "By Half Verse";
|
|
703
|
+
const heading = "Heading Level";
|
|
704
|
+
const heading1 = "1. Title";
|
|
705
|
+
const heading2 = "2. Section Title";
|
|
706
|
+
const heading3 = "3. Label";
|
|
707
|
+
const heading4 = "4. Sub-Section Label";
|
|
708
|
+
const move_down = "Move Down";
|
|
709
|
+
const move_up = "Move Up";
|
|
710
|
+
const ok = "OK";
|
|
711
|
+
const omit = "Omit";
|
|
712
|
+
const preferences = "Preferences";
|
|
713
|
+
const settings = "Settings";
|
|
714
|
+
const edit = "Edit";
|
|
715
|
+
const preview = "Preview";
|
|
716
|
+
const responsive = "Responsive Display Settings";
|
|
717
|
+
const responsiveMsg = "What size devices should this appear on?";
|
|
718
|
+
const responsiveAll = "All devices";
|
|
719
|
+
const responsiveSmallOnly = "Only on small screens";
|
|
720
|
+
const responsiveSmallHidden = "Not on small screens";
|
|
721
|
+
const unison = "Unison";
|
|
722
|
+
const wholeverse = "By Whole Verse";
|
|
723
|
+
const EN$6 = {
|
|
724
|
+
abbreviated: abbreviated,
|
|
725
|
+
addOption: addOption,
|
|
726
|
+
cancel: cancel,
|
|
727
|
+
condition: condition$1,
|
|
728
|
+
copy: copy,
|
|
729
|
+
copied: copied,
|
|
730
|
+
"default": "Default",
|
|
731
|
+
displayFormat: displayFormat,
|
|
732
|
+
halfverse: halfverse,
|
|
733
|
+
heading: heading,
|
|
734
|
+
heading1: heading1,
|
|
735
|
+
heading2: heading2,
|
|
736
|
+
heading3: heading3,
|
|
737
|
+
heading4: heading4,
|
|
738
|
+
move_down: move_down,
|
|
739
|
+
move_up: move_up,
|
|
740
|
+
ok: ok,
|
|
741
|
+
omit: omit,
|
|
742
|
+
preferences: preferences,
|
|
743
|
+
settings: settings,
|
|
744
|
+
edit: edit,
|
|
745
|
+
preview: preview,
|
|
746
|
+
responsive: responsive,
|
|
747
|
+
responsiveMsg: responsiveMsg,
|
|
748
|
+
responsiveAll: responsiveAll,
|
|
749
|
+
responsiveSmallOnly: responsiveSmallOnly,
|
|
750
|
+
responsiveSmallHidden: responsiveSmallHidden,
|
|
751
|
+
unison: unison,
|
|
752
|
+
wholeverse: wholeverse
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
const editableMetadataButtonsCss = ".buttons.sc-ldf-editable-metadata-buttons{position:absolute;height:0;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;opacity:1;transition:all 0.25s}.buttons.sc-ldf-editable-metadata-buttons ion-buttons.sc-ldf-editable-metadata-buttons{background-color:var(--ion-color-light, #f4f5f8);border-radius:3px;flex-wrap:wrap;max-width:100%}.hidden.sc-ldf-editable-metadata-buttons{display:none;height:0;opacity:0;transition:all 0.25s}@media (max-width: 767px){.sm-hidden.sc-ldf-editable-metadata-buttons{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}";
|
|
756
|
+
|
|
757
|
+
const LOCALE$6 = {
|
|
758
|
+
'en': EN$6
|
|
759
|
+
};
|
|
760
|
+
const EditableMetadataButtonsComponent = class {
|
|
761
|
+
constructor(hostRef) {
|
|
762
|
+
registerInstance(this, hostRef);
|
|
763
|
+
this.ldfAddOptionToDoc = createEvent(this, "ldfAddOptionToDoc", 7);
|
|
764
|
+
this.ldfTogglePreview = createEvent(this, "ldfTogglePreview", 7);
|
|
765
|
+
this.ldfDocShouldMove = createEvent(this, "ldfDocShouldMove", 7);
|
|
766
|
+
this.ldfDocShouldChange = createEvent(this, "ldfDocShouldChange", 7);
|
|
767
|
+
/** Documents in `preview` mode will display as if they're not editable, unless the user explicitly chooses to edit them */
|
|
768
|
+
this.preview = false;
|
|
769
|
+
}
|
|
770
|
+
objChange(newObj) {
|
|
771
|
+
if (this.modal) {
|
|
772
|
+
this.modal.componentProps = Object.assign(Object.assign({}, this.modal.componentProps), { obj: newObj });
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
// Lifecycle events
|
|
776
|
+
componentWillLoad() {
|
|
777
|
+
this.loadLocaleStrings();
|
|
778
|
+
}
|
|
779
|
+
// Private methods
|
|
780
|
+
async loadLocaleStrings() {
|
|
781
|
+
try {
|
|
782
|
+
this.localeStrings = LOCALE$6[getComponentClosestLanguage(this.element)];
|
|
783
|
+
}
|
|
784
|
+
catch (e) {
|
|
785
|
+
console.warn(e);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
/** Display an alert to set responsiveness */
|
|
789
|
+
async openResponsive() {
|
|
790
|
+
var _a;
|
|
791
|
+
const alert = await alertController.create({
|
|
792
|
+
header: this.localeStrings.responsive,
|
|
793
|
+
message: this.localeStrings.responsiveMsg,
|
|
794
|
+
inputs: [
|
|
795
|
+
{
|
|
796
|
+
name: 'value',
|
|
797
|
+
type: 'radio',
|
|
798
|
+
value: Responsive.AllSizes,
|
|
799
|
+
label: this.localeStrings.responsiveAll
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
name: 'value',
|
|
803
|
+
type: 'radio',
|
|
804
|
+
value: Responsive.SmallOnly,
|
|
805
|
+
label: this.localeStrings.responsiveSmallOnly
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
name: 'value',
|
|
809
|
+
type: 'radio',
|
|
810
|
+
value: Responsive.SmallHidden,
|
|
811
|
+
label: this.localeStrings.responsiveSmallHidden
|
|
812
|
+
}
|
|
813
|
+
],
|
|
814
|
+
buttons: [
|
|
815
|
+
{
|
|
816
|
+
role: 'cancel',
|
|
817
|
+
text: this.localeStrings.cancel
|
|
818
|
+
},
|
|
819
|
+
this.localeStrings.ok
|
|
820
|
+
]
|
|
821
|
+
});
|
|
822
|
+
await alert.present();
|
|
823
|
+
const { data } = await alert.onDidDismiss();
|
|
824
|
+
const { values } = data;
|
|
825
|
+
if (values) {
|
|
826
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
827
|
+
path: `${this.base}/${this.index}/responsive`,
|
|
828
|
+
op: [{
|
|
829
|
+
type: 'set',
|
|
830
|
+
oldValue: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.responsive,
|
|
831
|
+
value: values
|
|
832
|
+
}]
|
|
833
|
+
}));
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
/** Display a modal `EditableMetadataComponent` */
|
|
837
|
+
async openSettings() {
|
|
838
|
+
this.modal = await this.openModal('ldf-editable-metadata');
|
|
839
|
+
}
|
|
840
|
+
/** Display a modal `EditableConditionComponent` */
|
|
841
|
+
async openCondition() {
|
|
842
|
+
this.modal = await this.openModal('ldf-editable-condition', `${this.base}/${this.index}/condition`, { obj: this.obj });
|
|
843
|
+
}
|
|
844
|
+
/** Display a modal `EditablePreferencesComponent` */
|
|
845
|
+
async openPreferences() {
|
|
846
|
+
const path = this.base && this.index ? `${this.base}/${this.index}` : '';
|
|
847
|
+
this.modal = await this.openModal('ldf-editable-preferences', `${path}/metadata`, {
|
|
848
|
+
obj: this.obj
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
async openModal(component, componentPath = undefined, componentProps = undefined) {
|
|
852
|
+
const modal = await modalController.create({
|
|
853
|
+
component
|
|
854
|
+
});
|
|
855
|
+
const path = componentPath || (this.base && this.index >= 0 ? `${this.base}/${this.index}` : '/');
|
|
856
|
+
modal.componentProps = Object.assign(Object.assign({}, componentProps), { modal, doc: this.obj, path, visible: true, collapsed: false });
|
|
857
|
+
// present the modal
|
|
858
|
+
await modal.present();
|
|
859
|
+
return modal;
|
|
860
|
+
}
|
|
861
|
+
/** Emit an event with information about this document’s location in the tree and current state */
|
|
862
|
+
addOption() {
|
|
863
|
+
this.ldfAddOptionToDoc.emit({
|
|
864
|
+
base: this.base,
|
|
865
|
+
index: this.index,
|
|
866
|
+
obj: this.obj
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
move(diff) {
|
|
870
|
+
this.ldfDocShouldMove.emit({
|
|
871
|
+
base: this.base,
|
|
872
|
+
oldIndex: this.index,
|
|
873
|
+
diff
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
async headingLevel() {
|
|
877
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
878
|
+
const alert = await alertController.create({
|
|
879
|
+
header: (_a = this.localeStrings) === null || _a === void 0 ? void 0 : _a.heading,
|
|
880
|
+
inputs: [
|
|
881
|
+
{
|
|
882
|
+
name: 'level',
|
|
883
|
+
type: 'radio',
|
|
884
|
+
value: 1,
|
|
885
|
+
label: (_b = this.localeStrings) === null || _b === void 0 ? void 0 : _b.heading1
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
name: 'level',
|
|
889
|
+
type: 'radio',
|
|
890
|
+
value: 2,
|
|
891
|
+
label: (_c = this.localeStrings) === null || _c === void 0 ? void 0 : _c.heading2
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
name: 'level',
|
|
895
|
+
type: 'radio',
|
|
896
|
+
value: 3,
|
|
897
|
+
label: (_d = this.localeStrings) === null || _d === void 0 ? void 0 : _d.heading3
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
name: 'level',
|
|
901
|
+
type: 'radio',
|
|
902
|
+
value: 4,
|
|
903
|
+
label: (_e = this.localeStrings) === null || _e === void 0 ? void 0 : _e.heading4
|
|
904
|
+
},
|
|
905
|
+
],
|
|
906
|
+
buttons: [
|
|
907
|
+
{
|
|
908
|
+
text: (_f = this.localeStrings) === null || _f === void 0 ? void 0 : _f.cancel,
|
|
909
|
+
role: 'cancel',
|
|
910
|
+
cssClass: 'secondary'
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
text: (_g = this.localeStrings) === null || _g === void 0 ? void 0 : _g.ok,
|
|
914
|
+
}
|
|
915
|
+
]
|
|
916
|
+
});
|
|
917
|
+
await alert.present();
|
|
918
|
+
const { data } = await alert.onDidDismiss(), { values } = data;
|
|
919
|
+
if ((_h = this.obj) === null || _h === void 0 ? void 0 : _h.metadata) {
|
|
920
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
921
|
+
path: `${this.base}/${this.index}/metadata/level`,
|
|
922
|
+
op: [{
|
|
923
|
+
type: 'set',
|
|
924
|
+
value: values,
|
|
925
|
+
oldValue: (_k = (_j = this.obj) === null || _j === void 0 ? void 0 : _j.metadata) === null || _k === void 0 ? void 0 : _k.level
|
|
926
|
+
}]
|
|
927
|
+
}));
|
|
928
|
+
}
|
|
929
|
+
else {
|
|
930
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
931
|
+
path: `${this.base}/${this.index}/metadata`,
|
|
932
|
+
op: [{
|
|
933
|
+
type: 'set',
|
|
934
|
+
value: { level: values }
|
|
935
|
+
}]
|
|
936
|
+
}));
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
async copyDoc() {
|
|
940
|
+
try {
|
|
941
|
+
navigator.clipboard.writeText(JSON.stringify(this.obj));
|
|
942
|
+
const toast = await toastController.create({
|
|
943
|
+
message: this.localeStrings.copied,
|
|
944
|
+
duration: 1000,
|
|
945
|
+
color: "success"
|
|
946
|
+
});
|
|
947
|
+
await toast.present();
|
|
948
|
+
}
|
|
949
|
+
catch (e) {
|
|
950
|
+
console.warn('Clipboard operation not allowed.', e);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
// Render
|
|
954
|
+
render() {
|
|
955
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
956
|
+
const localeStrings = this.localeStrings || {}, hasIndex = this.index !== undefined && this.index >= 0;
|
|
957
|
+
return h(Host, null, h("div", { class: { buttons: true, hidden: !this.visible || !this.preview } }, h("ion-buttons", { slot: "end" }, (navigator === null || navigator === void 0 ? void 0 : navigator.clipboard) && h("ion-button", { onClick: () => this.copyDoc(), "aria-role": 'button', "aria-label": localeStrings.copy }, h("ion-label", { class: "sm-hidden" }, localeStrings.copy), h("ion-icon", { slot: 'end', name: 'clipboard' })), h("ion-button", { onClick: () => this.ldfTogglePreview.emit(false) }, h("ion-label", { class: "sm-hidden" }, (_a = this.localeStrings) === null || _a === void 0 ? void 0 : _a.edit), h("ion-icon", { slot: "end", name: "create" })))), h("div", { class: { buttons: true, hidden: !this.visible || this.preview } }, h("ion-buttons", { slot: 'end' }, h("ion-button", { onClick: () => this.ldfTogglePreview.emit(true) }, h("ion-label", { class: "sm-hidden" }, (_b = this.localeStrings) === null || _b === void 0 ? void 0 : _b.preview), h("ion-icon", { slot: "end", name: "eye" })), ((_c = this.obj) === null || _c === void 0 ? void 0 : _c.type) !== 'option' && this.parentType !== 'option' && this.base &&
|
|
958
|
+
h("ion-button", { onClick: () => this.addOption(), "aria-role": 'button', "aria-label": localeStrings.addOption }, h("ion-icon", { slot: 'icon-only', name: 'add' })), ((_d = this.obj) === null || _d === void 0 ? void 0 : _d.type) == 'liturgy' && h("ion-button", { onClick: () => this.openPreferences(), "aria-role": 'button', "aria-label": localeStrings.preferences }, h("ion-icon", { slot: 'icon-only', name: 'list' })), ((_e = this.obj) === null || _e === void 0 ? void 0 : _e.type) == 'heading' && h("ion-button", { onClick: () => this.headingLevel() }, h("ion-label", null, localeStrings[`heading${((_g = (_f = this.obj) === null || _f === void 0 ? void 0 : _f.metadata) === null || _g === void 0 ? void 0 : _g.level) || 3}`] || 'Heading')), ((_j = (_h = this.obj) === null || _h === void 0 ? void 0 : _h.availableDisplayFormats()) === null || _j === void 0 ? void 0 : _j.length) > 0 && h("ldf-editable-select", { placeholder: localeStrings.displayFormat, value: this.obj.display_format, path: `${this.base}/${this.index}`, property: "display_format", options: this.obj.availableDisplayFormats().map(value => ({ value, label: localeStrings[value] || value })) }), (this.base && hasIndex || ((_k = this.obj) === null || _k === void 0 ? void 0 : _k.type) !== 'liturgy') && h("ion-button", { onClick: () => this.openCondition(), "aria-role": 'button', "aria-label": localeStrings.condition }, h("ion-icon", { slot: 'icon-only', name: 'calendar' })), (this.base && hasIndex || ((_l = this.obj) === null || _l === void 0 ? void 0 : _l.type) !== 'liturgy') && h("ion-button", { onClick: () => this.openResponsive(), "aria-role": 'button', "aria-label": localeStrings.responsive }, h("ion-icon", { slot: 'icon-only', name: 'phone-portrait' })), (navigator === null || navigator === void 0 ? void 0 : navigator.clipboard) && h("ion-button", { onClick: () => this.copyDoc(), "aria-role": 'button', "aria-label": localeStrings.copy }, h("ion-icon", { slot: 'icon-only', name: 'clipboard' })), h("ion-button", { onClick: () => this.openSettings(), "aria-role": 'button', "aria-label": localeStrings.settings }, h("ion-icon", { slot: 'icon-only', name: 'cog' })), (this.base && hasIndex && this.index > 0) && h("ion-button", { onClick: () => this.move(-1), "aria-role": 'button', "aria-label": localeStrings.move_up }, h("ion-icon", { slot: 'icon-only', name: 'arrow-up' })), (this.base && hasIndex) && h("ion-button", { onClick: () => this.move(1), "aria-role": 'button', "aria-label": localeStrings.move_down }, h("ion-icon", { slot: 'icon-only', name: 'arrow-down' })), hasIndex &&
|
|
959
|
+
h("ldf-editable-delete", { base: this.base, index: this.index, obj: this.obj }))));
|
|
960
|
+
}
|
|
961
|
+
get element() { return getElement(this); }
|
|
962
|
+
static get watchers() { return {
|
|
963
|
+
"obj": ["objChange"]
|
|
964
|
+
}; }
|
|
965
|
+
};
|
|
966
|
+
EditableMetadataButtonsComponent.style = editableMetadataButtonsCss;
|
|
967
|
+
|
|
968
|
+
const editableSelectCss = "";
|
|
969
|
+
|
|
970
|
+
const EditableSelectComponent = class {
|
|
971
|
+
constructor(hostRef) {
|
|
972
|
+
registerInstance(this, hostRef);
|
|
973
|
+
this.ldfChange = createEvent(this, "ldfChange", 7);
|
|
974
|
+
this.ldfDocShouldChange = createEvent(this, "ldfDocShouldChange", 7);
|
|
975
|
+
}
|
|
976
|
+
// Listeners
|
|
977
|
+
onChange(ev) {
|
|
978
|
+
const oldValue = this.value, value = ev.detail.value;
|
|
979
|
+
if (value !== oldValue) {
|
|
980
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
981
|
+
path: this.path,
|
|
982
|
+
op: [
|
|
983
|
+
{ type: 'set', index: this.property, oldValue, value }
|
|
984
|
+
]
|
|
985
|
+
}));
|
|
986
|
+
this.ldfChange.emit(value);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
render() {
|
|
990
|
+
return (h("ion-select", { value: this.value, placeholder: this.placeholder }, this.options.map(option => h("ion-select-option", { value: option.value }, option.label))));
|
|
991
|
+
}
|
|
992
|
+
get element() { return getElement(this); }
|
|
993
|
+
};
|
|
994
|
+
EditableSelectComponent.style = editableSelectCss;
|
|
995
|
+
|
|
996
|
+
const close = "Return to Bulletin";
|
|
997
|
+
const url = "URL";
|
|
998
|
+
const EN$5 = {
|
|
999
|
+
close: close,
|
|
1000
|
+
url: url
|
|
1001
|
+
};
|
|
1002
|
+
|
|
1003
|
+
const imageCss = "img.sc-ldf-image{height:auto;max-width:100%;z-index:1}figcaption.sc-ldf-image{background-color:var(--ldf-editable-lookup-background-color);border-radius:4px;color:var(--ldf-editable-lookup-color);display:block;margin:auto;text-align:center}.left.sc-ldf-image{text-align:left}.center.sc-ldf-image{text-align:center}.right.sc-ldf-image{text-align:right}.img-wrapper.sc-ldf-image{margin:0;padding:12px;display:inline-block;position:relative}img.editable.sc-ldf-image{border:3px solid var(--ldf-color)}button.resize.sc-ldf-image{height:30px;width:30px;margin:0;padding:0;background-color:var(--ldf-editable-lookup-background-color);border-radius:50%;border:3px solid var(--ldf-color)}.resize.top-left.sc-ldf-image{position:absolute;left:0;top:-3px;cursor:nwse-resize}.resize.bottom-left.sc-ldf-image{position:absolute;left:-3px;bottom:0;cursor:nesw-resize}.resize.top-right.sc-ldf-image{position:absolute;right:-6px;top:-3px;cursor:nesw-resize}.resize.bottom-right.sc-ldf-image{position:absolute;right:-6px;bottom:0;cursor:nwse-resize}";
|
|
1004
|
+
|
|
1005
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1006
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1007
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1008
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1009
|
+
else
|
|
1010
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1011
|
+
if (d = decorators[i])
|
|
1012
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1013
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1014
|
+
};
|
|
1015
|
+
const LOCALE$5 = {
|
|
1016
|
+
'en': EN$5
|
|
1017
|
+
};
|
|
1018
|
+
const ImageComponent = class {
|
|
1019
|
+
constructor(hostRef) {
|
|
1020
|
+
registerInstance(this, hostRef);
|
|
1021
|
+
this.ldfDocShouldChange = createEvent(this, "ldfDocShouldChange", 7);
|
|
1022
|
+
this.isResizing = false;
|
|
1023
|
+
this.resizingStartPoint = null;
|
|
1024
|
+
this.resizingCorner = null;
|
|
1025
|
+
}
|
|
1026
|
+
docChanged(newDoc) {
|
|
1027
|
+
var _a, _b, _c, _d;
|
|
1028
|
+
try {
|
|
1029
|
+
if (typeof newDoc == 'string') {
|
|
1030
|
+
this.obj = new Image(JSON.parse(newDoc));
|
|
1031
|
+
}
|
|
1032
|
+
else {
|
|
1033
|
+
this.obj = new Image(newDoc);
|
|
1034
|
+
}
|
|
1035
|
+
this.height = ((_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.height) || null;
|
|
1036
|
+
this.width = ((_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.metadata) === null || _d === void 0 ? void 0 : _d.width) || null;
|
|
1037
|
+
}
|
|
1038
|
+
catch (e) {
|
|
1039
|
+
console.warn(e);
|
|
1040
|
+
this.obj = new Image();
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
// Lifecycle events
|
|
1044
|
+
componentWillLoad() {
|
|
1045
|
+
this.docChanged(this.doc);
|
|
1046
|
+
this.loadLocaleStrings();
|
|
1047
|
+
}
|
|
1048
|
+
async loadLocaleStrings() {
|
|
1049
|
+
try {
|
|
1050
|
+
this.localeStrings = LOCALE$5[getComponentClosestLanguage(this.element)];
|
|
1051
|
+
}
|
|
1052
|
+
catch (e) {
|
|
1053
|
+
console.warn(e);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
async showZoomed() {
|
|
1057
|
+
const modal = await modalController.create({
|
|
1058
|
+
component: 'ldf-image'
|
|
1059
|
+
});
|
|
1060
|
+
modal.componentProps = {
|
|
1061
|
+
modal,
|
|
1062
|
+
doc: this.obj
|
|
1063
|
+
};
|
|
1064
|
+
await modal.present();
|
|
1065
|
+
}
|
|
1066
|
+
startResizing(corner, x, y) {
|
|
1067
|
+
this.resizingCorner = corner;
|
|
1068
|
+
this.resizingStartPoint = { x, y };
|
|
1069
|
+
}
|
|
1070
|
+
stopResizing() {
|
|
1071
|
+
// clear status of resizing
|
|
1072
|
+
console.log('stopResizing');
|
|
1073
|
+
this.resizingCorner = null;
|
|
1074
|
+
}
|
|
1075
|
+
resizingMove(ev) {
|
|
1076
|
+
if (this.resizingCorner && this.resizingStartPoint) {
|
|
1077
|
+
this.processResizingMove(this.resizingCorner, ev.clientX, ev.clientY);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
processResizingMove(corner, clientX, clientY) {
|
|
1081
|
+
const { x } = this.resizingStartPoint;
|
|
1082
|
+
const xDiff = corner === 'nw' || corner === 'sw' ? clientX - x : x - clientX;
|
|
1083
|
+
this.resizingStartPoint = { x: clientX, y: clientY };
|
|
1084
|
+
// force fixed aspect ratio by nulling out `height`
|
|
1085
|
+
this.width = this.imgElement.clientWidth - xDiff;
|
|
1086
|
+
this.height = null;
|
|
1087
|
+
this.updateDoc();
|
|
1088
|
+
}
|
|
1089
|
+
touchStart(corner, ev) {
|
|
1090
|
+
ev.preventDefault();
|
|
1091
|
+
const touch = ev.touches[0];
|
|
1092
|
+
if (touch) {
|
|
1093
|
+
this.startResizing(corner, touch.clientX, touch.clientY);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
touchMove(corner, ev) {
|
|
1097
|
+
ev.preventDefault();
|
|
1098
|
+
const touch = ev.touches[0];
|
|
1099
|
+
if (touch) {
|
|
1100
|
+
this.processResizingMove(corner, touch.clientX, touch.clientY);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
// debounce saving the change by 500ms, preventing sending multiple changes as the mouse moves
|
|
1104
|
+
updateDoc() {
|
|
1105
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1106
|
+
if (!((_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata)) {
|
|
1107
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
1108
|
+
path: this.path,
|
|
1109
|
+
op: [{ type: 'set', index: 'metadata', oldValue: (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata, value: {} }]
|
|
1110
|
+
}));
|
|
1111
|
+
}
|
|
1112
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
1113
|
+
path: `${this.path}/metadata`,
|
|
1114
|
+
op: [
|
|
1115
|
+
{
|
|
1116
|
+
type: 'set',
|
|
1117
|
+
index: 'height',
|
|
1118
|
+
oldValue: (_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.metadata) === null || _d === void 0 ? void 0 : _d.height,
|
|
1119
|
+
value: this.imgElement.clientHeight
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
type: 'set',
|
|
1123
|
+
index: 'width',
|
|
1124
|
+
oldValue: (_f = (_e = this.obj) === null || _e === void 0 ? void 0 : _e.metadata) === null || _f === void 0 ? void 0 : _f.width,
|
|
1125
|
+
value: this.imgElement.clientWidth
|
|
1126
|
+
}
|
|
1127
|
+
]
|
|
1128
|
+
}));
|
|
1129
|
+
}
|
|
1130
|
+
// Render
|
|
1131
|
+
render() {
|
|
1132
|
+
var _a, _b, _c, _d, _e;
|
|
1133
|
+
const localeStrings = this.localeStrings || {};
|
|
1134
|
+
const imageDisplay = [
|
|
1135
|
+
this.editable && h("ldf-label-bar", null, h("slot", { slot: 'end', name: 'controls' })),
|
|
1136
|
+
h("div", { class: `${((_a = this.obj) === null || _a === void 0 ? void 0 : _a.style) || ''} ${((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.align) || 'center'}` }, this.obj.value && this.obj.value.map((url, ii) => {
|
|
1137
|
+
var _a;
|
|
1138
|
+
return this.editable ?
|
|
1139
|
+
h("figure", null, h("div", { class: "img-wrapper" }, h("img", { src: url, ref: el => this.imgElement = el, alt: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.label, style: {
|
|
1140
|
+
height: this.height ? `${this.height}px` : 'auto',
|
|
1141
|
+
width: this.width ? `${this.width}px` : 'auto'
|
|
1142
|
+
}, class: "editable" }), h("button", { class: "resize top-left", onMouseDown: (ev) => this.startResizing('nw', ev.clientX, ev.clientY), onTouchStart: (ev) => this.touchStart('nw', ev), onTouchMove: (ev) => this.touchMove('nw', ev), onTouchEnd: () => this.stopResizing() }), h("button", { class: "resize bottom-left", onMouseDown: (ev) => this.startResizing('sw', ev.clientX, ev.clientY), onTouchStart: (ev) => this.touchStart('sw', ev), onTouchMove: (ev) => this.touchMove('sw', ev), onTouchEnd: () => this.stopResizing() }), h("button", { class: "resize top-right", onMouseDown: (ev) => this.startResizing('ne', ev.clientX, ev.clientY), onTouchStart: (ev) => this.touchStart('ne', ev), onTouchMove: (ev) => this.touchMove('ne', ev), onTouchEnd: () => this.stopResizing() }), h("button", { class: "resize bottom-right", onMouseDown: (ev) => this.startResizing('se', ev.clientX, ev.clientY), onTouchStart: (ev) => this.touchStart('se', ev), onTouchMove: (ev) => this.touchMove('se', ev), onTouchEnd: () => this.stopResizing() })), h("figcaption", null, h("code", null, localeStrings.url), h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-${ii}`, text: url, path: `${this.path}/value/${ii}` })))
|
|
1143
|
+
:
|
|
1144
|
+
h("img", { src: url, onClick: () => this.showZoomed(), style: {
|
|
1145
|
+
height: this.height ? `${this.height}px` : 'auto',
|
|
1146
|
+
width: this.width ? `${this.width}px` : 'auto'
|
|
1147
|
+
} });
|
|
1148
|
+
}))
|
|
1149
|
+
];
|
|
1150
|
+
if (!this.modal) {
|
|
1151
|
+
return h(Host, { lang: (_d = this.obj) === null || _d === void 0 ? void 0 : _d.language }, imageDisplay);
|
|
1152
|
+
}
|
|
1153
|
+
else {
|
|
1154
|
+
return [
|
|
1155
|
+
h("ion-header", null, h("ion-toolbar", null, h("ion-buttons", { slot: "end" }, h("ion-button", { onClick: () => this.modal.dismiss() }, h("ion-label", { slot: "start" }, localeStrings.close), h("ion-icon", { slot: "end", name: "close" }))))),
|
|
1156
|
+
h("ion-content", { class: "ion-padding", scrollX: true, lang: (_e = this.obj) === null || _e === void 0 ? void 0 : _e.language }, imageDisplay)
|
|
1157
|
+
];
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
get element() { return getElement(this); }
|
|
1161
|
+
static get watchers() { return {
|
|
1162
|
+
"doc": ["docChanged"]
|
|
1163
|
+
}; }
|
|
1164
|
+
};
|
|
1165
|
+
__decorate([
|
|
1166
|
+
Debounce(250)
|
|
1167
|
+
], ImageComponent.prototype, "updateDoc", null);
|
|
1168
|
+
ImageComponent.style = imageCss;
|
|
1169
|
+
|
|
1170
|
+
const bible_version = " in the version ";
|
|
1171
|
+
const category = "All items that match the category ";
|
|
1172
|
+
const collect = "The Collect of the Day.";
|
|
1173
|
+
const day_of_month_1 = "It is the ";
|
|
1174
|
+
const day_of_month_2 = " day of the month";
|
|
1175
|
+
const definedByPreference = " defined by the preference ";
|
|
1176
|
+
const fromCanticleTable = " from the canticle table ";
|
|
1177
|
+
const fromLectionary = " from the lectionary ";
|
|
1178
|
+
const lectionaryReading = "The lectionary reading ";
|
|
1179
|
+
const slug = "All items with the slug ";
|
|
1180
|
+
const condition = "Included when ";
|
|
1181
|
+
const and = "all";
|
|
1182
|
+
const or = "any";
|
|
1183
|
+
const the_day = " the day ";
|
|
1184
|
+
const of_the_following = " of the following are true: ";
|
|
1185
|
+
const day = "the liturgical day";
|
|
1186
|
+
const season = "the liturgical season";
|
|
1187
|
+
const week = "the liturgical week";
|
|
1188
|
+
const weekday = "the day of the week";
|
|
1189
|
+
const feastDay = "a Sunday or Holy Day";
|
|
1190
|
+
const is = " is ";
|
|
1191
|
+
const is_not = " is not ";
|
|
1192
|
+
const only = " one of: ";
|
|
1193
|
+
const only_1 = "";
|
|
1194
|
+
const except = " anything but: ";
|
|
1195
|
+
const except_1 = " not ";
|
|
1196
|
+
const the_preference = "the preference ";
|
|
1197
|
+
const the_preference_specified = "chosen in the preference ";
|
|
1198
|
+
const the_date = "the date ";
|
|
1199
|
+
const lte = " ≤ ";
|
|
1200
|
+
const lt = " < ";
|
|
1201
|
+
const gt = " > ";
|
|
1202
|
+
const gte = " ≥ ";
|
|
1203
|
+
const smallOnly = "Only appears on small screens";
|
|
1204
|
+
const smallHidden = "Doesn't appear on small screens";
|
|
1205
|
+
const EN$4 = {
|
|
1206
|
+
bible_version: bible_version,
|
|
1207
|
+
"canticle-1": "The first canticle ",
|
|
1208
|
+
"canticle-2": "The second canticle ",
|
|
1209
|
+
category: category,
|
|
1210
|
+
collect: collect,
|
|
1211
|
+
day_of_month_1: day_of_month_1,
|
|
1212
|
+
day_of_month_2: day_of_month_2,
|
|
1213
|
+
definedByPreference: definedByPreference,
|
|
1214
|
+
fromCanticleTable: fromCanticleTable,
|
|
1215
|
+
fromLectionary: fromLectionary,
|
|
1216
|
+
lectionaryReading: lectionaryReading,
|
|
1217
|
+
"filter-seasonal": " and the current season",
|
|
1218
|
+
"filter-evening-true": " and are in the evening ",
|
|
1219
|
+
"filter-evening-false": " and are not in the evening ",
|
|
1220
|
+
"filter-day": " and the liturgical day ",
|
|
1221
|
+
"rotate-true": " (rotating by day)",
|
|
1222
|
+
"rotate-false": " (including all possibilities)",
|
|
1223
|
+
slug: slug,
|
|
1224
|
+
condition: condition,
|
|
1225
|
+
and: and,
|
|
1226
|
+
or: or,
|
|
1227
|
+
the_day: the_day,
|
|
1228
|
+
of_the_following: of_the_following,
|
|
1229
|
+
day: day,
|
|
1230
|
+
season: season,
|
|
1231
|
+
week: week,
|
|
1232
|
+
weekday: weekday,
|
|
1233
|
+
feastDay: feastDay,
|
|
1234
|
+
is: is,
|
|
1235
|
+
is_not: is_not,
|
|
1236
|
+
only: only,
|
|
1237
|
+
only_1: only_1,
|
|
1238
|
+
except: except,
|
|
1239
|
+
except_1: except_1,
|
|
1240
|
+
the_preference: the_preference,
|
|
1241
|
+
the_preference_specified: the_preference_specified,
|
|
1242
|
+
the_date: the_date,
|
|
1243
|
+
lte: lte,
|
|
1244
|
+
lt: lt,
|
|
1245
|
+
gt: gt,
|
|
1246
|
+
gte: gte,
|
|
1247
|
+
smallOnly: smallOnly,
|
|
1248
|
+
smallHidden: smallHidden
|
|
1249
|
+
};
|
|
1250
|
+
|
|
1251
|
+
const ConditionNode = ({ doc, localeStrings }, children) => h("div", { class: 'condition' },
|
|
1252
|
+
h("p", null,
|
|
1253
|
+
localeStrings.condition,
|
|
1254
|
+
h("code", null, localeStrings[doc.condition.mode]),
|
|
1255
|
+
localeStrings.of_the_following),
|
|
1256
|
+
h("ul", null, doc.condition.conditions.map(condition => h(ConditionPiece, { condition: condition, localeStrings: localeStrings }))),
|
|
1257
|
+
children);
|
|
1258
|
+
const ConditionPiece = ({ condition, localeStrings }) => {
|
|
1259
|
+
let nodes = [];
|
|
1260
|
+
/* Except/Only fields: day, season, week, weekday */
|
|
1261
|
+
if (condition.day) {
|
|
1262
|
+
nodes = nodes.concat(h(ExceptOnly, { condition: condition, field: 'day', localeStrings: localeStrings }));
|
|
1263
|
+
}
|
|
1264
|
+
if (condition.season) {
|
|
1265
|
+
nodes = nodes.concat(h(ExceptOnly, { condition: condition, field: 'season', localeStrings: localeStrings }));
|
|
1266
|
+
}
|
|
1267
|
+
if (condition.week) {
|
|
1268
|
+
nodes = nodes.concat(h(ExceptOnly, { condition: condition, field: 'week', localeStrings: localeStrings }));
|
|
1269
|
+
}
|
|
1270
|
+
if (condition.weekday) {
|
|
1271
|
+
nodes = nodes.concat(h(ExceptOnly, { condition: condition, field: 'weekday', localeStrings: localeStrings }));
|
|
1272
|
+
}
|
|
1273
|
+
if (condition.day_of_month) {
|
|
1274
|
+
nodes.push([
|
|
1275
|
+
localeStrings.day_of_month_1,
|
|
1276
|
+
ordinal_suffix_of(Number(condition.day_of_month)),
|
|
1277
|
+
localeStrings.day_of_month_2
|
|
1278
|
+
]);
|
|
1279
|
+
}
|
|
1280
|
+
if (condition.hasOwnProperty('feastDay')) {
|
|
1281
|
+
nodes.push([
|
|
1282
|
+
localeStrings.the_day,
|
|
1283
|
+
condition.feastDay ? localeStrings.is : localeStrings.is_not,
|
|
1284
|
+
localeStrings.feastDay
|
|
1285
|
+
]);
|
|
1286
|
+
}
|
|
1287
|
+
if (condition.preference) {
|
|
1288
|
+
nodes.push([
|
|
1289
|
+
localeStrings.the_preference,
|
|
1290
|
+
h("code", null, condition.preference.key),
|
|
1291
|
+
condition.preference.is ? localeStrings.is : localeStrings.is_not,
|
|
1292
|
+
h("code", null, condition.preference.value)
|
|
1293
|
+
]);
|
|
1294
|
+
}
|
|
1295
|
+
if (condition.date) {
|
|
1296
|
+
nodes.push([
|
|
1297
|
+
localeStrings.the_date,
|
|
1298
|
+
condition.date.lt && `${localeStrings.lt} ${condition.date.lt}`,
|
|
1299
|
+
condition.date.lte && `${localeStrings.lte} ${condition.date.lte}`,
|
|
1300
|
+
condition.date.gte && `${localeStrings.gte} ${condition.date.gte}`,
|
|
1301
|
+
condition.date.gt && `${localeStrings.gt} ${condition.date.gt}`,
|
|
1302
|
+
]);
|
|
1303
|
+
}
|
|
1304
|
+
return nodes.map(node => h("li", null, node));
|
|
1305
|
+
};
|
|
1306
|
+
const ExceptOnly = ({ condition, field, localeStrings }) => {
|
|
1307
|
+
var _a, _b;
|
|
1308
|
+
const nodes = [];
|
|
1309
|
+
((_a = condition[field].except) === null || _a === void 0 ? void 0 : _a.length) > 0 && nodes.push([
|
|
1310
|
+
localeStrings[field],
|
|
1311
|
+
localeStrings.is,
|
|
1312
|
+
condition[field].except.length > 1 ? localeStrings.except : localeStrings.except_1,
|
|
1313
|
+
condition[field].except.join(', ')
|
|
1314
|
+
]);
|
|
1315
|
+
((_b = condition[field].only) === null || _b === void 0 ? void 0 : _b.length) > 0 && nodes.push([
|
|
1316
|
+
localeStrings[field],
|
|
1317
|
+
localeStrings.is,
|
|
1318
|
+
condition[field].only.length > 1 ? localeStrings.only : localeStrings.only_1,
|
|
1319
|
+
condition[field].only.join(', ')
|
|
1320
|
+
]);
|
|
1321
|
+
return nodes;
|
|
1322
|
+
};
|
|
1323
|
+
function ordinal_suffix_of(i) {
|
|
1324
|
+
var j = i % 10, k = i % 100;
|
|
1325
|
+
if (j == 1 && k != 11) {
|
|
1326
|
+
return i + "st";
|
|
1327
|
+
}
|
|
1328
|
+
if (j == 2 && k != 12) {
|
|
1329
|
+
return i + "nd";
|
|
1330
|
+
}
|
|
1331
|
+
if (j == 3 && k != 13) {
|
|
1332
|
+
return i + "rd";
|
|
1333
|
+
}
|
|
1334
|
+
return i + "th";
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
const valueOrPreference = (x, localeStrings) => {
|
|
1338
|
+
if (typeof x === 'object') {
|
|
1339
|
+
return h("span", null,
|
|
1340
|
+
localeStrings.definedByPreference,
|
|
1341
|
+
" ",
|
|
1342
|
+
h("code", null, x.preference));
|
|
1343
|
+
}
|
|
1344
|
+
else {
|
|
1345
|
+
return h("code", null, x);
|
|
1346
|
+
}
|
|
1347
|
+
};
|
|
1348
|
+
const LookupNode = ({ doc, localeStrings }) => {
|
|
1349
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
1350
|
+
let desc;
|
|
1351
|
+
if (doc.lookup) {
|
|
1352
|
+
switch ((_a = doc.lookup) === null || _a === void 0 ? void 0 : _a.type) {
|
|
1353
|
+
case 'lectionary':
|
|
1354
|
+
desc = [
|
|
1355
|
+
localeStrings.lectionaryReading,
|
|
1356
|
+
valueOrPreference((_b = doc.lookup) === null || _b === void 0 ? void 0 : _b.item, localeStrings),
|
|
1357
|
+
localeStrings.fromLectionary,
|
|
1358
|
+
valueOrPreference((_c = doc.lookup) === null || _c === void 0 ? void 0 : _c.table, localeStrings),
|
|
1359
|
+
"."
|
|
1360
|
+
];
|
|
1361
|
+
break;
|
|
1362
|
+
case 'canticle':
|
|
1363
|
+
desc = [
|
|
1364
|
+
localeStrings[`canticle-${(_d = doc.lookup) === null || _d === void 0 ? void 0 : _d.item}`],
|
|
1365
|
+
localeStrings.fromCanticleTable,
|
|
1366
|
+
valueOrPreference((_e = doc.lookup) === null || _e === void 0 ? void 0 : _e.table, localeStrings),
|
|
1367
|
+
"."
|
|
1368
|
+
];
|
|
1369
|
+
break;
|
|
1370
|
+
case 'category':
|
|
1371
|
+
desc = [
|
|
1372
|
+
localeStrings.category,
|
|
1373
|
+
doc.category.map(category => h("code", null, category)),
|
|
1374
|
+
((_f = doc.lookup) === null || _f === void 0 ? void 0 : _f.filter) && ((_g = doc.lookup) === null || _g === void 0 ? void 0 : _g.filter) == 'seasonal' && localeStrings['filter-seasonal'],
|
|
1375
|
+
((_h = doc.lookup) === null || _h === void 0 ? void 0 : _h.filter) && ((_j = doc.lookup) === null || _j === void 0 ? void 0 : _j.filter) == 'evening' && localeStrings[`filter-evening-${((_k = doc.lookup) === null || _k === void 0 ? void 0 : _k.item) || true}`],
|
|
1376
|
+
((_l = doc.lookup) === null || _l === void 0 ? void 0 : _l.filter) && ((_m = doc.lookup) === null || _m === void 0 ? void 0 : _m.filter) == 'day' && localeStrings[`filter-day`],
|
|
1377
|
+
((_o = doc.lookup) === null || _o === void 0 ? void 0 : _o.filter) && ((_p = doc.lookup) === null || _p === void 0 ? void 0 : _p.filter) == 'day' && h("code", null, (_q = doc.lookup) === null || _q === void 0 ? void 0 : _q.item),
|
|
1378
|
+
((_r = doc.lookup) === null || _r === void 0 ? void 0 : _r.hasOwnProperty('rotate')) && localeStrings[`rotate-${(_s = doc.lookup) === null || _s === void 0 ? void 0 : _s.rotate}`],
|
|
1379
|
+
"."
|
|
1380
|
+
];
|
|
1381
|
+
break;
|
|
1382
|
+
case 'slug':
|
|
1383
|
+
desc = [
|
|
1384
|
+
localeStrings.slug,
|
|
1385
|
+
h("code", null, doc.slug),
|
|
1386
|
+
((_t = doc.lookup) === null || _t === void 0 ? void 0 : _t.filter) && ((_u = doc.lookup) === null || _u === void 0 ? void 0 : _u.filter) == 'seasonal' && localeStrings['filter-seasonal'],
|
|
1387
|
+
((_v = doc.lookup) === null || _v === void 0 ? void 0 : _v.filter) && ((_w = doc.lookup) === null || _w === void 0 ? void 0 : _w.filter) == 'evening' && localeStrings[`filter-evening-${((_x = doc.lookup) === null || _x === void 0 ? void 0 : _x.item) || true}`],
|
|
1388
|
+
((_y = doc.lookup) === null || _y === void 0 ? void 0 : _y.filter) && ((_z = doc.lookup) === null || _z === void 0 ? void 0 : _z.filter) == 'day' && localeStrings[`filter-day`],
|
|
1389
|
+
((_0 = doc.lookup) === null || _0 === void 0 ? void 0 : _0.filter) && ((_1 = doc.lookup) === null || _1 === void 0 ? void 0 : _1.filter) == 'day' && h("code", null, (_2 = doc.lookup) === null || _2 === void 0 ? void 0 : _2.item),
|
|
1390
|
+
((_3 = doc.lookup) === null || _3 === void 0 ? void 0 : _3.hasOwnProperty('rotate')) && localeStrings[`rotate-${(_4 = doc.lookup) === null || _4 === void 0 ? void 0 : _4.rotate}`],
|
|
1391
|
+
"."
|
|
1392
|
+
];
|
|
1393
|
+
break;
|
|
1394
|
+
case 'collect':
|
|
1395
|
+
desc = h("code", null, localeStrings.collect);
|
|
1396
|
+
break;
|
|
1397
|
+
default:
|
|
1398
|
+
desc = JSON.stringify(doc.lookup);
|
|
1399
|
+
break;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
else if (doc.type === "bible-reading" && doc.citation) {
|
|
1403
|
+
desc = [
|
|
1404
|
+
h("code", null, doc.citation),
|
|
1405
|
+
localeStrings.bible_version,
|
|
1406
|
+
...typeof doc.version === "string"
|
|
1407
|
+
? [h("code", null, doc.version)]
|
|
1408
|
+
: [
|
|
1409
|
+
localeStrings.the_preference_specified,
|
|
1410
|
+
h("code", null, "bibleVersion")
|
|
1411
|
+
]
|
|
1412
|
+
];
|
|
1413
|
+
}
|
|
1414
|
+
return (h("article", { class: "lookup" }, desc));
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
const liturgicalDocumentCss = "ldf-liturgical-document.sc-ldf-liturgical-document,.sc-ldf-liturgical-document-h{font-family:var(--ldf-font-face);display:block}.container.editable.sc-ldf-liturgical-document{padding-top:0}.lookup.sc-ldf-liturgical-document{background-color:var(--ldf-editable-lookup-background-color);color:var(--ldf-editable-lookup-color);border-radius:4px;margin-bottom:1.5em;padding:1em;width:calc(100% - 2em)}.lookup.sc-ldf-liturgical-document code.sc-ldf-liturgical-document{font-weight:bold}.condition.sc-ldf-liturgical-document{background-color:var(--ldf-editable-condition-background-color);color:var(--ldf-editable-condition-color);border-radius:4px;padding:1em;width:calc(100% - 2em)}.condition.sc-ldf-liturgical-document code.sc-ldf-liturgical-document{font-weight:bold}.doc.sc-ldf-liturgical-document{margin-top:var(--ldf-liturgical-document-margin-top)}ldf-editable-metadata-buttons.sc-ldf-liturgical-document{height:none;display:block;z-index:10;background:var(--ldf-background);opacity:0.8;width:100%;position:sticky;top:2em;padding-top:1em;padding-bottom:1em}ldf-editable-metadata-buttons.top-level.sc-ldf-liturgical-document{position:relative;top:0}.small-only.sc-ldf-liturgical-document{display:block}.small-hidden.sc-ldf-liturgical-document{display:none}@media (min-width: 415px){.small-only.sc-ldf-liturgical-document{display:none}.small-hidden.sc-ldf-liturgical-document{display:block}}";
|
|
1418
|
+
|
|
1419
|
+
const LOCALE$4 = {
|
|
1420
|
+
'en': EN$4
|
|
1421
|
+
};
|
|
1422
|
+
const LiturgicalDocumentComponent = class {
|
|
1423
|
+
constructor(hostRef) {
|
|
1424
|
+
registerInstance(this, hostRef);
|
|
1425
|
+
this.focusPath = createEvent(this, "focusPath", 7);
|
|
1426
|
+
this.focusObj = createEvent(this, "focusObj", 7);
|
|
1427
|
+
this.ldfSelectionChange = createEvent(this, "ldfSelectionChange", 7);
|
|
1428
|
+
this.hasFocus = false;
|
|
1429
|
+
this.buttonsSelected = false;
|
|
1430
|
+
this.interrupt = false;
|
|
1431
|
+
/** Type of the parent `LiturgicalDocument`, if any */
|
|
1432
|
+
this.parentType = null;
|
|
1433
|
+
/** Documents in `preview` mode will display as if they're not editable, unless the user explicitly chooses to edit them */
|
|
1434
|
+
this.preview = false;
|
|
1435
|
+
/** CSS padding to add around element, if any. */
|
|
1436
|
+
this.padding = undefined;
|
|
1437
|
+
}
|
|
1438
|
+
async docChanged(newDoc) {
|
|
1439
|
+
let provisionalObj;
|
|
1440
|
+
try {
|
|
1441
|
+
if (typeof newDoc == 'string') {
|
|
1442
|
+
provisionalObj = new LiturgicalDocument(JSON.parse(newDoc));
|
|
1443
|
+
}
|
|
1444
|
+
else {
|
|
1445
|
+
provisionalObj = new LiturgicalDocument(newDoc);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
catch (e) {
|
|
1449
|
+
console.warn(e);
|
|
1450
|
+
provisionalObj = new LiturgicalDocument();
|
|
1451
|
+
}
|
|
1452
|
+
this.obj = provisionalObj || new LiturgicalDocument();
|
|
1453
|
+
}
|
|
1454
|
+
// Listeners
|
|
1455
|
+
onDragOver() {
|
|
1456
|
+
if (this.path !== "/") {
|
|
1457
|
+
this.hasFocus = true;
|
|
1458
|
+
this.focusPath.emit(this.path);
|
|
1459
|
+
this.focusObj.emit({ obj: this.obj, path: this.path });
|
|
1460
|
+
console.log("dragged over", this.path);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
selectionChangeHandler(ev) {
|
|
1464
|
+
var _a, _b;
|
|
1465
|
+
// stop iOS from taking over
|
|
1466
|
+
ev.preventDefault();
|
|
1467
|
+
// handle the selection
|
|
1468
|
+
const selection = document.getSelection(), anchorNode = selection.anchorNode, citation = (_b = (_a = anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.parentElement) === null || _a === void 0 ? void 0 : _a.closest('ldf-string')) === null || _b === void 0 ? void 0 : _b.citation;
|
|
1469
|
+
if (this.element.contains(anchorNode)) {
|
|
1470
|
+
const text = selection.toString();
|
|
1471
|
+
this.ldfSelectionChange.emit({
|
|
1472
|
+
target: this.element,
|
|
1473
|
+
text,
|
|
1474
|
+
citation,
|
|
1475
|
+
fragment: this.path
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
// Lifecycle events
|
|
1480
|
+
componentWillLoad() {
|
|
1481
|
+
this.loadLocaleStrings();
|
|
1482
|
+
this.docChanged(this.doc);
|
|
1483
|
+
}
|
|
1484
|
+
/** On hover, display Add Block buttons */
|
|
1485
|
+
onMouseOver() {
|
|
1486
|
+
this.hasFocus = true;
|
|
1487
|
+
this.focusPath.emit(this.path);
|
|
1488
|
+
}
|
|
1489
|
+
onMouseOut(ev) {
|
|
1490
|
+
const elDiv = this.element.querySelector('div.container');
|
|
1491
|
+
if (ev.relatedTarget == elDiv) {
|
|
1492
|
+
setTimeout(() => {
|
|
1493
|
+
this.hasFocus = false;
|
|
1494
|
+
this.focusPath.emit(this.path);
|
|
1495
|
+
}, 500);
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
// Firing the event during the capture phase the most specific LiturgicalDocument will
|
|
1499
|
+
// be handled last, i.e., the `Liturgy` won't override subdocuments
|
|
1500
|
+
onClick() {
|
|
1501
|
+
this.hasFocus = true;
|
|
1502
|
+
this.focusPath.emit(this.path);
|
|
1503
|
+
this.focusObj.emit({ obj: this.obj, path: this.path });
|
|
1504
|
+
}
|
|
1505
|
+
async loadLocaleStrings() {
|
|
1506
|
+
try {
|
|
1507
|
+
this.localeStrings = LOCALE$4[getComponentClosestLanguage(this.element)];
|
|
1508
|
+
}
|
|
1509
|
+
catch (e) {
|
|
1510
|
+
console.warn(e);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
/** Gives a loading view, a description of the document (if editing and has a lookup), or the component of the correct type */
|
|
1514
|
+
nodeFromDoc(doc, forceEditable = undefined) {
|
|
1515
|
+
if (doc == undefined) {
|
|
1516
|
+
return (customElements === null || customElements === void 0 ? void 0 : customElements.get('ion-skeleton-text')) ? h("ion-skeleton-text", null) : h("p", null, "...");
|
|
1517
|
+
}
|
|
1518
|
+
else if (this.editable || forceEditable) {
|
|
1519
|
+
return this.editableNode(doc);
|
|
1520
|
+
}
|
|
1521
|
+
else {
|
|
1522
|
+
return this.chooseComponent(doc);
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
editableNode(doc) {
|
|
1526
|
+
var _a;
|
|
1527
|
+
const localeStrings = this.localeStrings || {};
|
|
1528
|
+
if (((_a = doc.value) === null || _a === void 0 ? void 0 : _a.length) > 0 && Boolean(doc.value[0])) {
|
|
1529
|
+
if (doc.condition) {
|
|
1530
|
+
return h(ConditionNode, { doc: doc, localeStrings: localeStrings }, this.chooseComponent(doc));
|
|
1531
|
+
}
|
|
1532
|
+
else {
|
|
1533
|
+
return this.chooseComponent(doc);
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
else {
|
|
1537
|
+
if (doc.condition && !doc.lookup) {
|
|
1538
|
+
return h(ConditionNode, { doc: doc, localeStrings: localeStrings }, this.chooseComponent(doc));
|
|
1539
|
+
}
|
|
1540
|
+
else if (doc.condition && doc.lookup) {
|
|
1541
|
+
return h(ConditionNode, { doc: doc, localeStrings: localeStrings }, h(LookupNode, { doc: doc, localeStrings: localeStrings }));
|
|
1542
|
+
}
|
|
1543
|
+
else if (!doc.condition && doc.lookup) {
|
|
1544
|
+
return h(LookupNode, { doc: doc, localeStrings: localeStrings });
|
|
1545
|
+
}
|
|
1546
|
+
else if (doc.type === "bible-reading") {
|
|
1547
|
+
return h(LookupNode, { doc: doc, localeStrings: localeStrings });
|
|
1548
|
+
}
|
|
1549
|
+
else {
|
|
1550
|
+
return this.chooseComponent(doc);
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
/** Processes generic LiturgicalDocument into component of the appropriate type */
|
|
1555
|
+
//@Method()
|
|
1556
|
+
chooseComponent(doc) {
|
|
1557
|
+
var _a, _b;
|
|
1558
|
+
let node;
|
|
1559
|
+
const editable = this.editable && !this.preview;
|
|
1560
|
+
switch (doc === null || doc === void 0 ? void 0 : doc.type) {
|
|
1561
|
+
case 'liturgy':
|
|
1562
|
+
node = h("ldf-liturgy", { path: this.path, editable: editable, preview: this.preview, doc: doc });
|
|
1563
|
+
break;
|
|
1564
|
+
case 'heading':
|
|
1565
|
+
node = h("ldf-heading", { path: this.path, editable: editable, doc: doc });
|
|
1566
|
+
break;
|
|
1567
|
+
case 'image':
|
|
1568
|
+
node = h("ldf-image", { path: this.path, editable: editable, doc: doc });
|
|
1569
|
+
break;
|
|
1570
|
+
case 'meditation':
|
|
1571
|
+
const color = (_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.day) === null || _b === void 0 ? void 0 : _b.color, colorValue = (color === null || color === void 0 ? void 0 : color.hasOwnProperty('hex')) ? color.hex : color || '#3489eb';
|
|
1572
|
+
node = h("ldf-meditation", { path: this.path, editable: this.editable || this.preview, doc: doc, color: colorValue });
|
|
1573
|
+
break;
|
|
1574
|
+
case 'option':
|
|
1575
|
+
node = h("ldf-option", { path: this.path, editable: editable, preview: this.preview, doc: doc });
|
|
1576
|
+
break;
|
|
1577
|
+
case 'refrain':
|
|
1578
|
+
node = h("ldf-refrain", { path: this.path, editable: editable, doc: doc });
|
|
1579
|
+
break;
|
|
1580
|
+
case 'rubric':
|
|
1581
|
+
node = h("ldf-rubric", { path: this.path, editable: editable, doc: doc });
|
|
1582
|
+
break;
|
|
1583
|
+
case 'text':
|
|
1584
|
+
node = h("ldf-text", { path: this.path, editable: editable, doc: doc });
|
|
1585
|
+
break;
|
|
1586
|
+
case 'responsive':
|
|
1587
|
+
node = h("ldf-responsive-prayer", { path: this.path, editable: editable, doc: doc });
|
|
1588
|
+
break;
|
|
1589
|
+
case 'bible-reading':
|
|
1590
|
+
node = h("ldf-bible-reading", { path: this.path, editable: editable, doc: doc });
|
|
1591
|
+
break;
|
|
1592
|
+
case 'psalm':
|
|
1593
|
+
node = h("ldf-psalm", { path: this.path, editable: editable, doc: doc });
|
|
1594
|
+
break;
|
|
1595
|
+
default:
|
|
1596
|
+
console.warn('invalid type for document', doc);
|
|
1597
|
+
break;
|
|
1598
|
+
}
|
|
1599
|
+
return node;
|
|
1600
|
+
}
|
|
1601
|
+
setPreview(preview) {
|
|
1602
|
+
this.preview = preview;
|
|
1603
|
+
this.editable = true;
|
|
1604
|
+
}
|
|
1605
|
+
// Render
|
|
1606
|
+
render() {
|
|
1607
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1608
|
+
const node = this.nodeFromDoc(this.obj);
|
|
1609
|
+
return (node && h(Host, { lang: ((_a = this.obj) === null || _a === void 0 ? void 0 : _a.language) || 'en' }, h("div", { class: {
|
|
1610
|
+
container: true,
|
|
1611
|
+
editable: this.editable || this.preview,
|
|
1612
|
+
"small-only": !this.editable && !this.preview && ((_b = this.obj) === null || _b === void 0 ? void 0 : _b.responsive) !== undefined && ((_c = this.obj) === null || _c === void 0 ? void 0 : _c.responsive) == Responsive.SmallOnly,
|
|
1613
|
+
"small-hidden": !this.editable && !this.preview && ((_d = this.obj) === null || _d === void 0 ? void 0 : _d.responsive) !== undefined && ((_e = this.obj) === null || _e === void 0 ? void 0 : _e.responsive) == Responsive.SmallHidden,
|
|
1614
|
+
} }, (this.editable || this.preview) && h("ldf-editable-metadata-buttons", { visible: this.hasFocus, base: this.base, index: this.index, obj: this.obj, parentType: this.parentType, preview: this.preview, onLdfTogglePreview: (e) => this.setPreview(e.detail), class: { 'top-level': ((_f = this.obj) === null || _f === void 0 ? void 0 : _f.type) === 'liturgy' || ((_g = this.obj) === null || _g === void 0 ? void 0 : _g.type) === 'option' } }), (this.editable || this.preview) && (((_h = this.obj) === null || _h === void 0 ? void 0 : _h.responsive) === Responsive.SmallHidden || ((_j = this.obj) === null || _j === void 0 ? void 0 : _j.responsive) === Responsive.SmallOnly) && h("ion-chip", { class: "responsive-banner" }, h("ion-icon", { name: "phone-portrait-outline" }), ((_k = this.obj) === null || _k === void 0 ? void 0 : _k.responsive) === Responsive.SmallOnly && h("ion-label", null, this.localeStrings.smallOnly), ((_l = this.obj) === null || _l === void 0 ? void 0 : _l.responsive) === Responsive.SmallHidden && h("ion-label", null, this.localeStrings.smallHidden)), h("div", { id: (this.path || '').replace(/\//g, '-'), class: {
|
|
1615
|
+
doc: true,
|
|
1616
|
+
editable: this.editable || this.preview
|
|
1617
|
+
}, style: { padding: this.padding } }, node))));
|
|
1618
|
+
}
|
|
1619
|
+
get element() { return getElement(this); }
|
|
1620
|
+
static get watchers() { return {
|
|
1621
|
+
"doc": ["docChanged"]
|
|
1622
|
+
}; }
|
|
1623
|
+
};
|
|
1624
|
+
LiturgicalDocumentComponent.style = liturgicalDocumentCss;
|
|
1625
|
+
|
|
1626
|
+
const LiturgyComponent = class {
|
|
1627
|
+
constructor(hostRef) {
|
|
1628
|
+
registerInstance(this, hostRef);
|
|
1629
|
+
/** Documents in `preview` mode will display as if they're not editable, unless the user explicitly chooses to edit them */
|
|
1630
|
+
this.preview = false;
|
|
1631
|
+
}
|
|
1632
|
+
docChanged(newDoc) {
|
|
1633
|
+
try {
|
|
1634
|
+
if (typeof newDoc == 'string') {
|
|
1635
|
+
this.obj = new Liturgy(JSON.parse(newDoc));
|
|
1636
|
+
}
|
|
1637
|
+
else {
|
|
1638
|
+
this.obj = new Liturgy(newDoc);
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
catch (e) {
|
|
1642
|
+
console.warn(e);
|
|
1643
|
+
this.obj = new Liturgy();
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
// Lifecycle events
|
|
1647
|
+
componentWillLoad() {
|
|
1648
|
+
this.docChanged(this.doc);
|
|
1649
|
+
}
|
|
1650
|
+
// Listens for ldf-liturgical-document event indicating mouseover
|
|
1651
|
+
onFocusPath(ev) {
|
|
1652
|
+
this.hasFocus = ev.detail;
|
|
1653
|
+
}
|
|
1654
|
+
// Render
|
|
1655
|
+
render() {
|
|
1656
|
+
const basePath = this.path == '/' ? '' : `${this.path}/`, valuePath = `${basePath}/value`;
|
|
1657
|
+
return (h(Host, { lang: this.obj.language }, (this.editable || this.preview) && h("ldf-editable-add-block", { visible: true, base: valuePath, index: 0 }), this.obj.value.map((doc, docIndex) => {
|
|
1658
|
+
var _a, _b, _c;
|
|
1659
|
+
const path = `${valuePath}/${docIndex}`, buttonVisible = this.hasFocus == path // button appears if this doc is focused
|
|
1660
|
+
|| docIndex == ((((_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.length) || 0) - 1) // or it it's the last doc in the liturgy
|
|
1661
|
+
|| ((doc === null || doc === void 0 ? void 0 : doc.type) === 'option' && ((_c = this.hasFocus) === null || _c === void 0 ? void 0 : _c.startsWith(path))); // or if it's an option and one of its children is focused
|
|
1662
|
+
return (h("article", { style: { padding: this.editable ? '1em' : '0' } }, h("ldf-liturgical-document", { doc: doc, path: path, base: valuePath, index: docIndex, editable: this.editable, preview: this.preview, parentType: 'liturgy' }), (this.editable || this.preview) && h("ldf-editable-add-block", { visible: buttonVisible, base: valuePath, index: docIndex + 1 })));
|
|
1663
|
+
})));
|
|
1664
|
+
}
|
|
1665
|
+
static get watchers() { return {
|
|
1666
|
+
"doc": ["docChanged"]
|
|
1667
|
+
}; }
|
|
1668
|
+
};
|
|
1669
|
+
|
|
1670
|
+
const start = "Start";
|
|
1671
|
+
const pause = "Pause";
|
|
1672
|
+
const resume = "Resume";
|
|
1673
|
+
const meditate = "Meditate for";
|
|
1674
|
+
const minutes = "minutes.";
|
|
1675
|
+
const seconds = " seconds. ";
|
|
1676
|
+
const EN$3 = {
|
|
1677
|
+
start: start,
|
|
1678
|
+
pause: pause,
|
|
1679
|
+
resume: resume,
|
|
1680
|
+
meditate: meditate,
|
|
1681
|
+
minutes: minutes,
|
|
1682
|
+
seconds: seconds
|
|
1683
|
+
};
|
|
1684
|
+
|
|
1685
|
+
const meditationCss = "ldf-heading.sc-ldf-meditation .control-container.sc-ldf-meditation,.sc-ldf-meditation-h .control-container.sc-ldf-meditation{display:block;margin:auto}ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;width:100%}ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation input.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation input.sc-ldf-meditation{text-align:center}@media (min-width: 767px){ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation{flex-direction:row}}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation{display:flex;align-items:center;justify-content:center;padding:1em}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation{width:300px;height:300px;display:flex;align-items:center;justify-content:center;border-radius:50%}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .circle-overlay.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .circle-overlay.sc-ldf-meditation{background-color:var(--ldf-background-color);display:flex;align-items:center;flex-direction:column;justify-content:center;height:92%;width:92%;border-radius:50%}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .seconds.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .seconds.sc-ldf-meditation{font-family:var(--ldf-font-face);font-size:3em}ldf-heading.sc-ldf-meditation button.clear.sc-ldf-meditation,.sc-ldf-meditation-h button.clear.sc-ldf-meditation{background-color:var(--ldf-background-color);border:none;font-size:1em}.hidden.sc-ldf-meditation{height:0;opacity:0;transition:0.25s}";
|
|
1686
|
+
|
|
1687
|
+
const LOCALE$3 = {
|
|
1688
|
+
'en': EN$3
|
|
1689
|
+
};
|
|
1690
|
+
const MeditationComponent = class {
|
|
1691
|
+
constructor(hostRef) {
|
|
1692
|
+
registerInstance(this, hostRef);
|
|
1693
|
+
this.timerChanged = createEvent(this, "timerChanged", 7);
|
|
1694
|
+
this.started = false;
|
|
1695
|
+
this.paused = false;
|
|
1696
|
+
this.startingDuration = undefined;
|
|
1697
|
+
/** Liturgical color to use in display */
|
|
1698
|
+
this.color = "#3333ff";
|
|
1699
|
+
}
|
|
1700
|
+
docChanged(newDoc) {
|
|
1701
|
+
try {
|
|
1702
|
+
if (typeof newDoc == 'string') {
|
|
1703
|
+
this.obj = new Meditation(JSON.parse(newDoc));
|
|
1704
|
+
}
|
|
1705
|
+
else {
|
|
1706
|
+
this.obj = new Meditation(newDoc);
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
catch (e) {
|
|
1710
|
+
console.warn(e);
|
|
1711
|
+
this.obj = new Meditation();
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
// Lifecycle events
|
|
1715
|
+
async componentWillLoad() {
|
|
1716
|
+
// parse doc we're passed
|
|
1717
|
+
this.docChanged(this.doc);
|
|
1718
|
+
this.loadLocaleStrings();
|
|
1719
|
+
// start the timer
|
|
1720
|
+
if (this.autostart) {
|
|
1721
|
+
this.secondsRemaining = this.obj.metadata.length;
|
|
1722
|
+
this.start();
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
// Public methods
|
|
1726
|
+
/** Start the timer, either with a given value of seconds or with the number passed in the Meditation object metadata */
|
|
1727
|
+
async start(value = undefined) {
|
|
1728
|
+
var _a, _b;
|
|
1729
|
+
const metadata = (_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) !== null && _b !== void 0 ? _b : { length: 300, delay: 0 }, seconds = value || metadata.length, delay = metadata.delay;
|
|
1730
|
+
this.secondsRemaining = seconds;
|
|
1731
|
+
this.startingDuration = seconds;
|
|
1732
|
+
// Start the timer after the delay
|
|
1733
|
+
setTimeout(() => {
|
|
1734
|
+
this.startTimer();
|
|
1735
|
+
this.started = true;
|
|
1736
|
+
}, delay);
|
|
1737
|
+
// Emit event that it's running, after the delay
|
|
1738
|
+
setTimeout(() => {
|
|
1739
|
+
this.timerChanged.emit('start');
|
|
1740
|
+
}, delay);
|
|
1741
|
+
}
|
|
1742
|
+
/** Pause the timer */
|
|
1743
|
+
async pause() {
|
|
1744
|
+
this.paused = true;
|
|
1745
|
+
this.stopTimer();
|
|
1746
|
+
}
|
|
1747
|
+
/** Resume the timer */
|
|
1748
|
+
async resume() {
|
|
1749
|
+
this.paused = false;
|
|
1750
|
+
this.startTimer();
|
|
1751
|
+
this.timerChanged.emit('resume');
|
|
1752
|
+
}
|
|
1753
|
+
/** Rewind the timer to its initial value and restart it */
|
|
1754
|
+
async rewind() {
|
|
1755
|
+
this.pause(); // pause and clear the timer
|
|
1756
|
+
this.stopTimer();
|
|
1757
|
+
this.start(); // starts with the value passed
|
|
1758
|
+
this.timerChanged.emit('rewind');
|
|
1759
|
+
}
|
|
1760
|
+
/** Returns the total duration this timer is running for. */
|
|
1761
|
+
async duration() {
|
|
1762
|
+
return this.startingDuration;
|
|
1763
|
+
}
|
|
1764
|
+
/** Reset the selector for length of time */
|
|
1765
|
+
async reset() {
|
|
1766
|
+
await this.pause();
|
|
1767
|
+
this.secondsRemaining = undefined;
|
|
1768
|
+
}
|
|
1769
|
+
// Private methods
|
|
1770
|
+
async loadLocaleStrings() {
|
|
1771
|
+
try {
|
|
1772
|
+
this.localeStrings = LOCALE$3[getComponentClosestLanguage(this.element)];
|
|
1773
|
+
}
|
|
1774
|
+
catch (e) {
|
|
1775
|
+
console.warn(e);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
minutesSeconds(value) {
|
|
1779
|
+
const negative = value < 0, minutes = Math.floor(Math.abs(value / 60));
|
|
1780
|
+
return `${negative ? '-' : ''}${minutes.toString().padStart(2, '0')}:${Math.abs((value - minutes * 60)).toString().padStart(2, '0')}`;
|
|
1781
|
+
}
|
|
1782
|
+
startTimer() {
|
|
1783
|
+
this.timerId = setInterval(() => {
|
|
1784
|
+
this.secondsRemaining--;
|
|
1785
|
+
if (this.secondsRemaining == 0) {
|
|
1786
|
+
this.timerChanged.emit('complete');
|
|
1787
|
+
this.startingDuration = undefined;
|
|
1788
|
+
}
|
|
1789
|
+
else {
|
|
1790
|
+
this.timerChanged.emit(this.secondsRemaining);
|
|
1791
|
+
}
|
|
1792
|
+
}, 1000);
|
|
1793
|
+
}
|
|
1794
|
+
stopTimer() {
|
|
1795
|
+
if (this.timerId) {
|
|
1796
|
+
clearInterval(this.timerId);
|
|
1797
|
+
}
|
|
1798
|
+
// tell the listener to stop audio, controls, etc.
|
|
1799
|
+
this.timerChanged.emit('pause');
|
|
1800
|
+
}
|
|
1801
|
+
handleControlSubmit(e) {
|
|
1802
|
+
e.preventDefault();
|
|
1803
|
+
}
|
|
1804
|
+
handleControlValue(e) {
|
|
1805
|
+
var _a, _b, _c;
|
|
1806
|
+
// Blank values are bad -- replace with 0
|
|
1807
|
+
let value = e.target.value;
|
|
1808
|
+
if (value == '') {
|
|
1809
|
+
value = '0';
|
|
1810
|
+
}
|
|
1811
|
+
// Apply directly to the object and refresh display
|
|
1812
|
+
Object.assign(this.obj, {
|
|
1813
|
+
metadata: Object.assign(Object.assign({}, this.obj.metadata), { length: parseInt(value) * 60 })
|
|
1814
|
+
});
|
|
1815
|
+
this.obj = new Meditation(this.obj);
|
|
1816
|
+
this.secondsRemaining = (_c = (_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
|
|
1817
|
+
}
|
|
1818
|
+
buttonNode(handler, label, icon, fill = 'clear', size = 'large') {
|
|
1819
|
+
const localeStrings = this.localeStrings || {};
|
|
1820
|
+
if (customElements && !!customElements.get('ion-button')) {
|
|
1821
|
+
return (h("ion-button", { onClick: handler, fill: fill, size: size }, h("ion-icon", { name: icon, slot: 'start' }), h("ion-label", null, localeStrings[label])));
|
|
1822
|
+
}
|
|
1823
|
+
else {
|
|
1824
|
+
return (h("button", { onClick: handler, class: fill, style: { color: this.color } }, localeStrings[label]));
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
// Render
|
|
1828
|
+
render() {
|
|
1829
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1830
|
+
const localeStrings = this.localeStrings || {};
|
|
1831
|
+
const length = (_c = (_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 300, progressAmount = this.secondsRemaining / length, progressPercent = progressAmount * 100;
|
|
1832
|
+
//console.log('meditation', length, progressAmount, progressPercent)
|
|
1833
|
+
return (this.editable
|
|
1834
|
+
? h(Host, null, h("form", { class: 'controls', onSubmit: (e) => this.handleControlSubmit(e) }, h("span", null, localeStrings.meditate), h("ldf-editable-text", { inputType: "number", short: true, path: `${this.path}/metadata/length`, text: (_g = ((_f = (_e = (_d = this.obj) === null || _d === void 0 ? void 0 : _d.metadata) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 300)) === null || _g === void 0 ? void 0 : _g.toString() }), h("span", null, localeStrings.seconds), h("span", null, "(", Math.floor(length / 60), ":", Math.floor(length % 60).toString().padStart(2, '0'), ")")))
|
|
1835
|
+
: h(Host, null, h("div", { class: { 'control-container': true, 'hidden': !!this.secondsRemaining } }, h("form", { class: 'controls', onSubmit: (e) => this.handleControlSubmit(e) }, this.buttonNode(() => this.start(), 'meditate', 'sunny', 'solid', 'small'), h("input", { type: 'number', value: length / 60, onInput: (e) => this.handleControlValue(e) }), h("span", null, localeStrings.minutes))), h("div", { class: { 'hidden': !this.secondsRemaining } }, h("div", { class: 'progress-circle-container' }, h("div", { class: 'progress-circle', style: { background: `conic-gradient(${this.color} ${100 - progressPercent}%, 0, #ecf0f1 ${progressPercent}%)` } }, h("div", { class: 'circle-overlay' }, h("div", { class: 'seconds' }, this.minutesSeconds(this.secondsRemaining)), h("div", { class: 'controls' }, !this.started && this.buttonNode(() => this.start(), 'start', 'start'), this.started && !this.paused && this.buttonNode(() => this.pause(), 'pause', 'pause'), this.started && this.paused && this.buttonNode(() => this.resume(), 'resume', 'play'))))))));
|
|
1836
|
+
}
|
|
1837
|
+
get element() { return getElement(this); }
|
|
1838
|
+
static get watchers() { return {
|
|
1839
|
+
"doc": ["docChanged"]
|
|
1840
|
+
}; }
|
|
1841
|
+
};
|
|
1842
|
+
MeditationComponent.style = meditationCss;
|
|
1843
|
+
|
|
1844
|
+
const option = "Option";
|
|
1845
|
+
const EN$2 = {
|
|
1846
|
+
option: option
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1849
|
+
const optionCss = ".select-control.sc-ldf-option{margin-top:var(--ldf-select-control-margin-top)}ion-select.sc-ldf-option{width:75vw;max-width:300px}";
|
|
1850
|
+
|
|
1851
|
+
const LOCALE$2 = {
|
|
1852
|
+
'en': EN$2
|
|
1853
|
+
};
|
|
1854
|
+
const OptionComponent = class {
|
|
1855
|
+
constructor(hostRef) {
|
|
1856
|
+
registerInstance(this, hostRef);
|
|
1857
|
+
this.ldfAddOptionToDoc = createEvent(this, "ldfAddOptionToDoc", 7);
|
|
1858
|
+
this.ldfDocShouldChange = createEvent(this, "ldfDocShouldChange", 7);
|
|
1859
|
+
this.ldfOptionAskForStoredSelection = createEvent(this, "ldfOptionAskForStoredSelection", 7);
|
|
1860
|
+
this.ldfOptionMakeSelection = createEvent(this, "ldfOptionMakeSelection", 7);
|
|
1861
|
+
}
|
|
1862
|
+
docChanged(newDoc) {
|
|
1863
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1864
|
+
try {
|
|
1865
|
+
if (typeof newDoc == 'string') {
|
|
1866
|
+
this.obj = new Option(JSON.parse(newDoc));
|
|
1867
|
+
}
|
|
1868
|
+
else {
|
|
1869
|
+
this.obj = new Option(newDoc);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
catch (e) {
|
|
1873
|
+
console.warn(e);
|
|
1874
|
+
this.obj = new Option();
|
|
1875
|
+
}
|
|
1876
|
+
const selected = this.editable
|
|
1877
|
+
? (_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
|
|
1878
|
+
: (_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;
|
|
1879
|
+
this.select(selected);
|
|
1880
|
+
if (!((_k = this.obj) === null || _k === void 0 ? void 0 : _k.value) || !this.obj.value[selected] || !this.obj.value[selected].value) {
|
|
1881
|
+
this.selectFirstDefined();
|
|
1882
|
+
}
|
|
1883
|
+
this.filterOptions();
|
|
1884
|
+
}
|
|
1885
|
+
// Lifecycle events
|
|
1886
|
+
componentWillLoad() {
|
|
1887
|
+
this.docChanged(this.doc);
|
|
1888
|
+
this.loadLocaleStrings();
|
|
1889
|
+
this.ldfOptionAskForStoredSelection.emit({ el: this.el });
|
|
1890
|
+
}
|
|
1891
|
+
/** Asynchronously load localization strings */
|
|
1892
|
+
async loadLocaleStrings() {
|
|
1893
|
+
try {
|
|
1894
|
+
this.localeStrings = LOCALE$2[getComponentClosestLanguage(this.el)];
|
|
1895
|
+
}
|
|
1896
|
+
catch (e) {
|
|
1897
|
+
console.warn(e);
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
/** Display the nth option */
|
|
1901
|
+
async select(index, resultedFromUserAction = false) {
|
|
1902
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1903
|
+
if (((_a = this.obj) === null || _a === void 0 ? void 0 : _a.slug) && typeof index === 'number' && resultedFromUserAction) {
|
|
1904
|
+
this.ldfOptionMakeSelection.emit({ slug: (_b = this.obj) === null || _b === void 0 ? void 0 : _b.slug, index });
|
|
1905
|
+
}
|
|
1906
|
+
const 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;
|
|
1907
|
+
if (Number(index) >= 0) {
|
|
1908
|
+
//this.selectedDoc = this.obj.value.filter(child => Boolean(child))[index];
|
|
1909
|
+
if ((_f = this.obj) === null || _f === void 0 ? void 0 : _f.metadata) {
|
|
1910
|
+
this.obj.metadata.selected = Number(index);
|
|
1911
|
+
this.obj.metadata.editor_selected = Number(index);
|
|
1912
|
+
}
|
|
1913
|
+
else {
|
|
1914
|
+
this.obj.metadata = { selected: Number(index), editor_selected: Number(index) };
|
|
1915
|
+
}
|
|
1916
|
+
this.obj = new Option(Object.assign({}, this.obj));
|
|
1917
|
+
// only change the selection at this point if it's not editable
|
|
1918
|
+
// if it's editable, the editor will control when it changes
|
|
1919
|
+
if (resultedFromUserAction && !this.editable) {
|
|
1920
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
1921
|
+
path: `${this.path}/metadata`,
|
|
1922
|
+
op: [{
|
|
1923
|
+
type: 'set',
|
|
1924
|
+
index: 'selected',
|
|
1925
|
+
oldValue,
|
|
1926
|
+
value: Number(index)
|
|
1927
|
+
}]
|
|
1928
|
+
}));
|
|
1929
|
+
}
|
|
1930
|
+
if (this.editable) {
|
|
1931
|
+
if (hadMetadata && index !== oldValue) {
|
|
1932
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
1933
|
+
path: `${this.path}/metadata`,
|
|
1934
|
+
op: [{
|
|
1935
|
+
type: 'set',
|
|
1936
|
+
index: 'editor_selected',
|
|
1937
|
+
oldValue,
|
|
1938
|
+
value: Number(index)
|
|
1939
|
+
}]
|
|
1940
|
+
}));
|
|
1941
|
+
}
|
|
1942
|
+
else if (!hadMetadata && index !== oldValue) {
|
|
1943
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
1944
|
+
path: `${this.path}`,
|
|
1945
|
+
op: [{
|
|
1946
|
+
type: 'set',
|
|
1947
|
+
index: 'metadata',
|
|
1948
|
+
value: { editor_selected: Number(index) }
|
|
1949
|
+
}]
|
|
1950
|
+
}));
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
// sets metadata.selected to new index, and creates objects along the way if undefined
|
|
1954
|
+
// without overriding any other metadata fields
|
|
1955
|
+
Object.assign(this.obj, { metadata: Object.assign(Object.assign({}, this.obj.metadata), { selected: index }) });
|
|
1956
|
+
Object.assign(this.obj, { metadata: Object.assign(Object.assign({}, this.obj.metadata), { editor_selected: index }) });
|
|
1957
|
+
}
|
|
1958
|
+
else if (index === 'add') {
|
|
1959
|
+
this.ldfAddOptionToDoc.emit({
|
|
1960
|
+
base: this.path,
|
|
1961
|
+
index: (_h = (_g = this.obj) === null || _g === void 0 ? void 0 : _g.value) === null || _h === void 0 ? void 0 : _h.length,
|
|
1962
|
+
obj: this.obj
|
|
1963
|
+
});
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
// Private methods
|
|
1967
|
+
onSelectChange(ev) {
|
|
1968
|
+
const target = ev.target, value = parseInt(target.value);
|
|
1969
|
+
this.select(value, true);
|
|
1970
|
+
}
|
|
1971
|
+
selectFirstDefined() {
|
|
1972
|
+
const first = this.obj.value.find(opt => (opt === null || opt === void 0 ? void 0 : opt.value) !== undefined), index = this.obj.value.filter(child => Boolean(child)).indexOf(first);
|
|
1973
|
+
this.select(index);
|
|
1974
|
+
}
|
|
1975
|
+
filterOptions() {
|
|
1976
|
+
var _a;
|
|
1977
|
+
if (this.obj) {
|
|
1978
|
+
this.obj = new Option(Object.assign(Object.assign({}, this.obj), { value: (((_a = this.obj) === null || _a === void 0 ? void 0 : _a.value) || []).filter(entry => {
|
|
1979
|
+
return this.editable || (Boolean(entry) && (Boolean(entry.value) || Boolean((entry === null || entry === void 0 ? void 0 : entry.type) === "bible-reading" && entry.citation)));
|
|
1980
|
+
}) }));
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
// Render helpers
|
|
1984
|
+
/** Return an Ionic Select or Segment element if available, otherwise a vanilla HTML Select Element */
|
|
1985
|
+
selectNode() {
|
|
1986
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
1987
|
+
const 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;
|
|
1988
|
+
if (((_l = (_k = this.obj) === null || _k === void 0 ? void 0 : _k.value) === null || _l === void 0 ? void 0 : _l.length) > 1 || this.editable) {
|
|
1989
|
+
// Ionic available and
|
|
1990
|
+
if (customElements && !!customElements.get('ion-select')) {
|
|
1991
|
+
const optionsAreLong = (((_m = this.obj) === null || _m === void 0 ? void 0 : _m.value) || [])
|
|
1992
|
+
.map((option, optionIndex) => { var _a; return ((_a = this.versionLabel(option, optionIndex)) === null || _a === void 0 ? void 0 : _a.length) > 20; })
|
|
1993
|
+
.reduce((a, b) => a || b, false);
|
|
1994
|
+
// <= 3, short options
|
|
1995
|
+
if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 3) {
|
|
1996
|
+
return (h("ion-segment", { color: "primary", value: currentlySelected.toString() }, (_p = this.obj) === null || _p === void 0 ? void 0 :
|
|
1997
|
+
_p.value.map((option, optionIndex) => h("ion-segment-button", { value: optionIndex.toString(), onClick: () => this.select(optionIndex, true) }, h("ion-label", null, this.versionLabel(option, optionIndex)))), this.editable && h("ion-segment-button", { value: 'add', class: 'add', onClick: () => this.select('add', true) }, h("ion-label", null, "+"))));
|
|
1998
|
+
}
|
|
1999
|
+
// >2 options, or options are longish
|
|
2000
|
+
else {
|
|
2001
|
+
console.log('>2 or longish');
|
|
2002
|
+
return (h("ion-toolbar", null, h("ion-select", { value: currentlySelected, slot: this.editable ? 'start' : 'end', onIonChange: e => this.select(Number(e.detail.value), true) }, (_q = this.obj) === null || _q === void 0 ? void 0 : _q.value.map((option, optionIndex) => h("ion-select-option", { value: optionIndex }, h("ion-label", null, this.versionLabel(option, optionIndex))))), this.editable && h("ion-buttons", { slot: 'end' }, h("ion-button", { onClick: () => this.select('add', true) }, h("ion-icon", { slot: 'icon-only', name: 'add' })))));
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
// Ionic not availabe
|
|
2006
|
+
else {
|
|
2007
|
+
return (h("ldf-label-bar", null, h("select", { onInput: ev => this.onSelectChange(ev), slot: this.editable ? 'start' : 'end' }, (_r = this.obj) === null || _r === void 0 ? void 0 : _r.value.map((option, optionIndex) => h("option", { value: optionIndex, selected: optionIndex == currentlySelected }, this.versionLabel(option, optionIndex)))), this.editable && h("button", { slot: 'end', onClick: () => this.select('add', true) }, "+")));
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
else {
|
|
2011
|
+
return [];
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
versionLabel(option, index) {
|
|
2015
|
+
try {
|
|
2016
|
+
return this.obj.getVersionLabel(option);
|
|
2017
|
+
}
|
|
2018
|
+
catch (e) {
|
|
2019
|
+
console.warn(e);
|
|
2020
|
+
return `${(this.localeStrings || {}).option} ${index + 1}`;
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
// Render
|
|
2024
|
+
render() {
|
|
2025
|
+
var _a;
|
|
2026
|
+
//console.log('ldf-option (render) ', this.obj?.metadata.selected, this.obj.value, this.selectedDoc)
|
|
2027
|
+
const selectedIndex = this.editable ? (_a = this.obj.metadata.editor_selected) !== null && _a !== void 0 ? _a : this.obj.metadata.selected : this.obj.metadata.selected;
|
|
2028
|
+
return (h(Host, { lang: this.obj.language }, h("div", { class: 'select-control' }, h("ldf-label-bar", null, this.selectNode())), (this.obj.value || this.editable) && h("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' })));
|
|
2029
|
+
}
|
|
2030
|
+
get el() { return getElement(this); }
|
|
2031
|
+
static get watchers() { return {
|
|
2032
|
+
"doc": ["docChanged"]
|
|
2033
|
+
}; }
|
|
2034
|
+
};
|
|
2035
|
+
OptionComponent.style = optionCss;
|
|
2036
|
+
|
|
2037
|
+
const changeCanticle = "Change Canticle";
|
|
2038
|
+
const citation$1 = "(Biblical) Citation";
|
|
2039
|
+
const label$1 = "Label";
|
|
2040
|
+
const latinname = "Latin Name";
|
|
2041
|
+
const section_break_insert = "+ insert section break";
|
|
2042
|
+
const section_break_remove = "x remove section break";
|
|
2043
|
+
const source$1 = "Source";
|
|
2044
|
+
const source_citation = "Citation";
|
|
2045
|
+
const EN$1 = {
|
|
2046
|
+
changeCanticle: changeCanticle,
|
|
2047
|
+
citation: citation$1,
|
|
2048
|
+
label: label$1,
|
|
2049
|
+
latinname: latinname,
|
|
2050
|
+
section_break_insert: section_break_insert,
|
|
2051
|
+
section_break_remove: section_break_remove,
|
|
2052
|
+
source: source$1,
|
|
2053
|
+
source_citation: source_citation
|
|
2054
|
+
};
|
|
2055
|
+
|
|
2056
|
+
const psalmCss = "ldf-psalm.sc-ldf-psalm,.sc-ldf-psalm-h{font-family:var(--ldf-font-face);--ldf-drop-margin-right:var(--ldf-drop-psalm-margin-right)}ldf-psalm[lang=he].sc-ldf-psalm .verse.sc-ldf-psalm,[lang=he].sc-ldf-psalm-h .verse.sc-ldf-psalm{text-align:right;--ldf-drop-float:right}.psalm-set.sc-ldf-psalm{margin-top:0.5em;margin-bottom:0.5em}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm{display:var(--ldf-psalm-grid-display);grid-template-columns:var(--ldf-psalm-grid-template-columns);grid-template-rows:auto;grid-template-areas:var(--ldf-psalm-grid-template-areas);margin:0;text-indent:var(--ldf-psalm-verse-indentation)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm br.sc-ldf-psalm{display:var(--ldf-psalm-line-break-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm sup.sc-ldf-psalm{float:var(--ldf-psalm-number-float);display:var(--ldf-psalm-number-display);grid-area:var(--ldf-psalm-number-grid-area);margin-right:var(--ldf-psalm-number-margin-right)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .text.sc-ldf-psalm{display:var(--ldf-psalm-text-display);grid-area:var(--ldf-psalm-text-grid-area)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{margin-left:var(--ldf-psalm-halfverse-margin-left)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .verse.sc-ldf-psalm,.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{display:var(--ldf-psalm-verse-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{display:var(--ldf-psalm-halfverse-display, var(--ldf-psalm-verse-display))}.editable.sc-ldf-psalm .verse.sc-ldf-psalm,.editable.sc-ldf-psalm .halfverse.sc-ldf-psalm{width:100%}.psalm-parent.no-numbers.sc-ldf-psalm{display:block;text-align:left;grid-template-columns:none;grid-template-rows:none;grid-template-areas:none}.psalm-parent.no-numbers.sc-ldf-psalm .psalm.sc-ldf-psalm{display:block;grid-template-columns:none;grid-template-rows:none;grid-template-areas:none}.psalm-parent.no-numbers.sc-ldf-psalm .psalm.sc-ldf-psalm .text.sc-ldf-psalm{text-align:left;grid-area:none;display:var(--ldf-psalm-text-display);width:100%}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) sup.sc-ldf-psalm{display:var(--ldf-psalm-set-first-verse-number-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .verse.sc-ldf-psalm:nth-of-type(1){display:var(--ldf-psalm-set-first-verse-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .halfverse.sc-ldf-psalm:nth-of-type(2){display:var(--ldf-psalm-set-first-half-verse-display, inline-block)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) sup.sc-ldf-psalm{display:var(--ldf-psalm-first-verse-number-display)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .verse.sc-ldf-psalm:nth-of-type(1){display:var(--ldf-psalm-first-verse-display)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .halfverse.sc-ldf-psalm:nth-of-type(2){display:var(--ldf-psalm-first-half-verse-display, inline-block)}.antiphon.sc-ldf-psalm{display:var(--ldf-psalm-antiphon-display);font-style:var(--ldf-antiphon-font-style);font-weight:var(--ldf-antiphon-font-weight);margin-top:0.5em}.repeat-antiphon.sc-ldf-psalm{display:var(--ldf-psalm-repeat-antiphon-display)}h5.sc-ldf-psalm{font-size:1em;font-style:italic;font-weight:normal;margin-right:1em}.psalm.unison.sc-ldf-psalm .text.sc-ldf-psalm{font-weight:var(--ldf-unison-font-weight);font-style:var(--ldf-unison-font-style)}.psalm.omit.sc-ldf-psalm .text.sc-ldf-psalm{display:none}.psalm.wholeverse.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-child(even),.psalm-parent.wholeverse.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-child(even){font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.psalm.halfverse.sc-ldf-psalm .halfverse.sc-ldf-psalm,.psalm-parent.halfverse.sc-ldf-psalm .halfverse.sc-ldf-psalm{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}h3.editable-label.sc-ldf-psalm{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.section-break.sc-ldf-psalm{display:block;text-align:center;width:100%}.section-break.hidden.sc-ldf-psalm{display:none}";
|
|
2057
|
+
|
|
2058
|
+
const LOCALE$1 = {
|
|
2059
|
+
'en': EN$1,
|
|
2060
|
+
};
|
|
2061
|
+
const PsalmComponent = class {
|
|
2062
|
+
constructor(hostRef) {
|
|
2063
|
+
registerInstance(this, hostRef);
|
|
2064
|
+
this.ldfAskForCanticleOptions = createEvent(this, "ldfAskForCanticleOptions", 7);
|
|
2065
|
+
this.ldfDocShouldChange = createEvent(this, "ldfDocShouldChange", 7);
|
|
2066
|
+
this.focusedVerse = undefined;
|
|
2067
|
+
this.focusedSection = undefined;
|
|
2068
|
+
}
|
|
2069
|
+
docChanged(newDoc) {
|
|
2070
|
+
try {
|
|
2071
|
+
if (typeof newDoc == 'string') {
|
|
2072
|
+
this.obj = new Psalm(JSON.parse(newDoc));
|
|
2073
|
+
}
|
|
2074
|
+
else {
|
|
2075
|
+
this.obj = new Psalm(newDoc);
|
|
2076
|
+
}
|
|
2077
|
+
this.filter();
|
|
2078
|
+
}
|
|
2079
|
+
catch (e) {
|
|
2080
|
+
console.warn(e);
|
|
2081
|
+
this.obj = new Psalm();
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
// Lifecycle events
|
|
2085
|
+
async componentWillLoad() {
|
|
2086
|
+
this.docChanged(this.doc);
|
|
2087
|
+
this.loadLocaleStrings();
|
|
2088
|
+
this.filter();
|
|
2089
|
+
}
|
|
2090
|
+
// Private methods
|
|
2091
|
+
async loadLocaleStrings() {
|
|
2092
|
+
try {
|
|
2093
|
+
this.localeStrings = LOCALE$1[getComponentClosestLanguage(this.element)];
|
|
2094
|
+
}
|
|
2095
|
+
catch (e) {
|
|
2096
|
+
console.warn(e);
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
async changeCanticle() {
|
|
2100
|
+
const modal = await modalController.create({
|
|
2101
|
+
component: 'ldf-editable-filter-documents',
|
|
2102
|
+
});
|
|
2103
|
+
modal.componentProps = {
|
|
2104
|
+
modal,
|
|
2105
|
+
type: "canticle",
|
|
2106
|
+
changeCallback: (doc) => {
|
|
2107
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
2108
|
+
path: this.path,
|
|
2109
|
+
op: [{
|
|
2110
|
+
type: 'set',
|
|
2111
|
+
oldValue: this.obj,
|
|
2112
|
+
value: doc
|
|
2113
|
+
}]
|
|
2114
|
+
}));
|
|
2115
|
+
}
|
|
2116
|
+
};
|
|
2117
|
+
await modal.present();
|
|
2118
|
+
this.ldfAskForCanticleOptions.emit(this.path);
|
|
2119
|
+
}
|
|
2120
|
+
async filter() {
|
|
2121
|
+
this.filteredValue = this.obj.filteredVerses();
|
|
2122
|
+
}
|
|
2123
|
+
// Render helpers
|
|
2124
|
+
antiphonNode(antiphon, notEditable = false) {
|
|
2125
|
+
var _a, _b;
|
|
2126
|
+
if (typeof antiphon == 'string') {
|
|
2127
|
+
const refrain = new Refrain({ type: 'refrain', value: [antiphon], style: 'antiphon' });
|
|
2128
|
+
return h("ldf-refrain", { class: 'antiphon', doc: refrain, editable: this.editable && !notEditable, path: `${this.path}/metadata/antiphon` });
|
|
2129
|
+
}
|
|
2130
|
+
else if (antiphon === null || antiphon === void 0 ? void 0 : antiphon.type) {
|
|
2131
|
+
return h("ldf-liturgical-document", { class: 'antiphon', doc: antiphon, path: `${this.path}/metadata/antiphon`, editable: this.editable && !notEditable });
|
|
2132
|
+
}
|
|
2133
|
+
else if (typeof antiphon == 'object') {
|
|
2134
|
+
// antiphon is something like an O antiphon tree:
|
|
2135
|
+
// dates can be either MM/DD or MM-DD
|
|
2136
|
+
// { '12/23': '...', '12/24': '...' }
|
|
2137
|
+
const date = this.obj.day ? dateFromYMDString((_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.day) === null || _b === void 0 ? void 0 : _b.date) : new Date();
|
|
2138
|
+
return this.antiphonNode(antiphon[`${date.getMonth() + 1}/${date.getDate()}`] || antiphon[`${date.getMonth() + 1}-${date.getDate()}`], true);
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
gloriaNode(gloria) {
|
|
2142
|
+
if (typeof gloria == 'string') {
|
|
2143
|
+
const refrain = new Refrain({ value: [gloria], style: 'gloria' });
|
|
2144
|
+
return h("ldf-liturgical-document", { doc: refrain, editable: this.editable });
|
|
2145
|
+
}
|
|
2146
|
+
else {
|
|
2147
|
+
return h("ldf-liturgical-document", { doc: gloria, editable: this.editable });
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
headingNode(value = undefined, level = 3, showLatinName = true, omitCitation = false, omitSource = false) {
|
|
2151
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
2152
|
+
let label = this.obj.label;
|
|
2153
|
+
if (this.obj.style == 'canticle' && this.obj.metadata && this.obj.metadata.number && this.obj.metadata.localname) {
|
|
2154
|
+
label = `${this.obj.metadata.number}. ${this.obj.metadata.localname}`;
|
|
2155
|
+
}
|
|
2156
|
+
else if (this.obj.style == 'canticle' && this.obj.metadata && this.obj.metadata.localname) {
|
|
2157
|
+
label = this.obj.metadata.localname;
|
|
2158
|
+
}
|
|
2159
|
+
const heading = new Heading({
|
|
2160
|
+
type: 'heading',
|
|
2161
|
+
metadata: { level },
|
|
2162
|
+
citation: !omitCitation && ((_a = this.obj) === null || _a === void 0 ? void 0 : _a.citation) !== ((_b = this.obj) === null || _b === void 0 ? void 0 : _b.label) ? (_c = this.obj) === null || _c === void 0 ? void 0 : _c.citation : undefined,
|
|
2163
|
+
value: [value !== null && value !== void 0 ? value : label],
|
|
2164
|
+
source: omitSource ? undefined : (_d = this.obj) === null || _d === void 0 ? void 0 : _d.source
|
|
2165
|
+
});
|
|
2166
|
+
return (this.editable
|
|
2167
|
+
? [
|
|
2168
|
+
h("ldf-label-bar", null, h("h3", { slot: "start", class: "editable-label" }, h("ldf-editable-text", { id: "label", text: (_e = this.obj) === null || _e === void 0 ? void 0 : _e.label, path: `${this.path}/label`, placeholder: (_f = this.localeStrings) === null || _f === void 0 ? void 0 : _f.label })), ((_g = this.obj) === null || _g === void 0 ? void 0 : _g.metadata) && h("ldf-editable-text", { id: "latinname", text: (_j = (_h = this.obj) === null || _h === void 0 ? void 0 : _h.metadata) === null || _j === void 0 ? void 0 : _j.latinname, path: `${this.path}/metadata/latinname`, placeholder: (_k = this.localeStrings) === null || _k === void 0 ? void 0 : _k.latinname }), h("ldf-editable-text", { slot: "end", id: "source-source", text: (_m = (_l = this.obj) === null || _l === void 0 ? void 0 : _l.source) === null || _m === void 0 ? void 0 : _m.source, path: `${this.path}/source/source`, placeholder: (_o = this.localeStrings) === null || _o === void 0 ? void 0 : _o.source }), h("ldf-editable-text", { slot: "end", id: "source-citation", text: (_q = (_p = this.obj) === null || _p === void 0 ? void 0 : _p.source) === null || _q === void 0 ? void 0 : _q.citation, path: `${this.path}/source/citation`, placeholder: (_r = this.localeStrings) === null || _r === void 0 ? void 0 : _r.source_citation })),
|
|
2169
|
+
h("ldf-label-bar", null, h("ldf-editable-text", { slot: "start", id: "citation", text: (_s = this.obj) === null || _s === void 0 ? void 0 : _s.citation, path: `${this.path}/citation`, placeholder: (_t = this.localeStrings) === null || _t === void 0 ? void 0 : _t.citation }))
|
|
2170
|
+
]
|
|
2171
|
+
: h("ldf-heading", { doc: heading }, showLatinName && h("h5", { slot: 'additional' }, (_v = (_u = this.obj) === null || _u === void 0 ? void 0 : _u.metadata) === null || _v === void 0 ? void 0 : _v.latinname)));
|
|
2172
|
+
}
|
|
2173
|
+
insertSectionBreakAfterVerse(sectionIndex, verseIndex) {
|
|
2174
|
+
const section = this.obj.value[sectionIndex], remainingVerses = section.value.slice(0, verseIndex + 1), movingVerses = section.value.slice(verseIndex + 1);
|
|
2175
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
2176
|
+
path: `${this.path}/value/${sectionIndex}`,
|
|
2177
|
+
op: [{
|
|
2178
|
+
type: 'set',
|
|
2179
|
+
oldValue: section,
|
|
2180
|
+
value: Object.assign(Object.assign({}, section), { value: remainingVerses })
|
|
2181
|
+
}]
|
|
2182
|
+
}));
|
|
2183
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
2184
|
+
path: `${this.path}/value`,
|
|
2185
|
+
op: [{
|
|
2186
|
+
type: 'insertAt',
|
|
2187
|
+
index: sectionIndex + 1,
|
|
2188
|
+
oldValue: section,
|
|
2189
|
+
value: Object.assign(Object.assign({}, section), { value: movingVerses })
|
|
2190
|
+
}]
|
|
2191
|
+
}));
|
|
2192
|
+
}
|
|
2193
|
+
removeSectionBreakAfter(sectionIndex) {
|
|
2194
|
+
const thisSection = this.obj.value[sectionIndex], nextSection = this.obj.value[sectionIndex + 1];
|
|
2195
|
+
if (thisSection && nextSection) {
|
|
2196
|
+
const combinedValue = thisSection.value.concat(nextSection.value);
|
|
2197
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
2198
|
+
path: `${this.path}/value/${sectionIndex}/value`,
|
|
2199
|
+
op: [{
|
|
2200
|
+
type: 'set',
|
|
2201
|
+
oldValue: thisSection.value,
|
|
2202
|
+
value: combinedValue
|
|
2203
|
+
}]
|
|
2204
|
+
}));
|
|
2205
|
+
this.ldfDocShouldChange.emit(new Change({
|
|
2206
|
+
path: `${this.path}/value`,
|
|
2207
|
+
op: [{
|
|
2208
|
+
type: 'deleteAt',
|
|
2209
|
+
index: sectionIndex + 1,
|
|
2210
|
+
oldValue: nextSection
|
|
2211
|
+
}]
|
|
2212
|
+
}));
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
// Render
|
|
2216
|
+
render() {
|
|
2217
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
2218
|
+
const includeAntiphon = this.obj.includeAntiphon();
|
|
2219
|
+
// create blank psalm verse pattern
|
|
2220
|
+
let pattern, templateMaker = (verse) => ({ type: 'psalm-verse', number: '', halfverse: '', verse });
|
|
2221
|
+
if (this.editable) {
|
|
2222
|
+
pattern = Object.assign({}, (((_b = (_a = this.obj) === null || _a === void 0 ? void 0 : _a.value[0]) === null || _b === void 0 ? void 0 : _b.value[0]) || { type: 'psalm-verse', number: '', halfverse: '', verse: '' }));
|
|
2223
|
+
if (pattern.number) {
|
|
2224
|
+
pattern.number = '';
|
|
2225
|
+
}
|
|
2226
|
+
if (pattern.halfverse) {
|
|
2227
|
+
pattern.halfverse = '';
|
|
2228
|
+
}
|
|
2229
|
+
if (pattern.verse) {
|
|
2230
|
+
pattern.verse = '';
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
const noNumbers = (((_c = this.obj) === null || _c === void 0 ? void 0 : _c.value) || [])
|
|
2234
|
+
.map(section => section.value.map(verse => !Boolean(verse.number)))
|
|
2235
|
+
.flat()
|
|
2236
|
+
.reduce((a, b) => a || b, false);
|
|
2237
|
+
const localeStrings = this.localeStrings || {};
|
|
2238
|
+
return (h(Host, { lang: ((_d = this.obj) === null || _d === void 0 ? void 0 : _d.language) || 'en' }, h("div", { class: `psalm-parent ${this.editable ? 'editable' : ''} ${((_e = this.obj) === null || _e === void 0 ? void 0 : _e.display_format) || 'default'} ${noNumbers ? 'no-numbers' : ''}` }, (this.editable || ((_f = this.obj) === null || _f === void 0 ? void 0 : _f.style) === 'canticle') && h("ldf-label-bar", null, h("slot", { slot: 'end', name: 'controls' }, ((_g = this.obj) === null || _g === void 0 ? void 0 : _g.style) === 'canticle' && ((_j = (_h = this.obj) === null || _h === void 0 ? void 0 : _h.metadata) === null || _j === void 0 ? void 0 : _j.changeable) && h("ldf-label-bar", null, h("slot", { slot: 'end', name: 'controls' }, h("ion-buttons", null, h("ion-button", { onClick: () => this.changeCanticle() }, h("ion-icon", { name: "swap-horizontal", slot: "start" }), h("ion-label", null, localeStrings.changeCanticle))))))), this.headingNode(), includeAntiphon && this.antiphonNode(this.obj.metadata.antiphon), (_k = this.filteredValue) === null || _k === void 0 ? void 0 :
|
|
2239
|
+
_k.map((section, sectionIndex) => {
|
|
2240
|
+
var _a, _b, _c;
|
|
2241
|
+
return [
|
|
2242
|
+
// render a `Heading`, if this section has a `label`
|
|
2243
|
+
section.label && ((_a = section.value) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.headingNode(section.label, 4, false, true, true),
|
|
2244
|
+
// build a set of verses
|
|
2245
|
+
h("div", { class: 'psalm-set' }, section.value.map((verse, verseIndex) => {
|
|
2246
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2247
|
+
// build each verse
|
|
2248
|
+
if (verse instanceof Heading) {
|
|
2249
|
+
// for e.g., the Benedicite, Heading passed at head of section
|
|
2250
|
+
return h("ldf-heading", { doc: verse });
|
|
2251
|
+
}
|
|
2252
|
+
else {
|
|
2253
|
+
// otherwise, it's a normal psalm verse
|
|
2254
|
+
const nodes = new Array();
|
|
2255
|
+
// 1st half of verse
|
|
2256
|
+
nodes.push(h("div", { class: 'verse' }, this.editable ?
|
|
2257
|
+
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 }) :
|
|
2258
|
+
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: (verseIndex == 0 && ((_e = this.obj) === null || _e === void 0 ? void 0 : _e.language) !== "he") ? 'force' : 'disabled', index: verseIndex, fragment: this.path })));
|
|
2259
|
+
nodes.push(h("br", null));
|
|
2260
|
+
// 2nd half of verse
|
|
2261
|
+
nodes.push(h("div", { class: 'halfverse' }, this.editable ?
|
|
2262
|
+
h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-${sectionIndex}-${verseIndex}-halfverse`, text: verse.halfverse, path: `${this.path}/value/${sectionIndex}/value/${verseIndex}/halfverse`, placeholder: 'consectetur adipiscing elit.', template: pattern }) :
|
|
2263
|
+
h("ldf-string", { text: verse.halfverse, citation: { label: (_f = this.obj) === null || _f === void 0 ? void 0 : _f.label, book: ((_g = this.obj) === null || _g === void 0 ? void 0 : _g.style) === 'psalm' ? 'Psalm' : undefined, chapter: (_j = (_h = this.obj) === null || _h === void 0 ? void 0 : _h.metadata) === null || _j === void 0 ? void 0 : _j.number, verse: verse.number }, dropcap: 'disabled', fragment: this.path })));
|
|
2264
|
+
// render the verse
|
|
2265
|
+
return (h("p", { class: this.editable ? 'psalm editable' : 'psalm', onClick: () => {
|
|
2266
|
+
this.focusedVerse = verseIndex;
|
|
2267
|
+
this.focusedSection = sectionIndex;
|
|
2268
|
+
} }, this.editable ?
|
|
2269
|
+
h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-${sectionIndex}-${verseIndex}-number`, text: verse.number, path: `${this.path}/value/${sectionIndex}/value/${verseIndex}/number`, placeholder: '#', template: pattern }) :
|
|
2270
|
+
(verse.number && h("sup", null, verse.number)), h("div", { class: 'text' }, nodes, this.editable && h("ion-button", { fill: "clear", class: { "section-break": true, "hidden": this.focusedVerse !== verseIndex || this.focusedSection !== sectionIndex }, onClick: () => this.insertSectionBreakAfterVerse(sectionIndex, verseIndex) }, localeStrings.section_break_insert))));
|
|
2271
|
+
}
|
|
2272
|
+
}), this.obj.repeatAntiphon(sectionIndex, this.filteredValue.length)
|
|
2273
|
+
&& h("div", { class: 'repeat-antiphon' }, this.antiphonNode((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.antiphon)), this.editable && this.obj.value.length > (sectionIndex + 1) && h("ion-button", { fill: "clear", class: "section-break", onClick: () => this.removeSectionBreakAfter(sectionIndex) }, localeStrings.section_break_remove))
|
|
2274
|
+
];
|
|
2275
|
+
}), ((_m = (_l = this.obj) === null || _l === void 0 ? void 0 : _l.metadata) === null || _m === void 0 ? void 0 : _m.gloria) && !this.obj.metadata.omit_gloria && this.gloriaNode(this.obj.metadata.gloria), ((((_p = (_o = this.obj) === null || _o === void 0 ? void 0 : _o.metadata) === null || _p === void 0 ? void 0 : _p.gloria) && !this.obj.metadata.omit_gloria) || (((_r = (_q = this.obj) === null || _q === void 0 ? void 0 : _q.metadata) === null || _r === void 0 ? void 0 : _r.gloria) === undefined || Boolean((_t = (_s = this.obj) === null || _s === void 0 ? void 0 : _s.metadata) === null || _t === void 0 ? void 0 : _t.omit_gloria))) && includeAntiphon && this.antiphonNode((_v = (_u = this.obj) === null || _u === void 0 ? void 0 : _u.metadata) === null || _v === void 0 ? void 0 : _v.antiphon))));
|
|
2276
|
+
}
|
|
2277
|
+
get element() { return getElement(this); }
|
|
2278
|
+
static get watchers() { return {
|
|
2279
|
+
"doc": ["docChanged"]
|
|
2280
|
+
}; }
|
|
2281
|
+
};
|
|
2282
|
+
PsalmComponent.style = psalmCss;
|
|
2283
|
+
|
|
2284
|
+
const refrainCss = "ldf-refrain.sc-ldf-refrain,.sc-ldf-refrain-h{font-family:var(--ldf-font-face);display:block}ldf-refrain.sc-ldf-refrain p.sc-ldf-refrain,.sc-ldf-refrain-h p.sc-ldf-refrain{font-style:inherit;margin-bottom:0;margin:0}.antiphon.sc-ldf-refrain{font-style:var(--ldf-antiphon-font-style)}.gloria.sc-ldf-refrain{margin-left:calc(var(--ldf-gloria-indent) / 2);text-indent:calc(var(--ldf-gloria-indent) / -2)}@media (min-width: 450px){.gloria.sc-ldf-refrain{margin-left:var(--ldf-gloria-indent);text-indent:calc(var(--ldf-gloria-indent) * -1)}.gloria.sc-ldf-refrain>p.sc-ldf-refrain:first-child{margin-left:0em}.gloria.sc-ldf-refrain>p.sc-ldf-refrain:nth-child(even){margin-left:1em}}.left.sc-ldf-refrain{text-align:left}.center.sc-ldf-refrain{text-align:center}.right.sc-ldf-refrain{text-align:right}";
|
|
2285
|
+
|
|
2286
|
+
const RefrainComponent = class {
|
|
2287
|
+
constructor(hostRef) {
|
|
2288
|
+
registerInstance(this, hostRef);
|
|
2289
|
+
}
|
|
2290
|
+
docChanged(newDoc) {
|
|
2291
|
+
try {
|
|
2292
|
+
if (typeof newDoc == 'string') {
|
|
2293
|
+
this.obj = new Refrain(JSON.parse(newDoc));
|
|
2294
|
+
}
|
|
2295
|
+
else {
|
|
2296
|
+
this.obj = new Refrain(newDoc);
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
catch (e) {
|
|
2300
|
+
console.warn(e);
|
|
2301
|
+
this.obj = new Refrain();
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
// Lifecycle events
|
|
2305
|
+
componentWillLoad() {
|
|
2306
|
+
this.docChanged(this.doc);
|
|
2307
|
+
}
|
|
2308
|
+
// Render
|
|
2309
|
+
render() {
|
|
2310
|
+
var _a, _b, _c;
|
|
2311
|
+
return (h(Host, { lang: this.obj.language }, this.editable && h("ldf-label-bar", null, h("slot", { slot: 'end', name: 'controls' })), h("div", { class: `${((_a = this.obj) === null || _a === void 0 ? void 0 : _a.style) || ''} ${((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.align) || ''}` }, this.obj.value && this.obj.value.map((para, ii) => this.editable ?
|
|
2312
|
+
h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-${ii}`, text: para, path: `${this.path}/value/${ii}` }) :
|
|
2313
|
+
h("p", { id: `${this.obj.uid || this.obj.slug}-${ii}`, innerHTML: para })))));
|
|
2314
|
+
}
|
|
2315
|
+
static get watchers() { return {
|
|
2316
|
+
"doc": ["docChanged"]
|
|
2317
|
+
}; }
|
|
2318
|
+
};
|
|
2319
|
+
RefrainComponent.style = refrainCss;
|
|
2320
|
+
|
|
2321
|
+
const label = "Label";
|
|
2322
|
+
const source = "Source";
|
|
2323
|
+
const citation = "Citation";
|
|
2324
|
+
const makeOptional = "Make Optional";
|
|
2325
|
+
const optional = "Optional";
|
|
2326
|
+
const EN = {
|
|
2327
|
+
label: label,
|
|
2328
|
+
source: source,
|
|
2329
|
+
citation: citation,
|
|
2330
|
+
makeOptional: makeOptional,
|
|
2331
|
+
optional: optional
|
|
2332
|
+
};
|
|
2333
|
+
|
|
2334
|
+
const responsivePrayerCss = ".sc-ldf-responsive-prayer-h{text-align:var(--ldf-text-align);text-justify:inter-character}.response.sc-ldf-responsive-prayer{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.preces.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer{text-align:left}.preces.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer:first-child{font-style:italic;text-align:left;padding-right:1em;vertical-align:top}.optional.sc-ldf-responsive-prayer{padding-left:0.5em;border-left:2px solid black}.line.sc-ldf-responsive-prayer{display:flex;flex-direction:row;align-items:center}.line.sc-ldf-responsive-prayer>*.sc-ldf-responsive-prayer{text-align:var(--ldf-text-align)}.editable.line.sc-ldf-responsive-prayer ldf-editable-boolean.sc-ldf-responsive-prayer{width:2em}.editable.line.sc-ldf-responsive-prayer p.sc-ldf-responsive-prayer{width:calc(100% - 2em)}.rubric.sc-ldf-responsive-prayer{font-family:var(--ldf-font-face);color:var(--ldf-rubric-color);font-style:var(--ldf-rubric-font-style);font-weight:var(--ldf-rubric-font-weight);font-size:var(--ldf-rubric-font-size)}.litany.sc-ldf-responsive-prayer{white-space:pre-wrap}.preces.sc-ldf-responsive-prayer{width:100%}.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer{display:table-row;display:var(--ldf-preces-tr-display)}.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer .cell.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer .cell.sc-ldf-responsive-prayer{display:table-cell;display:var(--ldf-preces-td-display);margin-left:var(--ldf-preces-td-margin-left)}h3.editable-label.sc-ldf-responsive-prayer{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.optional-label.sc-ldf-responsive-prayer{margin-right:0.5em}";
|
|
2335
|
+
|
|
2336
|
+
const LOCALE = {
|
|
2337
|
+
'en': EN,
|
|
2338
|
+
};
|
|
2339
|
+
const ResponsivePrayerComponent = class {
|
|
2340
|
+
constructor(hostRef) {
|
|
2341
|
+
registerInstance(this, hostRef);
|
|
2342
|
+
}
|
|
2343
|
+
docChanged(newDoc) {
|
|
2344
|
+
try {
|
|
2345
|
+
if (typeof newDoc == 'string') {
|
|
2346
|
+
this.obj = new ResponsivePrayer(JSON.parse(newDoc));
|
|
2347
|
+
}
|
|
2348
|
+
else {
|
|
2349
|
+
this.obj = new ResponsivePrayer(newDoc);
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
catch (e) {
|
|
2353
|
+
console.warn(e);
|
|
2354
|
+
this.obj = new ResponsivePrayer();
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
// Lifecycle events
|
|
2358
|
+
async componentWillLoad() {
|
|
2359
|
+
this.docChanged(this.doc);
|
|
2360
|
+
this.loadLocaleStrings();
|
|
2361
|
+
}
|
|
2362
|
+
async loadLocaleStrings() {
|
|
2363
|
+
try {
|
|
2364
|
+
this.localeStrings = LOCALE[getComponentClosestLanguage(this.element)];
|
|
2365
|
+
}
|
|
2366
|
+
catch (e) {
|
|
2367
|
+
console.warn(e);
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
// Render helpers
|
|
2371
|
+
/** renders a `ResponsivePrayerLine` as an `ldf-editable-text` */
|
|
2372
|
+
editableNode(line, index, part, template = undefined, templateMaker) {
|
|
2373
|
+
return (h("ldf-editable-text", { id: `${this.obj.uid}-${index}-${part}`, text: line[part], path: `${this.path}/value/${index}/${part}`, template: template, templateMaker: templateMaker }));
|
|
2374
|
+
}
|
|
2375
|
+
/** renders a `ResponsivePrayerLine` as an `ldf-string` */
|
|
2376
|
+
stringNode(line, index, part) {
|
|
2377
|
+
return (h("ldf-string", { citation: { label: this.obj.label }, id: `${this.obj.uid}-${index}-${part}`, text: line[part], dropcap: index == 0 ? "enabled" : "disabled", fragment: this.path }));
|
|
2378
|
+
}
|
|
2379
|
+
// Render the `response` in a litany, and handle `[Silence]` value
|
|
2380
|
+
litanyResponseStringNode(line, index) {
|
|
2381
|
+
const text = line.response || this.obj.metadata.response;
|
|
2382
|
+
if (text == '[Silence]') {
|
|
2383
|
+
return (h("span", { class: 'rubric' }, h("br", null), "Silence"));
|
|
2384
|
+
}
|
|
2385
|
+
else {
|
|
2386
|
+
return (h("span", { class: 'response' }, h("ldf-string", { citation: { label: this.obj.label }, id: `${this.obj.uid}-${index}-response`, text: text, fragment: this.path })));
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
editableHeader() {
|
|
2390
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2391
|
+
return h("ldf-label-bar", null, h("h3", { slot: "start", class: "editable-label" }, h("ldf-editable-text", { id: "label", text: (_a = this.obj) === null || _a === void 0 ? void 0 : _a.label, path: `${this.path}/label`, placeholder: (_b = this.localeStrings) === null || _b === void 0 ? void 0 : _b.label })), h("ldf-editable-text", { slot: "end", id: "source-source", text: (_d = (_c = this.obj) === null || _c === void 0 ? void 0 : _c.source) === null || _d === void 0 ? void 0 : _d.source, path: `${this.path}/source/source`, placeholder: (_e = this.localeStrings) === null || _e === void 0 ? void 0 : _e.source }), h("ldf-editable-text", { slot: "end", id: "source-citation", text: (_g = (_f = this.obj) === null || _f === void 0 ? void 0 : _f.source) === null || _g === void 0 ? void 0 : _g.citation, path: `${this.path}/source/citation`, placeholder: (_h = this.localeStrings) === null || _h === void 0 ? void 0 : _h.citation }));
|
|
2392
|
+
}
|
|
2393
|
+
// Render
|
|
2394
|
+
render() {
|
|
2395
|
+
var _a, _b, _c, _d, _e;
|
|
2396
|
+
const needsHeader = ((_a = this.obj) === null || _a === void 0 ? void 0 : _a.label) || ((_b = this.obj) === null || _b === void 0 ? void 0 : _b.citation) || ((_c = this.obj) === null || _c === void 0 ? void 0 : _c.source);
|
|
2397
|
+
if (this.obj.style == 'preces') {
|
|
2398
|
+
/* `preces` type returns a table like
|
|
2399
|
+
* V. O Lord, open our lips.
|
|
2400
|
+
* R. And our mouth shall proclaim thy praise. */
|
|
2401
|
+
const template = { label: '', text: '' }, templateMaker = (text) => ({ label: '', text });
|
|
2402
|
+
return (h(Host, { class: this.obj.style, lang: this.obj.language }, h("ldf-label-bar", null, h("slot", { slot: 'end', name: 'controls' })), !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 }) }), this.editable && needsHeader && this.editableHeader(), h("table", { class: "preces" }, this.obj.value.map((line, index) => h("tr", { class: "row" }, h("td", { class: "cell" }, this.editable ? this.editableNode(line, index, 'label', template, templateMaker) : this.stringNode(line, index, 'label')), h("td", { class: index % 2 == 0 ? 'cell' : 'cell response' }, this.editable ? this.editableNode(line, index, 'text', template, templateMaker) : this.stringNode(line, index, 'text')))))));
|
|
2403
|
+
}
|
|
2404
|
+
else if (this.obj.style == 'litany') {
|
|
2405
|
+
/* `litany`type returns prayers and responses with a break between each pair, like
|
|
2406
|
+
* That this evening may be holy, good, and peaceful,
|
|
2407
|
+
* We entreat you, O Lord.
|
|
2408
|
+
*
|
|
2409
|
+
* That your holy angels may lead us in paths of peace and goodwill,
|
|
2410
|
+
* We entreat you, O Lord. */
|
|
2411
|
+
const template = { text: '', response: ((_d = this.obj.metadata) === null || _d === void 0 ? void 0 : _d.response) || '' }, templateMaker = (text) => { var _a; return ({ text, response: ((_a = this.obj.metadata) === null || _a === void 0 ? void 0 : _a.response) || '' }); };
|
|
2412
|
+
return (h(Host, { class: this.obj.style, lang: this.obj.language }, this.editable && h("ldf-label-bar", null, h("slot", { slot: 'end', name: 'controls' })), !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 }) }), this.editable && needsHeader && this.editableHeader(), this.obj.value.map((line, index) => {
|
|
2413
|
+
var _a, _b;
|
|
2414
|
+
// Classes depending on style and whether this line is optional
|
|
2415
|
+
let classes = new Array('litany');
|
|
2416
|
+
if (line.optional) {
|
|
2417
|
+
classes.push('optional');
|
|
2418
|
+
}
|
|
2419
|
+
// Render the line
|
|
2420
|
+
return h("div", { class: { "line": true, "editable": this.editable } }, h("p", { class: classes.join(' ') }, this.editable
|
|
2421
|
+
? this.editableNode(line, index, 'text', template, templateMaker)
|
|
2422
|
+
: this.stringNode(line, index, 'text'), line.response && (this.editable ?
|
|
2423
|
+
h("span", { class: 'response' }, this.editableNode(line, index, 'response', template, templateMaker)) :
|
|
2424
|
+
[h("br", null), this.litanyResponseStringNode(line, index)]), (!line.response && ((_a = this.obj.metadata) === null || _a === void 0 ? void 0 : _a.response)) && (this.editable ?
|
|
2425
|
+
h("span", { class: 'response' }, h("ldf-editable-text", { id: `${this.obj.uid}-${index}-response`, text: this.obj.metadata.response, path: `${this.path}/response` })) :
|
|
2426
|
+
[h("br", null), this.litanyResponseStringNode(line, index)])), this.editable && h("label", { class: "optional-label", htmlFor: `optional-${index}` }, (_b = this.localeStrings) === null || _b === void 0 ? void 0 : _b.optional), this.editable && h("ldf-editable-boolean", { id: `optional-${index}`, slot: "start", path: `${this.path}/value/${index}/optional`, value: line.optional }));
|
|
2427
|
+
})));
|
|
2428
|
+
}
|
|
2429
|
+
else {
|
|
2430
|
+
/* `responsive` type returns alternating lines like
|
|
2431
|
+
* Lord, hear our prayer.
|
|
2432
|
+
* And let our cry come to you.
|
|
2433
|
+
* Let us pray. */
|
|
2434
|
+
const template = { text: '', response: ((_e = this.obj.metadata) === null || _e === void 0 ? void 0 : _e.response) || '' }, templateMaker = (text) => { var _a; return ({ text, response: ((_a = this.obj.metadata) === null || _a === void 0 ? void 0 : _a.response) || '' }); };
|
|
2435
|
+
return (h(Host, { class: this.obj.style, lang: this.obj.language }, !this.editableHeader && needsHeader && h("ldf-heading", { doc: new Heading({ type: 'heading', metadata: { level: 3 }, value: [this.obj.label], citation: this.obj.citation, source: this.obj.source }) }), this.editable && needsHeader && this.editableHeader(), h("p", { class: 'responsive' }, this.obj.value.map((line, index) => [
|
|
2436
|
+
this.editable ?
|
|
2437
|
+
h("div", null, this.editableNode(line, index, 'text', template, templateMaker)) :
|
|
2438
|
+
h("div", null, this.stringNode(line, index, 'text')),
|
|
2439
|
+
this.editable ?
|
|
2440
|
+
h("div", { class: 'response' }, this.editableNode(line, index, 'response', template, templateMaker)) :
|
|
2441
|
+
h("div", { class: 'response' }, this.stringNode(line, index, 'response'))
|
|
2442
|
+
]))));
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
get element() { return getElement(this); }
|
|
2446
|
+
static get watchers() { return {
|
|
2447
|
+
"doc": ["docChanged"]
|
|
2448
|
+
}; }
|
|
2449
|
+
};
|
|
2450
|
+
ResponsivePrayerComponent.style = responsivePrayerCss;
|
|
2451
|
+
|
|
2452
|
+
const rubricCss = ".sc-ldf-rubric-h{font-family:var(--ldf-font-face);color:var(--ldf-rubric-color);font-style:var(--ldf-rubric-font-style);font-weight:var(--ldf-rubric-font-weight);font-size:var(--ldf-rubric-font-size);text-align:var(--ldf-text-align);text-justify:inter-character}";
|
|
2453
|
+
|
|
2454
|
+
const RubricComponent = class {
|
|
2455
|
+
constructor(hostRef) {
|
|
2456
|
+
registerInstance(this, hostRef);
|
|
2457
|
+
}
|
|
2458
|
+
docChanged(newDoc) {
|
|
2459
|
+
try {
|
|
2460
|
+
if (typeof newDoc == 'string') {
|
|
2461
|
+
this.obj = new Rubric(JSON.parse(newDoc));
|
|
2462
|
+
}
|
|
2463
|
+
else {
|
|
2464
|
+
this.obj = new Rubric(newDoc);
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
catch (e) {
|
|
2468
|
+
console.warn(e);
|
|
2469
|
+
this.obj = new Rubric();
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
// Lifecycle events
|
|
2473
|
+
componentWillLoad() {
|
|
2474
|
+
this.docChanged(this.doc);
|
|
2475
|
+
}
|
|
2476
|
+
// Render
|
|
2477
|
+
render() {
|
|
2478
|
+
return (h(Host, { lang: this.obj.language }, this.editable && h("ldf-label-bar", null, h("slot", { slot: 'end', name: 'controls' })), this.obj.value.map((para, ii) => this.editable ?
|
|
2479
|
+
h("ldf-editable-text", { id: `${this.obj.uid || this.obj.slug}-${ii}`, text: para, path: `${this.path}/value/${ii}` }) :
|
|
2480
|
+
h("p", { id: `${this.obj.uid || this.obj.slug}-${ii}`, class: 'rubric' }, para))));
|
|
2481
|
+
}
|
|
2482
|
+
static get watchers() { return {
|
|
2483
|
+
"doc": ["docChanged"]
|
|
2484
|
+
}; }
|
|
2485
|
+
};
|
|
2486
|
+
RubricComponent.style = rubricCss;
|
|
2487
|
+
|
|
2488
|
+
export { Segment as ion_segment, SegmentButton as ion_segment_button, SkeletonText as ion_skeleton_text, BibleReadingComponent as ldf_bible_reading, EditableAddBlockComponent as ldf_editable_add_block, EditableMetadataButtonsComponent as ldf_editable_metadata_buttons, EditableSelectComponent as ldf_editable_select, ImageComponent as ldf_image, LiturgicalDocumentComponent as ldf_liturgical_document, LiturgyComponent as ldf_liturgy, MeditationComponent as ldf_meditation, OptionComponent as ldf_option, PsalmComponent as ldf_psalm, RefrainComponent as ldf_refrain, ResponsivePrayerComponent as ldf_responsive_prayer, RubricComponent as ldf_rubric };
|