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} from \"../constants.js\";\nimport { reset_casting } from \"../helpers.js\";\nimport { DAYTOOL, daytool } from \"./daytool.js\";\nimport {\n daytool_entity,\n daytool_note,\n daytool_event,\n daytool_plan,\n daytool_goal,\n daytool_case,\n daytool_stat,\n daytool_person,\n daytool_need,\n daytool_feed,\n} from \"./daytool_entity.js\";\nimport { daytool_nav } from \"./daytool_nav.js\";\nimport {\n needsService,\n goalsService,\n eventsService,\n plansService,\n casesService,\n feedsService,\n notesService,\n statsService,\n personsService,\n} from \"./daytool_storage.js\";\nimport { reset_actions } from \"./UI/daytool_actions.js\";\nimport { daytool_cleaner } from \"./UI/daytool_cleaner.js\";\nimport { DAYTOOL__EVENT_SETTINGS_FORM_UI } from \"./UI/daytool_event.js\";\nimport { daytool_injector } from \"./UI/daytool_injector.js\";\nimport { daytool_plan_item } from \"./UI/daytool_plan.js\";\nimport { daytool_templates } from \"./UI/daytool_templates.js\";\n\n// injection type ->\nexport class daytool_ui {\n // DayTool Entity View\n static showTextAddButton(e: MouseEvent) {\n var target = e.target;\n var div = target.nextElementSibling;\n div.classList.add(\"active\");\n }\n\n static hideTextAddButton(e: MouseEvent) {\n var target = e.target;\n var div = target.nextElementSibling;\n div.classList.remove(\"active\");\n }\n\n static highlight(e: MouseEvent) {\n var target = e.target;\n var div = target.closest(\"[data-entity-id][data-entity-type]\");\n var entity_id = parseInt(div.getAttribute(\"data-entity-id\"));\n var entity_type = div.getAttribute(\"data-entity-type\");\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n if (object == null) {\n console.log();\n }\n object.highlight = true;\n div.classList.add(\"highlighted\");\n var casted_object = reset_casting([object])[0];\n DAYTOOL.updateEntity(casted_object);\n }\n\n static unhighlight(e: MouseEvent) {\n var target = e.target;\n var div = target.closest(\"[data-entity-id][data-entity-type]\");\n var entity_id = parseInt(div.getAttribute(\"data-entity-id\"));\n var entity_type = div.getAttribute(\"data-entity-type\");\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n object.highlight = false;\n div.classList.remove(\"highlighted\");\n var casted_object = reset_casting([object])[0];\n DAYTOOL.updateEntity(casted_object);\n }\n\n static togglePinned(e: MouseEvent) {\n var target = e.target;\n var div = target.closest(\"[data-entity-id][data-entity-type]\");\n var entity_id = parseInt(div.getAttribute(\"data-entity-id\"));\n var entity_type = div.getAttribute(\"data-entity-type\");\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n var casted_object = reset_casting([object])[0];\n if (casted_object.pinned) {\n casted_object.pinned = false;\n } else {\n casted_object.pinned = true;\n }\n\n if (casted_object.pinned) {\n // entity is now pinned - make sure its on clipboard\n if (document.querySelector('[data-entity-id=\"'+entity_id+'\"][data-entity-type=\"'+entity_type+'\"].entity_clipboard')) {\n // Already on clipboard - activate pinned icon\n var pills_to_update = document.querySelectorAll(\n `[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] [data-action=\"toggle_pinned\"]`\n );\n for (var x = 0; x < pills_to_update.length; x++) {\n pills_to_update[x].classList.add(\"active\");\n }\n } else {\n // add to overview for the day\n if (!DAYTOOL.clipboard.entities.at(-1).includes(casted_object.entity_id)) {\n DAYTOOL.clipboard.entities.at(-1).push(casted_object.entity_id);\n\n DAYTOOL.updateClipboard()\n .then((response) => {\n\n var cards_to_update = document.querySelectorAll(`[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"].entity_card`);\n daytool_injector.addToClipboardDOM(casted_object);\n\n var pills_to_update = document.querySelectorAll(\n `[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] [data-action=\"toggle_pinned\"]`\n );\n\n for (var x = 0; x < pills_to_update.length; x++) {\n pills_to_update[x].classList.add(\"active\");\n }\n for (var x = 0; x < cards_to_update.length; x++) {\n cards_to_update[x].classList.add(\"pinned\");\n }\n })\n .catch((error) => {\n console.error(\"Update failed:\", error);\n });\n }\n\n }\n } else {\n // entity is no longer pinned\n // make sure clipboard shows its no longer pinned\n if (document.querySelector('[data-entity-id=\"'+entity_id+'\"][data-entity-type=\"'+entity_type+'\"].entity_clipboard')) {\n var cards_to_update = document.querySelectorAll(`[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"].entity_card`);\n var clipboards_to_update = document.querySelectorAll(`[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"].entity_clipboard`);\n var pills_to_update = document.querySelectorAll(\n `[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] [data-action=\"toggle_pinned\"]`\n );\n\n for (var x = 0; x < cards_to_update.length; x++) {\n cards_to_update[x].classList.remove(\"pinned\");\n }\n for (var x = 0; x < clipboards_to_update.length; x++) {\n clipboards_to_update[x].classList.remove(\"pinned\");\n }\n }\n }\n\n }\n\n static clipboardNextDate() {\n var curr_date = new Date(input__clipboard_date.value);\n curr_date.setUTCDate(curr_date.getUTCDate() + 1);\n const yyyy = curr_date.getUTCFullYear();\n const mm = String(curr_date.getUTCMonth() + 1).padStart(2, \"0\"); // Months are 0-based\n const dd = String(curr_date.getUTCDate()).padStart(2, \"0\");\n const formattedDate = `${yyyy}-${mm}-${dd}`;\n new daytool_nav(\"d=\" + formattedDate);\n }\n static clipboardPreviousDate() {\n var curr_date = new Date(input__clipboard_date.value);\n curr_date.setUTCDate(curr_date.getUTCDate() - 1);\n const yyyy = curr_date.getUTCFullYear();\n const mm = String(curr_date.getUTCMonth() + 1).padStart(2, \"0\"); // Months are 0-based\n const dd = String(curr_date.getUTCDate()).padStart(2, \"0\");\n const formattedDate = `${yyyy}-${mm}-${dd}`;\n new daytool_nav(\"d=\" + formattedDate);\n }\n\n static togglePulse(e: MouseEvent) {\n var target = e.target;\n var div = target.closest(\"[data-entity-id]\");\n var entity_id = parseInt(div.getAttribute(\"data-entity-id\"));\n var entity_type = div.getAttribute(\"data-entity-type\");\n var object = DAYTOOL.getEntityByIdAndType(entity_id, entity_type);\n if (!modal_layer.classList.contains(\"show\")) {\n modal_toggle.click();\n }\n daytool_ui.switchModalView(\"pulse_section\");\n }\n\n static editNoteString(e: MouseEvent) {\n var target = e.target;\n var div = target.previousElementSibling;\n var card = div.closest(`[data-entity-id][data-entity-type]`);\n var entity_id = parseInt(card.getAttribute(\"data-entity-id\"));\n var entity_type = card.getAttribute(\"data-entity-type\");\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n object.note_string.push(div.value);\n var casted_object = reset_casting([object])[0];\n DAYTOOL.updateEntity(casted_object).then(()=>{\n var save_button = e.target;\n save_button.classList.remove(\"active\");\n });\n // Apply value to all other instances of field\n var object_DOMs = document.querySelectorAll(\n '[data-entity-id=\"' +\n entity_id +\n '\"][data-entity-type=\"' +\n entity_type +\n '\"] textarea.notes:not([data-action-parameter-attribute=\"new_clipboard_note\"])'\n );\n for (var i = 0; i < object_DOMs.length; i++) {\n var this_textarea = object_DOMs[i];\n if (this_textarea !== div) {\n if (parseInt(this_textarea.closest(`[data-entity-id]`).getAttribute('data-entity-id')) == entity_id &&\n this_textarea.closest(`[data-entity-type]`).getAttribute('data-entity-type') == entity_type\n ) {\n this_textarea.value = div.value;\n }\n }\n }\n }\n\n static editTitle(e: MouseEvent) {\n var target = e.target;\n var card = target.closest(`[data-entity-id][data-entity-type]`);\n var entity_id = parseInt(card.getAttribute(\"data-entity-id\"));\n var entity_type = card.getAttribute(\"data-entity-type\");\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n object.title.push(target.value);\n var casted_object = reset_casting([object])[0];\n DAYTOOL.updateEntity(casted_object);\n // Apply value to all other instances of field\n var object_DOMs = document.querySelectorAll(\n `[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] .entity_title textarea.title,\n [data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] .entity_title textarea.title`\n );\n for (var i = 0; i < object_DOMs.length; i++) {\n var this_textarea = object_DOMs[i];\n if (this_textarea !== target) {\n if (parseInt(this_textarea.closest(`[data-entity-id]`).getAttribute('data-entity-id')) == entity_id &&\n this_textarea.closest(`[data-entity-type]`).getAttribute('data-entity-type') == entity_type\n ) {\n this_textarea.value = target.value;\n }\n }\n }\n }\n\n static editPlanItemTitle(e: MouseEvent) {\n var target = e.target;\n var plan_item = target.closest(\"[data-plan-item-id]\");\n var card = target.closest(`[data-entity-id][data-entity-type]`);\n var entity_id = parseInt(card.getAttribute(\"data-entity-id\"));\n var entity_type = card.getAttribute(\"data-entity-type\");\n var plan_item_id = parseInt(plan_item.getAttribute(\"data-plan-item-id\"));\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n daytool_plan.getPlanItemById(object, plan_item_id).title.push(target.value);\n var casted_object = reset_casting([object])[0];\n DAYTOOL.updateEntity(casted_object);\n // Apply value to all other instances of field\n var object_DOMs = document.querySelectorAll(\n '[data-entity-id=\"' +\n entity_id +\n '\"][data-entity-type=\"' +\n entity_type +\n '\"] [data-plan-item-id=\"' +\n plan_item_id +\n '\"] textarea'\n );\n for (var i = 0; i < object_DOMs.length; i++) {\n var this_textarea = object_DOMs[i];\n if (this_textarea !== target) {\n if (parseInt(this_textarea.getAttribute('data-plan-item-id')) == plan_item_id\n ) {\n this_textarea.value = target.value;\n }\n }\n }\n }\n\n static editDescription(e: MouseEvent) {\n var target = e.target;\n var div = target.previousElementSibling;\n var card = div.closest(`[data-entity-id][data-entity-type]`);\n var entity_id = parseInt(card.getAttribute(\"data-entity-id\"));\n var entity_type = card.getAttribute(\"data-entity-type\");\n var object = DAYTOOL.getEntityByIdAndType(entity_id, entity_type);\n object.description.push(div.value);\n var casted_object = reset_casting([object])[0];\n DAYTOOL.updateEntity(casted_object).then(()=>{\n var save_button = e.target;\n save_button.classList.remove(\"active\");\n // card specific not clipboard specific\n var descriptions = document.querySelectorAll(`.entity_card[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] .card_body .description`);\n var enable = true;\n if (!( object.description.at(-1).length > 0)) {\n enable = false;\n }\n for (var d = 0; d < descriptions.length; d++) {\n var curr_des = descriptions[d];\n if (enable) {\n curr_des.classList.add('active');\n curr_des.querySelector(`.description_text`).innerHTML = div.value;\n } else {\n descriptions[d].classList.remove('active');\n }\n }\n });\n\n }\n\n static checklist_complete(e: MouseEvent) {\n var target = e.target;\n var plan_item = target.closest(\"[data-plan-item-id]\");\n var plan_item_id = parseInt(plan_item.getAttribute(\"data-plan-item-id\"));\n var div = target.closest(\"[data-entity-id][data-entity-type]\");\n var entity_id = parseInt(div.getAttribute(\"data-entity-id\"));\n var entity_type = div.getAttribute(\"data-entity-type\");\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n\n var activated = false;\n\n if (daytool_plan.getPlanItemById(object, plan_item_id).completed) {\n // make incomplete\n daytool_plan.getPlanItemById(object, plan_item_id).completed = false;\n } else {\n // make complete\n daytool_plan.getPlanItemById(object, plan_item_id).completed = true;\n activated = true;\n }\n\n // Save\n var casted_object = reset_casting([object])[0];\n DAYTOOL.updateEntity(casted_object).then(() => {\n // Reflect\n if (activated) {\n var object_DOMs = document.querySelectorAll(`[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] [data-plan-item-id=\"${plan_item_id}\"] [data-action=\"checklist_complete\"]`);\n for (var i = 0; i < object_DOMs.length; i++) {\n var this_pill = object_DOMs[i];\n this_pill.classList.add(\"active\");\n }\n } else {\n var object_DOMs = document.querySelectorAll(`[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] [data-plan-item-id=\"${plan_item_id}\"] [data-action=\"checklist_complete\"]`);\n for (var i = 0; i < object_DOMs.length; i++) {\n var this_pill = object_DOMs[i];\n this_pill.classList.remove(\"active\");\n }\n }\n });\n }\n\n static checklist_remove(e: MouseEvent) {\n var target = e.target;\n var plan_item = target.closest(\"[data-plan-item-id]\");\n var plan_item_id = parseInt(plan_item.getAttribute(\"data-plan-item-id\"));\n var div = target.closest(\"[data-entity-id][data-entity-type]\");\n var entity_id = parseInt(div.getAttribute(\"data-entity-id\"));\n var entity_type = div.getAttribute(\"data-entity-type\");\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n var plan_item_object = daytool_plan.getPlanItemById(object, plan_item_id);\n object.checklist\n .at(-1)\n .splice(object.checklist.at(-1).indexOf(plan_item_object), 1);\n var casted_object = reset_casting([object])[0];\n DAYTOOL.updateEntity(casted_object).then(() => {\n var object_DOMs = document.querySelectorAll(`[data-entity-id=\"${entity_id}\"][data-entity-type=\"${entity_type}\"] [data-plan-item-id=\"${plan_item_id}\"]`);\n for (var i = 0; i < object_DOMs.length; i++) {\n var this_plan_item = object_DOMs[i].parentNode;\n this_plan_item.classList.add(\"fadeOut\");\n setTimeout(() => {\n this_plan_item.remove();\n }, 500);\n }\n });\n }\n\n static delete_entity_prompt(e: MouseEvent) {\n var target = e.target;\n var div = target.closest(\"[data-entity-id][data-entity-type]\");\n var entity_id = parseInt(div.getAttribute(\"data-entity-id\"));\n var entity_type = div.getAttribute(\"data-entity-type\");\n var object = (\n DAYTOOL.getEntityByIdAndType(entity_id, entity_type)\n );\n var delete_entity_prompt = document.getElementById(\"delete_entity_prompt\");\n\n var type_text = delete_entity_prompt.querySelector(`b#entity_type`);\n var entity_being_removed = delete_entity_prompt.querySelector(`#entity_being_removed`);\n var confirmation_pill = delete_entity_prompt.querySelector(`[data-action=\"delete\"]`);\n type_text.innerHTML = (object.type[0].toUpperCase() + object.type.slice(1)).slice(0, -1);\n entity_being_removed.innerHTML = daytool_templates.Card(\"remove_view\", object);\n confirmation_pill.setAttribute('data-entity-id', (object.id).toString());\n confirmation_pill.setAttribute('data-entity-type', object.type);\n daytool_ui.switchModalView(\"delete_entity_prompt\");\n modal_toggle.click();\n reset_actions(delete_entity_prompt);\n\n }\n\n // Event Settings\n // Section controllers\n static event_settings__all_day_check(e: MouseEvent) {\n var target = e.target;\n var container = document.querySelector(\"#event_start_time_hour\").closest('.pill_container');\n var container_2 = document.querySelector(\"#event_end_time_hour\").closest('.pill_container');\n if (target.checked) {\n container.classList.add('d-none');\n container_2.classList.add('d-none');\n } else {\n container.classList.remove('d-none');\n container_2.classList.remove('d-none');\n }\n }\n\n static event_settings__toggle_repetition(e: MouseEvent) {\n var target = e.target;\n var container = document.querySelector(\".repetition_period_count\").parentNode;\n var container_2 = document.querySelector(\".repetition_start_title\").parentNode;\n var container_3 = document.querySelector(\".repetition_end_title\").parentNode;\n if (target.checked) {\n container.classList.remove('d-none');\n container_2.classList.remove('d-none');\n container_3.classList.remove('d-none');\n } else {\n container.classList.add('d-none');\n container_2.classList.add('d-none');\n container_3.classList.add('d-none');\n }\n }\n\n static event_settings__toggle_recurrence_start(e: MouseEvent) {\n var target = e.target;\n var container = document.querySelector(\".recurrence_start_date\").parentNode;\n if (target.checked) {\n container.classList.add('d-none');\n } else {\n container.classList.remove('d-none');\n }\n }\n\n static event_settings__toggle_recurrence_end(e: MouseEvent) {\n var target = e.target;\n var container = document.querySelector(\".recurrence_end_date\").parentNode;\n if (target.checked) {\n container.classList.remove('d-none');\n } else {\n container.classList.add('d-none');\n }\n }\n\n static event_settings__event_start_time_hour(e: MouseEvent) {\n\n }\n static event_settings__event_start_time_minute(e: MouseEvent) {\n\n }\n static event_settings__event_start_time_ampm(e: MouseEvent) {\n\n }\n\n static event_settings__event_end_time_hour(e: MouseEvent) {\n\n }\n static event_settings__event_end_time_minute(e: MouseEvent) {\n\n }\n static event_settings__event_end_time_ampm(e: MouseEvent) {\n\n }\n\n\n static event_settings__repetition_period_count(e: MouseEvent) {\n\n }\n static event_settings__repetition_period(e: MouseEvent) {\n\n }\n static event_settings__week_pattern(e: MouseEvent) {\n\n }\n\n static event_settings__recurrence_end_repetition_number(e: MouseEvent) {\n\n }\n static event_settings__event_settings_save(e: MouseEvent) {\n\n }\n\n\n static add(targetDiv: HTMLElement) {\n var div = targetDiv.closest(\"[data-action-parameter-entity-type]\");\n var entityType = div.getAttribute(\"data-action-parameter-entity-type\");\n var new_entity:\n | daytool_event\n | daytool_plan\n | daytool_need\n | daytool_goal\n | daytool_case\n | daytool_feed\n | daytool_note\n | daytool_stat\n | daytool_person;\n switch (entityType) {\n case \"cases\":\n new_entity = new daytool_case();\n break;\n case \"goals\":\n new_entity = new daytool_goal();\n var first_objective = new daytool_plan();\n first_objective.icon.push(\"goals\");\n first_objective.title.push(\"New Objective\");\n first_objective.imported = true;\n DAYTOOL.addEntity(first_objective);\n new_entity.primary_objectives_plan_entity_id = [first_objective.entity_id];\n break;\n case \"stats\":\n new_entity = new daytool_stat();\n break;\n case \"needs\":\n new_entity = new daytool_need();\n break;\n case \"notes\":\n new_entity = new daytool_note();\n break;\n case \"events\":\n var icalId = targetDiv.getAttribute(\"data-ical-id\");\n var startTimestamp = targetDiv.getAttribute(\"data-start-timestamp\");\n var endTimestamp = targetDiv.getAttribute(\"data-end-timestamp\");\n new_entity = new daytool_event(\n icalId,\n parseInt(startTimestamp),\n parseInt(endTimestamp)\n );\n break;\n case \"persons\":\n new_entity = new daytool_person();\n break;\n case \"plans\":\n new_entity = new daytool_plan();\n break;\n }\n\n new_entity.imported = true;\n DAYTOOL.addEntity(new_entity);\n }\n\n static add_note_to_note(targetDiv: HTMLElement) {\n var div = targetDiv.closest(`[data-entity-id][data-entity-type]`);\n var id = parseInt(div.getAttribute(\"data-entity-id\"));\n var type = div.getAttribute(\"data-entity-type\");\n var object = DAYTOOL.getEntityByIdAndType(id, type);\n var current_notes_length = daytool_injector.fetchEntityNotes(object).length;\n var new_note = new daytool_note();\n new_note.title.push( (current_notes_length + 1).toString()+ '/x ' + object.title.at(-1));\n object.links.push(new_note.entity_id);\n DAYTOOL.clipboard.entities.at(-1).push(new_note.entity_id);\n\n new_note.imported = true;\n DAYTOOL.addEntity(new_note).then(() => { DAYTOOL.updateClipboard()\n }).then(() => { daytool_injector.addToClipboardDOM(new_note);\n }).then(() => {DAYTOOL.updateEntity(object);});\n\n\n\n var newElement = document.createElement(\"div\");\n newElement.innerHTML = `${daytool_templates.Card(\n \"linked_note\",\n DAYTOOL.getEntityByObjectEntityId(new_note.entity_id)\n )}`;\n var newElementNode = newElement.childNodes[0].cloneNode(true);\n\n\n\n if (document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .section_container.notes`\n )) {\n document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .section_container.notes`\n ).appendChild(newElementNode);\n }\n\n document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .section_container.notes .no_notes`\n ).classList.add('fadeOut');\n\n // TODO: link bar should now have this note\n // var cards_to_update = document.querySelectorAll(\n // `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_card .primary_targets`\n // );\n // for (var c = 0; c < cards_to_update.length; c++) {\n // var newElementNodeNew = newElementNode.cloneNode(true);\n // cards_to_update[c].appendChild(newElementNodeNew);\n // reset_actions(cards_to_update[c].lastChild);\n // }\n reset_actions(\n (\n document.querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .section_container.notes`\n ).lastChild\n )\n );\n\n\n }\n\n static add_to_goal_primary(targetDiv: HTMLElement) {\n var div = targetDiv.closest(`[data-entity-id][data-entity-type]`);\n var id = parseInt(div.getAttribute(\"data-entity-id\"));\n var type = div.getAttribute(\"data-entity-type\");\n var object = DAYTOOL.getEntityByIdAndType(id, type);\n var new_objective = new daytool_plan();\n new_objective.icon.push(\"goals\");\n new_objective.title.push(\"New Objective\");\n object.primary_objectives_plan_entity_id.push(new_objective.entity_id);\n DAYTOOL.clipboard.entities.at(-1).push(new_objective.entity_id);\n\n new_objective.imported = true;\n DAYTOOL.addEntity(new_objective).then(() => { DAYTOOL.updateClipboard()\n }).then(() => { daytool_injector.addToClipboardDOM(new_objective);\n }).then(() => {DAYTOOL.updateEntity(object);});\n\n\n\n var newElement = document.createElement(\"div\");\n newElement.innerHTML = `${daytool_templates.Card(\n \"goal_view primary_objective\",\n DAYTOOL.getEntityByObjectEntityId(object.primary_objectives_plan_entity_id.at(-1))\n )}`;\n var newElementNode = newElement.childNodes[0].cloneNode(true);\n\n\n\n if (document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .primary .subsection_items`\n )) {\n document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .primary .subsection_items`\n ).appendChild(newElementNode);\n }\n\n\n var cards_to_update = document.querySelectorAll(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_card .primary_targets`\n );\n for (var c = 0; c < cards_to_update.length; c++) {\n var newElementNodeNew = newElementNode.cloneNode(true);\n cards_to_update[c].appendChild(newElementNodeNew);\n reset_actions(cards_to_update[c].lastChild);\n }\n reset_actions(\n (\n document.querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .primary .subsection_items`\n ).lastChild\n )\n );\n\n\n }\n\n static add_to_goal_secondary(targetDiv: HTMLElement) {\n var div = targetDiv.closest(`[data-entity-id][data-entity-type]`);\n var id = parseInt(div.getAttribute(\"data-entity-id\"));\n var type = div.getAttribute(\"data-entity-type\");\n var object = DAYTOOL.getEntityByIdAndType(id, type);\n var new_objective = new daytool_plan();\n new_objective.icon.push(\"goals\");\n new_objective.title.push(\"New Milestone\");\n object.secondary_objectives_plan_entity_id.push(new_objective.entity_id);\n DAYTOOL.clipboard.entities.at(-1).push(new_objective.entity_id);\n\n new_objective.imported = true;\n DAYTOOL.addEntity(new_objective).then(() => { DAYTOOL.updateClipboard()\n }).then(() => { daytool_injector.addToClipboardDOM(new_objective);\n }).then(() => {DAYTOOL.updateEntity(object);});\n\n\n\n var newElement = document.createElement(\"div\");\n newElement.innerHTML = `${daytool_templates.Card(\n \"goal_view secondary_objective\",\n DAYTOOL.getEntityByObjectEntityId(object.secondary_objectives_plan_entity_id.at(-1))\n )}`;\n var newElementNode = newElement.childNodes[0].cloneNode(true);\n\n if (document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .secondary .subsection_items`\n )) {\n document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .secondary .subsection_items`\n ).appendChild(newElementNode);\n }\n\n\n var cards_to_update = document.querySelectorAll(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_card .secondary_targets`\n );\n for (var c = 0; c < cards_to_update.length; c++) {\n var newElementNodeNew = newElementNode.cloneNode(true);\n cards_to_update[c].appendChild(newElementNodeNew);\n reset_actions(cards_to_update[c].lastChild);\n }\n reset_actions(\n (\n document.querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .secondary .subsection_items`\n ).lastChild\n )\n );\n\n\n }\n\n static add_to_goal_bonus(targetDiv: HTMLElement) {\n var div = targetDiv.closest(`[data-entity-id][data-entity-type]`);\n var id = parseInt(div.getAttribute(\"data-entity-id\"));\n var type = div.getAttribute(\"data-entity-type\");\n var object = DAYTOOL.getEntityByIdAndType(id, type);\n var new_objective = new daytool_plan();\n new_objective.icon.push(\"goals\");\n new_objective.title.push(\"New Bonus Target\");\n object.bonus_objectives_plan_entity_id.push(new_objective.entity_id);\n DAYTOOL.clipboard.entities.at(-1).push(new_objective.entity_id);\n\n new_objective.imported = true;\n DAYTOOL.addEntity(new_objective).then(() => { DAYTOOL.updateClipboard()\n }).then(() => { daytool_injector.addToClipboardDOM(new_objective);\n }).then(() => {DAYTOOL.updateEntity(object);});\n\n\n\n var newElement = document.createElement(\"div\");\n newElement.innerHTML = `${daytool_templates.Card(\n \"goal_view bonus_objective\",\n DAYTOOL.getEntityByObjectEntityId(object.bonus_objectives_plan_entity_id.at(-1))\n )}`;\n var newElementNode = newElement.childNodes[0].cloneNode(true);\n\n if (document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .bonus .subsection_items`\n )) {\n document\n .querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .bonus .subsection_items`\n ).appendChild(newElementNode);\n }\n\n\n var cards_to_update = document.querySelectorAll(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_card .bonus_targets`\n );\n for (var c = 0; c < cards_to_update.length; c++) {\n var newElementNodeNew = newElementNode.cloneNode(true);\n cards_to_update[c].appendChild(newElementNodeNew);\n reset_actions(cards_to_update[c].lastChild);\n }\n reset_actions(\n (\n document.querySelector(\n `[data-entity-id=\"${id}\"][data-entity-type=\"${type}\"].entity_clipboard .bonus .subsection_items`\n ).lastChild\n )\n );\n\n\n }\n\n static add_to_plan(targetDiv: HTMLElement) {\n var div = targetDiv.closest(`[data-entity-id][data-entity-type]`);\n var id = parseInt(div.getAttribute(\"data-entity-id\"));\n var type = div.getAttribute(\"data-entity-type\");\n daytool_plan.addToPlan(id, type);\n }\n\n static section_change(\n type: string,\n item: string,\n entity_id: number,\n entity_type: string\n ) {\n if (type == \"clipboard\") {\n var itemToActivate = item;\n var section_labels = document.querySelectorAll(\n '[data-entity-id=\"' +\n entity_id +\n '\"][data-entity-type=\"' +\n entity_type +\n '\"] .section_label[data-action-parameter-option-type=\"clipboard\"]'\n );\n var sections = document.querySelectorAll(\n '[data-entity-id=\"' +\n entity_id +\n '\"][data-entity-type=\"' +\n entity_type +\n '\"] .sections .section'\n );\n for (var i = 0; i < sections.length; i++) {\n if (sections[i].classList.contains(itemToActivate)) {\n sections[i].classList.add(\"active\");\n section_labels[i].classList.add(\"active\");\n } else {\n sections[i].classList.remove(\"active\");\n section_labels[i].classList.remove(\"active\");\n }\n }\n }\n }\n static switchModalView(view_name: string) {\n var sections = document.querySelectorAll(\"section[data-modal-state]\");\n for (var i = 0; i < sections.length; i++) {\n sections[i].setAttribute(\"data-modal-state\", \"disabled\");\n }\n var selected_modal = document.getElementById(view_name);\n selected_modal.setAttribute(\"data-modal-state\", \"enabled\");\n }\n static openIconOptions(\n entity_id: number,\n entity_type: string,\n repetition_number: number\n ) {\n var current_card = DAYTOOL.getEntityCardsById(\n entity_id,\n repetition_number\n )[0];\n var entity = DAYTOOL.getEntityByIdAndType(entity_id, entity_type);\n var head = current_card.getElementsByClassName(\"head\")[0];\n if (!head.getElementsByClassName(\"head_icon_set\")[0]) {\n // Generate card icon set\n var head_icon_set = document.createElement(\"template\");\n\n var icons: string[] = [];\n switch (entity_type) {\n case \"needs\":\n icons = [\n \"needs\",\n \"food\",\n \"home\",\n \"family\",\n \"career\",\n \"sleep\",\n \"health\",\n \"friends\",\n \"fun\",\n ];\n break;\n case \"goals\":\n icons = [\n \"goal\",\n \"milestones\",\n \"experience\",\n \"options\",\n \"terms\",\n \"timing\",\n ];\n break;\n case \"persons\":\n icons = [\n \"family\",\n \"fun\",\n \"friends\",\n \"food\",\n \"home\",\n \"career\",\n \"health\",\n \"experience\",\n \"goal\",\n \"terms\",\n \"contacts\",\n ];\n break;\n }\n\n var icon_set_html = \"\";\n for (var i = 0; i < icons.length; i++) {\n icon_set_html += ``;\n }\n\n head_icon_set.innerHTML = `
${icon_set_html}
`;\n head.append(head_icon_set.content);\n } else {\n head.getElementsByClassName(\"head_icon_set\")[0].remove();\n }\n }\n static setCardIcon(\n entity_id: number,\n entity_type: string,\n repetition_number: number,\n img: HTMLAnchorElement\n ) {\n var src = img.children[0].getAttribute(\"src\");\n var cardDIV = DAYTOOL.getEntityCardsById(entity_id, repetition_number)[0];\n var entity = DAYTOOL.getEntityByIdAndType(entity_id, entity_type);\n var icon = cardDIV.getElementsByClassName(\"icon\")[0];\n if (src != null) {\n if (icon) {\n icon.children[0].setAttribute(\"src\", src);\n }\n entity?.icon.push(\n src\n .replace(\"themes/custom/demitool/images/icons/\", \"\")\n .replace(\".svg\", \"\")\n );\n if (entity instanceof daytool_need) {\n needsService.update(entity.id, entity);\n } else if (entity instanceof daytool_goal) {\n goalsService.update(entity.id, entity);\n } else if (entity instanceof daytool_event) {\n eventsService.update(entity.id, entity);\n } else if (entity instanceof daytool_plan) {\n plansService.update(entity.id, entity);\n } else if (entity instanceof daytool_case) {\n casesService.update(entity.id, entity);\n } else if (entity instanceof daytool_feed) {\n feedsService.update(entity.id, entity);\n } else if (entity instanceof daytool_note) {\n notesService.update(entity.id, entity);\n } else if (entity instanceof daytool_stat) {\n statsService.update(entity.id, entity);\n } else if (entity instanceof daytool_person) {\n personsService.update(entity.id, entity);\n }\n daytool_ui.openIconOptions(entity_id, entity_type, repetition_number);\n }\n }\n\n static expand(expandSelector: string) {\n var element = document.querySelector(expandSelector);\n element.classList.toggle(\"expanded\");\n }\n static externalLink(actionParameterHref: string) {\n window.open(actionParameterHref, \"_blank\");\n }\n static addOptions(entity_type: string) {\n daytool_ui.switchModalView(\"add_options_modal\");\n var add_options_modal = document.getElementById(\"add_options_modal\");\n var add_option_sections =\n add_options_modal.querySelectorAll(\".add_options\");\n\n for (var c = 0; c < add_option_sections.length; c++) {\n if (add_option_sections[c].classList.contains(entity_type)) {\n add_option_sections[c].classList.add(\"active\");\n } else {\n add_option_sections[c].classList.remove(\"active\");\n }\n }\n }\n\n static async import(src: string) {\n if (src == \"google\") {\n await getAllCalendarsEvents().then((value) => {\n daytool.importGoogleEvents();\n });\n } else if (src == \"microsoft\") {\n await microsoftReturnCalendars().then((value) => {\n daytool.importMicrosoftEvents();\n });\n } else if (src == \"file\") {\n }\n }\n\n static delete(\n entity_id: number,\n entity_type: string\n ) {\n var entity = DAYTOOL.getEntityByIdAndType(entity_id, entity_type);\n if (entity != null) {\n DAYTOOL.deleleEntity(entity);\n }\n }\n\n static rejectEntityDeletion(entity_id: number, repetition_number: null) {\n var DIV = DAYTOOL.getEntityCardsById(entity_id, repetition_number)[0];\n var confirm_cancellation = DIV.getElementsByClassName(\n \"confirm_cancellation\"\n )[0];\n confirm_cancellation.remove();\n }\n\n static open_event_repetition_weekly_frequency_pattern(e: MouseEvent) {\n var mouseEventDiv = e.target;\n var current_card = mouseEventDiv.closest(\".card\");\n var event_time_repetition_div = (\n current_card.getElementsByClassName(\"event_time_repetition\")[0]\n );\n var event_time_repetition = event_time_repetition_div.selectedIndex;\n var event_time_repetition_week = current_card.getElementsByClassName(\n \"event_time_repetition_week\"\n )[0];\n var event_time_repetition_end_date = current_card.getElementsByClassName(\n \"event_time_repetition_end_date\"\n )[0];\n if (event_time_repetition == 2) {\n event_time_repetition_week.classList.add(\"active\");\n } else {\n event_time_repetition_week.classList.remove(\"active\");\n }\n if (event_time_repetition > 0) {\n event_time_repetition_end_date.classList.add(\"active\");\n } else {\n event_time_repetition_end_date.classList.remove(\"active\");\n }\n }\n\n static show_section(e: HTMLElement, section_type: string) {\n var body = e.closest(\".body\");\n var subsection = body.getElementsByClassName(section_type + \"_section\")[0];\n var button = body.getElementsByClassName(section_type + \"_button\")[0];\n\n if (subsection.classList.contains(\"selected\")) {\n // already selected - do nothing\n } else {\n for (\n var i = 0;\n i < body.getElementsByClassName(\"second_row_button\").length;\n i++\n ) {\n body\n .getElementsByClassName(\"second_row_button\")\n [i].classList.remove(\"selected\");\n body\n .getElementsByClassName(\"body_subsection\")\n [i].classList.remove(\"selected\");\n }\n\n subsection.classList.add(\"selected\");\n button.classList.add(\"selected\");\n }\n }\n\n static change_rating(target: MouseEvent, id: number) {\n if (target instanceof Node && target instanceof HTMLElement) {\n var parent = target.parentNode;\n if (parent instanceof HTMLElement) {\n var icons = parent.getElementsByTagName(\"A\");\n var input = parent.getElementsByTagName(\"INPUT\")[0];\n if (icons.length == 5) {\n for (var i = 0; i < icons.length; i++) {\n icons[i].classList.add(\"transparent\");\n }\n\n for (var i = 0; i < icons.length; i++) {\n if (i <= id) {\n icons[i].classList.remove(\"transparent\");\n }\n }\n }\n input.setAttribute(\"value\", id.toString());\n }\n }\n }\n\n static change_AMPM(e: HTMLInputElement) {\n if (e.value == \"PM\") {\n e.value = \"AM\";\n } else {\n e.value = \"PM\";\n }\n }\n}\n\nexport class daytool_feed_ui {\n static disevent_feed_notes_changes() {}\n}\n"]}