@venite/components 0.17.0 → 0.17.1

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.
Files changed (28) hide show
  1. package/dist/cjs/ldf-editable-antiphon-field.cjs.entry.js +1 -1
  2. package/dist/cjs/ldf-editable-condition-piece.cjs.entry.js +5 -7
  3. package/dist/cjs/ldf-editable-condition.cjs.entry.js +2 -2
  4. package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +1 -1
  5. package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +4 -4
  6. package/dist/collection/components/editable-antiphon-field/editable-antiphon-field.js +4 -8
  7. package/dist/collection/components/editable-condition/editable-condition.js +3 -6
  8. package/dist/collection/components/editable-condition-piece/editable-condition-piece.js +5 -10
  9. package/dist/collection/components/editable-condition-piece/except-only-strings.js +1 -2
  10. package/dist/collection/components/editable-condition-piece/except-only.js +1 -2
  11. package/dist/collection/components/editable-filter-documents/editable-filter-documents.js +1 -2
  12. package/dist/collection/components/editable-lookup/editable-lookup.js +2 -4
  13. package/dist/collection/components/editable-metadata-metadata-fields/editable-metadata-metadata-fields.js +1 -2
  14. package/dist/esm/ldf-editable-antiphon-field.entry.js +1 -1
  15. package/dist/esm/ldf-editable-condition-piece.entry.js +5 -7
  16. package/dist/esm/ldf-editable-condition.entry.js +2 -2
  17. package/dist/esm/ldf-editable-filter-documents.entry.js +1 -1
  18. package/dist/esm/ldf-editable-lookup_2.entry.js +4 -4
  19. package/dist/ldf/ldf.esm.js +1 -1
  20. package/dist/ldf/{p-326fefd6.entry.js → p-4611204b.entry.js} +1 -1
  21. package/dist/ldf/p-923d4bd9.entry.js +1 -0
  22. package/dist/ldf/p-a45c3647.entry.js +1 -0
  23. package/dist/ldf/{p-6849e4e5.entry.js → p-cc0ae2eb.entry.js} +1 -1
  24. package/dist/ldf/p-cef59cf4.entry.js +1 -0
  25. package/package.json +2 -2
  26. package/dist/ldf/p-792a67b9.entry.js +0 -1
  27. package/dist/ldf/p-fb168191.entry.js +0 -1
  28. package/dist/ldf/p-fe8033c2.entry.js +0 -1
@@ -200,7 +200,7 @@ const EditableAntiphonFieldComponent = class {
200
200
  this.setValue({}, false, false);
201
201
  break;
202
202
  }
203
- } }, index.h("ion-list-header", null, index.h("ion-label", null, localeStrings.antiphon)), index.h("ion-item", { lines: "none" }, index.h("ion-label", null, localeStrings.omit), index.h("ion-radio", { slot: "end", value: "omit" })), index.h("ion-item", { lines: "none" }, index.h("ion-label", null, localeStrings.insert), index.h("ion-radio", { slot: "end", value: "insert" })), index.h("ion-item", { lines: "none" }, index.h("ion-label", null, localeStrings.text), index.h("ion-radio", { slot: "end", value: "refrain" })), index.h("ion-item", { lines: "none" }, index.h("ion-label", null, localeStrings.table), index.h("ion-radio", { slot: "end", value: "table" }))), (typeof this.currentAntiphon !== 'object' || this.currentAntiphon.type === 'refrain') && index.h(EditableStringOrAntiphon, { mode: this.mode, path: `${this.path}/metadata/antiphon`, value: this.currentAntiphon }), typeof this.currentAntiphon === 'object' && !Boolean(this.currentAntiphon.type) && index.h("ion-item", { lines: "none" }, index.h("ion-grid", null, Object.keys(this.currentAntiphon).map(mmdd => index.h("ion-row", { key: mmdd }, index.h("ion-col", { size: "4" }, mmdd), index.h("ion-col", null, index.h(EditableStringOrAntiphon, { mode: typeof this.currentAntiphon[mmdd] === 'string' ? 'string' : 'refrain', path: `${this.path}/metadata/antiphon/${mmdd}`, value: this.currentAntiphon[mmdd] })), index.h("ion-col", { size: "1" }, index.h("ion-buttons", null, index.h("ion-button", { fill: "clear", onClick: () => this.removeTableValue(mmdd) }, index.h("ion-label", null, index.h("ion-icon", { slot: "icon-only", name: "trash" }))))))), index.h("ion-row", null, index.h("ion-toolbar", null, index.h("ion-buttons", { slot: "end" }, index.h("ion-button", { onClick: () => this.addTableValue() }, index.h("ion-label", null, index.h("ion-icon", { slot: "icon-only", name: "add" }))))))))));
203
+ } }, index.h("ion-list-header", null, index.h("ion-label", null, localeStrings.antiphon)), index.h("ion-item", { lines: "none" }, index.h("ion-radio", { value: "omit", justify: "space-between" }, localeStrings.omit)), index.h("ion-item", { lines: "none" }, index.h("ion-radio", { value: "insert", justify: "space-between" }, localeStrings.insert)), index.h("ion-item", { lines: "none" }, index.h("ion-radio", { value: "refrain", justify: "space-between" }, localeStrings.text)), index.h("ion-item", { lines: "none" }, index.h("ion-radio", { value: "table", justify: "space-between" }, localeStrings.table))), (typeof this.currentAntiphon !== 'object' || this.currentAntiphon.type === 'refrain') && index.h(EditableStringOrAntiphon, { mode: this.mode, path: `${this.path}/metadata/antiphon`, value: this.currentAntiphon }), typeof this.currentAntiphon === 'object' && !Boolean(this.currentAntiphon.type) && index.h("ion-item", { lines: "none" }, index.h("ion-grid", null, Object.keys(this.currentAntiphon).map(mmdd => index.h("ion-row", { key: mmdd }, index.h("ion-col", { size: "4" }, mmdd), index.h("ion-col", null, index.h(EditableStringOrAntiphon, { mode: typeof this.currentAntiphon[mmdd] === 'string' ? 'string' : 'refrain', path: `${this.path}/metadata/antiphon/${mmdd}`, value: this.currentAntiphon[mmdd] })), index.h("ion-col", { size: "1" }, index.h("ion-buttons", null, index.h("ion-button", { fill: "clear", onClick: () => this.removeTableValue(mmdd) }, index.h("ion-label", null, index.h("ion-icon", { slot: "icon-only", name: "trash" }))))))), index.h("ion-row", null, index.h("ion-toolbar", null, index.h("ion-buttons", { slot: "end" }, index.h("ion-button", { onClick: () => this.addTableValue() }, index.h("ion-label", null, index.h("ion-icon", { slot: "icon-only", name: "add" }))))))))));
204
204
  }
205
205
  get element() { return index.getElement(this); }
206
206
  static get watchers() { return {
@@ -72,10 +72,9 @@ const EN = {
72
72
 
73
73
  const ExceptOnly = ({ field, localeStrings, options, currentCondition, onToggleSubcondition, onToggleValue }) => index.h("article", null,
74
74
  index.h("ion-item", null,
75
- index.h("ion-label", null, localeStrings[field]),
76
75
  index.h("ion-toggle", { checked: currentCondition !== undefined, onIonChange: (ev) => onToggleSubcondition(field, ev.detail.checked, {
77
76
  except: [], only: []
78
- }) })),
77
+ }), justify: "space-between" }, localeStrings[field])),
79
78
  currentCondition !== undefined && index.h("div", { class: "type" },
80
79
  index.h("h4", null, localeStrings.only),
81
80
  options.map(opt => {
@@ -92,10 +91,9 @@ const ExceptOnly = ({ field, localeStrings, options, currentCondition, onToggleS
92
91
 
93
92
  const ExceptOnlyStrings = ({ path, field, localeStrings, currentCondition, onToggleSubcondition }) => currentCondition && index.h("article", null,
94
93
  index.h("ion-item", null,
95
- index.h("ion-label", null, localeStrings[field]),
96
94
  index.h("ion-toggle", { checked: currentCondition[field] !== undefined, onIonChange: (ev) => onToggleSubcondition(field, ev.detail.checked, {
97
95
  except: [], only: []
98
- }) })),
96
+ }), justify: "space-between" }, localeStrings[field])),
99
97
  currentCondition[field] !== undefined && index.h("div", { class: "type" },
100
98
  index.h("h4", null, localeStrings.except),
101
99
  index.h("ldf-editable-string-list", { path: `${path}/${field}`, property: 'except', value: currentCondition[field].except }),
@@ -208,12 +206,12 @@ const EditableConditionComponent = class {
208
206
  render() {
209
207
  var _a, _b, _c, _d;
210
208
  const localeStrings = this.localeStrings || {};
211
- return (index.h(index.Host, null, index.h("ion-item", null, index.h("ion-label", null, localeStrings.feastDay), index.h("ion-toggle", { checked: this.workingCondition.feastDay === true, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, ev.detail.checked) })), index.h("ion-item", null, index.h("ion-label", null, localeStrings.notFeastDay), index.h("ion-toggle", { checked: this.workingCondition.feastDay === false, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, !ev.detail.checked) })), index.h(ExceptOnly, { field: "season", localeStrings: localeStrings, options: SEASONS, currentCondition: (_a = this.workingCondition) === null || _a === void 0 ? void 0 : _a.season, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }), index.h(ExceptOnly, { field: "weekday", localeStrings: localeStrings, options: WEEKDAYS, currentCondition: (_b = this.workingCondition) === null || _b === void 0 ? void 0 : _b.weekday, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }), index.h("article", null, index.h("ion-item", null, index.h("ion-label", null, localeStrings.date), index.h("ion-toggle", { checked: this.workingCondition.date !== undefined, onIonChange: (ev) => this.toggleSubcondition('date', ev.detail.checked, {}) })), this.workingCondition.date !== undefined && index.h("div", { class: "type" }, index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.lte), index.h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('lte', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.lt), index.h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('lt', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.gte), index.h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('gte', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.gt), index.h("ion-datetime", {
209
+ return (index.h(index.Host, null, index.h("ion-item", null, index.h("ion-toggle", { checked: this.workingCondition.feastDay === true, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, ev.detail.checked), justify: "space-between" }, localeStrings.feastDay)), index.h("ion-item", null, index.h("ion-toggle", { checked: this.workingCondition.feastDay === false, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, !ev.detail.checked), justify: "space-between" }, localeStrings.notFeastDay)), index.h(ExceptOnly, { field: "season", localeStrings: localeStrings, options: SEASONS, currentCondition: (_a = this.workingCondition) === null || _a === void 0 ? void 0 : _a.season, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }), index.h(ExceptOnly, { field: "weekday", localeStrings: localeStrings, options: WEEKDAYS, currentCondition: (_b = this.workingCondition) === null || _b === void 0 ? void 0 : _b.weekday, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }), index.h("article", null, index.h("ion-item", null, index.h("ion-toggle", { checked: this.workingCondition.date !== undefined, onIonChange: (ev) => this.toggleSubcondition('date', ev.detail.checked, {}), justify: "space-between" }, localeStrings.date)), this.workingCondition.date !== undefined && index.h("div", { class: "type" }, index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.lte), index.h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('lte', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.lt), index.h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('lt', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.gte), index.h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('gte', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.gt), index.h("ion-datetime", {
212
210
  //displayFormat="MMMM D"
213
211
  onIonChange: (ev) => this.setDateField('gt', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value)
214
- })))), index.h("article", null, index.h("ion-item", null, index.h("ion-label", null, localeStrings.dayOfMonth), index.h("ion-toggle", { checked: this.workingCondition.day_of_month !== undefined, onIonChange: (ev) => this.toggleSubcondition('day_of_month', ev.detail.checked, {}) })), this.workingCondition.day_of_month !== undefined && index.h("div", { class: "type row" }, index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIs), index.h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/eq`, placeholder: localeStrings.dayOfMonth, text: (_c = this.workingCondition.day_of_month.eq) === null || _c === void 0 ? void 0 : _c.toString() })), index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIsNot), index.h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/neq`, placeholder: localeStrings.dayOfMonth, text: (_d = this.workingCondition.day_of_month.eq) === null || _d === void 0 ? void 0 : _d.toString() })))), index.h("article", null, index.h("ion-item", null, index.h("ion-label", null, localeStrings.preference), index.h("ion-toggle", { checked: this.workingCondition.preference !== undefined, onIonChange: (ev) => this.toggleSubcondition('preference', ev.detail.checked, {
212
+ })))), index.h("article", null, index.h("ion-item", null, index.h("ion-toggle", { checked: this.workingCondition.day_of_month !== undefined, onIonChange: (ev) => this.toggleSubcondition('day_of_month', ev.detail.checked, {}), justify: "space-between" }, localeStrings.dayOfMonth)), this.workingCondition.day_of_month !== undefined && index.h("div", { class: "type row" }, index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIs), index.h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/eq`, placeholder: localeStrings.dayOfMonth, text: (_c = this.workingCondition.day_of_month.eq) === null || _c === void 0 ? void 0 : _c.toString() })), index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIsNot), index.h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/neq`, placeholder: localeStrings.dayOfMonth, text: (_d = this.workingCondition.day_of_month.eq) === null || _d === void 0 ? void 0 : _d.toString() })))), index.h("article", null, index.h("ion-item", null, index.h("ion-toggle", { checked: this.workingCondition.preference !== undefined, onIonChange: (ev) => this.toggleSubcondition('preference', ev.detail.checked, {
215
213
  key: '', is: true, value: ''
216
- }) })), this.workingCondition.preference !== undefined && index.h("div", { class: "type row" }, index.h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/key`, placeholder: localeStrings.preferenceKey, text: this.workingCondition.preference.key }), index.h("ion-select", { value: this.workingCondition.preference.is, onIonChange: (ev) => this.preferenceIs(ev.detail.value) }, index.h("ion-select-option", { value: true }, localeStrings.preferenceIs), index.h("ion-select-option", { value: false }, localeStrings.preferenceIsNot)), index.h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/value`, placeholder: localeStrings.preferenceValue, text: this.workingCondition.preference.value }))), index.h(ExceptOnlyStrings, { path: this.path, field: "day", localeStrings: localeStrings, currentCondition: this.workingCondition.day, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template) }), index.h(ExceptOnlyStrings, { path: this.path, field: "week", localeStrings: localeStrings, currentCondition: this.workingCondition.week, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template) })));
214
+ }), justify: "space-between" }, localeStrings.preference)), this.workingCondition.preference !== undefined && index.h("div", { class: "type row" }, index.h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/key`, placeholder: localeStrings.preferenceKey, text: this.workingCondition.preference.key }), index.h("ion-select", { value: this.workingCondition.preference.is, onIonChange: (ev) => this.preferenceIs(ev.detail.value) }, index.h("ion-select-option", { value: true }, localeStrings.preferenceIs), index.h("ion-select-option", { value: false }, localeStrings.preferenceIsNot)), index.h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/value`, placeholder: localeStrings.preferenceValue, text: this.workingCondition.preference.value }))), index.h(ExceptOnlyStrings, { path: this.path, field: "day", localeStrings: localeStrings, currentCondition: this.workingCondition.day, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template) }), index.h(ExceptOnlyStrings, { path: this.path, field: "week", localeStrings: localeStrings, currentCondition: this.workingCondition.week, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template) })));
217
215
  }
218
216
  get element() { return index.getElement(this); }
219
217
  static get watchers() { return {
@@ -90,8 +90,8 @@ const EditableConditionComponent = class {
90
90
  render() {
91
91
  var _a, _b, _c, _d;
92
92
  const localeStrings = this.localeStrings || {};
93
- return (index.h(index.Host, null, index.h("ion-header", null, index.h("ion-toolbar", null, index.h("ion-title", null, localeStrings.condition), index.h("ion-buttons", { slot: "primary" }, index.h("ion-button", { onClick: () => this.modal.dismiss(null) }, index.h("ion-icon", { slot: "icon-only", name: "close" }))))), index.h("ion-content", null, index.h("ion-list", null, index.h("ion-item", { lines: "none" }, index.h("ion-label", null, localeStrings.hasCondition), index.h("ion-checkbox", { checked: !!this.currentCondition, onIonChange: (ev) => this.toggleCondition(ev.detail.checked) })), this.currentCondition &&
94
- index.h("ion-radio-group", { value: (_a = this.currentCondition) === null || _a === void 0 ? void 0 : _a.mode, onIonChange: (ev) => this.setAndOr(ev.detail.value) }, index.h("ion-item", { lines: "none" }, index.h("ion-label", null, localeStrings.and), index.h("ion-radio", { value: "and" })), index.h("ion-item", { lines: "none" }, index.h("ion-label", null, localeStrings.or), index.h("ion-radio", { value: "or" }))), (_c = (_b = this.currentCondition) === null || _b === void 0 ? void 0 : _b.conditions) === null || _c === void 0 ? void 0 :
93
+ return (index.h(index.Host, null, index.h("ion-header", null, index.h("ion-toolbar", null, index.h("ion-title", null, localeStrings.condition), index.h("ion-buttons", { slot: "primary" }, index.h("ion-button", { onClick: () => this.modal.dismiss(null) }, index.h("ion-icon", { slot: "icon-only", name: "close" }))))), index.h("ion-content", null, index.h("ion-list", null, index.h("ion-item", { lines: "none" }, index.h("ion-checkbox", { checked: !!this.currentCondition, onIonChange: (ev) => this.toggleCondition(ev.detail.checked), justify: "space-between" }, localeStrings.hasCondition)), this.currentCondition &&
94
+ index.h("ion-radio-group", { value: (_a = this.currentCondition) === null || _a === void 0 ? void 0 : _a.mode, onIonChange: (ev) => this.setAndOr(ev.detail.value) }, index.h("ion-item", { lines: "none" }, index.h("ion-radio", { value: "and", justify: "space-between" }, localeStrings.and)), index.h("ion-item", { lines: "none" }, index.h("ion-radio", { value: "or", justify: "space-between" }, localeStrings.or))), (_c = (_b = this.currentCondition) === null || _b === void 0 ? void 0 : _b.conditions) === null || _c === void 0 ? void 0 :
95
95
  _c.map((condition, ii) => [
96
96
  index.h("ion-toolbar", null, index.h("ion-title", { slot: "start" }, localeStrings.condition, " ", ii + 1), index.h("ion-buttons", { slot: "end" }, index.h("ldf-editable-delete", { slot: "end", base: `${this.path}/conditions`, index: ii, obj: condition }))),
97
97
  (index.h("ldf-editable-condition-piece", { path: `${this.path}/conditions/${ii}`, condition: condition }))
@@ -138,7 +138,7 @@ const EditableFilterDocumentsComponent = class {
138
138
  }
139
139
  render() {
140
140
  const localeStrings = this.localeStrings || {};
141
- return (index.h(index.Host, null, this.modal && index.h("ion-header", null, index.h("ion-toolbar", null, index.h("ion-buttons", { slot: "end" }, index.h("ion-button", { onClick: () => this.modal.dismiss() }, index.h("ion-icon", { name: "close", slot: "icon-only" }))))), index.h("ion-content", null, index.h("form", null, index.h("ion-list", null, index.h("ion-button", { fill: "clear", onClick: () => { this.chooseDoc(docsToOption(this.filteredOptions)); this.choose(); } }, index.h("ion-label", null, localeStrings.includeAll)), this.versions && Object.values(this.versions).length > 1 && index.h("ion-item", null, index.h("ion-label", null, localeStrings.version), index.h("ion-select", { value: this.version, onIonChange: (ev) => this.chooseVersion(ev.detail.value) }, Object.entries(this.versions)
141
+ return (index.h(index.Host, null, this.modal && index.h("ion-header", null, index.h("ion-toolbar", null, index.h("ion-buttons", { slot: "end" }, index.h("ion-button", { onClick: () => this.modal.dismiss() }, index.h("ion-icon", { name: "close", slot: "icon-only" }))))), index.h("ion-content", null, index.h("form", null, index.h("ion-list", null, index.h("ion-button", { fill: "clear", onClick: () => { this.chooseDoc(docsToOption(this.filteredOptions)); this.choose(); } }, index.h("ion-label", null, localeStrings.includeAll)), this.versions && Object.values(this.versions).length > 1 && index.h("ion-item", null, index.h("ion-select", { label: localeStrings.version, justify: "space-between", value: this.version, onIonChange: (ev) => this.chooseVersion(ev.detail.value) }, Object.entries(this.versions)
142
142
  .sort((a, b) => a[0] > b[0] ? 1 : -1)
143
143
  .map(([versionKey, versionLabel]) => index.h("ion-select-option", { value: versionKey }, versionLabel)))), index.h("ion-searchbar", { debounce: 250, onIonInput: (ev) => this.filter(ev.detail.value) }), this.filteredOptions && this.filteredOptions.map(doc => {
144
144
  var _a, _b, _c, _d;
@@ -102,13 +102,13 @@ const EditableLookupComponent = class {
102
102
  const isPreference = value && typeof value !== 'string';
103
103
  return [
104
104
  index.h("ion-item", { lines: "none" }, index.h("ion-label", { position: "stacked" }, label), index.h("br", null)),
105
- index.h("ion-item", { lines: "none" }, index.h("ion-label", null, LOCALE_STRINGS.isPreference), index.h("ion-checkbox", { slot: "end", checked: isPreference, onIonChange: (e) => this.toggleIsPreference(field, e.detail.checked) })),
105
+ index.h("ion-item", { lines: "none" }, index.h("ion-checkbox", { checked: isPreference, onIonChange: (e) => this.toggleIsPreference(field, e.detail.checked), justify: "space-between" }, LOCALE_STRINGS.isPreference)),
106
106
  index.h("ion-item", null, isPreference
107
107
  ? index.h("ldf-editable-text", { path: `${this.path}/${field}/preference`, short: true, placeholder: LOCALE_STRINGS.preference, text: value === null || value === void 0 ? void 0 : value.preference })
108
108
  : index.h("ldf-editable-text", { path: `${this.path}/${field}`, placeholder: LOCALE_STRINGS.value, short: true, text: value }))
109
109
  ];
110
110
  };
111
- return (index.h(index.Host, null, index.h("ion-item", null, index.h("ion-label", null, LOCALE_STRINGS.lookup), index.h("ion-checkbox", { checked: Boolean(this.lookup), onIonChange: () => this.toggle() })), this.currentLookup && index.h("ion-list", null, index.h("ion-item", null, index.h("ion-label", { position: "stacked" }, LOCALE_STRINGS.type), index.h("ldf-editable-select", { path: this.path, property: "type", options: new Array({ value: undefined, label: "—" }).concat(this.types.map(lookupType => ({
111
+ return (index.h(index.Host, null, index.h("ion-item", null, index.h("ion-checkbox", { checked: Boolean(this.lookup), onIonChange: () => this.toggle(), justify: "space-between" }, LOCALE_STRINGS.lookup)), this.currentLookup && index.h("ion-list", null, index.h("ion-item", null, index.h("ion-label", { position: "stacked" }, LOCALE_STRINGS.type), index.h("ldf-editable-select", { path: this.path, property: "type", options: new Array({ value: undefined, label: "—" }).concat(this.types.map(lookupType => ({
112
112
  value: lookupType,
113
113
  label: LOCALE_STRINGS[lookupType] || lookupType
114
114
  }))), value: (_a = this.currentLookup) === null || _a === void 0 ? void 0 : _a.type })), index.h(PreferenceOrText, { label: LOCALE_STRINGS.table, field: "table", value: (_b = this.currentLookup) === null || _b === void 0 ? void 0 : _b.table }), index.h(PreferenceOrText, { label: LOCALE_STRINGS.item, field: "item", value: (_c = this.currentLookup) === null || _c === void 0 ? void 0 : _c.item }), index.h("ion-item", null, index.h("ion-label", { position: "stacked" }, LOCALE_STRINGS.filter), index.h("ldf-editable-select", { path: this.path, property: "filter", options: [
@@ -400,7 +400,7 @@ const EditableMetadataMetadataFieldsComponent = class {
400
400
  case Field.Gloria:
401
401
  wrapInItem = false;
402
402
  nodes.push({
403
- node: index.h("ion-item", { lines: "none" }, index.h("ion-label", null, localeStrings.insert_gloria), index.h("ion-checkbox", { checked: Boolean((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.gloria), onIonChange: (e) => {
403
+ node: index.h("ion-item", { lines: "none" }, index.h("ion-checkbox", { checked: Boolean((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.gloria), onIonChange: (e) => {
404
404
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
405
405
  if (e.detail.checked) {
406
406
  this.ldfShouldAddGloriaPatri.emit({
@@ -442,7 +442,7 @@ const EditableMetadataMetadataFieldsComponent = class {
442
442
  }));
443
443
  }
444
444
  }
445
- } })),
445
+ }, justify: "space-between" }, localeStrings.insert_gloria)),
446
446
  size: 12
447
447
  });
448
448
  break;
@@ -176,17 +176,13 @@ export class EditableAntiphonFieldComponent {
176
176
  h("ion-list-header", null,
177
177
  h("ion-label", null, localeStrings.antiphon)),
178
178
  h("ion-item", { lines: "none" },
179
- h("ion-label", null, localeStrings.omit),
180
- h("ion-radio", { slot: "end", value: "omit" })),
179
+ h("ion-radio", { value: "omit", justify: "space-between" }, localeStrings.omit)),
181
180
  h("ion-item", { lines: "none" },
182
- h("ion-label", null, localeStrings.insert),
183
- h("ion-radio", { slot: "end", value: "insert" })),
181
+ h("ion-radio", { value: "insert", justify: "space-between" }, localeStrings.insert)),
184
182
  h("ion-item", { lines: "none" },
185
- h("ion-label", null, localeStrings.text),
186
- h("ion-radio", { slot: "end", value: "refrain" })),
183
+ h("ion-radio", { value: "refrain", justify: "space-between" }, localeStrings.text)),
187
184
  h("ion-item", { lines: "none" },
188
- h("ion-label", null, localeStrings.table),
189
- h("ion-radio", { slot: "end", value: "table" }))),
185
+ h("ion-radio", { value: "table", justify: "space-between" }, localeStrings.table))),
190
186
  (typeof this.currentAntiphon !== 'object' || this.currentAntiphon.type === 'refrain') && h(EditableStringOrAntiphon, { mode: this.mode, path: `${this.path}/metadata/antiphon`, value: this.currentAntiphon }),
191
187
  typeof this.currentAntiphon === 'object' && !Boolean(this.currentAntiphon.type) && h("ion-item", { lines: "none" },
192
188
  h("ion-grid", null,
@@ -78,16 +78,13 @@ export class EditableConditionComponent {
78
78
  h("ion-content", null,
79
79
  h("ion-list", null,
80
80
  h("ion-item", { lines: "none" },
81
- h("ion-label", null, localeStrings.hasCondition),
82
- h("ion-checkbox", { checked: !!this.currentCondition, onIonChange: (ev) => this.toggleCondition(ev.detail.checked) })),
81
+ h("ion-checkbox", { checked: !!this.currentCondition, onIonChange: (ev) => this.toggleCondition(ev.detail.checked), justify: "space-between" }, localeStrings.hasCondition)),
83
82
  this.currentCondition &&
84
83
  h("ion-radio-group", { value: (_a = this.currentCondition) === null || _a === void 0 ? void 0 : _a.mode, onIonChange: (ev) => this.setAndOr(ev.detail.value) },
85
84
  h("ion-item", { lines: "none" },
86
- h("ion-label", null, localeStrings.and),
87
- h("ion-radio", { value: "and" })),
85
+ h("ion-radio", { value: "and", justify: "space-between" }, localeStrings.and)),
88
86
  h("ion-item", { lines: "none" },
89
- h("ion-label", null, localeStrings.or),
90
- h("ion-radio", { value: "or" }))), (_c = (_b = this.currentCondition) === null || _b === void 0 ? void 0 : _b.conditions) === null || _c === void 0 ? void 0 :
87
+ h("ion-radio", { value: "or", justify: "space-between" }, localeStrings.or))), (_c = (_b = this.currentCondition) === null || _b === void 0 ? void 0 : _b.conditions) === null || _c === void 0 ? void 0 :
91
88
  _c.map((condition, ii) => [
92
89
  h("ion-toolbar", null,
93
90
  h("ion-title", { slot: "start" },
@@ -106,17 +106,14 @@ export class EditableConditionComponent {
106
106
  const localeStrings = this.localeStrings || {};
107
107
  return (h(Host, null,
108
108
  h("ion-item", null,
109
- h("ion-label", null, localeStrings.feastDay),
110
- h("ion-toggle", { checked: this.workingCondition.feastDay === true, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, ev.detail.checked) })),
109
+ h("ion-toggle", { checked: this.workingCondition.feastDay === true, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, ev.detail.checked), justify: "space-between" }, localeStrings.feastDay)),
111
110
  h("ion-item", null,
112
- h("ion-label", null, localeStrings.notFeastDay),
113
- h("ion-toggle", { checked: this.workingCondition.feastDay === false, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, !ev.detail.checked) })),
111
+ h("ion-toggle", { checked: this.workingCondition.feastDay === false, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, !ev.detail.checked), justify: "space-between" }, localeStrings.notFeastDay)),
114
112
  h(ExceptOnly, { field: "season", localeStrings: localeStrings, options: SEASONS, currentCondition: (_a = this.workingCondition) === null || _a === void 0 ? void 0 : _a.season, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }),
115
113
  h(ExceptOnly, { field: "weekday", localeStrings: localeStrings, options: WEEKDAYS, currentCondition: (_b = this.workingCondition) === null || _b === void 0 ? void 0 : _b.weekday, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }),
116
114
  h("article", null,
117
115
  h("ion-item", null,
118
- h("ion-label", null, localeStrings.date),
119
- h("ion-toggle", { checked: this.workingCondition.date !== undefined, onIonChange: (ev) => this.toggleSubcondition('date', ev.detail.checked, {}) })),
116
+ h("ion-toggle", { checked: this.workingCondition.date !== undefined, onIonChange: (ev) => this.toggleSubcondition('date', ev.detail.checked, {}), justify: "space-between" }, localeStrings.date)),
120
117
  this.workingCondition.date !== undefined && h("div", { class: "type" },
121
118
  h("ion-item", { lines: "none" },
122
119
  h("ion-label", { position: "stacked" }, localeStrings.lte),
@@ -134,8 +131,7 @@ export class EditableConditionComponent {
134
131
  onIonChange: (ev) => this.setDateField('gt', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })))),
135
132
  h("article", null,
136
133
  h("ion-item", null,
137
- h("ion-label", null, localeStrings.dayOfMonth),
138
- h("ion-toggle", { checked: this.workingCondition.day_of_month !== undefined, onIonChange: (ev) => this.toggleSubcondition('day_of_month', ev.detail.checked, {}) })),
134
+ h("ion-toggle", { checked: this.workingCondition.day_of_month !== undefined, onIonChange: (ev) => this.toggleSubcondition('day_of_month', ev.detail.checked, {}), justify: "space-between" }, localeStrings.dayOfMonth)),
139
135
  this.workingCondition.day_of_month !== undefined && h("div", { class: "type row" },
140
136
  h("ion-item", { lines: "none" },
141
137
  h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIs),
@@ -145,10 +141,9 @@ export class EditableConditionComponent {
145
141
  h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/neq`, placeholder: localeStrings.dayOfMonth, text: (_d = this.workingCondition.day_of_month.eq) === null || _d === void 0 ? void 0 : _d.toString() })))),
146
142
  h("article", null,
147
143
  h("ion-item", null,
148
- h("ion-label", null, localeStrings.preference),
149
144
  h("ion-toggle", { checked: this.workingCondition.preference !== undefined, onIonChange: (ev) => this.toggleSubcondition('preference', ev.detail.checked, {
150
145
  key: '', is: true, value: ''
151
- }) })),
146
+ }), justify: "space-between" }, localeStrings.preference)),
152
147
  this.workingCondition.preference !== undefined && h("div", { class: "type row" },
153
148
  h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/key`, placeholder: localeStrings.preferenceKey, text: this.workingCondition.preference.key }),
154
149
  h("ion-select", { value: this.workingCondition.preference.is, onIonChange: (ev) => this.preferenceIs(ev.detail.value) },
@@ -1,10 +1,9 @@
1
1
  import { h } from '@stencil/core';
2
2
  export const ExceptOnlyStrings = ({ path, field, localeStrings, currentCondition, onToggleSubcondition }) => currentCondition && h("article", null,
3
3
  h("ion-item", null,
4
- h("ion-label", null, localeStrings[field]),
5
4
  h("ion-toggle", { checked: currentCondition[field] !== undefined, onIonChange: (ev) => onToggleSubcondition(field, ev.detail.checked, {
6
5
  except: [], only: []
7
- }) })),
6
+ }), justify: "space-between" }, localeStrings[field])),
8
7
  currentCondition[field] !== undefined && h("div", { class: "type" },
9
8
  h("h4", null, localeStrings.except),
10
9
  h("ldf-editable-string-list", { path: `${path}/${field}`, property: 'except', value: currentCondition[field].except }),
@@ -1,10 +1,9 @@
1
1
  import { h } from '@stencil/core';
2
2
  export const ExceptOnly = ({ field, localeStrings, options, currentCondition, onToggleSubcondition, onToggleValue }) => h("article", null,
3
3
  h("ion-item", null,
4
- h("ion-label", null, localeStrings[field]),
5
4
  h("ion-toggle", { checked: currentCondition !== undefined, onIonChange: (ev) => onToggleSubcondition(field, ev.detail.checked, {
6
5
  except: [], only: []
7
- }) })),
6
+ }), justify: "space-between" }, localeStrings[field])),
8
7
  currentCondition !== undefined && h("div", { class: "type" },
9
8
  h("h4", null, localeStrings.only),
10
9
  options.map(opt => {
@@ -96,8 +96,7 @@ export class EditableFilterDocumentsComponent {
96
96
  h("ion-button", { fill: "clear", onClick: () => { this.chooseDoc(docsToOption(this.filteredOptions)); this.choose(); } },
97
97
  h("ion-label", null, localeStrings.includeAll)),
98
98
  this.versions && Object.values(this.versions).length > 1 && h("ion-item", null,
99
- h("ion-label", null, localeStrings.version),
100
- h("ion-select", { value: this.version, onIonChange: (ev) => this.chooseVersion(ev.detail.value) }, Object.entries(this.versions)
99
+ h("ion-select", { label: localeStrings.version, justify: "space-between", value: this.version, onIonChange: (ev) => this.chooseVersion(ev.detail.value) }, Object.entries(this.versions)
101
100
  .sort((a, b) => a[0] > b[0] ? 1 : -1)
102
101
  .map(([versionKey, versionLabel]) => h("ion-select-option", { value: versionKey }, versionLabel)))),
103
102
  h("ion-searchbar", { debounce: 250, onIonInput: (ev) => this.filter(ev.detail.value) }),
@@ -88,8 +88,7 @@ export class EditableLookupComponent {
88
88
  h("ion-label", { position: "stacked" }, label),
89
89
  h("br", null)),
90
90
  h("ion-item", { lines: "none" },
91
- h("ion-label", null, LOCALE_STRINGS.isPreference),
92
- h("ion-checkbox", { slot: "end", checked: isPreference, onIonChange: (e) => this.toggleIsPreference(field, e.detail.checked) })),
91
+ h("ion-checkbox", { checked: isPreference, onIonChange: (e) => this.toggleIsPreference(field, e.detail.checked), justify: "space-between" }, LOCALE_STRINGS.isPreference)),
93
92
  h("ion-item", null, isPreference
94
93
  ? h("ldf-editable-text", { path: `${this.path}/${field}/preference`, short: true, placeholder: LOCALE_STRINGS.preference, text: value === null || value === void 0 ? void 0 : value.preference })
95
94
  : h("ldf-editable-text", { path: `${this.path}/${field}`, placeholder: LOCALE_STRINGS.value, short: true, text: value }))
@@ -97,8 +96,7 @@ export class EditableLookupComponent {
97
96
  };
98
97
  return (h(Host, null,
99
98
  h("ion-item", null,
100
- h("ion-label", null, LOCALE_STRINGS.lookup),
101
- h("ion-checkbox", { checked: Boolean(this.lookup), onIonChange: () => this.toggle() })),
99
+ h("ion-checkbox", { checked: Boolean(this.lookup), onIonChange: () => this.toggle(), justify: "space-between" }, LOCALE_STRINGS.lookup)),
102
100
  this.currentLookup && h("ion-list", null,
103
101
  h("ion-item", null,
104
102
  h("ion-label", { position: "stacked" }, LOCALE_STRINGS.type),
@@ -182,7 +182,6 @@ export class EditableMetadataMetadataFieldsComponent {
182
182
  wrapInItem = false;
183
183
  nodes.push({
184
184
  node: h("ion-item", { lines: "none" },
185
- h("ion-label", null, localeStrings.insert_gloria),
186
185
  h("ion-checkbox", { checked: Boolean((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.gloria), onIonChange: (e) => {
187
186
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
188
187
  if (e.detail.checked) {
@@ -225,7 +224,7 @@ export class EditableMetadataMetadataFieldsComponent {
225
224
  }));
226
225
  }
227
226
  }
228
- } })),
227
+ }, justify: "space-between" }, localeStrings.insert_gloria)),
229
228
  size: 12
230
229
  });
231
230
  break;
@@ -196,7 +196,7 @@ const EditableAntiphonFieldComponent = class {
196
196
  this.setValue({}, false, false);
197
197
  break;
198
198
  }
199
- } }, h("ion-list-header", null, h("ion-label", null, localeStrings.antiphon)), h("ion-item", { lines: "none" }, h("ion-label", null, localeStrings.omit), h("ion-radio", { slot: "end", value: "omit" })), h("ion-item", { lines: "none" }, h("ion-label", null, localeStrings.insert), h("ion-radio", { slot: "end", value: "insert" })), h("ion-item", { lines: "none" }, h("ion-label", null, localeStrings.text), h("ion-radio", { slot: "end", value: "refrain" })), h("ion-item", { lines: "none" }, h("ion-label", null, localeStrings.table), h("ion-radio", { slot: "end", value: "table" }))), (typeof this.currentAntiphon !== 'object' || this.currentAntiphon.type === 'refrain') && h(EditableStringOrAntiphon, { mode: this.mode, path: `${this.path}/metadata/antiphon`, value: this.currentAntiphon }), typeof this.currentAntiphon === 'object' && !Boolean(this.currentAntiphon.type) && h("ion-item", { lines: "none" }, h("ion-grid", null, Object.keys(this.currentAntiphon).map(mmdd => h("ion-row", { key: mmdd }, h("ion-col", { size: "4" }, mmdd), h("ion-col", null, h(EditableStringOrAntiphon, { mode: typeof this.currentAntiphon[mmdd] === 'string' ? 'string' : 'refrain', path: `${this.path}/metadata/antiphon/${mmdd}`, value: this.currentAntiphon[mmdd] })), h("ion-col", { size: "1" }, h("ion-buttons", null, h("ion-button", { fill: "clear", onClick: () => this.removeTableValue(mmdd) }, h("ion-label", null, h("ion-icon", { slot: "icon-only", name: "trash" }))))))), h("ion-row", null, h("ion-toolbar", null, h("ion-buttons", { slot: "end" }, h("ion-button", { onClick: () => this.addTableValue() }, h("ion-label", null, h("ion-icon", { slot: "icon-only", name: "add" }))))))))));
199
+ } }, h("ion-list-header", null, h("ion-label", null, localeStrings.antiphon)), h("ion-item", { lines: "none" }, h("ion-radio", { value: "omit", justify: "space-between" }, localeStrings.omit)), h("ion-item", { lines: "none" }, h("ion-radio", { value: "insert", justify: "space-between" }, localeStrings.insert)), h("ion-item", { lines: "none" }, h("ion-radio", { value: "refrain", justify: "space-between" }, localeStrings.text)), h("ion-item", { lines: "none" }, h("ion-radio", { value: "table", justify: "space-between" }, localeStrings.table))), (typeof this.currentAntiphon !== 'object' || this.currentAntiphon.type === 'refrain') && h(EditableStringOrAntiphon, { mode: this.mode, path: `${this.path}/metadata/antiphon`, value: this.currentAntiphon }), typeof this.currentAntiphon === 'object' && !Boolean(this.currentAntiphon.type) && h("ion-item", { lines: "none" }, h("ion-grid", null, Object.keys(this.currentAntiphon).map(mmdd => h("ion-row", { key: mmdd }, h("ion-col", { size: "4" }, mmdd), h("ion-col", null, h(EditableStringOrAntiphon, { mode: typeof this.currentAntiphon[mmdd] === 'string' ? 'string' : 'refrain', path: `${this.path}/metadata/antiphon/${mmdd}`, value: this.currentAntiphon[mmdd] })), h("ion-col", { size: "1" }, h("ion-buttons", null, h("ion-button", { fill: "clear", onClick: () => this.removeTableValue(mmdd) }, h("ion-label", null, h("ion-icon", { slot: "icon-only", name: "trash" }))))))), h("ion-row", null, h("ion-toolbar", null, h("ion-buttons", { slot: "end" }, h("ion-button", { onClick: () => this.addTableValue() }, h("ion-label", null, h("ion-icon", { slot: "icon-only", name: "add" }))))))))));
200
200
  }
201
201
  get element() { return getElement(this); }
202
202
  static get watchers() { return {
@@ -68,10 +68,9 @@ const EN = {
68
68
 
69
69
  const ExceptOnly = ({ field, localeStrings, options, currentCondition, onToggleSubcondition, onToggleValue }) => h("article", null,
70
70
  h("ion-item", null,
71
- h("ion-label", null, localeStrings[field]),
72
71
  h("ion-toggle", { checked: currentCondition !== undefined, onIonChange: (ev) => onToggleSubcondition(field, ev.detail.checked, {
73
72
  except: [], only: []
74
- }) })),
73
+ }), justify: "space-between" }, localeStrings[field])),
75
74
  currentCondition !== undefined && h("div", { class: "type" },
76
75
  h("h4", null, localeStrings.only),
77
76
  options.map(opt => {
@@ -88,10 +87,9 @@ const ExceptOnly = ({ field, localeStrings, options, currentCondition, onToggleS
88
87
 
89
88
  const ExceptOnlyStrings = ({ path, field, localeStrings, currentCondition, onToggleSubcondition }) => currentCondition && h("article", null,
90
89
  h("ion-item", null,
91
- h("ion-label", null, localeStrings[field]),
92
90
  h("ion-toggle", { checked: currentCondition[field] !== undefined, onIonChange: (ev) => onToggleSubcondition(field, ev.detail.checked, {
93
91
  except: [], only: []
94
- }) })),
92
+ }), justify: "space-between" }, localeStrings[field])),
95
93
  currentCondition[field] !== undefined && h("div", { class: "type" },
96
94
  h("h4", null, localeStrings.except),
97
95
  h("ldf-editable-string-list", { path: `${path}/${field}`, property: 'except', value: currentCondition[field].except }),
@@ -204,12 +202,12 @@ const EditableConditionComponent = class {
204
202
  render() {
205
203
  var _a, _b, _c, _d;
206
204
  const localeStrings = this.localeStrings || {};
207
- return (h(Host, null, h("ion-item", null, h("ion-label", null, localeStrings.feastDay), h("ion-toggle", { checked: this.workingCondition.feastDay === true, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, ev.detail.checked) })), h("ion-item", null, h("ion-label", null, localeStrings.notFeastDay), h("ion-toggle", { checked: this.workingCondition.feastDay === false, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, !ev.detail.checked) })), h(ExceptOnly, { field: "season", localeStrings: localeStrings, options: SEASONS, currentCondition: (_a = this.workingCondition) === null || _a === void 0 ? void 0 : _a.season, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }), h(ExceptOnly, { field: "weekday", localeStrings: localeStrings, options: WEEKDAYS, currentCondition: (_b = this.workingCondition) === null || _b === void 0 ? void 0 : _b.weekday, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }), h("article", null, h("ion-item", null, h("ion-label", null, localeStrings.date), h("ion-toggle", { checked: this.workingCondition.date !== undefined, onIonChange: (ev) => this.toggleSubcondition('date', ev.detail.checked, {}) })), this.workingCondition.date !== undefined && h("div", { class: "type" }, h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.lte), h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('lte', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.lt), h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('lt', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.gte), h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('gte', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.gt), h("ion-datetime", {
205
+ return (h(Host, null, h("ion-item", null, h("ion-toggle", { checked: this.workingCondition.feastDay === true, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, ev.detail.checked), justify: "space-between" }, localeStrings.feastDay)), h("ion-item", null, h("ion-toggle", { checked: this.workingCondition.feastDay === false, onIonChange: (ev) => this.toggleSubcondition('feastDay', ev.detail.checked, !ev.detail.checked), justify: "space-between" }, localeStrings.notFeastDay)), h(ExceptOnly, { field: "season", localeStrings: localeStrings, options: SEASONS, currentCondition: (_a = this.workingCondition) === null || _a === void 0 ? void 0 : _a.season, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }), h(ExceptOnly, { field: "weekday", localeStrings: localeStrings, options: WEEKDAYS, currentCondition: (_b = this.workingCondition) === null || _b === void 0 ? void 0 : _b.weekday, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template), onToggleValue: (field, subfield, value) => this.toggleExceptOnly(field, subfield, value) }), h("article", null, h("ion-item", null, h("ion-toggle", { checked: this.workingCondition.date !== undefined, onIonChange: (ev) => this.toggleSubcondition('date', ev.detail.checked, {}), justify: "space-between" }, localeStrings.date)), this.workingCondition.date !== undefined && h("div", { class: "type" }, h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.lte), h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('lte', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.lt), h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('lt', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.gte), h("ion-datetime", { presentation: "date", onIonChange: (ev) => this.setDateField('gte', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value) })), h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.gt), h("ion-datetime", {
208
206
  //displayFormat="MMMM D"
209
207
  onIonChange: (ev) => this.setDateField('gt', Array.isArray(ev.detail.value) ? ev.detail.value[0] : ev.detail.value)
210
- })))), h("article", null, h("ion-item", null, h("ion-label", null, localeStrings.dayOfMonth), h("ion-toggle", { checked: this.workingCondition.day_of_month !== undefined, onIonChange: (ev) => this.toggleSubcondition('day_of_month', ev.detail.checked, {}) })), this.workingCondition.day_of_month !== undefined && h("div", { class: "type row" }, h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIs), h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/eq`, placeholder: localeStrings.dayOfMonth, text: (_c = this.workingCondition.day_of_month.eq) === null || _c === void 0 ? void 0 : _c.toString() })), h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIsNot), h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/neq`, placeholder: localeStrings.dayOfMonth, text: (_d = this.workingCondition.day_of_month.eq) === null || _d === void 0 ? void 0 : _d.toString() })))), h("article", null, h("ion-item", null, h("ion-label", null, localeStrings.preference), h("ion-toggle", { checked: this.workingCondition.preference !== undefined, onIonChange: (ev) => this.toggleSubcondition('preference', ev.detail.checked, {
208
+ })))), h("article", null, h("ion-item", null, h("ion-toggle", { checked: this.workingCondition.day_of_month !== undefined, onIonChange: (ev) => this.toggleSubcondition('day_of_month', ev.detail.checked, {}), justify: "space-between" }, localeStrings.dayOfMonth)), this.workingCondition.day_of_month !== undefined && h("div", { class: "type row" }, h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIs), h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/eq`, placeholder: localeStrings.dayOfMonth, text: (_c = this.workingCondition.day_of_month.eq) === null || _c === void 0 ? void 0 : _c.toString() })), h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, localeStrings.dayOfMonthIsNot), h("ldf-editable-text", { short: true, inputType: "number", path: `${this.path}/day_of_month/neq`, placeholder: localeStrings.dayOfMonth, text: (_d = this.workingCondition.day_of_month.eq) === null || _d === void 0 ? void 0 : _d.toString() })))), h("article", null, h("ion-item", null, h("ion-toggle", { checked: this.workingCondition.preference !== undefined, onIonChange: (ev) => this.toggleSubcondition('preference', ev.detail.checked, {
211
209
  key: '', is: true, value: ''
212
- }) })), this.workingCondition.preference !== undefined && h("div", { class: "type row" }, h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/key`, placeholder: localeStrings.preferenceKey, text: this.workingCondition.preference.key }), h("ion-select", { value: this.workingCondition.preference.is, onIonChange: (ev) => this.preferenceIs(ev.detail.value) }, h("ion-select-option", { value: true }, localeStrings.preferenceIs), h("ion-select-option", { value: false }, localeStrings.preferenceIsNot)), h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/value`, placeholder: localeStrings.preferenceValue, text: this.workingCondition.preference.value }))), h(ExceptOnlyStrings, { path: this.path, field: "day", localeStrings: localeStrings, currentCondition: this.workingCondition.day, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template) }), h(ExceptOnlyStrings, { path: this.path, field: "week", localeStrings: localeStrings, currentCondition: this.workingCondition.week, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template) })));
210
+ }), justify: "space-between" }, localeStrings.preference)), this.workingCondition.preference !== undefined && h("div", { class: "type row" }, h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/key`, placeholder: localeStrings.preferenceKey, text: this.workingCondition.preference.key }), h("ion-select", { value: this.workingCondition.preference.is, onIonChange: (ev) => this.preferenceIs(ev.detail.value) }, h("ion-select-option", { value: true }, localeStrings.preferenceIs), h("ion-select-option", { value: false }, localeStrings.preferenceIsNot)), h("ldf-editable-text", { short: true, inputType: "text", path: `${this.path}/preference/value`, placeholder: localeStrings.preferenceValue, text: this.workingCondition.preference.value }))), h(ExceptOnlyStrings, { path: this.path, field: "day", localeStrings: localeStrings, currentCondition: this.workingCondition.day, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template) }), h(ExceptOnlyStrings, { path: this.path, field: "week", localeStrings: localeStrings, currentCondition: this.workingCondition.week, onToggleSubcondition: (subcondition, active, template) => this.toggleSubcondition(subcondition, active, template) })));
213
211
  }
214
212
  get element() { return getElement(this); }
215
213
  static get watchers() { return {
@@ -86,8 +86,8 @@ const EditableConditionComponent = class {
86
86
  render() {
87
87
  var _a, _b, _c, _d;
88
88
  const localeStrings = this.localeStrings || {};
89
- return (h(Host, null, h("ion-header", null, h("ion-toolbar", null, h("ion-title", null, localeStrings.condition), h("ion-buttons", { slot: "primary" }, h("ion-button", { onClick: () => this.modal.dismiss(null) }, h("ion-icon", { slot: "icon-only", name: "close" }))))), h("ion-content", null, h("ion-list", null, h("ion-item", { lines: "none" }, h("ion-label", null, localeStrings.hasCondition), h("ion-checkbox", { checked: !!this.currentCondition, onIonChange: (ev) => this.toggleCondition(ev.detail.checked) })), this.currentCondition &&
90
- h("ion-radio-group", { value: (_a = this.currentCondition) === null || _a === void 0 ? void 0 : _a.mode, onIonChange: (ev) => this.setAndOr(ev.detail.value) }, h("ion-item", { lines: "none" }, h("ion-label", null, localeStrings.and), h("ion-radio", { value: "and" })), h("ion-item", { lines: "none" }, h("ion-label", null, localeStrings.or), h("ion-radio", { value: "or" }))), (_c = (_b = this.currentCondition) === null || _b === void 0 ? void 0 : _b.conditions) === null || _c === void 0 ? void 0 :
89
+ return (h(Host, null, h("ion-header", null, h("ion-toolbar", null, h("ion-title", null, localeStrings.condition), h("ion-buttons", { slot: "primary" }, h("ion-button", { onClick: () => this.modal.dismiss(null) }, h("ion-icon", { slot: "icon-only", name: "close" }))))), h("ion-content", null, h("ion-list", null, h("ion-item", { lines: "none" }, h("ion-checkbox", { checked: !!this.currentCondition, onIonChange: (ev) => this.toggleCondition(ev.detail.checked), justify: "space-between" }, localeStrings.hasCondition)), this.currentCondition &&
90
+ h("ion-radio-group", { value: (_a = this.currentCondition) === null || _a === void 0 ? void 0 : _a.mode, onIonChange: (ev) => this.setAndOr(ev.detail.value) }, h("ion-item", { lines: "none" }, h("ion-radio", { value: "and", justify: "space-between" }, localeStrings.and)), h("ion-item", { lines: "none" }, h("ion-radio", { value: "or", justify: "space-between" }, localeStrings.or))), (_c = (_b = this.currentCondition) === null || _b === void 0 ? void 0 : _b.conditions) === null || _c === void 0 ? void 0 :
91
91
  _c.map((condition, ii) => [
92
92
  h("ion-toolbar", null, h("ion-title", { slot: "start" }, localeStrings.condition, " ", ii + 1), h("ion-buttons", { slot: "end" }, h("ldf-editable-delete", { slot: "end", base: `${this.path}/conditions`, index: ii, obj: condition }))),
93
93
  (h("ldf-editable-condition-piece", { path: `${this.path}/conditions/${ii}`, condition: condition }))
@@ -134,7 +134,7 @@ const EditableFilterDocumentsComponent = class {
134
134
  }
135
135
  render() {
136
136
  const localeStrings = this.localeStrings || {};
137
- return (h(Host, null, this.modal && h("ion-header", null, h("ion-toolbar", null, h("ion-buttons", { slot: "end" }, h("ion-button", { onClick: () => this.modal.dismiss() }, h("ion-icon", { name: "close", slot: "icon-only" }))))), h("ion-content", null, h("form", null, h("ion-list", null, h("ion-button", { fill: "clear", onClick: () => { this.chooseDoc(docsToOption(this.filteredOptions)); this.choose(); } }, h("ion-label", null, localeStrings.includeAll)), this.versions && Object.values(this.versions).length > 1 && h("ion-item", null, h("ion-label", null, localeStrings.version), h("ion-select", { value: this.version, onIonChange: (ev) => this.chooseVersion(ev.detail.value) }, Object.entries(this.versions)
137
+ return (h(Host, null, this.modal && h("ion-header", null, h("ion-toolbar", null, h("ion-buttons", { slot: "end" }, h("ion-button", { onClick: () => this.modal.dismiss() }, h("ion-icon", { name: "close", slot: "icon-only" }))))), h("ion-content", null, h("form", null, h("ion-list", null, h("ion-button", { fill: "clear", onClick: () => { this.chooseDoc(docsToOption(this.filteredOptions)); this.choose(); } }, h("ion-label", null, localeStrings.includeAll)), this.versions && Object.values(this.versions).length > 1 && h("ion-item", null, h("ion-select", { label: localeStrings.version, justify: "space-between", value: this.version, onIonChange: (ev) => this.chooseVersion(ev.detail.value) }, Object.entries(this.versions)
138
138
  .sort((a, b) => a[0] > b[0] ? 1 : -1)
139
139
  .map(([versionKey, versionLabel]) => h("ion-select-option", { value: versionKey }, versionLabel)))), h("ion-searchbar", { debounce: 250, onIonInput: (ev) => this.filter(ev.detail.value) }), this.filteredOptions && this.filteredOptions.map(doc => {
140
140
  var _a, _b, _c, _d;
@@ -98,13 +98,13 @@ const EditableLookupComponent = class {
98
98
  const isPreference = value && typeof value !== 'string';
99
99
  return [
100
100
  h("ion-item", { lines: "none" }, h("ion-label", { position: "stacked" }, label), h("br", null)),
101
- h("ion-item", { lines: "none" }, h("ion-label", null, LOCALE_STRINGS.isPreference), h("ion-checkbox", { slot: "end", checked: isPreference, onIonChange: (e) => this.toggleIsPreference(field, e.detail.checked) })),
101
+ h("ion-item", { lines: "none" }, h("ion-checkbox", { checked: isPreference, onIonChange: (e) => this.toggleIsPreference(field, e.detail.checked), justify: "space-between" }, LOCALE_STRINGS.isPreference)),
102
102
  h("ion-item", null, isPreference
103
103
  ? h("ldf-editable-text", { path: `${this.path}/${field}/preference`, short: true, placeholder: LOCALE_STRINGS.preference, text: value === null || value === void 0 ? void 0 : value.preference })
104
104
  : h("ldf-editable-text", { path: `${this.path}/${field}`, placeholder: LOCALE_STRINGS.value, short: true, text: value }))
105
105
  ];
106
106
  };
107
- return (h(Host, null, h("ion-item", null, h("ion-label", null, LOCALE_STRINGS.lookup), h("ion-checkbox", { checked: Boolean(this.lookup), onIonChange: () => this.toggle() })), this.currentLookup && h("ion-list", null, h("ion-item", null, h("ion-label", { position: "stacked" }, LOCALE_STRINGS.type), h("ldf-editable-select", { path: this.path, property: "type", options: new Array({ value: undefined, label: "—" }).concat(this.types.map(lookupType => ({
107
+ return (h(Host, null, h("ion-item", null, h("ion-checkbox", { checked: Boolean(this.lookup), onIonChange: () => this.toggle(), justify: "space-between" }, LOCALE_STRINGS.lookup)), this.currentLookup && h("ion-list", null, h("ion-item", null, h("ion-label", { position: "stacked" }, LOCALE_STRINGS.type), h("ldf-editable-select", { path: this.path, property: "type", options: new Array({ value: undefined, label: "—" }).concat(this.types.map(lookupType => ({
108
108
  value: lookupType,
109
109
  label: LOCALE_STRINGS[lookupType] || lookupType
110
110
  }))), value: (_a = this.currentLookup) === null || _a === void 0 ? void 0 : _a.type })), h(PreferenceOrText, { label: LOCALE_STRINGS.table, field: "table", value: (_b = this.currentLookup) === null || _b === void 0 ? void 0 : _b.table }), h(PreferenceOrText, { label: LOCALE_STRINGS.item, field: "item", value: (_c = this.currentLookup) === null || _c === void 0 ? void 0 : _c.item }), h("ion-item", null, h("ion-label", { position: "stacked" }, LOCALE_STRINGS.filter), h("ldf-editable-select", { path: this.path, property: "filter", options: [
@@ -396,7 +396,7 @@ const EditableMetadataMetadataFieldsComponent = class {
396
396
  case Field.Gloria:
397
397
  wrapInItem = false;
398
398
  nodes.push({
399
- node: h("ion-item", { lines: "none" }, h("ion-label", null, localeStrings.insert_gloria), h("ion-checkbox", { checked: Boolean((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.gloria), onIonChange: (e) => {
399
+ node: h("ion-item", { lines: "none" }, h("ion-checkbox", { checked: Boolean((_c = (_b = this.obj) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.gloria), onIonChange: (e) => {
400
400
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
401
401
  if (e.detail.checked) {
402
402
  this.ldfShouldAddGloriaPatri.emit({
@@ -438,7 +438,7 @@ const EditableMetadataMetadataFieldsComponent = class {
438
438
  }));
439
439
  }
440
440
  }
441
- } })),
441
+ }, justify: "space-between" }, localeStrings.insert_gloria)),
442
442
  size: 12
443
443
  });
444
444
  break;
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-d15b0d6d.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-b28bf2e4",[[2,"ldf-editable-text",{text:[1],path:[513],placeholder:[1],short:[4],unit:[1],inputType:[1,"input-type"],template:[1],templateMaker:[16],currentText:[32],localeStrings:[32]},[[0,"input","onInput"],[0,"focusout","onFocusOut"],[0,"select","onSelect"],[0,"focus","onFocus"],[0,"click","onClick"],[0,"keydown","onKeyDown"]]]]],["p-a752e9b6",[[2,"ldf-editable-metadata",{doc:[1],path:[513],visible:[4],collapsed:[4],modal:[8],obj:[32],localeStrings:[32],collapsedState:[32],showAdvanced:[32]}]]],["p-9d948ac9",[[6,"ldf-editor",{doc:[1],users:[16],uid:[1],cursors:[16],listUsers:[4,"list-users"],preview:[4],obj:[32],cursor:[32],focusObj:[32]},[[0,"ldfCursorMoved","onCursorMoved"],[4,"ldfDocShouldChange","onDocShouldChange"],[0,"ldfDocShouldAdd","onDocShouldAdd"],[0,"ldfAddChildAfter","onAddChildAfter"],[0,"ldfMergeWithPrevious","onMergeWithPrevious"],[4,"ldfAskForBibleIntros","onAskForBibleIntros"],[4,"ldfAskForCanticleOptions","onAskForCanticleOptions"],[4,"ldfAskForPrayersAndThanksgivings","onAskForPT"],[4,"ldfShouldAddGloriaPatri","onShouldAddGloriaPatri"],[8,"paste","onPaste"],[8,"drop","onDrop"],[8,"dragover","onDragOver"],[8,"dragenter","onDragEnter"],[0,"focusObj","onFocusObj"]]]]],["p-b43f4c39",[[2,"ldf-editable-preferences",{path:[513],obj:[16],modal:[8],tree:[32],specialTree:[32],localeStrings:[32],currentPreferences:[32],currentSpecialPreferences:[32]}]]],["p-fe8033c2",[[2,"ldf-editable-condition-piece",{path:[513],condition:[16],localeStrings:[32],workingCondition:[32]}]]],["p-fb168191",[[2,"ldf-editable-condition",{path:[513],obj:[16],modal:[8],localeStrings:[32],currentCondition:[32]}]]],["p-15792d0c",[[2,"ldf-editable-add-block-menu",{localeStrings:[32],menu:[32]},[[0,"ionChange","onIonChange"]]]]],["p-6849e4e5",[[2,"ldf-editable-filter-documents",{modal:[8],type:[1],versions:[16],options:[16],changeCallback:[16],localeStrings:[32],filteredOptions:[32],doc:[32],version:[32],setVersions:[64],setVersion:[64],setOptions:[64]}]]],["p-b0654366",[[2,"ldf-prayers-and-thanksgivings",{base:[513],index:[513],modal:[8],parent:[8],options:[16],localeStrings:[32],currentOptions:[32],filter:[32],setOptions:[64]}]]],["p-1b69e1bc",[[2,"ldf-editable-preference",{path:[513],preference:[16],modal:[8],localeStrings:[32],currentPreference:[32]}]]],["p-6c1e6318",[[2,"ldf-editor-cursors",{parent:[16],users:[16],uid:[513],cursors:[16],cursorPos:[32]},[[5,"scroll","onScroll"],[9,"resize","onResize"]]]]],["p-1da5f090",[[2,"ldf-editable-delete",{base:[513],index:[520],type:[1],obj:[8],localeStrings:[32]},[[0,"click","onClick"]]],[2,"ldf-editable-boolean",{path:[513],property:[513],value:[4]},[[0,"ionChange","onChange"]]]]],["p-6f7b2462",[[1,"ldf-heading",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32]}],[2,"ldf-day-name",{day:[1],obj:[32],localeStrings:[32]}],[6,"ldf-text",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32],intentions:[32],setPrayerList:[64]}],[2,"ldf-string",{text:[1],citation:[16],dropcap:[1],dropcapMinLength:[2,"dropcap-min-length"],replaceTetragrammaton:[4,"replace-tetragrammaton"],index:[2],fragment:[1],processedString:[32]}],[1,"ldf-label-bar",{center:[516]}]]],["p-063bc9d7",[[6,"ldf-bible-reading",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32],verses:[32],loadingError:[32],changeReading:[64]}],[2,"ldf-liturgical-document",{doc:[1],path:[513],base:[513],index:[2],parentType:[513,"parent-type"],editable:[4],preview:[4],padding:[1],obj:[32],localeStrings:[32],hasFocus:[32]},[[0,"dragover","onDragOver"],[4,"selectionchange","selectionChangeHandler"],[3,"mouseover","onMouseOver"],[3,"mouseout","onMouseOut"],[2,"click","onClick"]]],[2,"ldf-liturgy",{doc:[1],path:[513],editable:[4],preview:[4],obj:[32],hasFocus:[32]},[[0,"focusPath","onFocusPath"]]],[2,"ldf-editable-add-block",{visible:[4],base:[513],index:[514],localeStrings:[32]}],[2,"ldf-option",{doc:[1],path:[513],editable:[4],preview:[4],obj:[32],localeStrings:[32],filteredOptions:[32],select:[64]}],[6,"ldf-psalm",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32],filteredValue:[32],focusedVerse:[32],focusedSection:[32]}],[6,"ldf-responsive-prayer",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32]}],[2,"ldf-editable-metadata-buttons",{visible:[4],base:[513],index:[514],obj:[16],parentType:[1,"parent-type"],preview:[4],localeStrings:[32],collapsedState:[32],modal:[32]}],[2,"ldf-editable-select",{path:[513],property:[513],options:[16],value:[8],placeholder:[1]},[[0,"ionChange","onChange"]]],[2,"ldf-parallel",{doc:[1],path:[513],editable:[4],preview:[4],obj:[32],localeStrings:[32],filteredOptions:[32]}],[6,"ldf-image",{doc:[1],path:[513],editable:[4],modal:[8],obj:[32],localeStrings:[32],isResizing:[32],height:[32],width:[32]},[[5,"mouseup","stopResizing"],[9,"mousemove","resizingMove"]]],[6,"ldf-refrain",{doc:[1],path:[513],editable:[4],obj:[32]}],[6,"ldf-rubric",{doc:[1],path:[513],editable:[4],obj:[32]}],[2,"ldf-meditation",{doc:[1],path:[513],editable:[4],color:[1],autostart:[4],obj:[32],localeStrings:[32],secondsRemaining:[32],started:[32],paused:[32],start:[64],pause:[64],resume:[64],rewind:[64],duration:[64],reset:[64]}]]],["p-326fefd6",[[2,"ldf-editable-antiphon-field",{path:[513],antiphon:[1],omit_antiphon:[4],insert_antiphon:[4],localeStrings:[32],currentAntiphon:[32],currentOmitAntiphon:[32],currentInsertAntiphon:[32],mode:[32]}]]],["p-792a67b9",[[2,"ldf-editable-metadata-metadata-fields",{path:[513],doc:[1],bibleReadingIntros:[16],localeStrings:[32],fields:[32],obj:[32],currentBibleReadingIntros:[32],setBibleReadingIntros:[64]}],[2,"ldf-editable-lookup",{path:[513],lookup:[16],types:[16],currentLookup:[32]}]]],["p-f969bb07",[[2,"ldf-editable-preference-option",{path:[513],option:[16],localeStrings:[32],currentOption:[32]}]]],["p-68a1889c",[[2,"ldf-editable-string-list",{path:[513],property:[513],value:[16],localeStrings:[32],optimisticValues:[32],currentValue:[32]}]]]],e)));
1
+ import{p as e,b as o}from"./p-d15b0d6d.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-b28bf2e4",[[2,"ldf-editable-text",{text:[1],path:[513],placeholder:[1],short:[4],unit:[1],inputType:[1,"input-type"],template:[1],templateMaker:[16],currentText:[32],localeStrings:[32]},[[0,"input","onInput"],[0,"focusout","onFocusOut"],[0,"select","onSelect"],[0,"focus","onFocus"],[0,"click","onClick"],[0,"keydown","onKeyDown"]]]]],["p-a752e9b6",[[2,"ldf-editable-metadata",{doc:[1],path:[513],visible:[4],collapsed:[4],modal:[8],obj:[32],localeStrings:[32],collapsedState:[32],showAdvanced:[32]}]]],["p-9d948ac9",[[6,"ldf-editor",{doc:[1],users:[16],uid:[1],cursors:[16],listUsers:[4,"list-users"],preview:[4],obj:[32],cursor:[32],focusObj:[32]},[[0,"ldfCursorMoved","onCursorMoved"],[4,"ldfDocShouldChange","onDocShouldChange"],[0,"ldfDocShouldAdd","onDocShouldAdd"],[0,"ldfAddChildAfter","onAddChildAfter"],[0,"ldfMergeWithPrevious","onMergeWithPrevious"],[4,"ldfAskForBibleIntros","onAskForBibleIntros"],[4,"ldfAskForCanticleOptions","onAskForCanticleOptions"],[4,"ldfAskForPrayersAndThanksgivings","onAskForPT"],[4,"ldfShouldAddGloriaPatri","onShouldAddGloriaPatri"],[8,"paste","onPaste"],[8,"drop","onDrop"],[8,"dragover","onDragOver"],[8,"dragenter","onDragEnter"],[0,"focusObj","onFocusObj"]]]]],["p-b43f4c39",[[2,"ldf-editable-preferences",{path:[513],obj:[16],modal:[8],tree:[32],specialTree:[32],localeStrings:[32],currentPreferences:[32],currentSpecialPreferences:[32]}]]],["p-a45c3647",[[2,"ldf-editable-condition-piece",{path:[513],condition:[16],localeStrings:[32],workingCondition:[32]}]]],["p-cef59cf4",[[2,"ldf-editable-condition",{path:[513],obj:[16],modal:[8],localeStrings:[32],currentCondition:[32]}]]],["p-15792d0c",[[2,"ldf-editable-add-block-menu",{localeStrings:[32],menu:[32]},[[0,"ionChange","onIonChange"]]]]],["p-cc0ae2eb",[[2,"ldf-editable-filter-documents",{modal:[8],type:[1],versions:[16],options:[16],changeCallback:[16],localeStrings:[32],filteredOptions:[32],doc:[32],version:[32],setVersions:[64],setVersion:[64],setOptions:[64]}]]],["p-b0654366",[[2,"ldf-prayers-and-thanksgivings",{base:[513],index:[513],modal:[8],parent:[8],options:[16],localeStrings:[32],currentOptions:[32],filter:[32],setOptions:[64]}]]],["p-1b69e1bc",[[2,"ldf-editable-preference",{path:[513],preference:[16],modal:[8],localeStrings:[32],currentPreference:[32]}]]],["p-6c1e6318",[[2,"ldf-editor-cursors",{parent:[16],users:[16],uid:[513],cursors:[16],cursorPos:[32]},[[5,"scroll","onScroll"],[9,"resize","onResize"]]]]],["p-1da5f090",[[2,"ldf-editable-delete",{base:[513],index:[520],type:[1],obj:[8],localeStrings:[32]},[[0,"click","onClick"]]],[2,"ldf-editable-boolean",{path:[513],property:[513],value:[4]},[[0,"ionChange","onChange"]]]]],["p-6f7b2462",[[1,"ldf-heading",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32]}],[2,"ldf-day-name",{day:[1],obj:[32],localeStrings:[32]}],[6,"ldf-text",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32],intentions:[32],setPrayerList:[64]}],[2,"ldf-string",{text:[1],citation:[16],dropcap:[1],dropcapMinLength:[2,"dropcap-min-length"],replaceTetragrammaton:[4,"replace-tetragrammaton"],index:[2],fragment:[1],processedString:[32]}],[1,"ldf-label-bar",{center:[516]}]]],["p-063bc9d7",[[6,"ldf-bible-reading",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32],verses:[32],loadingError:[32],changeReading:[64]}],[2,"ldf-liturgical-document",{doc:[1],path:[513],base:[513],index:[2],parentType:[513,"parent-type"],editable:[4],preview:[4],padding:[1],obj:[32],localeStrings:[32],hasFocus:[32]},[[0,"dragover","onDragOver"],[4,"selectionchange","selectionChangeHandler"],[3,"mouseover","onMouseOver"],[3,"mouseout","onMouseOut"],[2,"click","onClick"]]],[2,"ldf-liturgy",{doc:[1],path:[513],editable:[4],preview:[4],obj:[32],hasFocus:[32]},[[0,"focusPath","onFocusPath"]]],[2,"ldf-editable-add-block",{visible:[4],base:[513],index:[514],localeStrings:[32]}],[2,"ldf-option",{doc:[1],path:[513],editable:[4],preview:[4],obj:[32],localeStrings:[32],filteredOptions:[32],select:[64]}],[6,"ldf-psalm",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32],filteredValue:[32],focusedVerse:[32],focusedSection:[32]}],[6,"ldf-responsive-prayer",{doc:[1],path:[513],editable:[4],obj:[32],localeStrings:[32]}],[2,"ldf-editable-metadata-buttons",{visible:[4],base:[513],index:[514],obj:[16],parentType:[1,"parent-type"],preview:[4],localeStrings:[32],collapsedState:[32],modal:[32]}],[2,"ldf-editable-select",{path:[513],property:[513],options:[16],value:[8],placeholder:[1]},[[0,"ionChange","onChange"]]],[2,"ldf-parallel",{doc:[1],path:[513],editable:[4],preview:[4],obj:[32],localeStrings:[32],filteredOptions:[32]}],[6,"ldf-image",{doc:[1],path:[513],editable:[4],modal:[8],obj:[32],localeStrings:[32],isResizing:[32],height:[32],width:[32]},[[5,"mouseup","stopResizing"],[9,"mousemove","resizingMove"]]],[6,"ldf-refrain",{doc:[1],path:[513],editable:[4],obj:[32]}],[6,"ldf-rubric",{doc:[1],path:[513],editable:[4],obj:[32]}],[2,"ldf-meditation",{doc:[1],path:[513],editable:[4],color:[1],autostart:[4],obj:[32],localeStrings:[32],secondsRemaining:[32],started:[32],paused:[32],start:[64],pause:[64],resume:[64],rewind:[64],duration:[64],reset:[64]}]]],["p-4611204b",[[2,"ldf-editable-antiphon-field",{path:[513],antiphon:[1],omit_antiphon:[4],insert_antiphon:[4],localeStrings:[32],currentAntiphon:[32],currentOmitAntiphon:[32],currentInsertAntiphon:[32],mode:[32]}]]],["p-923d4bd9",[[2,"ldf-editable-metadata-metadata-fields",{path:[513],doc:[1],bibleReadingIntros:[16],localeStrings:[32],fields:[32],obj:[32],currentBibleReadingIntros:[32],setBibleReadingIntros:[64]}],[2,"ldf-editable-lookup",{path:[513],lookup:[16],types:[16],currentLookup:[32]}]]],["p-f969bb07",[[2,"ldf-editable-preference-option",{path:[513],option:[16],localeStrings:[32],currentOption:[32]}]]],["p-68a1889c",[[2,"ldf-editable-string-list",{path:[513],property:[513],value:[16],localeStrings:[32],optimisticValues:[32],currentValue:[32]}]]]],e)));
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as n,g as a}from"./p-d15b0d6d.js";import{a as o}from"./p-fcc39afa.js";import"./p-619c1cd7.js";import{R as s}from"./p-3f3b5ab1.js";import{C as l}from"./p-991c0877.js";import{g as h}from"./p-546bb0de.js";const d={en:{antiphon:"Antiphon",omit:"Omit Antiphon",insert:"Insert Seasonal Antiphon",text:"Text",table:"Table",add_table_value_header:"Add Antiphon for Date",add_table_value_message:"What date should the antiphon appear? (MM-DD)",cancel:"Cancel",ok:"Okay"}},r=({mode:t,path:i,value:n})=>e("ion-item",{lines:"none"},"string"===t&&e("ldf-editable-text",{path:i,short:!0,text:n.toString()}),"refrain"===t&&e("ldf-liturgical-document",{path:i,doc:n,editable:!0})),p=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.mode="default"}antiphonChange(){this.currentAntiphon=this.antiphon,this.setMode()}omitAntiphonChange(){this.currentOmitAntiphon=this.omit_antiphon}insertAntiphonChange(){this.currentInsertAntiphon=this.insert_antiphon}componentWillLoad(){this.loadLocaleStrings(),this.currentAntiphon=this.antiphon,this.currentOmitAntiphon=this.omit_antiphon,this.currentInsertAntiphon=this.insert_antiphon,this.setMode()}setMode(){var t;null==this.currentAntiphon?this.mode="default":"string"==typeof this.currentAntiphon?this.mode="string":"refrain"===(null===(t=this.currentAntiphon)||void 0===t?void 0:t.type)?this.mode="refrain":"object"==typeof this.currentAntiphon?this.mode="table":console.warn(`[ldf-editable-antiphon-field] invalid antiphon field at path ${this.path}/metadata/antiphon: ${JSON.stringify(this.currentAntiphon)}`)}async loadLocaleStrings(){try{this.localeStrings=d[h(this.element)]}catch(t){console.warn(t)}}setValue(t,i,e){this.ldfDocShouldChange.emit(new l({path:`${this.path}/metadata/antiphon`,op:[{type:"set",oldValue:this.currentAntiphon,value:t}]})),this.currentAntiphon=t,this.setMode(),this.currentOmitAntiphon!==i&&(this.ldfDocShouldChange.emit(new l({path:`${this.path}/metadata/omit_antiphon`,op:[{type:"set",oldValue:this.currentOmitAntiphon,value:i}]})),this.currentOmitAntiphon=i),this.currentInsertAntiphon!==e&&(this.ldfDocShouldChange.emit(new l({path:`${this.path}/metadata/insert_antiphon`,op:[{type:"set",oldValue:this.currentInsertAntiphon,value:e}]})),this.currentInsertAntiphon=e)}async addTableValue(){const t=await o.create({header:this.localeStrings.add_table_value_header,message:this.localeStrings.add_table_value_message,inputs:[{name:"mmdd",type:"text",placeholder:"MM/DD"}],buttons:[{text:this.localeStrings.cancel,role:"cancel",cssClass:"secondary"},{text:this.localeStrings.ok,handler:({mmdd:t})=>{if("object"==typeof this.currentAntiphon){const i=this.currentAntiphon[t];this.currentAntiphon[t]="",this.ldfDocShouldChange.emit(new l({path:`${this.path}/metadata/antiphon`,op:[{type:"set",index:t,oldValue:i,value:""}]})),this.currentAntiphon=Object.assign({},this.currentAntiphon),this.ldfDocShouldChange.emit(new l({path:`${this.path}/metadata/omit_antiphon`,op:[{type:"set",oldValue:this.currentOmitAntiphon,value:!1}]})),this.currentOmitAntiphon=!1}}}]});await t.present()}async removeTableValue(t){"object"==typeof this.currentAntiphon&&(this.currentAntiphon[t]=void 0,this.ldfDocShouldChange.emit(new l({path:`${this.path}/metadata/antiphon`,op:[{type:"deleteAt",index:t,oldValue:this.currentAntiphon[t]}]})),this.currentAntiphon=Object.assign({},this.currentAntiphon))}render(){const t=this.localeStrings||{};return e(n,null,e("ion-radio-group",{value:this.mode,onIonChange:t=>{switch(t.detail.value){case"omit":this.setValue(void 0,!0,!1);break;case"insert":this.setValue(void 0,!1,!0);break;case"string":this.setValue("",!1,!1);case"refrain":this.setValue(new s({type:"refrain",style:"antiphon",value:[""]}),!1,!1);break;case"table":this.setValue({},!1,!1)}}},e("ion-list-header",null,e("ion-label",null,t.antiphon)),e("ion-item",{lines:"none"},e("ion-label",null,t.omit),e("ion-radio",{slot:"end",value:"omit"})),e("ion-item",{lines:"none"},e("ion-label",null,t.insert),e("ion-radio",{slot:"end",value:"insert"})),e("ion-item",{lines:"none"},e("ion-label",null,t.text),e("ion-radio",{slot:"end",value:"refrain"})),e("ion-item",{lines:"none"},e("ion-label",null,t.table),e("ion-radio",{slot:"end",value:"table"}))),("object"!=typeof this.currentAntiphon||"refrain"===this.currentAntiphon.type)&&e(r,{mode:this.mode,path:`${this.path}/metadata/antiphon`,value:this.currentAntiphon}),"object"==typeof this.currentAntiphon&&!Boolean(this.currentAntiphon.type)&&e("ion-item",{lines:"none"},e("ion-grid",null,Object.keys(this.currentAntiphon).map((t=>e("ion-row",{key:t},e("ion-col",{size:"4"},t),e("ion-col",null,e(r,{mode:"string"==typeof this.currentAntiphon[t]?"string":"refrain",path:`${this.path}/metadata/antiphon/${t}`,value:this.currentAntiphon[t]})),e("ion-col",{size:"1"},e("ion-buttons",null,e("ion-button",{fill:"clear",onClick:()=>this.removeTableValue(t)},e("ion-label",null,e("ion-icon",{slot:"icon-only",name:"trash"})))))))),e("ion-row",null,e("ion-toolbar",null,e("ion-buttons",{slot:"end"},e("ion-button",{onClick:()=>this.addTableValue()},e("ion-label",null,e("ion-icon",{slot:"icon-only",name:"add"})))))))))}get element(){return a(this)}static get watchers(){return{antiphon:["antiphonChange"],omit_antiphon:["omitAntiphonChange"],insert_antiphon:["insertAntiphonChange"]}}};p.style="ion-grid.sc-ldf-editable-antiphon-field{width:100%}ldf-liturgical-document.sc-ldf-editable-antiphon-field{width:100%}";export{p as ldf_editable_antiphon_field}
1
+ import{r as t,c as i,h as e,H as n,g as a}from"./p-d15b0d6d.js";import{a as s}from"./p-fcc39afa.js";import"./p-619c1cd7.js";import{R as o}from"./p-3f3b5ab1.js";import{C as h}from"./p-991c0877.js";import{g as l}from"./p-546bb0de.js";const d={en:{antiphon:"Antiphon",omit:"Omit Antiphon",insert:"Insert Seasonal Antiphon",text:"Text",table:"Table",add_table_value_header:"Add Antiphon for Date",add_table_value_message:"What date should the antiphon appear? (MM-DD)",cancel:"Cancel",ok:"Okay"}},p=({mode:t,path:i,value:n})=>e("ion-item",{lines:"none"},"string"===t&&e("ldf-editable-text",{path:i,short:!0,text:n.toString()}),"refrain"===t&&e("ldf-liturgical-document",{path:i,doc:n,editable:!0})),r=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.mode="default"}antiphonChange(){this.currentAntiphon=this.antiphon,this.setMode()}omitAntiphonChange(){this.currentOmitAntiphon=this.omit_antiphon}insertAntiphonChange(){this.currentInsertAntiphon=this.insert_antiphon}componentWillLoad(){this.loadLocaleStrings(),this.currentAntiphon=this.antiphon,this.currentOmitAntiphon=this.omit_antiphon,this.currentInsertAntiphon=this.insert_antiphon,this.setMode()}setMode(){var t;null==this.currentAntiphon?this.mode="default":"string"==typeof this.currentAntiphon?this.mode="string":"refrain"===(null===(t=this.currentAntiphon)||void 0===t?void 0:t.type)?this.mode="refrain":"object"==typeof this.currentAntiphon?this.mode="table":console.warn(`[ldf-editable-antiphon-field] invalid antiphon field at path ${this.path}/metadata/antiphon: ${JSON.stringify(this.currentAntiphon)}`)}async loadLocaleStrings(){try{this.localeStrings=d[l(this.element)]}catch(t){console.warn(t)}}setValue(t,i,e){this.ldfDocShouldChange.emit(new h({path:`${this.path}/metadata/antiphon`,op:[{type:"set",oldValue:this.currentAntiphon,value:t}]})),this.currentAntiphon=t,this.setMode(),this.currentOmitAntiphon!==i&&(this.ldfDocShouldChange.emit(new h({path:`${this.path}/metadata/omit_antiphon`,op:[{type:"set",oldValue:this.currentOmitAntiphon,value:i}]})),this.currentOmitAntiphon=i),this.currentInsertAntiphon!==e&&(this.ldfDocShouldChange.emit(new h({path:`${this.path}/metadata/insert_antiphon`,op:[{type:"set",oldValue:this.currentInsertAntiphon,value:e}]})),this.currentInsertAntiphon=e)}async addTableValue(){const t=await s.create({header:this.localeStrings.add_table_value_header,message:this.localeStrings.add_table_value_message,inputs:[{name:"mmdd",type:"text",placeholder:"MM/DD"}],buttons:[{text:this.localeStrings.cancel,role:"cancel",cssClass:"secondary"},{text:this.localeStrings.ok,handler:({mmdd:t})=>{if("object"==typeof this.currentAntiphon){const i=this.currentAntiphon[t];this.currentAntiphon[t]="",this.ldfDocShouldChange.emit(new h({path:`${this.path}/metadata/antiphon`,op:[{type:"set",index:t,oldValue:i,value:""}]})),this.currentAntiphon=Object.assign({},this.currentAntiphon),this.ldfDocShouldChange.emit(new h({path:`${this.path}/metadata/omit_antiphon`,op:[{type:"set",oldValue:this.currentOmitAntiphon,value:!1}]})),this.currentOmitAntiphon=!1}}}]});await t.present()}async removeTableValue(t){"object"==typeof this.currentAntiphon&&(this.currentAntiphon[t]=void 0,this.ldfDocShouldChange.emit(new h({path:`${this.path}/metadata/antiphon`,op:[{type:"deleteAt",index:t,oldValue:this.currentAntiphon[t]}]})),this.currentAntiphon=Object.assign({},this.currentAntiphon))}render(){const t=this.localeStrings||{};return e(n,null,e("ion-radio-group",{value:this.mode,onIonChange:t=>{switch(t.detail.value){case"omit":this.setValue(void 0,!0,!1);break;case"insert":this.setValue(void 0,!1,!0);break;case"string":this.setValue("",!1,!1);case"refrain":this.setValue(new o({type:"refrain",style:"antiphon",value:[""]}),!1,!1);break;case"table":this.setValue({},!1,!1)}}},e("ion-list-header",null,e("ion-label",null,t.antiphon)),e("ion-item",{lines:"none"},e("ion-radio",{value:"omit",justify:"space-between"},t.omit)),e("ion-item",{lines:"none"},e("ion-radio",{value:"insert",justify:"space-between"},t.insert)),e("ion-item",{lines:"none"},e("ion-radio",{value:"refrain",justify:"space-between"},t.text)),e("ion-item",{lines:"none"},e("ion-radio",{value:"table",justify:"space-between"},t.table))),("object"!=typeof this.currentAntiphon||"refrain"===this.currentAntiphon.type)&&e(p,{mode:this.mode,path:`${this.path}/metadata/antiphon`,value:this.currentAntiphon}),"object"==typeof this.currentAntiphon&&!Boolean(this.currentAntiphon.type)&&e("ion-item",{lines:"none"},e("ion-grid",null,Object.keys(this.currentAntiphon).map((t=>e("ion-row",{key:t},e("ion-col",{size:"4"},t),e("ion-col",null,e(p,{mode:"string"==typeof this.currentAntiphon[t]?"string":"refrain",path:`${this.path}/metadata/antiphon/${t}`,value:this.currentAntiphon[t]})),e("ion-col",{size:"1"},e("ion-buttons",null,e("ion-button",{fill:"clear",onClick:()=>this.removeTableValue(t)},e("ion-label",null,e("ion-icon",{slot:"icon-only",name:"trash"})))))))),e("ion-row",null,e("ion-toolbar",null,e("ion-buttons",{slot:"end"},e("ion-button",{onClick:()=>this.addTableValue()},e("ion-label",null,e("ion-icon",{slot:"icon-only",name:"add"})))))))))}get element(){return a(this)}static get watchers(){return{antiphon:["antiphonChange"],omit_antiphon:["omitAntiphonChange"],insert_antiphon:["insertAntiphonChange"]}}};r.style="ion-grid.sc-ldf-editable-antiphon-field{width:100%}ldf-liturgical-document.sc-ldf-editable-antiphon-field{width:100%}";export{r as ldf_editable_antiphon_field}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as i,H as l,g as a}from"./p-d15b0d6d.js";import{L as n}from"./p-619c1cd7.js";import{C as o}from"./p-991c0877.js";import{v as s}from"./p-8e59a930.js";import{s as d}from"./p-94095704.js";import{g as r}from"./p-546bb0de.js";import"./p-c88be1ca.js";import"./p-d6b725e9.js";import"./p-3f3b5ab1.js";import"./p-07a5654e.js";const h={allowMultiple:"Allow multiple options",lookup:"Look this document up from the database.",type:"Type",lectionary:"Lectionary",canticle:"Canticle",category:"Category",slug:"Slug",collect:"Collect",table:"Table",item:"Item",filter:"Filter",seasonal:"Seasonal",evening:"Evening",day:"Day",rotate:"Rotate",isPreference:"Value stored in preference",preference:"Preference",value:"Value"},p={type:"slug"},u=class{constructor(i){e(this,i),this.ldfDocShouldChange=t(this,"ldfDocShouldChange",7)}optionChange(){this.currentLookup=this.lookup}componentWillLoad(){this.currentLookup=this.lookup}toggle(){this.currentLookup?(this.ldfDocShouldChange.emit(new o({path:this.path,op:[{type:"set",oldValue:this.currentLookup,value:void 0}]})),this.currentLookup=void 0):(this.currentLookup=p,this.ldfDocShouldChange.emit(new o({path:this.path,op:[{type:"set",oldValue:void 0,value:p}]})))}toggleIsPreference(e,t){const i=(this.currentLookup||{})[e];t?(this.currentLookup=Object.assign(Object.assign({},this.currentLookup),{[e]:{preference:""}}),this.ldfDocShouldChange.emit(new o({path:`${this.path}/${e}`,op:[{type:"set",oldValue:i,value:{preference:""}}]}))):(this.currentLookup=Object.assign(Object.assign({},this.currentLookup),{[e]:""}),this.ldfDocShouldChange.emit(new o({path:`${this.path}/${e}`,op:[{type:"set",oldValue:i,value:""}]})))}render(){var e,t,a,n,o,s;const d=({label:e,field:t,value:l})=>{const a=l&&"string"!=typeof l;return[i("ion-item",{lines:"none"},i("ion-label",{position:"stacked"},e),i("br",null)),i("ion-item",{lines:"none"},i("ion-checkbox",{checked:a,onIonChange:e=>this.toggleIsPreference(t,e.detail.checked),justify:"space-between"},h.isPreference)),i("ion-item",null,i("ldf-editable-text",a?{path:`${this.path}/${t}/preference`,short:!0,placeholder:h.preference,text:null==l?void 0:l.preference}:{path:`${this.path}/${t}`,placeholder:h.value,short:!0,text:l}))]};return i(l,null,i("ion-item",null,i("ion-checkbox",{checked:Boolean(this.lookup),onIonChange:()=>this.toggle(),justify:"space-between"},h.lookup)),this.currentLookup&&i("ion-list",null,i("ion-item",null,i("ion-label",{position:"stacked"},h.type),i("ldf-editable-select",{path:this.path,property:"type",options:new Array({value:void 0,label:"—"}).concat(this.types.map((e=>({value:e,label:h[e]||e})))),value:null===(e=this.currentLookup)||void 0===e?void 0:e.type})),i(d,{label:h.table,field:"table",value:null===(t=this.currentLookup)||void 0===t?void 0:t.table}),i(d,{label:h.item,field:"item",value:null===(a=this.currentLookup)||void 0===a?void 0:a.item}),i("ion-item",null,i("ion-label",{position:"stacked"},h.filter),i("ldf-editable-select",{path:this.path,property:"filter",options:[{value:void 0,label:"—"},{value:"seasonal",label:h.seasonal},{value:"evening",label:h.evening},{value:"day",label:h.day}],value:null===(n=this.currentLookup)||void 0===n?void 0:n.filter})),i("ion-item",null,i("ion-label",null,h.rotate),i("ldf-editable-boolean",{slot:"end",path:this.path,property:"rotate",value:null===(o=this.currentLookup)||void 0===o?void 0:o.rotate})),i("ion-item",null,i("ion-label",null,h.allowMultiple),i("ldf-editable-boolean",{slot:"end",path:this.path,property:"allow_multiple",value:null===(s=this.currentLookup)||void 0===s?void 0:s.allow_multiple}))))}static get watchers(){return{lookup:["optionChange"]}}},c={en:{"bible-reading":"Bible Reading",changeable:"Changeable (show 'Change ...')",delay:"Delay before Starting",evening:"Evening Liturgy",heading:"Heading",heading1:"1. Title",heading2:"2. Section Title",heading3:"3. Label",heading4:"4. Sub-Section Label",insert_seasonal_antiphon:"Insert Seasonal Antiphon",insert_gloria:"Insert Gloria Patri",intro:"Introduction",label:"Short Label",latinname:"Latin Name",level:"Level",length:"Length of Meditation",liturgy:"Liturgy",liturgyversions:"Liturgy Versions",localname:"English Name",meditation:"Meditation",none:"None",number:"Psalm Number",omit_antiphon:"Omit Antiphon",omit_gloria:"Omit Gloria Patri",omit_label:"Omit Label",omit_response:"Omit Response",preferences:"Preferences",pronouns:"Pronouns to Replace",psalm:"Psalm",response:"Response",responsive:"Responsive Prayer",rollup:"Roll Up (Remove Whitespace)",slug:"End of URL (venite.app/[church name]/____)",special_preferences:"Special Preferences (not saved)",supplement:"Supplemental Devotion",title:"Settings",text:"Text",gloria:"Gloria Patri",insert_gloria_patri:"Insert the Gloria Patri",antiphon:"Antiphon",left:"Left",center:"Center",right:"Right",align:"Alignment",height:"Height",width:"Width"}};var v;!function(e){e[e.Alignment=0]="Alignment",e[e.String=1]="String",e[e.Bool=2]="Bool",e[e.Number=3]="Number",e[e.StringList=4]="StringList",e[e.BibleReadingIntro=5]="BibleReadingIntro",e[e.TimeInSeconds=6]="TimeInSeconds",e[e.HeadingLevel=7]="HeadingLevel",e[e.Gloria=8]="Gloria",e[e.Antiphon=9]="Antiphon"}(v||(v={}));const b=class{constructor(i){e(this,i),this.ldfDocShouldChange=t(this,"ldfDocShouldChange",7),this.ldfAskForBibleIntros=t(this,"ldfAskForBibleIntros",7),this.ldfShouldAddGloriaPatri=t(this,"ldfShouldAddGloriaPatri",7),this.currentBibleReadingIntros=new Array,this.bibleReadingIntros=new Array}docChanged(e){var t;try{this.obj=d("string"==typeof e?JSON.parse(e):e),this.fields=this.fieldsFromType(null===(t=this.obj)||void 0===t?void 0:t.type),this.fields.find((e=>e.type==v.BibleReadingIntro))&&this.ldfAskForBibleIntros.emit()}catch(e){console.warn(e),this.obj=new n}}introsChanged(){this.currentBibleReadingIntros=[...this.bibleReadingIntros]}async setBibleReadingIntros(e){this.currentBibleReadingIntros="string"==typeof e?JSON.parse(e):e}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=c[r(this.element)]}catch(e){console.warn(e)}}fieldsFromType(e){switch(e){case"bible-reading":return[{field:"response",type:v.String},{field:"intro",type:v.BibleReadingIntro}];case"heading":return[{field:"level",type:v.HeadingLevel}];case"image":return[{field:"height",type:v.Number,unit:"px"},{field:"width",type:v.Number,unit:"px"},{field:"align",type:v.Alignment}];case"liturgy":return[{field:"label",type:v.String},{field:"slug",type:v.String},{field:"liturgyversions",type:v.StringList},{field:"supplement",type:v.Bool},{field:"evening",type:v.Bool},{field:"pronouns",type:v.StringList}];case"meditation":return[{field:"length",type:v.TimeInSeconds},{field:"delay",type:v.TimeInSeconds}];case"psalm":return[{field:"number",type:v.Number},{field:"localname",type:v.String},{field:"latinname",type:v.String},{field:"omit_antiphon",type:v.Bool},{field:"omit_gloria",type:v.Bool},{field:"insert_seasonal_antiphon",type:v.Bool},{field:"antiphon",type:v.Antiphon},{field:"gloria",type:v.Gloria},{field:"changeable",type:v.Bool}];case"responsive":return[{field:"response",type:v.String}];case"option":case"refrain":case"rubric":return[];case"text":return[{field:"response",type:v.String},{field:"omit_response",type:v.Bool},{field:"omit_label",type:v.Bool},{field:"rollup",type:v.Bool}];default:console.warn("(ldf-editable-metadata-metadata-fields)",e,"is not a recognized type")}}fieldToNodes(e,t){var l,a,n,d,r,h,p,u,c;const b=new Array,f=((null===(l=this.obj)||void 0===l?void 0:l.metadata)||{})[e.field],g=`${this.path}/metadata/${e.field}`,m=t[e.field];let y=!0,_=!0;switch(e.type){case v.BibleReadingIntro:b.push(i("ldf-editable-select",{path:`${this.path}/metadata`,property:e.field,options:[{label:t.none,value:null},...this.currentBibleReadingIntros.map((e=>{var t;return{label:"responsive"===e.type?null===(t=e.value[0].text)||void 0===t?void 0:t.toString():e.value[0].toString(),value:e}}))],value:f}));break;case v.Bool:b.push(i("ldf-editable-boolean",{path:`${this.path}/metadata`,property:e.field,value:f})),_=!1;break;case v.Number:b.push(i("ldf-editable-text",{short:!0,inputType:"number",path:g,placeholder:m,text:f,unit:e.unit}));break;case v.String:b.push(i("ldf-editable-text",{short:!0,path:g,placeholder:m,text:f}));break;case v.StringList:b.push({node:i("ldf-editable-string-list",{path:`${this.path}/metadata`,property:e.field,value:f}),size:12}),y=!1;break;case v.HeadingLevel:b.push(i("ldf-editable-select",{path:`${this.path}/metadata`,property:e.field,options:[{label:t.heading1,value:1},{label:t.heading2,value:2},{label:t.heading3,value:3},{label:t.heading4,value:4}],value:f}));break;case v.TimeInSeconds:b.push(i("ldf-editable-text",{inputType:"number",short:!0,path:g,placeholder:m,text:f}));break;case v.Gloria:y=!1,b.push({node:i("ion-item",{lines:"none"},i("ion-checkbox",{checked:Boolean(null===(n=null===(a=this.obj)||void 0===a?void 0:a.metadata)||void 0===n?void 0:n.gloria),onIonChange:e=>{var t,i,l,a,n,d,r,h,p,u,c,v,b,f;e.detail.checked?(this.ldfShouldAddGloriaPatri.emit({path:this.path,language:null===(t=this.obj)||void 0===t?void 0:t.language,version:s(null===(i=this.obj)||void 0===i?void 0:i.version),oldValue:null===(a=null===(l=this.obj)||void 0===l?void 0:l.metadata)||void 0===a?void 0:a.gloria}),!1!==(null===(d=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===d?void 0:d.omit_gloria)&&this.ldfDocShouldChange.emit(new o({path:`${this.path}/metadata`,op:[{type:"set",index:"omit_gloria",oldValue:null===(h=null===(r=this.obj)||void 0===r?void 0:r.metadata)||void 0===h?void 0:h.omit_gloria,value:!1}]}))):(this.ldfDocShouldChange.emit(new o({path:`${this.path}/metadata`,op:[{type:"deleteAt",index:"gloria",oldValue:null===(u=null===(p=this.obj)||void 0===p?void 0:p.metadata)||void 0===u?void 0:u.gloria}]})),!0!==(null===(v=null===(c=this.obj)||void 0===c?void 0:c.metadata)||void 0===v?void 0:v.omit_gloria)&&this.ldfDocShouldChange.emit(new o({path:`${this.path}/metadata`,op:[{type:"set",index:"omit_gloria",oldValue:null===(f=null===(b=this.obj)||void 0===b?void 0:b.metadata)||void 0===f?void 0:f.omit_gloria,value:!0}]})))},justify:"space-between"},t.insert_gloria)),size:12});break;case v.Antiphon:y=!1,b.push({node:i("ldf-editable-antiphon-field",{path:this.path,antiphon:null===(r=null===(d=this.obj)||void 0===d?void 0:d.metadata)||void 0===r?void 0:r.antiphon,omit_antiphon:null===(p=null===(h=this.obj)||void 0===h?void 0:h.metadata)||void 0===p?void 0:p.omit_antiphon,insert_antiphon:null===(c=null===(u=this.obj)||void 0===u?void 0:u.metadata)||void 0===c?void 0:c.insert_seasonal_antiphon}),size:12});break;case v.Alignment:b.push(i("ldf-editable-select",{path:`${this.path}/metadata`,property:e.field,options:[{label:t.left,value:"left"},{label:t.center,value:"center"},{label:t.right,value:"right"}],value:f}));break;default:console.warn("(ldf-editable-metadata-metadata-fields)",e.type,"is not a recognized FieldType")}return y?[i("ion-item",{lines:"none"},i("ion-label",_?{position:"stacked"}:null,t[e.field]),b.map((e=>e.hasOwnProperty("size")?i("ion-col",{size:e.size},e.node):i("ion-col",null,e))))]:b}render(){const e=this.localeStrings||{},t=this.fields.map((t=>this.fieldToNodes(t,e)));return(null==t?void 0:t.length)>0&&i("ion-card",null,i("ion-card-header",null,i("ion-card-title",null,e[this.obj.type]," ",e.title)),i("ion-card-content",null,t.map((e=>e.map((e=>e.hasOwnProperty("size")?i("div",null,e.node):i("div",null,e)))))))}get element(){return a(this)}static get watchers(){return{doc:["docChanged"],bibleReadingIntros:["introsChanged"]}}};export{u as ldf_editable_lookup,b as ldf_editable_metadata_metadata_fields}
@@ -0,0 +1 @@
1
+ import{h as e,r as t,c as i,H as o,g as n}from"./p-d15b0d6d.js";import{C as l}from"./p-619c1cd7.js";import{C as a}from"./p-991c0877.js";import{g as s}from"./p-546bb0de.js";const r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["Advent","Christmas","Epiphany","Lent","HolyWeek","Easter","Ascension","Pentecost","Saints","OrdinaryTime","Ember","National","Rogation","Mary"],d=({field:t,localeStrings:i,options:o,currentCondition:n,onToggleSubcondition:l,onToggleValue:a})=>e("article",null,e("ion-item",null,e("ion-toggle",{checked:void 0!==n,onIonChange:e=>l(t,e.detail.checked,{except:[],only:[]}),justify:"space-between"},i[t])),void 0!==n&&e("div",{class:"type"},e("h4",null,i.only),o.map((o=>{var l;const s=null===(l=n.only)||void 0===l?void 0:l.includes(o);return e("ion-chip",{onClick:()=>a(t,"only",o),color:s?"primary":"light"},i[o]||o)})),e("h4",null,i.except),o.map((o=>{var l;const s=null===(l=n.except)||void 0===l?void 0:l.includes(o);return e("ion-chip",{onClick:()=>a(t,"except",o),color:s?"primary":"light"},i[o]||o)})))),h=({path:t,field:i,localeStrings:o,currentCondition:n,onToggleSubcondition:l})=>n&&e("article",null,e("ion-item",null,e("ion-toggle",{checked:void 0!==n[i],onIonChange:e=>l(i,e.detail.checked,{except:[],only:[]}),justify:"space-between"},o[i])),void 0!==n[i]&&e("div",{class:"type"},e("h4",null,o.except),e("ldf-editable-string-list",{path:`${t}/${i}`,property:"except",value:n[i].except}),e("h4",null,o.only),e("ldf-editable-string-list",{path:`${t}/${i}`,property:"only",value:n[i].only}))),p={en:{date:"Date (Month/Day)",day:"Liturgical Day",dayOfMonth:"Day of Month",dayOfMonthIs:"Day of Month Is",dayOfMonthIsNot:"Day of Month Is Not",except:"Except",feastDay:"Only on Holy Days and Sundays",notFeastDay:"Except on Holy Days and Sundays",gt:"After",gte:"On or After",lt:"Before",lte:"Before or On",only:"Only",preference:"Preference",preferenceIs:"=",preferenceIsNot:"≠",preferenceKey:"Key",preferenceValue:"Value",season:"Season",weekday:"Day of the Week"}},y=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7)}conditionChange(){this.workingCondition=this.condition}componentWillLoad(){this.loadLocaleStrings(),this.workingCondition=this.condition}async loadLocaleStrings(){try{this.localeStrings=p[s(this.element)]}catch(e){console.warn(e)}}toggleSubcondition(e,t,i){t&&null==this.workingCondition[e]?(this.workingCondition=new l(Object.assign(Object.assign({},this.workingCondition),{[e]:i})),this.ldfDocShouldChange.emit(new a({path:`${this.path}/${e}`,op:[{type:"set",value:i}]}))):(this.ldfDocShouldChange.emit(new a({path:`${this.path}/${e}`,op:[{type:"delete",oldValue:this.workingCondition[e]}]})),this.workingCondition[e]=void 0,this.workingCondition=new l(this.workingCondition))}toggleExceptOnly(e,t,i){const o=this.workingCondition[e][t];if(-1==o.indexOf(i))o.push(i),this.ldfDocShouldChange.emit(new a({path:`${this.path}/${e}/${t}`,op:[{type:"insertAt",index:o.length,value:i}]}));else{const n=o.indexOf(i);o.splice(n,1),this.ldfDocShouldChange.emit(new a({path:`${this.path}/${e}/${t}`,op:[{type:"deleteAt",index:n,oldValue:i}]}))}this.workingCondition=new l(Object.assign({},this.workingCondition))}setDateField(e,t){var i;const o=new Date(Date.parse(t)),n=o.getMonth()+1,l=o.getDate(),s=null===(i=this.workingCondition)||void 0===i?void 0:i.date[e];this.ldfDocShouldChange.emit(new a({path:`${this.path}/date/${e}`,op:[{type:"set",value:`${n}/${l}`,oldValue:s}]}))}preferenceIs(e){var t,i;const o=null===(i=null===(t=this.workingCondition)||void 0===t?void 0:t.preference)||void 0===i?void 0:i.is;this.workingCondition=new l(Object.assign(Object.assign({},this.workingCondition),{preference:Object.assign(Object.assign({},this.workingCondition.preference),{is:e})})),this.ldfDocShouldChange.emit(new a({path:`${this.path}/preference`,op:[{type:"set",index:"is",value:e,oldValue:o}]}))}render(){var t,i,n,l;const a=this.localeStrings||{};return e(o,null,e("ion-item",null,e("ion-toggle",{checked:!0===this.workingCondition.feastDay,onIonChange:e=>this.toggleSubcondition("feastDay",e.detail.checked,e.detail.checked),justify:"space-between"},a.feastDay)),e("ion-item",null,e("ion-toggle",{checked:!1===this.workingCondition.feastDay,onIonChange:e=>this.toggleSubcondition("feastDay",e.detail.checked,!e.detail.checked),justify:"space-between"},a.notFeastDay)),e(d,{field:"season",localeStrings:a,options:c,currentCondition:null===(t=this.workingCondition)||void 0===t?void 0:t.season,onToggleSubcondition:(e,t,i)=>this.toggleSubcondition(e,t,i),onToggleValue:(e,t,i)=>this.toggleExceptOnly(e,t,i)}),e(d,{field:"weekday",localeStrings:a,options:r,currentCondition:null===(i=this.workingCondition)||void 0===i?void 0:i.weekday,onToggleSubcondition:(e,t,i)=>this.toggleSubcondition(e,t,i),onToggleValue:(e,t,i)=>this.toggleExceptOnly(e,t,i)}),e("article",null,e("ion-item",null,e("ion-toggle",{checked:void 0!==this.workingCondition.date,onIonChange:e=>this.toggleSubcondition("date",e.detail.checked,{}),justify:"space-between"},a.date)),void 0!==this.workingCondition.date&&e("div",{class:"type"},e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.lte),e("ion-datetime",{presentation:"date",onIonChange:e=>this.setDateField("lte",Array.isArray(e.detail.value)?e.detail.value[0]:e.detail.value)})),e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.lt),e("ion-datetime",{presentation:"date",onIonChange:e=>this.setDateField("lt",Array.isArray(e.detail.value)?e.detail.value[0]:e.detail.value)})),e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.gte),e("ion-datetime",{presentation:"date",onIonChange:e=>this.setDateField("gte",Array.isArray(e.detail.value)?e.detail.value[0]:e.detail.value)})),e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.gt),e("ion-datetime",{onIonChange:e=>this.setDateField("gt",Array.isArray(e.detail.value)?e.detail.value[0]:e.detail.value)})))),e("article",null,e("ion-item",null,e("ion-toggle",{checked:void 0!==this.workingCondition.day_of_month,onIonChange:e=>this.toggleSubcondition("day_of_month",e.detail.checked,{}),justify:"space-between"},a.dayOfMonth)),void 0!==this.workingCondition.day_of_month&&e("div",{class:"type row"},e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.dayOfMonthIs),e("ldf-editable-text",{short:!0,inputType:"number",path:`${this.path}/day_of_month/eq`,placeholder:a.dayOfMonth,text:null===(n=this.workingCondition.day_of_month.eq)||void 0===n?void 0:n.toString()})),e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.dayOfMonthIsNot),e("ldf-editable-text",{short:!0,inputType:"number",path:`${this.path}/day_of_month/neq`,placeholder:a.dayOfMonth,text:null===(l=this.workingCondition.day_of_month.eq)||void 0===l?void 0:l.toString()})))),e("article",null,e("ion-item",null,e("ion-toggle",{checked:void 0!==this.workingCondition.preference,onIonChange:e=>this.toggleSubcondition("preference",e.detail.checked,{key:"",is:!0,value:""}),justify:"space-between"},a.preference)),void 0!==this.workingCondition.preference&&e("div",{class:"type row"},e("ldf-editable-text",{short:!0,inputType:"text",path:`${this.path}/preference/key`,placeholder:a.preferenceKey,text:this.workingCondition.preference.key}),e("ion-select",{value:this.workingCondition.preference.is,onIonChange:e=>this.preferenceIs(e.detail.value)},e("ion-select-option",{value:!0},a.preferenceIs),e("ion-select-option",{value:!1},a.preferenceIsNot)),e("ldf-editable-text",{short:!0,inputType:"text",path:`${this.path}/preference/value`,placeholder:a.preferenceValue,text:this.workingCondition.preference.value}))),e(h,{path:this.path,field:"day",localeStrings:a,currentCondition:this.workingCondition.day,onToggleSubcondition:(e,t,i)=>this.toggleSubcondition(e,t,i)}),e(h,{path:this.path,field:"week",localeStrings:a,currentCondition:this.workingCondition.week,onToggleSubcondition:(e,t,i)=>this.toggleSubcondition(e,t,i)}))}get element(){return n(this)}static get watchers(){return{condition:["conditionChange"]}}};y.style=".row.sc-ldf-editable-condition-piece{display:flex;flex-direction:row;justify-content:space-between;padding:8px}.type.sc-ldf-editable-condition-piece ul.checkbox.sc-ldf-editable-condition-piece{display:flex;flex-wrap:wrap;margin:0;padding:0}.type.sc-ldf-editable-condition-piece h4.sc-ldf-editable-condition-piece{text-align:center}.sc-ldf-editable-condition-piece:root{--ion-color-primary:#69bb7b;--ion-color-primary-rgb:105,187,123;--ion-color-primary-contrast:#000000;--ion-color-primary-contrast-rgb:0,0,0;--ion-color-primary-shade:#5ca56c;--ion-color-primary-tint:#78c288}.ion-color-primary.sc-ldf-editable-condition-piece{--ion-color-base:#69bb7b, var(--ion-color-primary);--ion-color-base-rgb:var(--ion-color-primary-rgb);--ion-color-contrast:var(--ion-color-primary-contrast);--ion-color-contrast-rgb:var(--ion-color-primary-contrast-rgb);--ion-color-shade:var(--ion-color-primary-shade);--ion-color-tint:var(--ion-color-primary-tint)}";export{y as ldf_editable_condition_piece}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as o,g as n}from"./p-d15b0d6d.js";import{L as e}from"./p-619c1cd7.js";import{v as l,O as h}from"./p-8e59a930.js";import{g as r}from"./p-546bb0de.js";const a={en:{choose:"Choose a ",confirm:"Choose",includeAll:"Include all possibilities",version:"Version",psalm:"Psalm",collect:"Collect",reading:"Reading"}},c=class{constructor(s){t(this,s),this.ldfDocumentSelected=i(this,"ldfDocumentSelected",7),this.filteredOptions=[],this.versions={},this.options=[]}versionChange(){this.filter(this.search)}versionsChange(){this.version||(this.version=Object.keys(this.versions)[0]),this.filter(this.search)}optionsChange(){this.filter(this.search)}async setVersions(t){this.versions=Object.assign({},t)}setVersion(t){this.version=t,this.filter(this.search)}async setOptions(t){this.options=t,this.optionsChange()}async componentWillLoad(){this.loadLocaleStrings(),this.filteredOptions=this.options||[],this.version=(this.versions||[])[0],this.filter(this.search)}async loadLocaleStrings(){try{this.localeStrings=a[r(this.element)]}catch(t){console.warn(t)}}filter(t){var i;this.search=t,this.filteredOptions=null===(i=this.options)||void 0===i?void 0:i.filter((i=>{var s;return(!this.version||i.version==this.version)&&(!t||(null===(s=i.label)||void 0===s?void 0:s.match(t)))}))}chooseVersion(t){this.version=t}chooseDoc(t){this.doc=t}choose(){this.changeCallback&&this.changeCallback(this.doc),this.ldfDocumentSelected.emit(this.doc),this.modal&&this.modal.dismiss()}render(){const t=this.localeStrings||{};return s(o,null,this.modal&&s("ion-header",null,s("ion-toolbar",null,s("ion-buttons",{slot:"end"},s("ion-button",{onClick:()=>this.modal.dismiss()},s("ion-icon",{name:"close",slot:"icon-only"}))))),s("ion-content",null,s("form",null,s("ion-list",null,s("ion-button",{fill:"clear",onClick:()=>{this.chooseDoc(function(t){if(Array.isArray(t)){const i=Array.from(new Set(t.map((t=>JSON.stringify(t))))).map((t=>new e(JSON.parse(t))));let s;return s=i,(null==s?void 0:s.length)>1?new h({type:"option",metadata:{selected:0},value:s}):s[0]}return t}(this.filteredOptions)),this.choose()}},s("ion-label",null,t.includeAll)),this.versions&&Object.values(this.versions).length>1&&s("ion-item",null,s("ion-label",null,t.version),s("ion-select",{value:this.version,onIonChange:t=>this.chooseVersion(t.detail.value)},Object.entries(this.versions).sort(((t,i)=>t[0]>i[0]?1:-1)).map((([t,i])=>s("ion-select-option",{value:t},i))))),s("ion-searchbar",{debounce:250,onIonInput:t=>this.filter(t.detail.value)}),this.filteredOptions&&this.filteredOptions.map((t=>{var i,o,n,e;return s("ion-item",{button:!0,onClick:()=>{this.chooseDoc(t),this.choose()},color:t==this.doc?"primary":void 0},null!==(o=null!==(i=t.label)&&void 0!==i?i:t.version_label)&&void 0!==o?o:`${null!==(e=null!==(n=((t.value||[])[0]||{}).text)&&void 0!==n?n:(t.value||[])[0])&&void 0!==e?e:""}${t.citation?` (${t.citation})`:""}`)}))))))}get element(){return n(this)}static get watchers(){return{version:["versionChange"],versions:["versionsChange"],options:["optionsChange"]}}};c.style="form.sc-ldf-editable-filter-documents{display:flex;flex-direction:column;align-items:center}ion-button.sc-ldf-editable-filter-documents{display:block;margin:auto;text-align:center}";export{c as ldf_editable_filter_documents}
1
+ import{r as t,c as i,h as s,H as e,g as o}from"./p-d15b0d6d.js";import{L as n}from"./p-619c1cd7.js";import{v as l,O as h}from"./p-8e59a930.js";import{g as r}from"./p-546bb0de.js";const a={en:{choose:"Choose a ",confirm:"Choose",includeAll:"Include all possibilities",version:"Version",psalm:"Psalm",collect:"Collect",reading:"Reading"}},c=class{constructor(s){t(this,s),this.ldfDocumentSelected=i(this,"ldfDocumentSelected",7),this.filteredOptions=[],this.versions={},this.options=[]}versionChange(){this.filter(this.search)}versionsChange(){this.version||(this.version=Object.keys(this.versions)[0]),this.filter(this.search)}optionsChange(){this.filter(this.search)}async setVersions(t){this.versions=Object.assign({},t)}setVersion(t){this.version=t,this.filter(this.search)}async setOptions(t){this.options=t,this.optionsChange()}async componentWillLoad(){this.loadLocaleStrings(),this.filteredOptions=this.options||[],this.version=(this.versions||[])[0],this.filter(this.search)}async loadLocaleStrings(){try{this.localeStrings=a[r(this.element)]}catch(t){console.warn(t)}}filter(t){var i;this.search=t,this.filteredOptions=null===(i=this.options)||void 0===i?void 0:i.filter((i=>{var s;return(!this.version||i.version==this.version)&&(!t||(null===(s=i.label)||void 0===s?void 0:s.match(t)))}))}chooseVersion(t){this.version=t}chooseDoc(t){this.doc=t}choose(){this.changeCallback&&this.changeCallback(this.doc),this.ldfDocumentSelected.emit(this.doc),this.modal&&this.modal.dismiss()}render(){const t=this.localeStrings||{};return s(e,null,this.modal&&s("ion-header",null,s("ion-toolbar",null,s("ion-buttons",{slot:"end"},s("ion-button",{onClick:()=>this.modal.dismiss()},s("ion-icon",{name:"close",slot:"icon-only"}))))),s("ion-content",null,s("form",null,s("ion-list",null,s("ion-button",{fill:"clear",onClick:()=>{this.chooseDoc(function(t){if(Array.isArray(t)){const i=Array.from(new Set(t.map((t=>JSON.stringify(t))))).map((t=>new n(JSON.parse(t))));let s;return s=i,(null==s?void 0:s.length)>1?new h({type:"option",metadata:{selected:0},value:s}):s[0]}return t}(this.filteredOptions)),this.choose()}},s("ion-label",null,t.includeAll)),this.versions&&Object.values(this.versions).length>1&&s("ion-item",null,s("ion-select",{label:t.version,justify:"space-between",value:this.version,onIonChange:t=>this.chooseVersion(t.detail.value)},Object.entries(this.versions).sort(((t,i)=>t[0]>i[0]?1:-1)).map((([t,i])=>s("ion-select-option",{value:t},i))))),s("ion-searchbar",{debounce:250,onIonInput:t=>this.filter(t.detail.value)}),this.filteredOptions&&this.filteredOptions.map((t=>{var i,e,o,n;return s("ion-item",{button:!0,onClick:()=>{this.chooseDoc(t),this.choose()},color:t==this.doc?"primary":void 0},null!==(e=null!==(i=t.label)&&void 0!==i?i:t.version_label)&&void 0!==e?e:`${null!==(n=null!==(o=((t.value||[])[0]||{}).text)&&void 0!==o?o:(t.value||[])[0])&&void 0!==n?n:""}${t.citation?` (${t.citation})`:""}`)}))))))}get element(){return o(this)}static get watchers(){return{version:["versionChange"],versions:["versionsChange"],options:["optionsChange"]}}};c.style="form.sc-ldf-editable-filter-documents{display:flex;flex-direction:column;align-items:center}ion-button.sc-ldf-editable-filter-documents{display:block;margin:auto;text-align:center}";export{c as ldf_editable_filter_documents}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as n,H as o,g as e}from"./p-d15b0d6d.js";import{C as s}from"./p-619c1cd7.js";import{C as l}from"./p-991c0877.js";import{g as d}from"./p-546bb0de.js";const a={en:{addCondition:"Add a Condition",and:"All of the following are true",condition:"Condition",hasCondition:"Only include this if...",or:"Any of the following is true"}},h=class{constructor(n){i(this,n),this.ldfDocShouldChange=t(this,"ldfDocShouldChange",7)}objChange(){var i;this.currentCondition=null===(i=this.obj)||void 0===i?void 0:i.condition}componentWillLoad(){var i;this.loadLocaleStrings(),this.currentCondition=null===(i=this.obj)||void 0===i?void 0:i.condition}async loadLocaleStrings(){try{this.localeStrings=a[d(this.element)]}catch(i){console.warn(i)}}toggleCondition(i){let t;i?(this.currentCondition={mode:"and",conditions:new Array},t=new l({path:this.path,op:[{type:"set",value:this.currentCondition}]})):(this.currentCondition=void 0,t=new l({path:this.path,op:[{type:"delete",oldValue:this.currentCondition}]})),this.ldfDocShouldChange.emit(t)}setAndOr(i){this.currentCondition.mode=i,this.ldfDocShouldChange.emit(new l({path:`${this.path}`,op:[{type:"set",index:"mode",value:i,oldValue:this.currentCondition.mode}]}))}addCondition(){Array.isArray(this.currentCondition.conditions)||(this.currentCondition.conditions=new Array,this.ldfDocShouldChange.emit(new l({path:this.path,op:[{type:"set",index:"conditions",value:new Array}]}))),this.currentCondition=Object.assign(Object.assign({},this.currentCondition),{conditions:this.currentCondition.conditions.concat(new s)});const i=this.currentCondition.conditions.length-1;this.ldfDocShouldChange.emit(new l({path:`${this.path}/conditions`,op:[{type:"insertAt",index:i<0?0:i,value:new s}]}))}render(){var i,t,e,s;const l=this.localeStrings||{};return n(o,null,n("ion-header",null,n("ion-toolbar",null,n("ion-title",null,l.condition),n("ion-buttons",{slot:"primary"},n("ion-button",{onClick:()=>this.modal.dismiss(null)},n("ion-icon",{slot:"icon-only",name:"close"}))))),n("ion-content",null,n("ion-list",null,n("ion-item",{lines:"none"},n("ion-checkbox",{checked:!!this.currentCondition,onIonChange:i=>this.toggleCondition(i.detail.checked),justify:"space-between"},l.hasCondition)),this.currentCondition&&n("ion-radio-group",{value:null===(i=this.currentCondition)||void 0===i?void 0:i.mode,onIonChange:i=>this.setAndOr(i.detail.value)},n("ion-item",{lines:"none"},n("ion-radio",{value:"and",justify:"space-between"},l.and)),n("ion-item",{lines:"none"},n("ion-radio",{value:"or",justify:"space-between"},l.or))),null===(e=null===(t=this.currentCondition)||void 0===t?void 0:t.conditions)||void 0===e?void 0:e.map(((i,t)=>[n("ion-toolbar",null,n("ion-title",{slot:"start"},l.condition," ",t+1),n("ion-buttons",{slot:"end"},n("ldf-editable-delete",{slot:"end",base:`${this.path}/conditions`,index:t,obj:i}))),n("ldf-editable-condition-piece",{path:`${this.path}/conditions/${t}`,condition:i})])),(null===(s=this.currentCondition)||void 0===s?void 0:s.conditions)&&n("ion-item",{lines:"none"},n("ion-button",{onClick:()=>this.addCondition()},l.addCondition)))))}get element(){return e(this)}static get watchers(){return{obj:["objChange"]}}};export{h as ldf_editable_condition}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venite/components",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Rendering components for the Venite.app Liturgical Document Format (LDF)",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -58,6 +58,6 @@
58
58
  "homepage": "https://github.com/gbj/venite#readme",
59
59
  "author": "Greg Johnston <greg@venite.app>",
60
60
  "peerDependencies": {
61
- "@ionic/core": ">=6.0.0"
61
+ "@ionic/core": ">=7.0.0"
62
62
  }
63
63
  }
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as l,g as a}from"./p-d15b0d6d.js";import{L as n}from"./p-619c1cd7.js";import{C as o}from"./p-991c0877.js";import{v as s}from"./p-8e59a930.js";import{s as d}from"./p-94095704.js";import{g as r}from"./p-546bb0de.js";import"./p-c88be1ca.js";import"./p-d6b725e9.js";import"./p-3f3b5ab1.js";import"./p-07a5654e.js";const h={allowMultiple:"Allow multiple options",lookup:"Look this document up from the database.",type:"Type",lectionary:"Lectionary",canticle:"Canticle",category:"Category",slug:"Slug",collect:"Collect",table:"Table",item:"Item",filter:"Filter",seasonal:"Seasonal",evening:"Evening",day:"Day",rotate:"Rotate",isPreference:"Value stored in preference",preference:"Preference",value:"Value"},p={type:"slug"},u=class{constructor(i){e(this,i),this.ldfDocShouldChange=t(this,"ldfDocShouldChange",7)}optionChange(){this.currentLookup=this.lookup}componentWillLoad(){this.currentLookup=this.lookup}toggle(){this.currentLookup?(this.ldfDocShouldChange.emit(new o({path:this.path,op:[{type:"set",oldValue:this.currentLookup,value:void 0}]})),this.currentLookup=void 0):(this.currentLookup=p,this.ldfDocShouldChange.emit(new o({path:this.path,op:[{type:"set",oldValue:void 0,value:p}]})))}toggleIsPreference(e,t){const i=(this.currentLookup||{})[e];t?(this.currentLookup=Object.assign(Object.assign({},this.currentLookup),{[e]:{preference:""}}),this.ldfDocShouldChange.emit(new o({path:`${this.path}/${e}`,op:[{type:"set",oldValue:i,value:{preference:""}}]}))):(this.currentLookup=Object.assign(Object.assign({},this.currentLookup),{[e]:""}),this.ldfDocShouldChange.emit(new o({path:`${this.path}/${e}`,op:[{type:"set",oldValue:i,value:""}]})))}render(){var e,t,a,n,o,s;const d=({label:e,field:t,value:l})=>{const a=l&&"string"!=typeof l;return[i("ion-item",{lines:"none"},i("ion-label",{position:"stacked"},e),i("br",null)),i("ion-item",{lines:"none"},i("ion-label",null,h.isPreference),i("ion-checkbox",{slot:"end",checked:a,onIonChange:e=>this.toggleIsPreference(t,e.detail.checked)})),i("ion-item",null,i("ldf-editable-text",a?{path:`${this.path}/${t}/preference`,short:!0,placeholder:h.preference,text:null==l?void 0:l.preference}:{path:`${this.path}/${t}`,placeholder:h.value,short:!0,text:l}))]};return i(l,null,i("ion-item",null,i("ion-label",null,h.lookup),i("ion-checkbox",{checked:Boolean(this.lookup),onIonChange:()=>this.toggle()})),this.currentLookup&&i("ion-list",null,i("ion-item",null,i("ion-label",{position:"stacked"},h.type),i("ldf-editable-select",{path:this.path,property:"type",options:new Array({value:void 0,label:"—"}).concat(this.types.map((e=>({value:e,label:h[e]||e})))),value:null===(e=this.currentLookup)||void 0===e?void 0:e.type})),i(d,{label:h.table,field:"table",value:null===(t=this.currentLookup)||void 0===t?void 0:t.table}),i(d,{label:h.item,field:"item",value:null===(a=this.currentLookup)||void 0===a?void 0:a.item}),i("ion-item",null,i("ion-label",{position:"stacked"},h.filter),i("ldf-editable-select",{path:this.path,property:"filter",options:[{value:void 0,label:"—"},{value:"seasonal",label:h.seasonal},{value:"evening",label:h.evening},{value:"day",label:h.day}],value:null===(n=this.currentLookup)||void 0===n?void 0:n.filter})),i("ion-item",null,i("ion-label",null,h.rotate),i("ldf-editable-boolean",{slot:"end",path:this.path,property:"rotate",value:null===(o=this.currentLookup)||void 0===o?void 0:o.rotate})),i("ion-item",null,i("ion-label",null,h.allowMultiple),i("ldf-editable-boolean",{slot:"end",path:this.path,property:"allow_multiple",value:null===(s=this.currentLookup)||void 0===s?void 0:s.allow_multiple}))))}static get watchers(){return{lookup:["optionChange"]}}},c={en:{"bible-reading":"Bible Reading",changeable:"Changeable (show 'Change ...')",delay:"Delay before Starting",evening:"Evening Liturgy",heading:"Heading",heading1:"1. Title",heading2:"2. Section Title",heading3:"3. Label",heading4:"4. Sub-Section Label",insert_seasonal_antiphon:"Insert Seasonal Antiphon",insert_gloria:"Insert Gloria Patri",intro:"Introduction",label:"Short Label",latinname:"Latin Name",level:"Level",length:"Length of Meditation",liturgy:"Liturgy",liturgyversions:"Liturgy Versions",localname:"English Name",meditation:"Meditation",none:"None",number:"Psalm Number",omit_antiphon:"Omit Antiphon",omit_gloria:"Omit Gloria Patri",omit_label:"Omit Label",omit_response:"Omit Response",preferences:"Preferences",pronouns:"Pronouns to Replace",psalm:"Psalm",response:"Response",responsive:"Responsive Prayer",rollup:"Roll Up (Remove Whitespace)",slug:"End of URL (venite.app/[church name]/____)",special_preferences:"Special Preferences (not saved)",supplement:"Supplemental Devotion",title:"Settings",text:"Text",gloria:"Gloria Patri",insert_gloria_patri:"Insert the Gloria Patri",antiphon:"Antiphon",left:"Left",center:"Center",right:"Right",align:"Alignment",height:"Height",width:"Width"}};var v;!function(e){e[e.Alignment=0]="Alignment",e[e.String=1]="String",e[e.Bool=2]="Bool",e[e.Number=3]="Number",e[e.StringList=4]="StringList",e[e.BibleReadingIntro=5]="BibleReadingIntro",e[e.TimeInSeconds=6]="TimeInSeconds",e[e.HeadingLevel=7]="HeadingLevel",e[e.Gloria=8]="Gloria",e[e.Antiphon=9]="Antiphon"}(v||(v={}));const b=class{constructor(i){e(this,i),this.ldfDocShouldChange=t(this,"ldfDocShouldChange",7),this.ldfAskForBibleIntros=t(this,"ldfAskForBibleIntros",7),this.ldfShouldAddGloriaPatri=t(this,"ldfShouldAddGloriaPatri",7),this.currentBibleReadingIntros=new Array,this.bibleReadingIntros=new Array}docChanged(e){var t;try{this.obj=d("string"==typeof e?JSON.parse(e):e),this.fields=this.fieldsFromType(null===(t=this.obj)||void 0===t?void 0:t.type),this.fields.find((e=>e.type==v.BibleReadingIntro))&&this.ldfAskForBibleIntros.emit()}catch(e){console.warn(e),this.obj=new n}}introsChanged(){this.currentBibleReadingIntros=[...this.bibleReadingIntros]}async setBibleReadingIntros(e){this.currentBibleReadingIntros="string"==typeof e?JSON.parse(e):e}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=c[r(this.element)]}catch(e){console.warn(e)}}fieldsFromType(e){switch(e){case"bible-reading":return[{field:"response",type:v.String},{field:"intro",type:v.BibleReadingIntro}];case"heading":return[{field:"level",type:v.HeadingLevel}];case"image":return[{field:"height",type:v.Number,unit:"px"},{field:"width",type:v.Number,unit:"px"},{field:"align",type:v.Alignment}];case"liturgy":return[{field:"label",type:v.String},{field:"slug",type:v.String},{field:"liturgyversions",type:v.StringList},{field:"supplement",type:v.Bool},{field:"evening",type:v.Bool},{field:"pronouns",type:v.StringList}];case"meditation":return[{field:"length",type:v.TimeInSeconds},{field:"delay",type:v.TimeInSeconds}];case"psalm":return[{field:"number",type:v.Number},{field:"localname",type:v.String},{field:"latinname",type:v.String},{field:"omit_antiphon",type:v.Bool},{field:"omit_gloria",type:v.Bool},{field:"insert_seasonal_antiphon",type:v.Bool},{field:"antiphon",type:v.Antiphon},{field:"gloria",type:v.Gloria},{field:"changeable",type:v.Bool}];case"responsive":return[{field:"response",type:v.String}];case"option":case"refrain":case"rubric":return[];case"text":return[{field:"response",type:v.String},{field:"omit_response",type:v.Bool},{field:"omit_label",type:v.Bool},{field:"rollup",type:v.Bool}];default:console.warn("(ldf-editable-metadata-metadata-fields)",e,"is not a recognized type")}}fieldToNodes(e,t){var l,a,n,d,r,h,p,u,c;const b=new Array,g=((null===(l=this.obj)||void 0===l?void 0:l.metadata)||{})[e.field],f=`${this.path}/metadata/${e.field}`,m=t[e.field];let y=!0,_=!0;switch(e.type){case v.BibleReadingIntro:b.push(i("ldf-editable-select",{path:`${this.path}/metadata`,property:e.field,options:[{label:t.none,value:null},...this.currentBibleReadingIntros.map((e=>{var t;return{label:"responsive"===e.type?null===(t=e.value[0].text)||void 0===t?void 0:t.toString():e.value[0].toString(),value:e}}))],value:g}));break;case v.Bool:b.push(i("ldf-editable-boolean",{path:`${this.path}/metadata`,property:e.field,value:g})),_=!1;break;case v.Number:b.push(i("ldf-editable-text",{short:!0,inputType:"number",path:f,placeholder:m,text:g,unit:e.unit}));break;case v.String:b.push(i("ldf-editable-text",{short:!0,path:f,placeholder:m,text:g}));break;case v.StringList:b.push({node:i("ldf-editable-string-list",{path:`${this.path}/metadata`,property:e.field,value:g}),size:12}),y=!1;break;case v.HeadingLevel:b.push(i("ldf-editable-select",{path:`${this.path}/metadata`,property:e.field,options:[{label:t.heading1,value:1},{label:t.heading2,value:2},{label:t.heading3,value:3},{label:t.heading4,value:4}],value:g}));break;case v.TimeInSeconds:b.push(i("ldf-editable-text",{inputType:"number",short:!0,path:f,placeholder:m,text:g}));break;case v.Gloria:y=!1,b.push({node:i("ion-item",{lines:"none"},i("ion-label",null,t.insert_gloria),i("ion-checkbox",{checked:Boolean(null===(n=null===(a=this.obj)||void 0===a?void 0:a.metadata)||void 0===n?void 0:n.gloria),onIonChange:e=>{var t,i,l,a,n,d,r,h,p,u,c,v,b,g;e.detail.checked?(this.ldfShouldAddGloriaPatri.emit({path:this.path,language:null===(t=this.obj)||void 0===t?void 0:t.language,version:s(null===(i=this.obj)||void 0===i?void 0:i.version),oldValue:null===(a=null===(l=this.obj)||void 0===l?void 0:l.metadata)||void 0===a?void 0:a.gloria}),!1!==(null===(d=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===d?void 0:d.omit_gloria)&&this.ldfDocShouldChange.emit(new o({path:`${this.path}/metadata`,op:[{type:"set",index:"omit_gloria",oldValue:null===(h=null===(r=this.obj)||void 0===r?void 0:r.metadata)||void 0===h?void 0:h.omit_gloria,value:!1}]}))):(this.ldfDocShouldChange.emit(new o({path:`${this.path}/metadata`,op:[{type:"deleteAt",index:"gloria",oldValue:null===(u=null===(p=this.obj)||void 0===p?void 0:p.metadata)||void 0===u?void 0:u.gloria}]})),!0!==(null===(v=null===(c=this.obj)||void 0===c?void 0:c.metadata)||void 0===v?void 0:v.omit_gloria)&&this.ldfDocShouldChange.emit(new o({path:`${this.path}/metadata`,op:[{type:"set",index:"omit_gloria",oldValue:null===(g=null===(b=this.obj)||void 0===b?void 0:b.metadata)||void 0===g?void 0:g.omit_gloria,value:!0}]})))}})),size:12});break;case v.Antiphon:y=!1,b.push({node:i("ldf-editable-antiphon-field",{path:this.path,antiphon:null===(r=null===(d=this.obj)||void 0===d?void 0:d.metadata)||void 0===r?void 0:r.antiphon,omit_antiphon:null===(p=null===(h=this.obj)||void 0===h?void 0:h.metadata)||void 0===p?void 0:p.omit_antiphon,insert_antiphon:null===(c=null===(u=this.obj)||void 0===u?void 0:u.metadata)||void 0===c?void 0:c.insert_seasonal_antiphon}),size:12});break;case v.Alignment:b.push(i("ldf-editable-select",{path:`${this.path}/metadata`,property:e.field,options:[{label:t.left,value:"left"},{label:t.center,value:"center"},{label:t.right,value:"right"}],value:g}));break;default:console.warn("(ldf-editable-metadata-metadata-fields)",e.type,"is not a recognized FieldType")}return y?[i("ion-item",{lines:"none"},i("ion-label",_?{position:"stacked"}:null,t[e.field]),b.map((e=>e.hasOwnProperty("size")?i("ion-col",{size:e.size},e.node):i("ion-col",null,e))))]:b}render(){const e=this.localeStrings||{},t=this.fields.map((t=>this.fieldToNodes(t,e)));return(null==t?void 0:t.length)>0&&i("ion-card",null,i("ion-card-header",null,i("ion-card-title",null,e[this.obj.type]," ",e.title)),i("ion-card-content",null,t.map((e=>e.map((e=>e.hasOwnProperty("size")?i("div",null,e.node):i("div",null,e)))))))}get element(){return a(this)}static get watchers(){return{doc:["docChanged"],bibleReadingIntros:["introsChanged"]}}};export{u as ldf_editable_lookup,b as ldf_editable_metadata_metadata_fields}
@@ -1 +0,0 @@
1
- import{r as i,c as n,h as o,H as t,g as e}from"./p-d15b0d6d.js";import{C as l}from"./p-619c1cd7.js";import{C as s}from"./p-991c0877.js";import{g as d}from"./p-546bb0de.js";const a={en:{addCondition:"Add a Condition",and:"All of the following are true",condition:"Condition",hasCondition:"Only include this if...",or:"Any of the following is true"}},h=class{constructor(o){i(this,o),this.ldfDocShouldChange=n(this,"ldfDocShouldChange",7)}objChange(){var i;this.currentCondition=null===(i=this.obj)||void 0===i?void 0:i.condition}componentWillLoad(){var i;this.loadLocaleStrings(),this.currentCondition=null===(i=this.obj)||void 0===i?void 0:i.condition}async loadLocaleStrings(){try{this.localeStrings=a[d(this.element)]}catch(i){console.warn(i)}}toggleCondition(i){let n;i?(this.currentCondition={mode:"and",conditions:new Array},n=new s({path:this.path,op:[{type:"set",value:this.currentCondition}]})):(this.currentCondition=void 0,n=new s({path:this.path,op:[{type:"delete",oldValue:this.currentCondition}]})),this.ldfDocShouldChange.emit(n)}setAndOr(i){this.currentCondition.mode=i,this.ldfDocShouldChange.emit(new s({path:`${this.path}`,op:[{type:"set",index:"mode",value:i,oldValue:this.currentCondition.mode}]}))}addCondition(){Array.isArray(this.currentCondition.conditions)||(this.currentCondition.conditions=new Array,this.ldfDocShouldChange.emit(new s({path:this.path,op:[{type:"set",index:"conditions",value:new Array}]}))),this.currentCondition=Object.assign(Object.assign({},this.currentCondition),{conditions:this.currentCondition.conditions.concat(new l)});const i=this.currentCondition.conditions.length-1;this.ldfDocShouldChange.emit(new s({path:`${this.path}/conditions`,op:[{type:"insertAt",index:i<0?0:i,value:new l}]}))}render(){var i,n,e,l;const s=this.localeStrings||{};return o(t,null,o("ion-header",null,o("ion-toolbar",null,o("ion-title",null,s.condition),o("ion-buttons",{slot:"primary"},o("ion-button",{onClick:()=>this.modal.dismiss(null)},o("ion-icon",{slot:"icon-only",name:"close"}))))),o("ion-content",null,o("ion-list",null,o("ion-item",{lines:"none"},o("ion-label",null,s.hasCondition),o("ion-checkbox",{checked:!!this.currentCondition,onIonChange:i=>this.toggleCondition(i.detail.checked)})),this.currentCondition&&o("ion-radio-group",{value:null===(i=this.currentCondition)||void 0===i?void 0:i.mode,onIonChange:i=>this.setAndOr(i.detail.value)},o("ion-item",{lines:"none"},o("ion-label",null,s.and),o("ion-radio",{value:"and"})),o("ion-item",{lines:"none"},o("ion-label",null,s.or),o("ion-radio",{value:"or"}))),null===(e=null===(n=this.currentCondition)||void 0===n?void 0:n.conditions)||void 0===e?void 0:e.map(((i,n)=>[o("ion-toolbar",null,o("ion-title",{slot:"start"},s.condition," ",n+1),o("ion-buttons",{slot:"end"},o("ldf-editable-delete",{slot:"end",base:`${this.path}/conditions`,index:n,obj:i}))),o("ldf-editable-condition-piece",{path:`${this.path}/conditions/${n}`,condition:i})])),(null===(l=this.currentCondition)||void 0===l?void 0:l.conditions)&&o("ion-item",{lines:"none"},o("ion-button",{onClick:()=>this.addCondition()},s.addCondition)))))}get element(){return e(this)}static get watchers(){return{obj:["objChange"]}}};export{h as ldf_editable_condition}
@@ -1 +0,0 @@
1
- import{h as e,r as t,c as o,H as i,g as n}from"./p-d15b0d6d.js";import{C as l}from"./p-619c1cd7.js";import{C as a}from"./p-991c0877.js";import{g as s}from"./p-546bb0de.js";const r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["Advent","Christmas","Epiphany","Lent","HolyWeek","Easter","Ascension","Pentecost","Saints","OrdinaryTime","Ember","National","Rogation","Mary"],d=({field:t,localeStrings:o,options:i,currentCondition:n,onToggleSubcondition:l,onToggleValue:a})=>e("article",null,e("ion-item",null,e("ion-label",null,o[t]),e("ion-toggle",{checked:void 0!==n,onIonChange:e=>l(t,e.detail.checked,{except:[],only:[]})})),void 0!==n&&e("div",{class:"type"},e("h4",null,o.only),i.map((i=>{var l;const s=null===(l=n.only)||void 0===l?void 0:l.includes(i);return e("ion-chip",{onClick:()=>a(t,"only",i),color:s?"primary":"light"},o[i]||i)})),e("h4",null,o.except),i.map((i=>{var l;const s=null===(l=n.except)||void 0===l?void 0:l.includes(i);return e("ion-chip",{onClick:()=>a(t,"except",i),color:s?"primary":"light"},o[i]||i)})))),h=({path:t,field:o,localeStrings:i,currentCondition:n,onToggleSubcondition:l})=>n&&e("article",null,e("ion-item",null,e("ion-label",null,i[o]),e("ion-toggle",{checked:void 0!==n[o],onIonChange:e=>l(o,e.detail.checked,{except:[],only:[]})})),void 0!==n[o]&&e("div",{class:"type"},e("h4",null,i.except),e("ldf-editable-string-list",{path:`${t}/${o}`,property:"except",value:n[o].except}),e("h4",null,i.only),e("ldf-editable-string-list",{path:`${t}/${o}`,property:"only",value:n[o].only}))),p={en:{date:"Date (Month/Day)",day:"Liturgical Day",dayOfMonth:"Day of Month",dayOfMonthIs:"Day of Month Is",dayOfMonthIsNot:"Day of Month Is Not",except:"Except",feastDay:"Only on Holy Days and Sundays",notFeastDay:"Except on Holy Days and Sundays",gt:"After",gte:"On or After",lt:"Before",lte:"Before or On",only:"Only",preference:"Preference",preferenceIs:"=",preferenceIsNot:"≠",preferenceKey:"Key",preferenceValue:"Value",season:"Season",weekday:"Day of the Week"}},y=class{constructor(e){t(this,e),this.ldfDocShouldChange=o(this,"ldfDocShouldChange",7)}conditionChange(){this.workingCondition=this.condition}componentWillLoad(){this.loadLocaleStrings(),this.workingCondition=this.condition}async loadLocaleStrings(){try{this.localeStrings=p[s(this.element)]}catch(e){console.warn(e)}}toggleSubcondition(e,t,o){t&&null==this.workingCondition[e]?(this.workingCondition=new l(Object.assign(Object.assign({},this.workingCondition),{[e]:o})),this.ldfDocShouldChange.emit(new a({path:`${this.path}/${e}`,op:[{type:"set",value:o}]}))):(this.ldfDocShouldChange.emit(new a({path:`${this.path}/${e}`,op:[{type:"delete",oldValue:this.workingCondition[e]}]})),this.workingCondition[e]=void 0,this.workingCondition=new l(this.workingCondition))}toggleExceptOnly(e,t,o){const i=this.workingCondition[e][t];if(-1==i.indexOf(o))i.push(o),this.ldfDocShouldChange.emit(new a({path:`${this.path}/${e}/${t}`,op:[{type:"insertAt",index:i.length,value:o}]}));else{const n=i.indexOf(o);i.splice(n,1),this.ldfDocShouldChange.emit(new a({path:`${this.path}/${e}/${t}`,op:[{type:"deleteAt",index:n,oldValue:o}]}))}this.workingCondition=new l(Object.assign({},this.workingCondition))}setDateField(e,t){var o;const i=new Date(Date.parse(t)),n=i.getMonth()+1,l=i.getDate(),s=null===(o=this.workingCondition)||void 0===o?void 0:o.date[e];this.ldfDocShouldChange.emit(new a({path:`${this.path}/date/${e}`,op:[{type:"set",value:`${n}/${l}`,oldValue:s}]}))}preferenceIs(e){var t,o;const i=null===(o=null===(t=this.workingCondition)||void 0===t?void 0:t.preference)||void 0===o?void 0:o.is;this.workingCondition=new l(Object.assign(Object.assign({},this.workingCondition),{preference:Object.assign(Object.assign({},this.workingCondition.preference),{is:e})})),this.ldfDocShouldChange.emit(new a({path:`${this.path}/preference`,op:[{type:"set",index:"is",value:e,oldValue:i}]}))}render(){var t,o,n,l;const a=this.localeStrings||{};return e(i,null,e("ion-item",null,e("ion-label",null,a.feastDay),e("ion-toggle",{checked:!0===this.workingCondition.feastDay,onIonChange:e=>this.toggleSubcondition("feastDay",e.detail.checked,e.detail.checked)})),e("ion-item",null,e("ion-label",null,a.notFeastDay),e("ion-toggle",{checked:!1===this.workingCondition.feastDay,onIonChange:e=>this.toggleSubcondition("feastDay",e.detail.checked,!e.detail.checked)})),e(d,{field:"season",localeStrings:a,options:c,currentCondition:null===(t=this.workingCondition)||void 0===t?void 0:t.season,onToggleSubcondition:(e,t,o)=>this.toggleSubcondition(e,t,o),onToggleValue:(e,t,o)=>this.toggleExceptOnly(e,t,o)}),e(d,{field:"weekday",localeStrings:a,options:r,currentCondition:null===(o=this.workingCondition)||void 0===o?void 0:o.weekday,onToggleSubcondition:(e,t,o)=>this.toggleSubcondition(e,t,o),onToggleValue:(e,t,o)=>this.toggleExceptOnly(e,t,o)}),e("article",null,e("ion-item",null,e("ion-label",null,a.date),e("ion-toggle",{checked:void 0!==this.workingCondition.date,onIonChange:e=>this.toggleSubcondition("date",e.detail.checked,{})})),void 0!==this.workingCondition.date&&e("div",{class:"type"},e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.lte),e("ion-datetime",{presentation:"date",onIonChange:e=>this.setDateField("lte",Array.isArray(e.detail.value)?e.detail.value[0]:e.detail.value)})),e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.lt),e("ion-datetime",{presentation:"date",onIonChange:e=>this.setDateField("lt",Array.isArray(e.detail.value)?e.detail.value[0]:e.detail.value)})),e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.gte),e("ion-datetime",{presentation:"date",onIonChange:e=>this.setDateField("gte",Array.isArray(e.detail.value)?e.detail.value[0]:e.detail.value)})),e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.gt),e("ion-datetime",{onIonChange:e=>this.setDateField("gt",Array.isArray(e.detail.value)?e.detail.value[0]:e.detail.value)})))),e("article",null,e("ion-item",null,e("ion-label",null,a.dayOfMonth),e("ion-toggle",{checked:void 0!==this.workingCondition.day_of_month,onIonChange:e=>this.toggleSubcondition("day_of_month",e.detail.checked,{})})),void 0!==this.workingCondition.day_of_month&&e("div",{class:"type row"},e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.dayOfMonthIs),e("ldf-editable-text",{short:!0,inputType:"number",path:`${this.path}/day_of_month/eq`,placeholder:a.dayOfMonth,text:null===(n=this.workingCondition.day_of_month.eq)||void 0===n?void 0:n.toString()})),e("ion-item",{lines:"none"},e("ion-label",{position:"stacked"},a.dayOfMonthIsNot),e("ldf-editable-text",{short:!0,inputType:"number",path:`${this.path}/day_of_month/neq`,placeholder:a.dayOfMonth,text:null===(l=this.workingCondition.day_of_month.eq)||void 0===l?void 0:l.toString()})))),e("article",null,e("ion-item",null,e("ion-label",null,a.preference),e("ion-toggle",{checked:void 0!==this.workingCondition.preference,onIonChange:e=>this.toggleSubcondition("preference",e.detail.checked,{key:"",is:!0,value:""})})),void 0!==this.workingCondition.preference&&e("div",{class:"type row"},e("ldf-editable-text",{short:!0,inputType:"text",path:`${this.path}/preference/key`,placeholder:a.preferenceKey,text:this.workingCondition.preference.key}),e("ion-select",{value:this.workingCondition.preference.is,onIonChange:e=>this.preferenceIs(e.detail.value)},e("ion-select-option",{value:!0},a.preferenceIs),e("ion-select-option",{value:!1},a.preferenceIsNot)),e("ldf-editable-text",{short:!0,inputType:"text",path:`${this.path}/preference/value`,placeholder:a.preferenceValue,text:this.workingCondition.preference.value}))),e(h,{path:this.path,field:"day",localeStrings:a,currentCondition:this.workingCondition.day,onToggleSubcondition:(e,t,o)=>this.toggleSubcondition(e,t,o)}),e(h,{path:this.path,field:"week",localeStrings:a,currentCondition:this.workingCondition.week,onToggleSubcondition:(e,t,o)=>this.toggleSubcondition(e,t,o)}))}get element(){return n(this)}static get watchers(){return{condition:["conditionChange"]}}};y.style=".row.sc-ldf-editable-condition-piece{display:flex;flex-direction:row;justify-content:space-between;padding:8px}.type.sc-ldf-editable-condition-piece ul.checkbox.sc-ldf-editable-condition-piece{display:flex;flex-wrap:wrap;margin:0;padding:0}.type.sc-ldf-editable-condition-piece h4.sc-ldf-editable-condition-piece{text-align:center}.sc-ldf-editable-condition-piece:root{--ion-color-primary:#69bb7b;--ion-color-primary-rgb:105,187,123;--ion-color-primary-contrast:#000000;--ion-color-primary-contrast-rgb:0,0,0;--ion-color-primary-shade:#5ca56c;--ion-color-primary-tint:#78c288}.ion-color-primary.sc-ldf-editable-condition-piece{--ion-color-base:#69bb7b, var(--ion-color-primary);--ion-color-base-rgb:var(--ion-color-primary-rgb);--ion-color-contrast:var(--ion-color-primary-contrast);--ion-color-contrast-rgb:var(--ion-color-primary-contrast-rgb);--ion-color-shade:var(--ion-color-primary-shade);--ion-color-tint:var(--ion-color-primary-tint)}";export{y as ldf_editable_condition_piece}